diff --git a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorGroupServiceApi.java b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorGroupServiceApi.java index 8c9ff4b4004c..fecd24c11af0 100644 --- a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorGroupServiceApi.java +++ b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorGroupServiceApi.java @@ -42,28 +42,27 @@ * * *
Note: close() needs to be called on the errorGroupServiceApi object to clean up resources such - * as threads. In the example above, try-with-resources is used, which automatically calls - * close(). + * 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: + *
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. + *
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 ErrorGroupServiceSettings to * create(). For example: @@ -90,43 +89,31 @@ public class ErrorGroupServiceApi implements AutoCloseable { private static final PathTemplate GROUP_PATH_TEMPLATE = PathTemplate.createWithoutUrlEncoding("projects/{project}/groups/{group}"); - /** - * Formats a string containing the fully-qualified path to represent - * a group resource. - */ + /** Formats a string containing the fully-qualified path to represent a group resource. */ public static final String formatGroupName(String project, String group) { return GROUP_PATH_TEMPLATE.instantiate( "project", project, "group", group); } - /** - * Parses the project from the given fully-qualified path which - * represents a group resource. - */ + /** Parses the project from the given fully-qualified path which represents a group resource. */ public static final String parseProjectFromGroupName(String groupName) { return GROUP_PATH_TEMPLATE.parse(groupName).get("project"); } - /** - * Parses the group from the given fully-qualified path which - * represents a group resource. - */ + /** Parses the group from the given fully-qualified path which represents a group resource. */ public static final String parseGroupFromGroupName(String groupName) { return GROUP_PATH_TEMPLATE.parse(groupName).get("group"); } - /** - * Constructs an instance of ErrorGroupServiceApi with default settings. - */ + /** Constructs an instance of ErrorGroupServiceApi with default settings. */ public static final ErrorGroupServiceApi create() throws IOException { return create(ErrorGroupServiceSettings.defaultBuilder().build()); } /** - * Constructs an instance of ErrorGroupServiceApi, using the given settings. - * The channels are created based on the settings passed in, or defaults for any - * settings that are not set. + * Constructs an instance of ErrorGroupServiceApi, 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 ErrorGroupServiceApi create(ErrorGroupServiceSettings settings) throws IOException { @@ -134,9 +121,8 @@ public static final ErrorGroupServiceApi create(ErrorGroupServiceSettings settin } /** - * Constructs an instance of ErrorGroupServiceApi, using the given settings. - * This is protected so that it easy to make a subclass, but otherwise, the static - * factory methods should be preferred. + * Constructs an instance of ErrorGroupServiceApi, using the given settings. This is protected so + * that it easy to make a subclass, but otherwise, the static factory methods should be preferred. */ protected ErrorGroupServiceApi(ErrorGroupServiceSettings settings) throws IOException { this.settings = settings; @@ -176,7 +162,8 @@ public final ErrorGroupServiceSettings getSettings() { /** * Get the specified group. * - * Sample code: + *
Sample code: + * *
* try (ErrorGroupServiceApi errorGroupServiceApi = ErrorGroupServiceApi.create()) {
* String formattedGroupName = ErrorGroupServiceApi.formatGroupName("[PROJECT]", "[GROUP]");
@@ -185,13 +172,11 @@ public final ErrorGroupServiceSettings getSettings() {
*
*
* @param groupName [Required] The group resource name. Written as
- * <code>projects/<var>projectID</var>/groups/<var>group_name</var></code>.
- * Call
- * <a href="/error-reporting/reference/rest/v1beta1/projects.groupStats/list">
- * <code>groupStats.list</code></a> to return a list of groups belonging to
- * this project.
- *
- * Example: <code>projects/my-project-123/groups/my-group</code>
+ * <code>projects/<var>projectID</var>/groups/<var>group_name</var></code>.
+ * Call <a href="/error-reporting/reference/rest/v1beta1/projects.groupStats/list">
+ * <code>groupStats.list</code></a> to return a list of groups belonging to
+ * this project.
+ * Example: <code>projects/my-project-123/groups/my-group</code> * @throws com.google.api.gax.grpc.ApiException if the remote call fails */ public final ErrorGroup getGroup(String groupName) { @@ -204,7 +189,8 @@ public final ErrorGroup getGroup(String groupName) { /** * Get the specified group. * - * Sample code: + *
Sample code: + * *
* try (ErrorGroupServiceApi errorGroupServiceApi = ErrorGroupServiceApi.create()) {
* String formattedGroupName = ErrorGroupServiceApi.formatGroupName("[PROJECT]", "[GROUP]");
@@ -226,7 +212,8 @@ private final ErrorGroup getGroup(GetGroupRequest request) {
/**
* Get the specified group.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ErrorGroupServiceApi errorGroupServiceApi = ErrorGroupServiceApi.create()) {
* String formattedGroupName = ErrorGroupServiceApi.formatGroupName("[PROJECT]", "[GROUP]");
@@ -245,10 +232,10 @@ public final ApiCallable getGroupCallable() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Replace the data for the specified group.
- * Fails if the group does not exist.
+ * Replace the data for the specified group. Fails if the group does not exist.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (ErrorGroupServiceApi errorGroupServiceApi = ErrorGroupServiceApi.create()) {
* ErrorGroup group = ErrorGroup.newBuilder().build();
@@ -266,10 +253,10 @@ public final ErrorGroup updateGroup(ErrorGroup group) {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Replace the data for the specified group.
- * Fails if the group does not exist.
+ * Replace the data for the specified group. Fails if the group does not exist.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (ErrorGroupServiceApi errorGroupServiceApi = ErrorGroupServiceApi.create()) {
* ErrorGroup group = ErrorGroup.newBuilder().build();
@@ -289,10 +276,10 @@ private final ErrorGroup updateGroup(UpdateGroupRequest request) {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Replace the data for the specified group.
- * Fails if the group does not exist.
+ * Replace the data for the specified group. Fails if the group does not exist.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (ErrorGroupServiceApi errorGroupServiceApi = ErrorGroupServiceApi.create()) {
* ErrorGroup group = ErrorGroup.newBuilder().build();
diff --git a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorGroupServiceSettings.java b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorGroupServiceSettings.java
index f591c034ca78..4dc8bbeae7f1 100644
--- a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorGroupServiceSettings.java
+++ b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorGroupServiceSettings.java
@@ -16,7 +16,6 @@
import com.google.api.gax.core.ConnectionSettings;
import com.google.api.gax.core.RetrySettings;
import com.google.api.gax.grpc.ApiCallSettings;
-import com.google.api.gax.grpc.PageStreamingDescriptor;
import com.google.api.gax.grpc.ServiceApiSettings;
import com.google.api.gax.grpc.SimpleCallSettings;
import com.google.auth.Credentials;
@@ -43,15 +42,15 @@
* The default instance has everything set to sensible defaults:
*
*
- * - The default service address (clouderrorreporting.googleapis.com) and default port (443)
- * are used.
- *
- Credentials are acquired automatically through Application Default Credentials.
- *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
- The default service address (clouderrorreporting.googleapis.com) and default port (443) are
+ * used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
*
*
- * 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 getGroup to 30 seconds:
+ *
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 getGroup to 30 seconds:
*
*
*
@@ -65,25 +64,17 @@
*/
@javax.annotation.Generated("by GAPIC")
public class ErrorGroupServiceSettings extends ServiceApiSettings {
- /**
- * The default address of the service.
- */
+ /** The default address of the service. */
private static final String DEFAULT_SERVICE_ADDRESS = "clouderrorreporting.googleapis.com";
- /**
- * The default port of the service.
- */
+ /** The default port of the service. */
private static final int DEFAULT_SERVICE_PORT = 443;
- /**
- * The default scopes of the service.
- */
+ /** The default scopes of the service. */
private static final ImmutableList DEFAULT_SERVICE_SCOPES =
ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
- /**
- * The default connection settings of the service.
- */
+ /** The default connection settings of the service. */
public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS =
ConnectionSettings.newBuilder()
.setServiceAddress(DEFAULT_SERVICE_ADDRESS)
@@ -94,58 +85,42 @@ public class ErrorGroupServiceSettings extends ServiceApiSettings {
private final SimpleCallSettings getGroupSettings;
private final SimpleCallSettings updateGroupSettings;
- /**
- * Returns the object with the settings used for calls to getGroup.
- */
+ /** Returns the object with the settings used for calls to getGroup. */
public SimpleCallSettings getGroupSettings() {
return getGroupSettings;
}
- /**
- * Returns the object with the settings used for calls to updateGroup.
- */
+ /** Returns the object with the settings used for calls to updateGroup. */
public SimpleCallSettings updateGroupSettings() {
return updateGroupSettings;
}
- /**
- * Returns the default service address.
- */
+ /** Returns the default service address. */
public static String getDefaultServiceAddress() {
return DEFAULT_SERVICE_ADDRESS;
}
- /**
- * Returns the default service port.
- */
+ /** Returns the default service port. */
public static int getDefaultServicePort() {
return DEFAULT_SERVICE_PORT;
}
- /**
- * Returns the default service scopes.
- */
+ /** Returns the default service scopes. */
public static ImmutableList getDefaultServiceScopes() {
return DEFAULT_SERVICE_SCOPES;
}
- /**
- * Returns a builder for this class with recommended defaults.
- */
+ /** Returns a builder for this class with recommended defaults. */
public static Builder defaultBuilder() {
return Builder.createDefault();
}
- /**
- * Returns a new builder for this class.
- */
+ /** Returns a new builder for this class. */
public static Builder newBuilder() {
return new Builder();
}
- /**
- * Returns a builder containing all the values of this settings class.
- */
+ /** Returns a builder containing all the values of this settings class. */
public Builder toBuilder() {
return new Builder(this);
}
@@ -163,9 +138,7 @@ private ErrorGroupServiceSettings(Builder settingsBuilder) throws IOException {
updateGroupSettings = settingsBuilder.updateGroupSettings().build();
}
- /**
- * Builder for ErrorGroupServiceSettings.
- */
+ /** Builder for ErrorGroupServiceSettings. */
public static class Builder extends ServiceApiSettings.Builder {
private final ImmutableList methodSettingsBuilders;
@@ -289,25 +262,20 @@ public Builder setClientLibHeader(String name, String version) {
}
/**
- * Applies the given settings to all of the API methods in this service. Only
- * values that are non-null will be applied, so this method is not capable
- * of un-setting any values.
+ * Applies the given settings to all of the API methods in this service. Only values that are
+ * non-null will be applied, so this method is not capable of un-setting any values.
*/
public Builder applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings) throws Exception {
super.applyToAllApiMethods(methodSettingsBuilders, apiCallSettings);
return this;
}
- /**
- * Returns the builder for the settings used for calls to getGroup.
- */
+ /** Returns the builder for the settings used for calls to getGroup. */
public SimpleCallSettings.Builder getGroupSettings() {
return getGroupSettings;
}
- /**
- * Returns the builder for the settings used for calls to updateGroup.
- */
+ /** Returns the builder for the settings used for calls to updateGroup. */
public SimpleCallSettings.Builder updateGroupSettings() {
return updateGroupSettings;
}
diff --git a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorStatsServiceApi.java b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorStatsServiceApi.java
index c2a79541d076..f333c555e500 100644
--- a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorStatsServiceApi.java
+++ b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorStatsServiceApi.java
@@ -50,28 +50,27 @@
*
*
* Note: close() needs to be called on the errorStatsServiceApi object to clean up resources such
- * as threads. In the example above, try-with-resources is used, which automatically calls
- * close().
+ * 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:
+ *
The surface of this class includes several types of Java methods for each of the API's
+ * methods:
*
*
- * - A "flattened" method. With this type of method, the fields of the request type have been
- * converted into function parameters. It may be the case that not all fields are available
- * as parameters, and not every API method will have a flattened method entry point.
- *
- A "request object" method. This type of method only takes one parameter, a request
- * object, which must be constructed before the call. Not every API method will have a request
- * object method.
- *
- A "callable" method. This type of method takes no parameters and returns an immutable
- * ApiCallable object, which can be used to initiate calls to the service.
+ *
- A "flattened" method. With this type of method, the fields of the request type have been
+ * converted into function parameters. It may be the case that not all fields are available as
+ * parameters, and not every API method will have a flattened method entry point.
+ *
- A "request object" method. This type of method only takes one parameter, a request object,
+ * which must be constructed before the call. Not every API method will have a request object
+ * method.
+ *
- A "callable" method. This type of method takes no parameters and returns an immutable
+ * ApiCallable object, which can be used to initiate calls to the service.
*
*
* 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.
+ *
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 ErrorStatsServiceSettings to
* create(). For example:
@@ -106,33 +105,24 @@ public class ErrorStatsServiceApi implements AutoCloseable {
private static final PathTemplate PROJECT_PATH_TEMPLATE =
PathTemplate.createWithoutUrlEncoding("projects/{project}");
- /**
- * Formats a string containing the fully-qualified path to represent
- * a project resource.
- */
+ /** Formats a string containing the fully-qualified path to represent a project resource. */
public static final String formatProjectName(String project) {
return PROJECT_PATH_TEMPLATE.instantiate("project", project);
}
- /**
- * Parses the project from the given fully-qualified path which
- * represents a project resource.
- */
+ /** Parses the project from the given fully-qualified path which represents a project resource. */
public static final String parseProjectFromProjectName(String projectName) {
return PROJECT_PATH_TEMPLATE.parse(projectName).get("project");
}
- /**
- * Constructs an instance of ErrorStatsServiceApi with default settings.
- */
+ /** Constructs an instance of ErrorStatsServiceApi with default settings. */
public static final ErrorStatsServiceApi create() throws IOException {
return create(ErrorStatsServiceSettings.defaultBuilder().build());
}
/**
- * Constructs an instance of ErrorStatsServiceApi, using the given settings.
- * The channels are created based on the settings passed in, or defaults for any
- * settings that are not set.
+ * Constructs an instance of ErrorStatsServiceApi, 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 ErrorStatsServiceApi create(ErrorStatsServiceSettings settings)
throws IOException {
@@ -140,9 +130,8 @@ public static final ErrorStatsServiceApi create(ErrorStatsServiceSettings settin
}
/**
- * Constructs an instance of ErrorStatsServiceApi, using the given settings.
- * This is protected so that it easy to make a subclass, but otherwise, the static
- * factory methods should be preferred.
+ * Constructs an instance of ErrorStatsServiceApi, using the given settings. This is protected so
+ * that it easy to make a subclass, but otherwise, the static factory methods should be preferred.
*/
protected ErrorStatsServiceApi(ErrorStatsServiceSettings settings) throws IOException {
this.settings = settings;
@@ -189,7 +178,8 @@ public final ErrorStatsServiceSettings getSettings() {
/**
* Lists the specified groups.
*
- * Sample code:
+ *
Sample code:
+ *
*
* try (ErrorStatsServiceApi errorStatsServiceApi = ErrorStatsServiceApi.create()) {
* String formattedProjectName = ErrorStatsServiceApi.formatProjectName("[PROJECT]");
@@ -201,15 +191,13 @@ public final ErrorStatsServiceSettings getSettings() {
*
*
* @param projectName [Required] The resource name of the Google Cloud Platform project. Written
- * as <code>projects/</code> plus the
- * <a href="https://support.google.com/cloud/answer/6158840">Google Cloud
- * Platform project ID</a>.
- *
- * Example: <code>projects/my-project-123</code>.
- * @param timeRange [Required] List data for the given time range.
- * The service is tuned for retrieving data up to (approximately) 'now'.
- * Retrieving data for arbitrary time periods in the past can result in
- * higher response times or in returning incomplete results.
+ * as <code>projects/</code> plus the <a
+ * href="https://support.google.com/cloud/answer/6158840">Google Cloud Platform project
+ * ID</a>.
+ * Example: <code>projects/my-project-123</code>.
+ * @param timeRange [Required] List data for the given time range. The service is tuned for
+ * retrieving data up to (approximately) 'now'. Retrieving data for arbitrary time periods in
+ * the past can result in higher response times or in returning incomplete results.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final PagedListResponse
@@ -227,7 +215,8 @@ public final ErrorStatsServiceSettings getSettings() {
/**
* Lists the specified groups.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ErrorStatsServiceApi errorStatsServiceApi = ErrorStatsServiceApi.create()) {
* String formattedProjectName = ErrorStatsServiceApi.formatProjectName("[PROJECT]");
@@ -254,7 +243,8 @@ public final ErrorStatsServiceSettings getSettings() {
/**
* Lists the specified groups.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ErrorStatsServiceApi errorStatsServiceApi = ErrorStatsServiceApi.create()) {
* String formattedProjectName = ErrorStatsServiceApi.formatProjectName("[PROJECT]");
@@ -282,7 +272,8 @@ public final ErrorStatsServiceSettings getSettings() {
/**
* Lists the specified groups.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ErrorStatsServiceApi errorStatsServiceApi = ErrorStatsServiceApi.create()) {
* String formattedProjectName = ErrorStatsServiceApi.formatProjectName("[PROJECT]");
@@ -314,7 +305,8 @@ public final ApiCallable listGrou
/**
* Lists the specified events.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ErrorStatsServiceApi errorStatsServiceApi = ErrorStatsServiceApi.create()) {
* String formattedProjectName = ErrorStatsServiceApi.formatProjectName("[PROJECT]");
@@ -326,9 +318,8 @@ public final ApiCallable listGrou
*
*
* @param projectName [Required] The resource name of the Google Cloud Platform project. Written
- * as `projects/` plus the
- * [Google Cloud Platform project ID](https://support.google.com/cloud/answer/6158840).
- * Example: `projects/my-project-123`.
+ * as `projects/` plus the [Google Cloud Platform project
+ * ID](https://support.google.com/cloud/answer/6158840). Example: `projects/my-project-123`.
* @param groupId [Required] The group for which events shall be returned.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
@@ -344,7 +335,8 @@ public final PagedListResponseSample code:
+ *
*
* try (ErrorStatsServiceApi errorStatsServiceApi = ErrorStatsServiceApi.create()) {
* String formattedProjectName = ErrorStatsServiceApi.formatProjectName("[PROJECT]");
@@ -371,7 +363,8 @@ public final PagedListResponseSample code:
+ *
*
* try (ErrorStatsServiceApi errorStatsServiceApi = ErrorStatsServiceApi.create()) {
* String formattedProjectName = ErrorStatsServiceApi.formatProjectName("[PROJECT]");
@@ -398,7 +391,8 @@ public final PagedListResponseSample code:
+ *
*
* try (ErrorStatsServiceApi errorStatsServiceApi = ErrorStatsServiceApi.create()) {
* String formattedProjectName = ErrorStatsServiceApi.formatProjectName("[PROJECT]");
@@ -430,7 +424,8 @@ public final ApiCallable listEventsCallab
/**
* Deletes all error events of a given project.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ErrorStatsServiceApi errorStatsServiceApi = ErrorStatsServiceApi.create()) {
* String formattedProjectName = ErrorStatsServiceApi.formatProjectName("[PROJECT]");
@@ -439,9 +434,8 @@ public final ApiCallable listEventsCallab
*
*
* @param projectName [Required] The resource name of the Google Cloud Platform project. Written
- * as `projects/` plus the
- * [Google Cloud Platform project ID](https://support.google.com/cloud/answer/6158840).
- * Example: `projects/my-project-123`.
+ * as `projects/` plus the [Google Cloud Platform project
+ * ID](https://support.google.com/cloud/answer/6158840). Example: `projects/my-project-123`.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final DeleteEventsResponse deleteEvents(String projectName) {
@@ -455,7 +449,8 @@ public final DeleteEventsResponse deleteEvents(String projectName) {
/**
* Deletes all error events of a given project.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ErrorStatsServiceApi errorStatsServiceApi = ErrorStatsServiceApi.create()) {
* String formattedProjectName = ErrorStatsServiceApi.formatProjectName("[PROJECT]");
@@ -477,7 +472,8 @@ private final DeleteEventsResponse deleteEvents(DeleteEventsRequest request) {
/**
* Deletes all error events of a given project.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ErrorStatsServiceApi errorStatsServiceApi = ErrorStatsServiceApi.create()) {
* String formattedProjectName = ErrorStatsServiceApi.formatProjectName("[PROJECT]");
diff --git a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorStatsServiceSettings.java b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorStatsServiceSettings.java
index e04773777a7a..b34dde3f867b 100644
--- a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorStatsServiceSettings.java
+++ b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorStatsServiceSettings.java
@@ -14,7 +14,6 @@
package com.google.cloud.errorreporting.spi.v1beta1;
import com.google.api.gax.core.ConnectionSettings;
-import com.google.api.gax.core.PagedListResponse;
import com.google.api.gax.core.RetrySettings;
import com.google.api.gax.grpc.ApiCallSettings;
import com.google.api.gax.grpc.PageStreamingCallSettings;
@@ -50,15 +49,15 @@
* The default instance has everything set to sensible defaults:
*
*
- * - The default service address (clouderrorreporting.googleapis.com) and default port (443)
- * are used.
- *
- Credentials are acquired automatically through Application Default Credentials.
- *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
- The default service address (clouderrorreporting.googleapis.com) and default port (443) are
+ * used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
*
*
- * 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 deleteEvents to 30 seconds:
+ *
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 deleteEvents to 30 seconds:
*
*
*
@@ -72,25 +71,17 @@
*/
@javax.annotation.Generated("by GAPIC")
public class ErrorStatsServiceSettings extends ServiceApiSettings {
- /**
- * The default address of the service.
- */
+ /** The default address of the service. */
private static final String DEFAULT_SERVICE_ADDRESS = "clouderrorreporting.googleapis.com";
- /**
- * The default port of the service.
- */
+ /** The default port of the service. */
private static final int DEFAULT_SERVICE_PORT = 443;
- /**
- * The default scopes of the service.
- */
+ /** The default scopes of the service. */
private static final ImmutableList DEFAULT_SERVICE_SCOPES =
ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
- /**
- * The default connection settings of the service.
- */
+ /** The default connection settings of the service. */
public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS =
ConnectionSettings.newBuilder()
.setServiceAddress(DEFAULT_SERVICE_ADDRESS)
@@ -105,67 +96,49 @@ public class ErrorStatsServiceSettings extends ServiceApiSettings {
listEventsSettings;
private final SimpleCallSettings deleteEventsSettings;
- /**
- * Returns the object with the settings used for calls to listGroupStats.
- */
+ /** Returns the object with the settings used for calls to listGroupStats. */
public PageStreamingCallSettings
listGroupStatsSettings() {
return listGroupStatsSettings;
}
- /**
- * Returns the object with the settings used for calls to listEvents.
- */
+ /** Returns the object with the settings used for calls to listEvents. */
public PageStreamingCallSettings
listEventsSettings() {
return listEventsSettings;
}
- /**
- * Returns the object with the settings used for calls to deleteEvents.
- */
+ /** Returns the object with the settings used for calls to deleteEvents. */
public SimpleCallSettings deleteEventsSettings() {
return deleteEventsSettings;
}
- /**
- * Returns the default service address.
- */
+ /** Returns the default service address. */
public static String getDefaultServiceAddress() {
return DEFAULT_SERVICE_ADDRESS;
}
- /**
- * Returns the default service port.
- */
+ /** Returns the default service port. */
public static int getDefaultServicePort() {
return DEFAULT_SERVICE_PORT;
}
- /**
- * Returns the default service scopes.
- */
+ /** Returns the default service scopes. */
public static ImmutableList getDefaultServiceScopes() {
return DEFAULT_SERVICE_SCOPES;
}
- /**
- * Returns a builder for this class with recommended defaults.
- */
+ /** Returns a builder for this class with recommended defaults. */
public static Builder defaultBuilder() {
return Builder.createDefault();
}
- /**
- * Returns a new builder for this class.
- */
+ /** Returns a new builder for this class. */
public static Builder newBuilder() {
return new Builder();
}
- /**
- * Returns a builder containing all the values of this settings class.
- */
+ /** Returns a builder containing all the values of this settings class. */
public Builder toBuilder() {
return new Builder(this);
}
@@ -255,9 +228,7 @@ public Iterable extractResources(ListEventsResponse payload) {
}
};
- /**
- * Builder for ErrorStatsServiceSettings.
- */
+ /** Builder for ErrorStatsServiceSettings. */
public static class Builder extends ServiceApiSettings.Builder {
private final ImmutableList methodSettingsBuilders;
@@ -401,35 +372,28 @@ public Builder setClientLibHeader(String name, String version) {
}
/**
- * Applies the given settings to all of the API methods in this service. Only
- * values that are non-null will be applied, so this method is not capable
- * of un-setting any values.
+ * Applies the given settings to all of the API methods in this service. Only values that are
+ * non-null will be applied, so this method is not capable of un-setting any values.
*/
public Builder applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings) throws Exception {
super.applyToAllApiMethods(methodSettingsBuilders, apiCallSettings);
return this;
}
- /**
- * Returns the builder for the settings used for calls to listGroupStats.
- */
+ /** Returns the builder for the settings used for calls to listGroupStats. */
public PageStreamingCallSettings.Builder<
ListGroupStatsRequest, ListGroupStatsResponse, ErrorGroupStats>
listGroupStatsSettings() {
return listGroupStatsSettings;
}
- /**
- * Returns the builder for the settings used for calls to listEvents.
- */
+ /** Returns the builder for the settings used for calls to listEvents. */
public PageStreamingCallSettings.Builder
listEventsSettings() {
return listEventsSettings;
}
- /**
- * Returns the builder for the settings used for calls to deleteEvents.
- */
+ /** Returns the builder for the settings used for calls to deleteEvents. */
public SimpleCallSettings.Builder
deleteEventsSettings() {
return deleteEventsSettings;
diff --git a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ReportErrorsServiceApi.java b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ReportErrorsServiceApi.java
index 8ecedcb0205c..cdd5714e093e 100644
--- a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ReportErrorsServiceApi.java
+++ b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ReportErrorsServiceApi.java
@@ -42,29 +42,29 @@
*
*
*
- * Note: close() needs to be called on the reportErrorsServiceApi object to clean up resources such
- * as threads. In the example above, try-with-resources is used, which automatically calls
+ *
Note: close() needs to be called on the reportErrorsServiceApi 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:
+ *
The surface of this class includes several types of Java methods for each of the API's
+ * methods:
*
*
- * - A "flattened" method. With this type of method, the fields of the request type have been
- * converted into function parameters. It may be the case that not all fields are available
- * as parameters, and not every API method will have a flattened method entry point.
- *
- A "request object" method. This type of method only takes one parameter, a request
- * object, which must be constructed before the call. Not every API method will have a request
- * object method.
- *
- A "callable" method. This type of method takes no parameters and returns an immutable
- * ApiCallable object, which can be used to initiate calls to the service.
+ *
- A "flattened" method. With this type of method, the fields of the request type have been
+ * converted into function parameters. It may be the case that not all fields are available as
+ * parameters, and not every API method will have a flattened method entry point.
+ *
- A "request object" method. This type of method only takes one parameter, a request object,
+ * which must be constructed before the call. Not every API method will have a request object
+ * method.
+ *
- A "callable" method. This type of method takes no parameters and returns an immutable
+ * ApiCallable object, which can be used to initiate calls to the service.
*
*
* 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.
+ *
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 ReportErrorsServiceSettings to
* create(). For example:
@@ -91,33 +91,24 @@ public class ReportErrorsServiceApi implements AutoCloseable {
private static final PathTemplate PROJECT_PATH_TEMPLATE =
PathTemplate.createWithoutUrlEncoding("projects/{project}");
- /**
- * Formats a string containing the fully-qualified path to represent
- * a project resource.
- */
+ /** Formats a string containing the fully-qualified path to represent a project resource. */
public static final String formatProjectName(String project) {
return PROJECT_PATH_TEMPLATE.instantiate("project", project);
}
- /**
- * Parses the project from the given fully-qualified path which
- * represents a project resource.
- */
+ /** Parses the project from the given fully-qualified path which represents a project resource. */
public static final String parseProjectFromProjectName(String projectName) {
return PROJECT_PATH_TEMPLATE.parse(projectName).get("project");
}
- /**
- * Constructs an instance of ReportErrorsServiceApi with default settings.
- */
+ /** Constructs an instance of ReportErrorsServiceApi with default settings. */
public static final ReportErrorsServiceApi create() throws IOException {
return create(ReportErrorsServiceSettings.defaultBuilder().build());
}
/**
- * Constructs an instance of ReportErrorsServiceApi, using the given settings.
- * The channels are created based on the settings passed in, or defaults for any
- * settings that are not set.
+ * Constructs an instance of ReportErrorsServiceApi, 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 ReportErrorsServiceApi create(ReportErrorsServiceSettings settings)
throws IOException {
@@ -125,9 +116,9 @@ public static final ReportErrorsServiceApi create(ReportErrorsServiceSettings se
}
/**
- * Constructs an instance of ReportErrorsServiceApi, using the given settings.
- * This is protected so that it easy to make a subclass, but otherwise, the static
- * factory methods should be preferred.
+ * Constructs an instance of ReportErrorsServiceApi, using the given settings. This is protected
+ * so that it easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
*/
protected ReportErrorsServiceApi(ReportErrorsServiceSettings settings) throws IOException {
this.settings = settings;
@@ -165,14 +156,15 @@ public final ReportErrorsServiceSettings getSettings() {
/**
* Report an individual error event.
*
- * This endpoint accepts <strong>either</strong> an OAuth token,
- * <strong>or</strong> an
- * <a href="https://support.google.com/cloud/answer/6158862">API key</a>
- * for authentication. To use an API key, append it to the URL as the value of
- * a `key` parameter. For example:
- * <pre>POST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456</pre>
+ *
This endpoint accepts <strong>either</strong> an OAuth token,
+ * <strong>or</strong> an <a
+ * href="https://support.google.com/cloud/answer/6158862">API key</a> for authentication.
+ * To use an API key, append it to the URL as the value of a `key` parameter. For example:
+ * <pre>POST
+ * https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456</pre>
+ *
+ *
Sample code:
*
- * Sample code:
*
* try (ReportErrorsServiceApi reportErrorsServiceApi = ReportErrorsServiceApi.create()) {
* String formattedProjectName = ReportErrorsServiceApi.formatProjectName("[PROJECT]");
@@ -182,9 +174,8 @@ public final ReportErrorsServiceSettings getSettings() {
*
*
* @param projectName [Required] The resource name of the Google Cloud Platform project. Written
- * as `projects/` plus the
- * [Google Cloud Platform project ID](https://support.google.com/cloud/answer/6158840).
- * Example: `projects/my-project-123`.
+ * as `projects/` plus the [Google Cloud Platform project
+ * ID](https://support.google.com/cloud/answer/6158840). Example: `projects/my-project-123`.
* @param event [Required] The error event to be reported.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
@@ -200,14 +191,15 @@ public final ReportErrorEventResponse reportErrorEvent(
/**
* Report an individual error event.
*
- * This endpoint accepts <strong>either</strong> an OAuth token,
- * <strong>or</strong> an
- * <a href="https://support.google.com/cloud/answer/6158862">API key</a>
- * for authentication. To use an API key, append it to the URL as the value of
- * a `key` parameter. For example:
- * <pre>POST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456</pre>
+ * This endpoint accepts <strong>either</strong> an OAuth token,
+ * <strong>or</strong> an <a
+ * href="https://support.google.com/cloud/answer/6158862">API key</a> for authentication.
+ * To use an API key, append it to the URL as the value of a `key` parameter. For example:
+ * <pre>POST
+ * https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456</pre>
+ *
+ *
Sample code:
*
- * Sample code:
*
* try (ReportErrorsServiceApi reportErrorsServiceApi = ReportErrorsServiceApi.create()) {
* String formattedProjectName = ReportErrorsServiceApi.formatProjectName("[PROJECT]");
@@ -231,14 +223,15 @@ public final ReportErrorEventResponse reportErrorEvent(ReportErrorEventRequest r
/**
* Report an individual error event.
*
- * This endpoint accepts <strong>either</strong> an OAuth token,
- * <strong>or</strong> an
- * <a href="https://support.google.com/cloud/answer/6158862">API key</a>
- * for authentication. To use an API key, append it to the URL as the value of
- * a `key` parameter. For example:
- * <pre>POST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456</pre>
+ * This endpoint accepts <strong>either</strong> an OAuth token,
+ * <strong>or</strong> an <a
+ * href="https://support.google.com/cloud/answer/6158862">API key</a> for authentication.
+ * To use an API key, append it to the URL as the value of a `key` parameter. For example:
+ * <pre>POST
+ * https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456</pre>
+ *
+ *
Sample code:
*
- * Sample code:
*
* try (ReportErrorsServiceApi reportErrorsServiceApi = ReportErrorsServiceApi.create()) {
* String formattedProjectName = ReportErrorsServiceApi.formatProjectName("[PROJECT]");
diff --git a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ReportErrorsServiceSettings.java b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ReportErrorsServiceSettings.java
index a61c66655385..a4b390017c31 100644
--- a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ReportErrorsServiceSettings.java
+++ b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/ReportErrorsServiceSettings.java
@@ -16,7 +16,6 @@
import com.google.api.gax.core.ConnectionSettings;
import com.google.api.gax.core.RetrySettings;
import com.google.api.gax.grpc.ApiCallSettings;
-import com.google.api.gax.grpc.PageStreamingDescriptor;
import com.google.api.gax.grpc.ServiceApiSettings;
import com.google.api.gax.grpc.SimpleCallSettings;
import com.google.auth.Credentials;
@@ -42,15 +41,15 @@
* The default instance has everything set to sensible defaults:
*
*
- * - The default service address (clouderrorreporting.googleapis.com) and default port (443)
- * are used.
- *
- Credentials are acquired automatically through Application Default Credentials.
- *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
- The default service address (clouderrorreporting.googleapis.com) and default port (443) are
+ * used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
*
*
- * 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 reportErrorEvent to 30 seconds:
+ *
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 reportErrorEvent to 30 seconds:
*
*
*
@@ -64,25 +63,17 @@
*/
@javax.annotation.Generated("by GAPIC")
public class ReportErrorsServiceSettings extends ServiceApiSettings {
- /**
- * The default address of the service.
- */
+ /** The default address of the service. */
private static final String DEFAULT_SERVICE_ADDRESS = "clouderrorreporting.googleapis.com";
- /**
- * The default port of the service.
- */
+ /** The default port of the service. */
private static final int DEFAULT_SERVICE_PORT = 443;
- /**
- * The default scopes of the service.
- */
+ /** The default scopes of the service. */
private static final ImmutableList DEFAULT_SERVICE_SCOPES =
ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
- /**
- * The default connection settings of the service.
- */
+ /** The default connection settings of the service. */
public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS =
ConnectionSettings.newBuilder()
.setServiceAddress(DEFAULT_SERVICE_ADDRESS)
@@ -93,52 +84,38 @@ public class ReportErrorsServiceSettings extends ServiceApiSettings {
private final SimpleCallSettings
reportErrorEventSettings;
- /**
- * Returns the object with the settings used for calls to reportErrorEvent.
- */
+ /** Returns the object with the settings used for calls to reportErrorEvent. */
public SimpleCallSettings
reportErrorEventSettings() {
return reportErrorEventSettings;
}
- /**
- * Returns the default service address.
- */
+ /** Returns the default service address. */
public static String getDefaultServiceAddress() {
return DEFAULT_SERVICE_ADDRESS;
}
- /**
- * Returns the default service port.
- */
+ /** Returns the default service port. */
public static int getDefaultServicePort() {
return DEFAULT_SERVICE_PORT;
}
- /**
- * Returns the default service scopes.
- */
+ /** Returns the default service scopes. */
public static ImmutableList getDefaultServiceScopes() {
return DEFAULT_SERVICE_SCOPES;
}
- /**
- * Returns a builder for this class with recommended defaults.
- */
+ /** Returns a builder for this class with recommended defaults. */
public static Builder defaultBuilder() {
return Builder.createDefault();
}
- /**
- * Returns a new builder for this class.
- */
+ /** Returns a new builder for this class. */
public static Builder newBuilder() {
return new Builder();
}
- /**
- * Returns a builder containing all the values of this settings class.
- */
+ /** Returns a builder containing all the values of this settings class. */
public Builder toBuilder() {
return new Builder(this);
}
@@ -155,9 +132,7 @@ private ReportErrorsServiceSettings(Builder settingsBuilder) throws IOException
reportErrorEventSettings = settingsBuilder.reportErrorEventSettings().build();
}
- /**
- * Builder for ReportErrorsServiceSettings.
- */
+ /** Builder for ReportErrorsServiceSettings. */
public static class Builder extends ServiceApiSettings.Builder {
private final ImmutableList methodSettingsBuilders;
@@ -271,18 +246,15 @@ public Builder setClientLibHeader(String name, String version) {
}
/**
- * Applies the given settings to all of the API methods in this service. Only
- * values that are non-null will be applied, so this method is not capable
- * of un-setting any values.
+ * Applies the given settings to all of the API methods in this service. Only values that are
+ * non-null will be applied, so this method is not capable of un-setting any values.
*/
public Builder applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings) throws Exception {
super.applyToAllApiMethods(methodSettingsBuilders, apiCallSettings);
return this;
}
- /**
- * Returns the builder for the settings used for calls to reportErrorEvent.
- */
+ /** Returns the builder for the settings used for calls to reportErrorEvent. */
public SimpleCallSettings.Builder
reportErrorEventSettings() {
return reportErrorEventSettings;
diff --git a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/package-info.java b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/package-info.java
index 84d05a4d0496..15a1f4bf3564 100644
--- a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/package-info.java
+++ b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/spi/v1beta1/package-info.java
@@ -15,15 +15,14 @@
/**
* A client to Stackdriver Error Reporting API.
*
- * The interfaces provided are listed below, along with a usage sample
+ * The interfaces provided are listed below, along with a usage sample
*
- * ====================
- * ErrorGroupServiceApi
- * ====================
+ *
==================== ErrorGroupServiceApi ====================
*
- * Service Description: Service for retrieving and updating individual error groups.
+ *
Service Description: Service for retrieving and updating individual error groups.
+ *
+ *
Sample for ErrorGroupServiceApi:
*
- * Sample for ErrorGroupServiceApi:
*
*
* try (ErrorGroupServiceApi errorGroupServiceApi = ErrorGroupServiceApi.create()) {
@@ -33,14 +32,13 @@
*
*
*
- * ====================
- * ErrorStatsServiceApi
- * ====================
+ * ==================== ErrorStatsServiceApi ====================
*
- * Service Description: An API for retrieving and managing error statistics as well as data for
+ * Service Description: An API for retrieving and managing error statistics as well as data for
* individual events.
*
- * Sample for ErrorStatsServiceApi:
+ *
Sample for ErrorStatsServiceApi:
+ *
*
*
* try (ErrorStatsServiceApi errorStatsServiceApi = ErrorStatsServiceApi.create()) {
@@ -50,13 +48,12 @@
*
*
*
- * ======================
- * ReportErrorsServiceApi
- * ======================
+ * ====================== ReportErrorsServiceApi ======================
*
- * Service Description: An API for reporting error events.
+ * Service Description: An API for reporting error events.
+ *
+ *
Sample for ReportErrorsServiceApi:
*
- * Sample for ReportErrorsServiceApi:
*
*
* try (ReportErrorsServiceApi reportErrorsServiceApi = ReportErrorsServiceApi.create()) {
@@ -66,6 +63,5 @@
* }
*
*
- *
*/
package com.google.cloud.errorreporting.spi.v1beta1;
diff --git a/google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorGroupServiceTest.java b/google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorGroupServiceTest.java
index 7ef1423e0800..1a176a4adfa6 100644
--- a/google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorGroupServiceTest.java
+++ b/google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/spi/v1beta1/ErrorGroupServiceTest.java
@@ -14,10 +14,8 @@
package com.google.cloud.errorreporting.spi.v1beta1;
-import com.google.api.gax.core.PagedListResponse;
import com.google.api.gax.testing.MockGrpcService;
import com.google.api.gax.testing.MockServiceHelper;
-import com.google.common.collect.Lists;
import com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup;
import com.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest;
import com.google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest;
diff --git a/google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/spi/v1beta1/ReportErrorsServiceTest.java b/google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/spi/v1beta1/ReportErrorsServiceTest.java
index ff909ae74914..5149d16a357c 100644
--- a/google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/spi/v1beta1/ReportErrorsServiceTest.java
+++ b/google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/spi/v1beta1/ReportErrorsServiceTest.java
@@ -14,10 +14,8 @@
package com.google.cloud.errorreporting.spi.v1beta1;
-import com.google.api.gax.core.PagedListResponse;
import com.google.api.gax.testing.MockGrpcService;
import com.google.api.gax.testing.MockServiceHelper;
-import com.google.common.collect.Lists;
import com.google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequest;
import com.google.devtools.clouderrorreporting.v1beta1.ReportErrorEventResponse;
import com.google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent;
diff --git a/google-cloud-language/src/main/java/com/google/cloud/language/spi/v1beta1/LanguageServiceApi.java b/google-cloud-language/src/main/java/com/google/cloud/language/spi/v1beta1/LanguageServiceApi.java
index d47133cf5af3..1f663b9929f6 100644
--- a/google-cloud-language/src/main/java/com/google/cloud/language/spi/v1beta1/LanguageServiceApi.java
+++ b/google-cloud-language/src/main/java/com/google/cloud/language/spi/v1beta1/LanguageServiceApi.java
@@ -14,7 +14,6 @@
package com.google.cloud.language.spi.v1beta1;
import com.google.api.gax.grpc.ApiCallable;
-import com.google.api.gax.protobuf.PathTemplate;
import com.google.cloud.language.v1beta1.AnalyzeEntitiesRequest;
import com.google.cloud.language.v1beta1.AnalyzeEntitiesResponse;
import com.google.cloud.language.v1beta1.AnalyzeSentimentRequest;
@@ -49,28 +48,27 @@
*
*
* Note: close() needs to be called on the languageServiceApi object to clean up resources such
- * as threads. In the example above, try-with-resources is used, which automatically calls
- * close().
+ * 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:
+ *
The surface of this class includes several types of Java methods for each of the API's
+ * methods:
*
*
- * - A "flattened" method. With this type of method, the fields of the request type have been
- * converted into function parameters. It may be the case that not all fields are available
- * as parameters, and not every API method will have a flattened method entry point.
- *
- A "request object" method. This type of method only takes one parameter, a request
- * object, which must be constructed before the call. Not every API method will have a request
- * object method.
- *
- A "callable" method. This type of method takes no parameters and returns an immutable
- * ApiCallable object, which can be used to initiate calls to the service.
+ *
- A "flattened" method. With this type of method, the fields of the request type have been
+ * converted into function parameters. It may be the case that not all fields are available as
+ * parameters, and not every API method will have a flattened method entry point.
+ *
- A "request object" method. This type of method only takes one parameter, a request object,
+ * which must be constructed before the call. Not every API method will have a request object
+ * method.
+ *
- A "callable" method. This type of method takes no parameters and returns an immutable
+ * ApiCallable object, which can be used to initiate calls to the service.
*
*
* 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.
+ *
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 LanguageServiceSettings to
* create(). For example:
@@ -97,17 +95,14 @@ public class LanguageServiceApi implements AutoCloseable {
analyzeEntitiesCallable;
private final ApiCallable annotateTextCallable;
- /**
- * Constructs an instance of LanguageServiceApi with default settings.
- */
+ /** Constructs an instance of LanguageServiceApi with default settings. */
public static final LanguageServiceApi create() throws IOException {
return create(LanguageServiceSettings.defaultBuilder().build());
}
/**
- * Constructs an instance of LanguageServiceApi, using the given settings.
- * The channels are created based on the settings passed in, or defaults for any
- * settings that are not set.
+ * Constructs an instance of LanguageServiceApi, 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 LanguageServiceApi create(LanguageServiceSettings settings)
throws IOException {
@@ -115,9 +110,8 @@ public static final LanguageServiceApi create(LanguageServiceSettings settings)
}
/**
- * Constructs an instance of LanguageServiceApi, using the given settings.
- * This is protected so that it easy to make a subclass, but otherwise, the static
- * factory methods should be preferred.
+ * Constructs an instance of LanguageServiceApi, using the given settings. This is protected so
+ * that it easy to make a subclass, but otherwise, the static factory methods should be preferred.
*/
protected LanguageServiceApi(LanguageServiceSettings settings) throws IOException {
this.settings = settings;
@@ -159,7 +153,8 @@ public final LanguageServiceSettings getSettings() {
/**
* Analyzes the sentiment of the provided text.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (LanguageServiceApi languageServiceApi = LanguageServiceApi.create()) {
* Document document = Document.newBuilder().build();
@@ -168,7 +163,7 @@ public final LanguageServiceSettings getSettings() {
*
*
* @param document Input document. Currently, `analyzeSentiment` only supports English text
- * ([Document.language][google.cloud.language.v1beta1.Document.language]="EN").
+ * ([Document.language][google.cloud.language.v1beta1.Document.language]="EN").
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final AnalyzeSentimentResponse analyzeSentiment(Document document) {
@@ -181,7 +176,8 @@ public final AnalyzeSentimentResponse analyzeSentiment(Document document) {
/**
* Analyzes the sentiment of the provided text.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (LanguageServiceApi languageServiceApi = LanguageServiceApi.create()) {
* Document document = Document.newBuilder().build();
@@ -203,7 +199,8 @@ private final AnalyzeSentimentResponse analyzeSentiment(AnalyzeSentimentRequest
/**
* Analyzes the sentiment of the provided text.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (LanguageServiceApi languageServiceApi = LanguageServiceApi.create()) {
* Document document = Document.newBuilder().build();
@@ -223,10 +220,11 @@ private final AnalyzeSentimentResponse analyzeSentiment(AnalyzeSentimentRequest
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Finds named entities (currently finds proper names) in the text,
- * entity types, salience, mentions for each entity, and other properties.
+ * Finds named entities (currently finds proper names) in the text, entity types, salience,
+ * mentions for each entity, and other properties.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (LanguageServiceApi languageServiceApi = LanguageServiceApi.create()) {
* Document document = Document.newBuilder().build();
@@ -251,10 +249,11 @@ public final AnalyzeEntitiesResponse analyzeEntities(
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Finds named entities (currently finds proper names) in the text,
- * entity types, salience, mentions for each entity, and other properties.
+ * Finds named entities (currently finds proper names) in the text, entity types, salience,
+ * mentions for each entity, and other properties.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (LanguageServiceApi languageServiceApi = LanguageServiceApi.create()) {
* Document document = Document.newBuilder().build();
@@ -276,10 +275,11 @@ public final AnalyzeEntitiesResponse analyzeEntities(AnalyzeEntitiesRequest requ
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Finds named entities (currently finds proper names) in the text,
- * entity types, salience, mentions for each entity, and other properties.
+ * Finds named entities (currently finds proper names) in the text, entity types, salience,
+ * mentions for each entity, and other properties.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (LanguageServiceApi languageServiceApi = LanguageServiceApi.create()) {
* Document document = Document.newBuilder().build();
@@ -301,12 +301,12 @@ public final AnalyzeEntitiesResponse analyzeEntities(AnalyzeEntitiesRequest requ
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Advanced API that analyzes the document and provides a full set of text
- * annotations, including semantic, syntactic, and sentiment information. This
- * API is intended for users who are familiar with machine learning and need
- * in-depth text features to build upon.
+ * Advanced API that analyzes the document and provides a full set of text annotations, including
+ * semantic, syntactic, and sentiment information. This API is intended for users who are familiar
+ * with machine learning and need in-depth text features to build upon.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (LanguageServiceApi languageServiceApi = LanguageServiceApi.create()) {
* Document document = Document.newBuilder().build();
@@ -334,12 +334,12 @@ public final AnnotateTextResponse annotateText(
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Advanced API that analyzes the document and provides a full set of text
- * annotations, including semantic, syntactic, and sentiment information. This
- * API is intended for users who are familiar with machine learning and need
- * in-depth text features to build upon.
+ * Advanced API that analyzes the document and provides a full set of text annotations, including
+ * semantic, syntactic, and sentiment information. This API is intended for users who are familiar
+ * with machine learning and need in-depth text features to build upon.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (LanguageServiceApi languageServiceApi = LanguageServiceApi.create()) {
* Document document = Document.newBuilder().build();
@@ -363,12 +363,12 @@ public final AnnotateTextResponse annotateText(AnnotateTextRequest request) {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Advanced API that analyzes the document and provides a full set of text
- * annotations, including semantic, syntactic, and sentiment information. This
- * API is intended for users who are familiar with machine learning and need
- * in-depth text features to build upon.
+ * Advanced API that analyzes the document and provides a full set of text annotations, including
+ * semantic, syntactic, and sentiment information. This API is intended for users who are familiar
+ * with machine learning and need in-depth text features to build upon.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (LanguageServiceApi languageServiceApi = LanguageServiceApi.create()) {
* Document document = Document.newBuilder().build();
diff --git a/google-cloud-language/src/main/java/com/google/cloud/language/spi/v1beta1/LanguageServiceSettings.java b/google-cloud-language/src/main/java/com/google/cloud/language/spi/v1beta1/LanguageServiceSettings.java
index de0a26308a09..394c2a7add5e 100644
--- a/google-cloud-language/src/main/java/com/google/cloud/language/spi/v1beta1/LanguageServiceSettings.java
+++ b/google-cloud-language/src/main/java/com/google/cloud/language/spi/v1beta1/LanguageServiceSettings.java
@@ -16,7 +16,6 @@
import com.google.api.gax.core.ConnectionSettings;
import com.google.api.gax.core.RetrySettings;
import com.google.api.gax.grpc.ApiCallSettings;
-import com.google.api.gax.grpc.PageStreamingDescriptor;
import com.google.api.gax.grpc.ServiceApiSettings;
import com.google.api.gax.grpc.SimpleCallSettings;
import com.google.auth.Credentials;
@@ -46,15 +45,14 @@
* The default instance has everything set to sensible defaults:
*
*
- * - The default service address (language.googleapis.com) and default port (443)
- * are used.
- *
- Credentials are acquired automatically through Application Default Credentials.
- *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
- The default service address (language.googleapis.com) and default port (443) are used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
*
*
- * 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 analyzeSentiment to 30 seconds:
+ *
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 analyzeSentiment to 30 seconds:
*
*
*
@@ -68,25 +66,17 @@
*/
@javax.annotation.Generated("by GAPIC")
public class LanguageServiceSettings extends ServiceApiSettings {
- /**
- * The default address of the service.
- */
+ /** The default address of the service. */
private static final String DEFAULT_SERVICE_ADDRESS = "language.googleapis.com";
- /**
- * The default port of the service.
- */
+ /** The default port of the service. */
private static final int DEFAULT_SERVICE_PORT = 443;
- /**
- * The default scopes of the service.
- */
+ /** The default scopes of the service. */
private static final ImmutableList DEFAULT_SERVICE_SCOPES =
ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
- /**
- * The default connection settings of the service.
- */
+ /** The default connection settings of the service. */
public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS =
ConnectionSettings.newBuilder()
.setServiceAddress(DEFAULT_SERVICE_ADDRESS)
@@ -100,67 +90,49 @@ public class LanguageServiceSettings extends ServiceApiSettings {
analyzeEntitiesSettings;
private final SimpleCallSettings annotateTextSettings;
- /**
- * Returns the object with the settings used for calls to analyzeSentiment.
- */
+ /** Returns the object with the settings used for calls to analyzeSentiment. */
public SimpleCallSettings
analyzeSentimentSettings() {
return analyzeSentimentSettings;
}
- /**
- * Returns the object with the settings used for calls to analyzeEntities.
- */
+ /** Returns the object with the settings used for calls to analyzeEntities. */
public SimpleCallSettings
analyzeEntitiesSettings() {
return analyzeEntitiesSettings;
}
- /**
- * Returns the object with the settings used for calls to annotateText.
- */
+ /** Returns the object with the settings used for calls to annotateText. */
public SimpleCallSettings annotateTextSettings() {
return annotateTextSettings;
}
- /**
- * Returns the default service address.
- */
+ /** Returns the default service address. */
public static String getDefaultServiceAddress() {
return DEFAULT_SERVICE_ADDRESS;
}
- /**
- * Returns the default service port.
- */
+ /** Returns the default service port. */
public static int getDefaultServicePort() {
return DEFAULT_SERVICE_PORT;
}
- /**
- * Returns the default service scopes.
- */
+ /** Returns the default service scopes. */
public static ImmutableList getDefaultServiceScopes() {
return DEFAULT_SERVICE_SCOPES;
}
- /**
- * Returns a builder for this class with recommended defaults.
- */
+ /** Returns a builder for this class with recommended defaults. */
public static Builder defaultBuilder() {
return Builder.createDefault();
}
- /**
- * Returns a new builder for this class.
- */
+ /** Returns a new builder for this class. */
public static Builder newBuilder() {
return new Builder();
}
- /**
- * Returns a builder containing all the values of this settings class.
- */
+ /** Returns a builder containing all the values of this settings class. */
public Builder toBuilder() {
return new Builder(this);
}
@@ -179,9 +151,7 @@ private LanguageServiceSettings(Builder settingsBuilder) throws IOException {
annotateTextSettings = settingsBuilder.annotateTextSettings().build();
}
- /**
- * Builder for LanguageServiceSettings.
- */
+ /** Builder for LanguageServiceSettings. */
public static class Builder extends ServiceApiSettings.Builder {
private final ImmutableList methodSettingsBuilders;
@@ -321,34 +291,27 @@ public Builder setClientLibHeader(String name, String version) {
}
/**
- * Applies the given settings to all of the API methods in this service. Only
- * values that are non-null will be applied, so this method is not capable
- * of un-setting any values.
+ * Applies the given settings to all of the API methods in this service. Only values that are
+ * non-null will be applied, so this method is not capable of un-setting any values.
*/
public Builder applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings) throws Exception {
super.applyToAllApiMethods(methodSettingsBuilders, apiCallSettings);
return this;
}
- /**
- * Returns the builder for the settings used for calls to analyzeSentiment.
- */
+ /** Returns the builder for the settings used for calls to analyzeSentiment. */
public SimpleCallSettings.Builder
analyzeSentimentSettings() {
return analyzeSentimentSettings;
}
- /**
- * Returns the builder for the settings used for calls to analyzeEntities.
- */
+ /** Returns the builder for the settings used for calls to analyzeEntities. */
public SimpleCallSettings.Builder
analyzeEntitiesSettings() {
return analyzeEntitiesSettings;
}
- /**
- * Returns the builder for the settings used for calls to annotateText.
- */
+ /** Returns the builder for the settings used for calls to annotateText. */
public SimpleCallSettings.Builder
annotateTextSettings() {
return annotateTextSettings;
diff --git a/google-cloud-language/src/main/java/com/google/cloud/language/spi/v1beta1/package-info.java b/google-cloud-language/src/main/java/com/google/cloud/language/spi/v1beta1/package-info.java
index 07c5cc884e39..9adb4a848362 100644
--- a/google-cloud-language/src/main/java/com/google/cloud/language/spi/v1beta1/package-info.java
+++ b/google-cloud-language/src/main/java/com/google/cloud/language/spi/v1beta1/package-info.java
@@ -15,16 +15,15 @@
/**
* A client to Google Cloud Natural Language API.
*
- * The interfaces provided are listed below, along with a usage sample
+ * The interfaces provided are listed below, along with a usage sample
*
- * ==================
- * LanguageServiceApi
- * ==================
+ *
================== LanguageServiceApi ==================
*
- * Service Description: Provides text analysis operations such as sentiment analysis and entity
+ *
Service Description: Provides text analysis operations such as sentiment analysis and entity
* recognition.
*
- * Sample for LanguageServiceApi:
+ *
Sample for LanguageServiceApi:
+ *
*
*
* try (LanguageServiceApi languageServiceApi = LanguageServiceApi.create()) {
@@ -33,6 +32,5 @@
* }
*
*
- *
*/
package com.google.cloud.language.spi.v1beta1;
diff --git a/google-cloud-language/src/test/java/com/google/cloud/language/spi/v1beta1/LanguageServiceTest.java b/google-cloud-language/src/test/java/com/google/cloud/language/spi/v1beta1/LanguageServiceTest.java
index 962cba6419fc..d9765d9ed8a2 100644
--- a/google-cloud-language/src/test/java/com/google/cloud/language/spi/v1beta1/LanguageServiceTest.java
+++ b/google-cloud-language/src/test/java/com/google/cloud/language/spi/v1beta1/LanguageServiceTest.java
@@ -14,7 +14,6 @@
package com.google.cloud.language.spi.v1beta1;
-import com.google.api.gax.core.PagedListResponse;
import com.google.api.gax.testing.MockGrpcService;
import com.google.api.gax.testing.MockServiceHelper;
import com.google.cloud.language.v1beta1.AnalyzeEntitiesRequest;
@@ -26,7 +25,6 @@
import com.google.cloud.language.v1beta1.AnnotateTextResponse;
import com.google.cloud.language.v1beta1.Document;
import com.google.cloud.language.v1beta1.EncodingType;
-import com.google.common.collect.Lists;
import com.google.protobuf.GeneratedMessageV3;
import java.io.IOException;
import java.util.ArrayList;
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java
index 6172bac44b91..f49aca494e33 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Api.java
@@ -49,28 +49,27 @@
*
*
* Note: close() needs to be called on the configServiceV2Api object to clean up resources such
- * as threads. In the example above, try-with-resources is used, which automatically calls
- * close().
+ * 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:
+ *
The surface of this class includes several types of Java methods for each of the API's
+ * methods:
*
*
- * - A "flattened" method. With this type of method, the fields of the request type have been
- * converted into function parameters. It may be the case that not all fields are available
- * as parameters, and not every API method will have a flattened method entry point.
- *
- A "request object" method. This type of method only takes one parameter, a request
- * object, which must be constructed before the call. Not every API method will have a request
- * object method.
- *
- A "callable" method. This type of method takes no parameters and returns an immutable
- * ApiCallable object, which can be used to initiate calls to the service.
+ *
- A "flattened" method. With this type of method, the fields of the request type have been
+ * converted into function parameters. It may be the case that not all fields are available as
+ * parameters, and not every API method will have a flattened method entry point.
+ *
- A "request object" method. This type of method only takes one parameter, a request object,
+ * which must be constructed before the call. Not every API method will have a request object
+ * method.
+ *
- A "callable" method. This type of method takes no parameters and returns an immutable
+ * ApiCallable object, which can be used to initiate calls to the service.
*
*
* 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.
+ *
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 ConfigServiceV2Settings to
* create(). For example:
@@ -106,59 +105,41 @@ public class ConfigServiceV2Api implements AutoCloseable {
private static final PathTemplate SINK_PATH_TEMPLATE =
PathTemplate.createWithoutUrlEncoding("projects/{project}/sinks/{sink}");
- /**
- * Formats a string containing the fully-qualified path to represent
- * a parent resource.
- */
+ /** Formats a string containing the fully-qualified path to represent a parent resource. */
public static final String formatParentName(String project) {
return PARENT_PATH_TEMPLATE.instantiate("project", project);
}
- /**
- * Formats a string containing the fully-qualified path to represent
- * a sink resource.
- */
+ /** Formats a string containing the fully-qualified path to represent a sink resource. */
public static final String formatSinkName(String project, String sink) {
return SINK_PATH_TEMPLATE.instantiate(
"project", project,
"sink", sink);
}
- /**
- * Parses the project from the given fully-qualified path which
- * represents a parent resource.
- */
+ /** Parses the project from the given fully-qualified path which represents a parent resource. */
public static final String parseProjectFromParentName(String parentName) {
return PARENT_PATH_TEMPLATE.parse(parentName).get("project");
}
- /**
- * Parses the project from the given fully-qualified path which
- * represents a sink resource.
- */
+ /** Parses the project from the given fully-qualified path which represents a sink resource. */
public static final String parseProjectFromSinkName(String sinkName) {
return SINK_PATH_TEMPLATE.parse(sinkName).get("project");
}
- /**
- * Parses the sink from the given fully-qualified path which
- * represents a sink resource.
- */
+ /** Parses the sink from the given fully-qualified path which represents a sink resource. */
public static final String parseSinkFromSinkName(String sinkName) {
return SINK_PATH_TEMPLATE.parse(sinkName).get("sink");
}
- /**
- * Constructs an instance of ConfigServiceV2Api with default settings.
- */
+ /** Constructs an instance of ConfigServiceV2Api with default settings. */
public static final ConfigServiceV2Api create() throws IOException {
return create(ConfigServiceV2Settings.defaultBuilder().build());
}
/**
- * Constructs an instance of ConfigServiceV2Api, using the given settings.
- * The channels are created based on the settings passed in, or defaults for any
- * settings that are not set.
+ * Constructs an instance of ConfigServiceV2Api, 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 ConfigServiceV2Api create(ConfigServiceV2Settings settings)
throws IOException {
@@ -166,9 +147,8 @@ public static final ConfigServiceV2Api create(ConfigServiceV2Settings settings)
}
/**
- * Constructs an instance of ConfigServiceV2Api, using the given settings.
- * This is protected so that it easy to make a subclass, but otherwise, the static
- * factory methods should be preferred.
+ * Constructs an instance of ConfigServiceV2Api, using the given settings. This is protected so
+ * that it easy to make a subclass, but otherwise, the static factory methods should be preferred.
*/
protected ConfigServiceV2Api(ConfigServiceV2Settings settings) throws IOException {
this.settings = settings;
@@ -216,7 +196,8 @@ public final ConfigServiceV2Settings getSettings() {
/**
* Lists sinks.
*
- * Sample code:
+ *
Sample code:
+ *
*
* try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create()) {
* String formattedParent = ConfigServiceV2Api.formatParentName("[PROJECT]");
@@ -226,8 +207,8 @@ public final ConfigServiceV2Settings getSettings() {
* }
*
*
- * @param parent Required. The resource name containing the sinks.
- * Example: `"projects/my-logging-project"`.
+ * @param parent Required. The resource name containing the sinks. Example:
+ * `"projects/my-logging-project"`.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final PagedListResponse listSinks(
@@ -241,7 +222,8 @@ public final PagedListResponse lis
/**
* Lists sinks.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create()) {
* String formattedParent = ConfigServiceV2Api.formatParentName("[PROJECT]");
@@ -266,7 +248,8 @@ public final PagedListResponse lis
/**
* Lists sinks.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create()) {
* String formattedParent = ConfigServiceV2Api.formatParentName("[PROJECT]");
@@ -291,7 +274,8 @@ public final PagedListResponse lis
/**
* Lists sinks.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create()) {
* String formattedParent = ConfigServiceV2Api.formatParentName("[PROJECT]");
@@ -321,7 +305,8 @@ public final ApiCallable listSinksCallable(
/**
* Gets a sink.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create()) {
* String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
@@ -329,8 +314,8 @@ public final ApiCallable listSinksCallable(
* }
*
*
- * @param sinkName The resource name of the sink to return.
- * Example: `"projects/my-project-id/sinks/my-sink-id"`.
+ * @param sinkName The resource name of the sink to return. Example:
+ * `"projects/my-project-id/sinks/my-sink-id"`.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final LogSink getSink(String sinkName) {
@@ -343,7 +328,8 @@ public final LogSink getSink(String sinkName) {
/**
* Gets a sink.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create()) {
* String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
@@ -365,7 +351,8 @@ private final LogSink getSink(GetSinkRequest request) {
/**
* Gets a sink.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create()) {
* String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
@@ -386,7 +373,8 @@ public final ApiCallable getSinkCallable() {
/**
* Creates a sink.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create()) {
* String formattedParent = ConfigServiceV2Api.formatParentName("[PROJECT]");
@@ -395,12 +383,9 @@ public final ApiCallable getSinkCallable() {
* }
*
*
- * @param parent The resource in which to create the sink.
- * Example: `"projects/my-project-id"`.
- *
- * The new sink must be provided in the request.
- * @param sink The new sink, which must not have an identifier that already
- * exists.
+ * @param parent The resource in which to create the sink. Example: `"projects/my-project-id"`.
+ * The new sink must be provided in the request.
+ * @param sink The new sink, which must not have an identifier that already exists.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final LogSink createSink(String parent, LogSink sink) {
@@ -414,7 +399,8 @@ public final LogSink createSink(String parent, LogSink sink) {
/**
* Creates a sink.
*
- * Sample code:
+ *
Sample code:
+ *
*
* try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create()) {
* String formattedParent = ConfigServiceV2Api.formatParentName("[PROJECT]");
@@ -438,7 +424,8 @@ public final LogSink createSink(CreateSinkRequest request) {
/**
* Creates a sink.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create()) {
* String formattedParent = ConfigServiceV2Api.formatParentName("[PROJECT]");
@@ -461,7 +448,8 @@ public final ApiCallable createSinkCallable() {
/**
* Creates or updates a sink.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create()) {
* String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
@@ -470,15 +458,12 @@ public final ApiCallable createSinkCallable() {
* }
*
*
- * @param sinkName The resource name of the sink to update.
- * Example: `"projects/my-project-id/sinks/my-sink-id"`.
- *
- * The updated sink must be provided in the request and have the
- * same name that is specified in `sinkName`. If the sink does not
- * exist, it is created.
- * @param sink The updated sink, whose name must be the same as the sink
- * identifier in `sinkName`. If `sinkName` does not exist, then
- * this method creates a new sink.
+ * @param sinkName The resource name of the sink to update. Example:
+ * `"projects/my-project-id/sinks/my-sink-id"`.
+ * The updated sink must be provided in the request and have the same name that is
+ * specified in `sinkName`. If the sink does not exist, it is created.
+ * @param sink The updated sink, whose name must be the same as the sink identifier in `sinkName`.
+ * If `sinkName` does not exist, then this method creates a new sink.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final LogSink updateSink(String sinkName, LogSink sink) {
@@ -492,7 +477,8 @@ public final LogSink updateSink(String sinkName, LogSink sink) {
/**
* Creates or updates a sink.
*
- * Sample code:
+ *
Sample code:
+ *
*
* try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create()) {
* String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
@@ -516,7 +502,8 @@ public final LogSink updateSink(UpdateSinkRequest request) {
/**
* Creates or updates a sink.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create()) {
* String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
@@ -539,7 +526,8 @@ public final ApiCallable updateSinkCallable() {
/**
* Deletes a sink.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create()) {
* String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
@@ -547,8 +535,8 @@ public final ApiCallable updateSinkCallable() {
* }
*
*
- * @param sinkName The resource name of the sink to delete.
- * Example: `"projects/my-project-id/sinks/my-sink-id"`.
+ * @param sinkName The resource name of the sink to delete. Example:
+ * `"projects/my-project-id/sinks/my-sink-id"`.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final void deleteSink(String sinkName) {
@@ -561,7 +549,8 @@ public final void deleteSink(String sinkName) {
/**
* Deletes a sink.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create()) {
* String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
@@ -583,7 +572,8 @@ private final void deleteSink(DeleteSinkRequest request) {
/**
* Deletes a sink.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create()) {
* String formattedSinkName = ConfigServiceV2Api.formatSinkName("[PROJECT]", "[SINK]");
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Settings.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Settings.java
index 82273360d909..f44dddab6743 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Settings.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/ConfigServiceV2Settings.java
@@ -14,7 +14,6 @@
package com.google.cloud.logging.spi.v2;
import com.google.api.gax.core.ConnectionSettings;
-import com.google.api.gax.core.PagedListResponse;
import com.google.api.gax.core.RetrySettings;
import com.google.api.gax.grpc.ApiCallSettings;
import com.google.api.gax.grpc.PageStreamingCallSettings;
@@ -50,15 +49,14 @@
* The default instance has everything set to sensible defaults:
*
*
- * - The default service address (logging.googleapis.com) and default port (443)
- * are used.
- *
- Credentials are acquired automatically through Application Default Credentials.
- *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
- The default service address (logging.googleapis.com) and default port (443) are used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
*
*
- * 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 getSink to 30 seconds:
+ *
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 getSink to 30 seconds:
*
*
*
@@ -72,19 +70,13 @@
*/
@javax.annotation.Generated("by GAPIC")
public class ConfigServiceV2Settings extends ServiceApiSettings {
- /**
- * The default address of the service.
- */
+ /** The default address of the service. */
private static final String DEFAULT_SERVICE_ADDRESS = "logging.googleapis.com";
- /**
- * The default port of the service.
- */
+ /** The default port of the service. */
private static final int DEFAULT_SERVICE_PORT = 443;
- /**
- * The default scopes of the service.
- */
+ /** The default scopes of the service. */
private static final ImmutableList DEFAULT_SERVICE_SCOPES =
ImmutableList.builder()
.add("https://www.googleapis.com/auth/cloud-platform")
@@ -94,9 +86,7 @@ public class ConfigServiceV2Settings extends ServiceApiSettings {
.add("https://www.googleapis.com/auth/logging.write")
.build();
- /**
- * The default connection settings of the service.
- */
+ /** The default connection settings of the service. */
public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS =
ConnectionSettings.newBuilder()
.setServiceAddress(DEFAULT_SERVICE_ADDRESS)
@@ -111,80 +101,58 @@ public class ConfigServiceV2Settings extends ServiceApiSettings {
private final SimpleCallSettings updateSinkSettings;
private final SimpleCallSettings deleteSinkSettings;
- /**
- * Returns the object with the settings used for calls to listSinks.
- */
+ /** Returns the object with the settings used for calls to listSinks. */
public PageStreamingCallSettings
listSinksSettings() {
return listSinksSettings;
}
- /**
- * Returns the object with the settings used for calls to getSink.
- */
+ /** Returns the object with the settings used for calls to getSink. */
public SimpleCallSettings getSinkSettings() {
return getSinkSettings;
}
- /**
- * Returns the object with the settings used for calls to createSink.
- */
+ /** Returns the object with the settings used for calls to createSink. */
public SimpleCallSettings createSinkSettings() {
return createSinkSettings;
}
- /**
- * Returns the object with the settings used for calls to updateSink.
- */
+ /** Returns the object with the settings used for calls to updateSink. */
public SimpleCallSettings updateSinkSettings() {
return updateSinkSettings;
}
- /**
- * Returns the object with the settings used for calls to deleteSink.
- */
+ /** Returns the object with the settings used for calls to deleteSink. */
public SimpleCallSettings deleteSinkSettings() {
return deleteSinkSettings;
}
- /**
- * Returns the default service address.
- */
+ /** Returns the default service address. */
public static String getDefaultServiceAddress() {
return DEFAULT_SERVICE_ADDRESS;
}
- /**
- * Returns the default service port.
- */
+ /** Returns the default service port. */
public static int getDefaultServicePort() {
return DEFAULT_SERVICE_PORT;
}
- /**
- * Returns the default service scopes.
- */
+ /** Returns the default service scopes. */
public static ImmutableList getDefaultServiceScopes() {
return DEFAULT_SERVICE_SCOPES;
}
- /**
- * Returns a builder for this class with recommended defaults.
- */
+ /** Returns a builder for this class with recommended defaults. */
public static Builder defaultBuilder() {
return Builder.createDefault();
}
- /**
- * Returns a new builder for this class.
- */
+ /** Returns a new builder for this class. */
public static Builder newBuilder() {
return new Builder();
}
- /**
- * Returns a builder containing all the values of this settings class.
- */
+ /** Returns a builder containing all the values of this settings class. */
public Builder toBuilder() {
return new Builder(this);
}
@@ -239,9 +207,7 @@ public Iterable extractResources(ListSinksResponse payload) {
}
};
- /**
- * Builder for ConfigServiceV2Settings.
- */
+ /** Builder for ConfigServiceV2Settings. */
public static class Builder extends ServiceApiSettings.Builder {
private final ImmutableList methodSettingsBuilders;
@@ -404,47 +370,36 @@ public Builder setClientLibHeader(String name, String version) {
}
/**
- * Applies the given settings to all of the API methods in this service. Only
- * values that are non-null will be applied, so this method is not capable
- * of un-setting any values.
+ * Applies the given settings to all of the API methods in this service. Only values that are
+ * non-null will be applied, so this method is not capable of un-setting any values.
*/
public Builder applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings) throws Exception {
super.applyToAllApiMethods(methodSettingsBuilders, apiCallSettings);
return this;
}
- /**
- * Returns the builder for the settings used for calls to listSinks.
- */
+ /** Returns the builder for the settings used for calls to listSinks. */
public PageStreamingCallSettings.Builder
listSinksSettings() {
return listSinksSettings;
}
- /**
- * Returns the builder for the settings used for calls to getSink.
- */
+ /** Returns the builder for the settings used for calls to getSink. */
public SimpleCallSettings.Builder getSinkSettings() {
return getSinkSettings;
}
- /**
- * Returns the builder for the settings used for calls to createSink.
- */
+ /** Returns the builder for the settings used for calls to createSink. */
public SimpleCallSettings.Builder createSinkSettings() {
return createSinkSettings;
}
- /**
- * Returns the builder for the settings used for calls to updateSink.
- */
+ /** Returns the builder for the settings used for calls to updateSink. */
public SimpleCallSettings.Builder updateSinkSettings() {
return updateSinkSettings;
}
- /**
- * Returns the builder for the settings used for calls to deleteSink.
- */
+ /** Returns the builder for the settings used for calls to deleteSink. */
public SimpleCallSettings.Builder deleteSinkSettings() {
return deleteSinkSettings;
}
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java
index 712ca4ed21cc..0200b82f7d2a 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Api.java
@@ -52,28 +52,27 @@
*
*
* Note: close() needs to be called on the loggingServiceV2Api object to clean up resources such
- * as threads. In the example above, try-with-resources is used, which automatically calls
- * close().
+ * 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:
+ *
The surface of this class includes several types of Java methods for each of the API's
+ * methods:
*
*
- * - A "flattened" method. With this type of method, the fields of the request type have been
- * converted into function parameters. It may be the case that not all fields are available
- * as parameters, and not every API method will have a flattened method entry point.
- *
- A "request object" method. This type of method only takes one parameter, a request
- * object, which must be constructed before the call. Not every API method will have a request
- * object method.
- *
- A "callable" method. This type of method takes no parameters and returns an immutable
- * ApiCallable object, which can be used to initiate calls to the service.
+ *
- A "flattened" method. With this type of method, the fields of the request type have been
+ * converted into function parameters. It may be the case that not all fields are available as
+ * parameters, and not every API method will have a flattened method entry point.
+ *
- A "request object" method. This type of method only takes one parameter, a request object,
+ * which must be constructed before the call. Not every API method will have a request object
+ * method.
+ *
- A "callable" method. This type of method takes no parameters and returns an immutable
+ * ApiCallable object, which can be used to initiate calls to the service.
*
*
* 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.
+ *
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 LoggingServiceV2Settings to
* create(). For example:
@@ -118,59 +117,41 @@ public class LoggingServiceV2Api implements AutoCloseable {
private static final PathTemplate LOG_PATH_TEMPLATE =
PathTemplate.createWithoutUrlEncoding("projects/{project}/logs/{log}");
- /**
- * Formats a string containing the fully-qualified path to represent
- * a parent resource.
- */
+ /** Formats a string containing the fully-qualified path to represent a parent resource. */
public static final String formatParentName(String project) {
return PARENT_PATH_TEMPLATE.instantiate("project", project);
}
- /**
- * Formats a string containing the fully-qualified path to represent
- * a log resource.
- */
+ /** Formats a string containing the fully-qualified path to represent a log resource. */
public static final String formatLogName(String project, String log) {
return LOG_PATH_TEMPLATE.instantiate(
"project", project,
"log", log);
}
- /**
- * Parses the project from the given fully-qualified path which
- * represents a parent resource.
- */
+ /** Parses the project from the given fully-qualified path which represents a parent resource. */
public static final String parseProjectFromParentName(String parentName) {
return PARENT_PATH_TEMPLATE.parse(parentName).get("project");
}
- /**
- * Parses the project from the given fully-qualified path which
- * represents a log resource.
- */
+ /** Parses the project from the given fully-qualified path which represents a log resource. */
public static final String parseProjectFromLogName(String logName) {
return LOG_PATH_TEMPLATE.parse(logName).get("project");
}
- /**
- * Parses the log from the given fully-qualified path which
- * represents a log resource.
- */
+ /** Parses the log from the given fully-qualified path which represents a log resource. */
public static final String parseLogFromLogName(String logName) {
return LOG_PATH_TEMPLATE.parse(logName).get("log");
}
- /**
- * Constructs an instance of LoggingServiceV2Api with default settings.
- */
+ /** Constructs an instance of LoggingServiceV2Api with default settings. */
public static final LoggingServiceV2Api create() throws IOException {
return create(LoggingServiceV2Settings.defaultBuilder().build());
}
/**
- * Constructs an instance of LoggingServiceV2Api, using the given settings.
- * The channels are created based on the settings passed in, or defaults for any
- * settings that are not set.
+ * Constructs an instance of LoggingServiceV2Api, 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 LoggingServiceV2Api create(LoggingServiceV2Settings settings)
throws IOException {
@@ -178,9 +159,8 @@ public static final LoggingServiceV2Api create(LoggingServiceV2Settings settings
}
/**
- * Constructs an instance of LoggingServiceV2Api, using the given settings.
- * This is protected so that it easy to make a subclass, but otherwise, the static
- * factory methods should be preferred.
+ * Constructs an instance of LoggingServiceV2Api, using the given settings. This is protected so
+ * that it easy to make a subclass, but otherwise, the static factory methods should be preferred.
*/
protected LoggingServiceV2Api(LoggingServiceV2Settings settings) throws IOException {
this.settings = settings;
@@ -229,10 +209,10 @@ public final LoggingServiceV2Settings getSettings() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes a log and all its log entries.
- * The log will reappear if it receives new entries.
+ * Deletes a log and all its log entries. The log will reappear if it receives new entries.
+ *
+ *
Sample code:
*
- * Sample code:
*
* try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.create()) {
* String formattedLogName = LoggingServiceV2Api.formatLogName("[PROJECT]", "[LOG]");
@@ -240,8 +220,8 @@ public final LoggingServiceV2Settings getSettings() {
* }
*
*
- * @param logName Required. The resource name of the log to delete. Example:
- * `"projects/my-project/logs/syslog"`.
+ * @param logName Required. The resource name of the log to delete. Example:
+ * `"projects/my-project/logs/syslog"`.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final void deleteLog(String logName) {
@@ -252,10 +232,10 @@ public final void deleteLog(String logName) {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes a log and all its log entries.
- * The log will reappear if it receives new entries.
+ * Deletes a log and all its log entries. The log will reappear if it receives new entries.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.create()) {
* String formattedLogName = LoggingServiceV2Api.formatLogName("[PROJECT]", "[LOG]");
@@ -275,10 +255,10 @@ private final void deleteLog(DeleteLogRequest request) {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes a log and all its log entries.
- * The log will reappear if it receives new entries.
+ * Deletes a log and all its log entries. The log will reappear if it receives new entries.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.create()) {
* String formattedLogName = LoggingServiceV2Api.formatLogName("[PROJECT]", "[LOG]");
@@ -297,10 +277,10 @@ public final ApiCallable deleteLogCallable() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Writes log entries to Stackdriver Logging. All log entries are
- * written by this method.
+ * Writes log entries to Stackdriver Logging. All log entries are written by this method.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.create()) {
* String formattedLogName = LoggingServiceV2Api.formatLogName("[PROJECT]", "[LOG]");
@@ -311,22 +291,19 @@ public final ApiCallable deleteLogCallable() {
* }
*
*
- * @param logName Optional. A default log resource name for those log entries in `entries`
- * that do not specify their own `logName`. Example:
- * `"projects/my-project/logs/syslog"`. See
- * [LogEntry][google.logging.v2.LogEntry].
- * @param resource Optional. A default monitored resource for those log entries in `entries`
- * that do not specify their own `resource`.
- * @param labels Optional. User-defined `key:value` items that are added to
- * the `labels` field of each log entry in `entries`, except when a log
- * entry specifies its own `key:value` item with the same key.
- * Example: `{ "size": "large", "color":"red" }`
- * @param entries Required. The log entries to write. The log entries must have values for
- * all required fields.
- *
- * To improve throughput and to avoid exceeding the quota limit for calls
- * to `entries.write`, use this field to write multiple log entries at once
- * rather than // calling this method for each log entry.
+ * @param logName Optional. A default log resource name for those log entries in `entries` that do
+ * not specify their own `logName`. Example: `"projects/my-project/logs/syslog"`. See
+ * [LogEntry][google.logging.v2.LogEntry].
+ * @param resource Optional. A default monitored resource for those log entries in `entries` that
+ * do not specify their own `resource`.
+ * @param labels Optional. User-defined `key:value` items that are added to the `labels` field of
+ * each log entry in `entries`, except when a log entry specifies its own `key:value` item
+ * with the same key. Example: `{ "size": "large", "color":"red" }`
+ * @param entries Required. The log entries to write. The log entries must have values for all
+ * required fields.
+ * To improve throughput and to avoid exceeding the quota limit for calls to
+ * `entries.write`, use this field to write multiple log entries at once rather than //
+ * calling this method for each log entry.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final WriteLogEntriesResponse writeLogEntries(
@@ -349,10 +326,10 @@ public final WriteLogEntriesResponse writeLogEntries(
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Writes log entries to Stackdriver Logging. All log entries are
- * written by this method.
+ * Writes log entries to Stackdriver Logging. All log entries are written by this method.
+ *
+ *
Sample code:
*
- * Sample code:
*
* try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.create()) {
* List<LogEntry> entries = new ArrayList<>();
@@ -372,10 +349,10 @@ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest requ
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Writes log entries to Stackdriver Logging. All log entries are
- * written by this method.
+ * Writes log entries to Stackdriver Logging. All log entries are written by this method.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.create()) {
* List<LogEntry> entries = new ArrayList<>();
@@ -395,11 +372,11 @@ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest requ
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists log entries. Use this method to retrieve log entries from Cloud
- * Logging. For ways to export log entries, see
- * [Exporting Logs](/logging/docs/export).
+ * Lists log entries. Use this method to retrieve log entries from Cloud Logging. For ways to
+ * export log entries, see [Exporting Logs](/logging/docs/export).
+ *
+ * Sample code:
*
- * Sample code:
*
* try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.create()) {
* List<String> projectIds = new ArrayList<>();
@@ -412,17 +389,15 @@ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest requ
*
*
* @param projectIds Required. One or more project IDs or project numbers from which to retrieve
- * log entries. Examples of a project ID: `"my-project-1A"`, `"1234567890"`.
- * @param filter Optional. An [advanced logs filter](/logging/docs/view/advanced_filters).
- * The filter is compared against all log entries in the projects specified by
- * `projectIds`. Only entries that match the filter are retrieved. An empty
- * filter matches all log entries.
- * @param orderBy Optional. How the results should be sorted. Presently, the only permitted
- * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first
- * option returns entries in order of increasing values of
- * `LogEntry.timestamp` (oldest first), and the second option returns entries
- * in order of decreasing timestamps (newest first). Entries with equal
- * timestamps are returned in order of `LogEntry.insertId`.
+ * log entries. Examples of a project ID: `"my-project-1A"`, `"1234567890"`.
+ * @param filter Optional. An [advanced logs filter](/logging/docs/view/advanced_filters). The
+ * filter is compared against all log entries in the projects specified by `projectIds`. Only
+ * entries that match the filter are retrieved. An empty filter matches all log entries.
+ * @param orderBy Optional. How the results should be sorted. Presently, the only permitted values
+ * are `"timestamp asc"` (default) and `"timestamp desc"`. The first option returns entries in
+ * order of increasing values of `LogEntry.timestamp` (oldest first), and the second option
+ * returns entries in order of decreasing timestamps (newest first). Entries with equal
+ * timestamps are returned in order of `LogEntry.insertId`.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final PagedListResponse
@@ -438,11 +413,11 @@ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest requ
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists log entries. Use this method to retrieve log entries from Cloud
- * Logging. For ways to export log entries, see
- * [Exporting Logs](/logging/docs/export).
+ * Lists log entries. Use this method to retrieve log entries from Cloud Logging. For ways to
+ * export log entries, see [Exporting Logs](/logging/docs/export).
+ *
+ * Sample code:
*
- * Sample code:
*
* try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.create()) {
* List<String> projectIds = new ArrayList<>();
@@ -465,11 +440,11 @@ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest requ
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists log entries. Use this method to retrieve log entries from Cloud
- * Logging. For ways to export log entries, see
- * [Exporting Logs](/logging/docs/export).
+ * Lists log entries. Use this method to retrieve log entries from Cloud Logging. For ways to
+ * export log entries, see [Exporting Logs](/logging/docs/export).
+ *
+ * Sample code:
*
- * Sample code:
*
* try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.create()) {
* List<String> projectIds = new ArrayList<>();
@@ -493,11 +468,11 @@ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest requ
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists log entries. Use this method to retrieve log entries from Cloud
- * Logging. For ways to export log entries, see
- * [Exporting Logs](/logging/docs/export).
+ * Lists log entries. Use this method to retrieve log entries from Cloud Logging. For ways to
+ * export log entries, see [Exporting Logs](/logging/docs/export).
+ *
+ * Sample code:
*
- * Sample code:
*
* try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.create()) {
* List<String> projectIds = new ArrayList<>();
@@ -527,7 +502,8 @@ public final ApiCallable listLogE
/**
* Lists the monitored resource descriptors used by Stackdriver Logging.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.create()) {
* ListMonitoredResourceDescriptorsRequest request = ListMonitoredResourceDescriptorsRequest.newBuilder().build();
@@ -551,7 +527,8 @@ public final ApiCallable listLogE
/**
* Lists the monitored resource descriptors used by Stackdriver Logging.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.create()) {
* ListMonitoredResourceDescriptorsRequest request = ListMonitoredResourceDescriptorsRequest.newBuilder().build();
@@ -576,7 +553,8 @@ public final ApiCallable listLogE
/**
* Lists the monitored resource descriptors used by Stackdriver Logging.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.create()) {
* ListMonitoredResourceDescriptorsRequest request = ListMonitoredResourceDescriptorsRequest.newBuilder().build();
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Settings.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Settings.java
index 0cc02e00c964..3db49f10b4f0 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Settings.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/LoggingServiceV2Settings.java
@@ -15,7 +15,6 @@
import com.google.api.MonitoredResourceDescriptor;
import com.google.api.gax.core.ConnectionSettings;
-import com.google.api.gax.core.PagedListResponse;
import com.google.api.gax.core.RetrySettings;
import com.google.api.gax.grpc.ApiCallSettings;
import com.google.api.gax.grpc.PageStreamingCallSettings;
@@ -52,15 +51,14 @@
* The default instance has everything set to sensible defaults:
*
*
- * - The default service address (logging.googleapis.com) and default port (443)
- * are used.
- *
- Credentials are acquired automatically through Application Default Credentials.
- *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
- The default service address (logging.googleapis.com) and default port (443) are used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
*
*
- * 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 deleteLog to 30 seconds:
+ *
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 deleteLog to 30 seconds:
*
*
*
@@ -74,19 +72,13 @@
*/
@javax.annotation.Generated("by GAPIC")
public class LoggingServiceV2Settings extends ServiceApiSettings {
- /**
- * The default address of the service.
- */
+ /** The default address of the service. */
private static final String DEFAULT_SERVICE_ADDRESS = "logging.googleapis.com";
- /**
- * The default port of the service.
- */
+ /** The default port of the service. */
private static final int DEFAULT_SERVICE_PORT = 443;
- /**
- * The default scopes of the service.
- */
+ /** The default scopes of the service. */
private static final ImmutableList DEFAULT_SERVICE_SCOPES =
ImmutableList.builder()
.add("https://www.googleapis.com/auth/cloud-platform")
@@ -96,9 +88,7 @@ public class LoggingServiceV2Settings extends ServiceApiSettings {
.add("https://www.googleapis.com/auth/logging.write")
.build();
- /**
- * The default connection settings of the service.
- */
+ /** The default connection settings of the service. */
public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS =
ConnectionSettings.newBuilder()
.setServiceAddress(DEFAULT_SERVICE_ADDRESS)
@@ -116,32 +106,24 @@ public class LoggingServiceV2Settings extends ServiceApiSettings {
MonitoredResourceDescriptor>
listMonitoredResourceDescriptorsSettings;
- /**
- * Returns the object with the settings used for calls to deleteLog.
- */
+ /** Returns the object with the settings used for calls to deleteLog. */
public SimpleCallSettings deleteLogSettings() {
return deleteLogSettings;
}
- /**
- * Returns the object with the settings used for calls to writeLogEntries.
- */
+ /** Returns the object with the settings used for calls to writeLogEntries. */
public SimpleCallSettings
writeLogEntriesSettings() {
return writeLogEntriesSettings;
}
- /**
- * Returns the object with the settings used for calls to listLogEntries.
- */
+ /** Returns the object with the settings used for calls to listLogEntries. */
public PageStreamingCallSettings
listLogEntriesSettings() {
return listLogEntriesSettings;
}
- /**
- * Returns the object with the settings used for calls to listMonitoredResourceDescriptors.
- */
+ /** Returns the object with the settings used for calls to listMonitoredResourceDescriptors. */
public PageStreamingCallSettings<
ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse,
MonitoredResourceDescriptor>
@@ -149,44 +131,32 @@ public SimpleCallSettings deleteLogSettings() {
return listMonitoredResourceDescriptorsSettings;
}
- /**
- * Returns the default service address.
- */
+ /** Returns the default service address. */
public static String getDefaultServiceAddress() {
return DEFAULT_SERVICE_ADDRESS;
}
- /**
- * Returns the default service port.
- */
+ /** Returns the default service port. */
public static int getDefaultServicePort() {
return DEFAULT_SERVICE_PORT;
}
- /**
- * Returns the default service scopes.
- */
+ /** Returns the default service scopes. */
public static ImmutableList getDefaultServiceScopes() {
return DEFAULT_SERVICE_SCOPES;
}
- /**
- * Returns a builder for this class with recommended defaults.
- */
+ /** Returns a builder for this class with recommended defaults. */
public static Builder defaultBuilder() {
return Builder.createDefault();
}
- /**
- * Returns a new builder for this class.
- */
+ /** Returns a new builder for this class. */
public static Builder newBuilder() {
return new Builder();
}
- /**
- * Returns a builder containing all the values of this settings class.
- */
+ /** Returns a builder containing all the values of this settings class. */
public Builder toBuilder() {
return new Builder(this);
}
@@ -288,9 +258,7 @@ public Iterable extractResources(
}
};
- /**
- * Builder for LoggingServiceV2Settings.
- */
+ /** Builder for LoggingServiceV2Settings. */
public static class Builder extends ServiceApiSettings.Builder {
private final ImmutableList methodSettingsBuilders;
@@ -462,42 +430,33 @@ public Builder setClientLibHeader(String name, String version) {
}
/**
- * Applies the given settings to all of the API methods in this service. Only
- * values that are non-null will be applied, so this method is not capable
- * of un-setting any values.
+ * Applies the given settings to all of the API methods in this service. Only values that are
+ * non-null will be applied, so this method is not capable of un-setting any values.
*/
public Builder applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings) throws Exception {
super.applyToAllApiMethods(methodSettingsBuilders, apiCallSettings);
return this;
}
- /**
- * Returns the builder for the settings used for calls to deleteLog.
- */
+ /** Returns the builder for the settings used for calls to deleteLog. */
public SimpleCallSettings.Builder deleteLogSettings() {
return deleteLogSettings;
}
- /**
- * Returns the builder for the settings used for calls to writeLogEntries.
- */
+ /** Returns the builder for the settings used for calls to writeLogEntries. */
public SimpleCallSettings.Builder
writeLogEntriesSettings() {
return writeLogEntriesSettings;
}
- /**
- * Returns the builder for the settings used for calls to listLogEntries.
- */
+ /** Returns the builder for the settings used for calls to listLogEntries. */
public PageStreamingCallSettings.Builder<
ListLogEntriesRequest, ListLogEntriesResponse, LogEntry>
listLogEntriesSettings() {
return listLogEntriesSettings;
}
- /**
- * Returns the builder for the settings used for calls to listMonitoredResourceDescriptors.
- */
+ /** Returns the builder for the settings used for calls to listMonitoredResourceDescriptors. */
public PageStreamingCallSettings.Builder<
ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse,
MonitoredResourceDescriptor>
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java
index 53c07512a22c..e458ba1c756e 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java
@@ -48,28 +48,27 @@
*
*
* Note: close() needs to be called on the metricsServiceV2Api object to clean up resources such
- * as threads. In the example above, try-with-resources is used, which automatically calls
- * close().
+ * 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:
+ *
The surface of this class includes several types of Java methods for each of the API's
+ * methods:
*
*
- * - A "flattened" method. With this type of method, the fields of the request type have been
- * converted into function parameters. It may be the case that not all fields are available
- * as parameters, and not every API method will have a flattened method entry point.
- *
- A "request object" method. This type of method only takes one parameter, a request
- * object, which must be constructed before the call. Not every API method will have a request
- * object method.
- *
- A "callable" method. This type of method takes no parameters and returns an immutable
- * ApiCallable object, which can be used to initiate calls to the service.
+ *
- A "flattened" method. With this type of method, the fields of the request type have been
+ * converted into function parameters. It may be the case that not all fields are available as
+ * parameters, and not every API method will have a flattened method entry point.
+ *
- A "request object" method. This type of method only takes one parameter, a request object,
+ * which must be constructed before the call. Not every API method will have a request object
+ * method.
+ *
- A "callable" method. This type of method takes no parameters and returns an immutable
+ * ApiCallable object, which can be used to initiate calls to the service.
*
*
* 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.
+ *
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 MetricsServiceV2Settings to
* create(). For example:
@@ -106,59 +105,41 @@ public class MetricsServiceV2Api implements AutoCloseable {
private static final PathTemplate METRIC_PATH_TEMPLATE =
PathTemplate.createWithoutUrlEncoding("projects/{project}/metrics/{metric}");
- /**
- * Formats a string containing the fully-qualified path to represent
- * a parent resource.
- */
+ /** Formats a string containing the fully-qualified path to represent a parent resource. */
public static final String formatParentName(String project) {
return PARENT_PATH_TEMPLATE.instantiate("project", project);
}
- /**
- * Formats a string containing the fully-qualified path to represent
- * a metric resource.
- */
+ /** Formats a string containing the fully-qualified path to represent a metric resource. */
public static final String formatMetricName(String project, String metric) {
return METRIC_PATH_TEMPLATE.instantiate(
"project", project,
"metric", metric);
}
- /**
- * Parses the project from the given fully-qualified path which
- * represents a parent resource.
- */
+ /** Parses the project from the given fully-qualified path which represents a parent resource. */
public static final String parseProjectFromParentName(String parentName) {
return PARENT_PATH_TEMPLATE.parse(parentName).get("project");
}
- /**
- * Parses the project from the given fully-qualified path which
- * represents a metric resource.
- */
+ /** Parses the project from the given fully-qualified path which represents a metric resource. */
public static final String parseProjectFromMetricName(String metricName) {
return METRIC_PATH_TEMPLATE.parse(metricName).get("project");
}
- /**
- * Parses the metric from the given fully-qualified path which
- * represents a metric resource.
- */
+ /** Parses the metric from the given fully-qualified path which represents a metric resource. */
public static final String parseMetricFromMetricName(String metricName) {
return METRIC_PATH_TEMPLATE.parse(metricName).get("metric");
}
- /**
- * Constructs an instance of MetricsServiceV2Api with default settings.
- */
+ /** Constructs an instance of MetricsServiceV2Api with default settings. */
public static final MetricsServiceV2Api create() throws IOException {
return create(MetricsServiceV2Settings.defaultBuilder().build());
}
/**
- * Constructs an instance of MetricsServiceV2Api, using the given settings.
- * The channels are created based on the settings passed in, or defaults for any
- * settings that are not set.
+ * Constructs an instance of MetricsServiceV2Api, 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 MetricsServiceV2Api create(MetricsServiceV2Settings settings)
throws IOException {
@@ -166,9 +147,8 @@ public static final MetricsServiceV2Api create(MetricsServiceV2Settings settings
}
/**
- * Constructs an instance of MetricsServiceV2Api, using the given settings.
- * This is protected so that it easy to make a subclass, but otherwise, the static
- * factory methods should be preferred.
+ * Constructs an instance of MetricsServiceV2Api, using the given settings. This is protected so
+ * that it easy to make a subclass, but otherwise, the static factory methods should be preferred.
*/
protected MetricsServiceV2Api(MetricsServiceV2Settings settings) throws IOException {
this.settings = settings;
@@ -217,7 +197,8 @@ public final MetricsServiceV2Settings getSettings() {
/**
* Lists logs-based metrics.
*
- * Sample code:
+ *
Sample code:
+ *
*
* try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create()) {
* String formattedParent = MetricsServiceV2Api.formatParentName("[PROJECT]");
@@ -227,8 +208,8 @@ public final MetricsServiceV2Settings getSettings() {
* }
*
*
- * @param parent Required. The resource name containing the metrics.
- * Example: `"projects/my-project-id"`.
+ * @param parent Required. The resource name containing the metrics. Example:
+ * `"projects/my-project-id"`.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final PagedListResponse
@@ -242,7 +223,8 @@ public final MetricsServiceV2Settings getSettings() {
/**
* Lists logs-based metrics.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create()) {
* String formattedParent = MetricsServiceV2Api.formatParentName("[PROJECT]");
@@ -267,7 +249,8 @@ public final MetricsServiceV2Settings getSettings() {
/**
* Lists logs-based metrics.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create()) {
* String formattedParent = MetricsServiceV2Api.formatParentName("[PROJECT]");
@@ -293,7 +276,8 @@ public final MetricsServiceV2Settings getSettings() {
/**
* Lists logs-based metrics.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create()) {
* String formattedParent = MetricsServiceV2Api.formatParentName("[PROJECT]");
@@ -323,7 +307,8 @@ public final ApiCallable listLogM
/**
* Gets a logs-based metric.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create()) {
* String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
@@ -331,8 +316,8 @@ public final ApiCallable listLogM
* }
*
*
- * @param metricName The resource name of the desired metric.
- * Example: `"projects/my-project-id/metrics/my-metric-id"`.
+ * @param metricName The resource name of the desired metric. Example:
+ * `"projects/my-project-id/metrics/my-metric-id"`.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final LogMetric getLogMetric(String metricName) {
@@ -346,7 +331,8 @@ public final LogMetric getLogMetric(String metricName) {
/**
* Gets a logs-based metric.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create()) {
* String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
@@ -368,7 +354,8 @@ private final LogMetric getLogMetric(GetLogMetricRequest request) {
/**
* Gets a logs-based metric.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create()) {
* String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
@@ -389,7 +376,8 @@ public final ApiCallable getLogMetricCallable()
/**
* Creates a logs-based metric.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create()) {
* String formattedParent = MetricsServiceV2Api.formatParentName("[PROJECT]");
@@ -398,12 +386,10 @@ public final ApiCallable getLogMetricCallable()
* }
*
*
- * @param parent The resource name of the project in which to create the metric.
- * Example: `"projects/my-project-id"`.
- *
- * The new metric must be provided in the request.
- * @param metric The new logs-based metric, which must not have an identifier that
- * already exists.
+ * @param parent The resource name of the project in which to create the metric. Example:
+ * `"projects/my-project-id"`.
+ * The new metric must be provided in the request.
+ * @param metric The new logs-based metric, which must not have an identifier that already exists.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final LogMetric createLogMetric(String parent, LogMetric metric) {
@@ -417,7 +403,8 @@ public final LogMetric createLogMetric(String parent, LogMetric metric) {
/**
* Creates a logs-based metric.
*
- * Sample code:
+ *
Sample code:
+ *
*
* try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create()) {
* String formattedParent = MetricsServiceV2Api.formatParentName("[PROJECT]");
@@ -441,7 +428,8 @@ public final LogMetric createLogMetric(CreateLogMetricRequest request) {
/**
* Creates a logs-based metric.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create()) {
* String formattedParent = MetricsServiceV2Api.formatParentName("[PROJECT]");
@@ -464,7 +452,8 @@ public final ApiCallable createLogMetricCalla
/**
* Creates or updates a logs-based metric.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create()) {
* String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
@@ -473,15 +462,12 @@ public final ApiCallable createLogMetricCalla
* }
*
*
- * @param metricName The resource name of the metric to update.
- * Example: `"projects/my-project-id/metrics/my-metric-id"`.
- *
- * The updated metric must be provided in the request and have the
- * same identifier that is specified in `metricName`.
- * If the metric does not exist, it is created.
- * @param metric The updated metric, whose name must be the same as the
- * metric identifier in `metricName`. If `metricName` does not
- * exist, then a new metric is created.
+ * @param metricName The resource name of the metric to update. Example:
+ * `"projects/my-project-id/metrics/my-metric-id"`.
+ * The updated metric must be provided in the request and have the same identifier that is
+ * specified in `metricName`. If the metric does not exist, it is created.
+ * @param metric The updated metric, whose name must be the same as the metric identifier in
+ * `metricName`. If `metricName` does not exist, then a new metric is created.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final LogMetric updateLogMetric(String metricName, LogMetric metric) {
@@ -495,7 +481,8 @@ public final LogMetric updateLogMetric(String metricName, LogMetric metric) {
/**
* Creates or updates a logs-based metric.
*
- * Sample code:
+ *
Sample code:
+ *
*
* try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create()) {
* String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
@@ -519,7 +506,8 @@ public final LogMetric updateLogMetric(UpdateLogMetricRequest request) {
/**
* Creates or updates a logs-based metric.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create()) {
* String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
@@ -542,7 +530,8 @@ public final ApiCallable updateLogMetricCalla
/**
* Deletes a logs-based metric.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create()) {
* String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
@@ -550,8 +539,8 @@ public final ApiCallable updateLogMetricCalla
* }
*
*
- * @param metricName The resource name of the metric to delete.
- * Example: `"projects/my-project-id/metrics/my-metric-id"`.
+ * @param metricName The resource name of the metric to delete. Example:
+ * `"projects/my-project-id/metrics/my-metric-id"`.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final void deleteLogMetric(String metricName) {
@@ -565,7 +554,8 @@ public final void deleteLogMetric(String metricName) {
/**
* Deletes a logs-based metric.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create()) {
* String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
@@ -587,7 +577,8 @@ private final void deleteLogMetric(DeleteLogMetricRequest request) {
/**
* Deletes a logs-based metric.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create()) {
* String formattedMetricName = MetricsServiceV2Api.formatMetricName("[PROJECT]", "[METRIC]");
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Settings.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Settings.java
index c58f60f8e3e0..33302e500c2f 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Settings.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Settings.java
@@ -14,7 +14,6 @@
package com.google.cloud.logging.spi.v2;
import com.google.api.gax.core.ConnectionSettings;
-import com.google.api.gax.core.PagedListResponse;
import com.google.api.gax.core.RetrySettings;
import com.google.api.gax.grpc.ApiCallSettings;
import com.google.api.gax.grpc.PageStreamingCallSettings;
@@ -50,15 +49,14 @@
* The default instance has everything set to sensible defaults:
*
*
- * - The default service address (logging.googleapis.com) and default port (443)
- * are used.
- *
- Credentials are acquired automatically through Application Default Credentials.
- *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
- The default service address (logging.googleapis.com) and default port (443) are used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
*
*
- * 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 getLogMetric to 30 seconds:
+ *
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 getLogMetric to 30 seconds:
*
*
*
@@ -72,19 +70,13 @@
*/
@javax.annotation.Generated("by GAPIC")
public class MetricsServiceV2Settings extends ServiceApiSettings {
- /**
- * The default address of the service.
- */
+ /** The default address of the service. */
private static final String DEFAULT_SERVICE_ADDRESS = "logging.googleapis.com";
- /**
- * The default port of the service.
- */
+ /** The default port of the service. */
private static final int DEFAULT_SERVICE_PORT = 443;
- /**
- * The default scopes of the service.
- */
+ /** The default scopes of the service. */
private static final ImmutableList DEFAULT_SERVICE_SCOPES =
ImmutableList.builder()
.add("https://www.googleapis.com/auth/cloud-platform")
@@ -94,9 +86,7 @@ public class MetricsServiceV2Settings extends ServiceApiSettings {
.add("https://www.googleapis.com/auth/logging.write")
.build();
- /**
- * The default connection settings of the service.
- */
+ /** The default connection settings of the service. */
public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS =
ConnectionSettings.newBuilder()
.setServiceAddress(DEFAULT_SERVICE_ADDRESS)
@@ -111,80 +101,58 @@ public class MetricsServiceV2Settings extends ServiceApiSettings {
private final SimpleCallSettings updateLogMetricSettings;
private final SimpleCallSettings deleteLogMetricSettings;
- /**
- * Returns the object with the settings used for calls to listLogMetrics.
- */
+ /** Returns the object with the settings used for calls to listLogMetrics. */
public PageStreamingCallSettings
listLogMetricsSettings() {
return listLogMetricsSettings;
}
- /**
- * Returns the object with the settings used for calls to getLogMetric.
- */
+ /** Returns the object with the settings used for calls to getLogMetric. */
public SimpleCallSettings getLogMetricSettings() {
return getLogMetricSettings;
}
- /**
- * Returns the object with the settings used for calls to createLogMetric.
- */
+ /** Returns the object with the settings used for calls to createLogMetric. */
public SimpleCallSettings createLogMetricSettings() {
return createLogMetricSettings;
}
- /**
- * Returns the object with the settings used for calls to updateLogMetric.
- */
+ /** Returns the object with the settings used for calls to updateLogMetric. */
public SimpleCallSettings updateLogMetricSettings() {
return updateLogMetricSettings;
}
- /**
- * Returns the object with the settings used for calls to deleteLogMetric.
- */
+ /** Returns the object with the settings used for calls to deleteLogMetric. */
public SimpleCallSettings deleteLogMetricSettings() {
return deleteLogMetricSettings;
}
- /**
- * Returns the default service address.
- */
+ /** Returns the default service address. */
public static String getDefaultServiceAddress() {
return DEFAULT_SERVICE_ADDRESS;
}
- /**
- * Returns the default service port.
- */
+ /** Returns the default service port. */
public static int getDefaultServicePort() {
return DEFAULT_SERVICE_PORT;
}
- /**
- * Returns the default service scopes.
- */
+ /** Returns the default service scopes. */
public static ImmutableList getDefaultServiceScopes() {
return DEFAULT_SERVICE_SCOPES;
}
- /**
- * Returns a builder for this class with recommended defaults.
- */
+ /** Returns a builder for this class with recommended defaults. */
public static Builder defaultBuilder() {
return Builder.createDefault();
}
- /**
- * Returns a new builder for this class.
- */
+ /** Returns a new builder for this class. */
public static Builder newBuilder() {
return new Builder();
}
- /**
- * Returns a builder containing all the values of this settings class.
- */
+ /** Returns a builder containing all the values of this settings class. */
public Builder toBuilder() {
return new Builder(this);
}
@@ -241,9 +209,7 @@ public Iterable extractResources(ListLogMetricsResponse payload) {
}
};
- /**
- * Builder for MetricsServiceV2Settings.
- */
+ /** Builder for MetricsServiceV2Settings. */
public static class Builder extends ServiceApiSettings.Builder {
private final ImmutableList methodSettingsBuilders;
@@ -413,48 +379,37 @@ public Builder setClientLibHeader(String name, String version) {
}
/**
- * Applies the given settings to all of the API methods in this service. Only
- * values that are non-null will be applied, so this method is not capable
- * of un-setting any values.
+ * Applies the given settings to all of the API methods in this service. Only values that are
+ * non-null will be applied, so this method is not capable of un-setting any values.
*/
public Builder applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings) throws Exception {
super.applyToAllApiMethods(methodSettingsBuilders, apiCallSettings);
return this;
}
- /**
- * Returns the builder for the settings used for calls to listLogMetrics.
- */
+ /** Returns the builder for the settings used for calls to listLogMetrics. */
public PageStreamingCallSettings.Builder<
ListLogMetricsRequest, ListLogMetricsResponse, LogMetric>
listLogMetricsSettings() {
return listLogMetricsSettings;
}
- /**
- * Returns the builder for the settings used for calls to getLogMetric.
- */
+ /** Returns the builder for the settings used for calls to getLogMetric. */
public SimpleCallSettings.Builder getLogMetricSettings() {
return getLogMetricSettings;
}
- /**
- * Returns the builder for the settings used for calls to createLogMetric.
- */
+ /** Returns the builder for the settings used for calls to createLogMetric. */
public SimpleCallSettings.Builder createLogMetricSettings() {
return createLogMetricSettings;
}
- /**
- * Returns the builder for the settings used for calls to updateLogMetric.
- */
+ /** Returns the builder for the settings used for calls to updateLogMetric. */
public SimpleCallSettings.Builder updateLogMetricSettings() {
return updateLogMetricSettings;
}
- /**
- * Returns the builder for the settings used for calls to deleteLogMetric.
- */
+ /** Returns the builder for the settings used for calls to deleteLogMetric. */
public SimpleCallSettings.Builder deleteLogMetricSettings() {
return deleteLogMetricSettings;
}
diff --git a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/package-info.java b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/package-info.java
index e16b370463dc..c579f3ff26d6 100644
--- a/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/package-info.java
+++ b/google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/package-info.java
@@ -15,15 +15,14 @@
/**
* A client to Stackdriver Logging API.
*
- * The interfaces provided are listed below, along with a usage sample
+ * The interfaces provided are listed below, along with a usage sample
*
- * ===================
- * LoggingServiceV2Api
- * ===================
+ *
=================== LoggingServiceV2Api ===================
*
- * Service Description: Service for ingesting and querying logs.
+ *
Service Description: Service for ingesting and querying logs.
+ *
+ *
Sample for LoggingServiceV2Api:
*
- * Sample for LoggingServiceV2Api:
*
*
* try (LoggingServiceV2Api loggingServiceV2Api = LoggingServiceV2Api.create()) {
@@ -33,14 +32,13 @@
*
*
*
- * ==================
- * ConfigServiceV2Api
- * ==================
+ * ================== ConfigServiceV2Api ==================
+ *
+ * Service Description: Service for configuring sinks used to export log entries outside
+ * Stackdriver Logging.
*
- * Service Description: Service for configuring sinks used to export log entries outside Stackdriver
- * Logging.
+ *
Sample for ConfigServiceV2Api:
*
- * Sample for ConfigServiceV2Api:
*
*
* try (ConfigServiceV2Api configServiceV2Api = ConfigServiceV2Api.create()) {
@@ -50,13 +48,12 @@
*
*
*
- * ===================
- * MetricsServiceV2Api
- * ===================
+ * =================== MetricsServiceV2Api ===================
*
- * Service Description: Service for configuring logs-based metrics.
+ * Service Description: Service for configuring logs-based metrics.
+ *
+ *
Sample for MetricsServiceV2Api:
*
- * Sample for MetricsServiceV2Api:
*
*
* try (MetricsServiceV2Api metricsServiceV2Api = MetricsServiceV2Api.create()) {
@@ -65,6 +62,5 @@
* }
*
*
- *
*/
package com.google.cloud.logging.spi.v2;
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/AgentTranslationServiceApi.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/AgentTranslationServiceApi.java
index f08630cd7fa9..a81142c23194 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/AgentTranslationServiceApi.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/AgentTranslationServiceApi.java
@@ -28,9 +28,8 @@
// AUTO-GENERATED DOCUMENTATION AND SERVICE
/**
- * Service Description: The AgentTranslation API allows `collectd`-based agents to
- * write time series data to Cloud Monitoring.
- * See [google.monitoring.v3.MetricService.CreateTimeSeries] instead.
+ * Service Description: The AgentTranslation API allows `collectd`-based agents to write time series
+ * data to Cloud Monitoring. See [google.monitoring.v3.MetricService.CreateTimeSeries] instead.
*
* 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:
@@ -47,32 +46,32 @@
*
*
*
- * Note: close() needs to be called on the agentTranslationServiceApi object to clean up resources such
- * as threads. In the example above, try-with-resources is used, which automatically calls
- * close().
+ *
Note: close() needs to be called on the agentTranslationServiceApi 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:
+ *
The surface of this class includes several types of Java methods for each of the API's
+ * methods:
*
*
- * - A "flattened" method. With this type of method, the fields of the request type have been
- * converted into function parameters. It may be the case that not all fields are available
- * as parameters, and not every API method will have a flattened method entry point.
- *
- A "request object" method. This type of method only takes one parameter, a request
- * object, which must be constructed before the call. Not every API method will have a request
- * object method.
- *
- A "callable" method. This type of method takes no parameters and returns an immutable
- * ApiCallable object, which can be used to initiate calls to the service.
+ *
- A "flattened" method. With this type of method, the fields of the request type have been
+ * converted into function parameters. It may be the case that not all fields are available as
+ * parameters, and not every API method will have a flattened method entry point.
+ *
- A "request object" method. This type of method only takes one parameter, a request object,
+ * which must be constructed before the call. Not every API method will have a request object
+ * method.
+ *
- A "callable" method. This type of method takes no parameters and returns an immutable
+ * ApiCallable object, which can be used to initiate calls to the service.
*
*
* 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.
+ *
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 AgentTranslationServiceSettings to
- * create(). For example:
+ *
This class can be customized by passing in a custom instance of
+ * AgentTranslationServiceSettings to create(). For example:
*
*
*
@@ -96,33 +95,24 @@ public class AgentTranslationServiceApi implements AutoCloseable {
private static final PathTemplate PROJECT_PATH_TEMPLATE =
PathTemplate.createWithoutUrlEncoding("projects/{project}");
- /**
- * Formats a string containing the fully-qualified path to represent
- * a project resource.
- */
+ /** Formats a string containing the fully-qualified path to represent a project resource. */
public static final String formatProjectName(String project) {
return PROJECT_PATH_TEMPLATE.instantiate("project", project);
}
- /**
- * Parses the project from the given fully-qualified path which
- * represents a project resource.
- */
+ /** Parses the project from the given fully-qualified path which represents a project resource. */
public static final String parseProjectFromProjectName(String projectName) {
return PROJECT_PATH_TEMPLATE.parse(projectName).get("project");
}
- /**
- * Constructs an instance of AgentTranslationServiceApi with default settings.
- */
+ /** Constructs an instance of AgentTranslationServiceApi with default settings. */
public static final AgentTranslationServiceApi create() throws IOException {
return create(AgentTranslationServiceSettings.defaultBuilder().build());
}
/**
- * Constructs an instance of AgentTranslationServiceApi, using the given settings.
- * The channels are created based on the settings passed in, or defaults for any
- * settings that are not set.
+ * Constructs an instance of AgentTranslationServiceApi, 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 AgentTranslationServiceApi create(AgentTranslationServiceSettings settings)
throws IOException {
@@ -130,9 +120,9 @@ public static final AgentTranslationServiceApi create(AgentTranslationServiceSet
}
/**
- * Constructs an instance of AgentTranslationServiceApi, using the given settings.
- * This is protected so that it easy to make a subclass, but otherwise, the static
- * factory methods should be preferred.
+ * Constructs an instance of AgentTranslationServiceApi, using the given settings. This is
+ * protected so that it easy to make a subclass, but otherwise, the static factory methods should
+ * be preferred.
*/
protected AgentTranslationServiceApi(AgentTranslationServiceSettings settings)
throws IOException {
@@ -172,11 +162,12 @@ public final AgentTranslationServiceSettings getSettings() {
/**
* **Stackdriver Monitoring Agent only:** Creates a new time series.
*
- * <aside class="caution">This method is only for use by the Google Monitoring Agent.
- * Use [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries]
+ * <aside class="caution">This method is only for use by the Google Monitoring Agent. Use
+ * [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries]
* instead.</aside>
*
- * Sample code:
+ *
Sample code:
+ *
*
* try (AgentTranslationServiceApi agentTranslationServiceApi = AgentTranslationServiceApi.create()) {
* String formattedName = AgentTranslationServiceApi.formatProjectName("[PROJECT]");
@@ -188,13 +179,13 @@ public final AgentTranslationServiceSettings getSettings() {
*
*
* @param name The project in which to create the time series. The format is
- * `"projects/PROJECT_ID_OR_NUMBER"`.
+ * `"projects/PROJECT_ID_OR_NUMBER"`.
* @param resource The monitored resource associated with the time series.
- * @param collectdVersion The version of `collectd` that collected the data. Example: `"5.3.0-192.el6"`.
- * @param collectdPayloads The `collectd` payloads representing the time series data.
- * You must not include more than a single point for each
- * time series, so no two payloads can have the same values
- * for all of the fields `plugin`, `plugin_instance`, `type`, and `type_instance`.
+ * @param collectdVersion The version of `collectd` that collected the data. Example:
+ * `"5.3.0-192.el6"`.
+ * @param collectdPayloads The `collectd` payloads representing the time series data. You must not
+ * include more than a single point for each time series, so no two payloads can have the same
+ * values for all of the fields `plugin`, `plugin_instance`, `type`, and `type_instance`.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final void createCollectdTimeSeries(
@@ -217,11 +208,12 @@ public final void createCollectdTimeSeries(
/**
* **Stackdriver Monitoring Agent only:** Creates a new time series.
*
- * <aside class="caution">This method is only for use by the Google Monitoring Agent.
- * Use [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries]
+ * <aside class="caution">This method is only for use by the Google Monitoring Agent. Use
+ * [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries]
* instead.</aside>
*
- * Sample code:
+ *
Sample code:
+ *
*
* try (AgentTranslationServiceApi agentTranslationServiceApi = AgentTranslationServiceApi.create()) {
* String formattedName = AgentTranslationServiceApi.formatProjectName("[PROJECT]");
@@ -249,11 +241,12 @@ public final void createCollectdTimeSeries(CreateCollectdTimeSeriesRequest reque
/**
* **Stackdriver Monitoring Agent only:** Creates a new time series.
*
- * <aside class="caution">This method is only for use by the Google Monitoring Agent.
- * Use [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries]
+ * <aside class="caution">This method is only for use by the Google Monitoring Agent. Use
+ * [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries]
* instead.</aside>
*
- * Sample code:
+ *
Sample code:
+ *
*
* try (AgentTranslationServiceApi agentTranslationServiceApi = AgentTranslationServiceApi.create()) {
* String formattedName = AgentTranslationServiceApi.formatProjectName("[PROJECT]");
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/AgentTranslationServiceSettings.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/AgentTranslationServiceSettings.java
index 9af3c0b4c166..72bbff0eebbb 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/AgentTranslationServiceSettings.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/AgentTranslationServiceSettings.java
@@ -16,7 +16,6 @@
import com.google.api.gax.core.ConnectionSettings;
import com.google.api.gax.core.RetrySettings;
import com.google.api.gax.grpc.ApiCallSettings;
-import com.google.api.gax.grpc.PageStreamingDescriptor;
import com.google.api.gax.grpc.ServiceApiSettings;
import com.google.api.gax.grpc.SimpleCallSettings;
import com.google.auth.Credentials;
@@ -42,15 +41,14 @@
* The default instance has everything set to sensible defaults:
*
*
- * - The default service address (monitoring.googleapis.com) and default port (443)
- * are used.
- *
- Credentials are acquired automatically through Application Default Credentials.
- *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
- The default service address (monitoring.googleapis.com) and default port (443) are used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
*
*
- * 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 createCollectdTimeSeries to 30 seconds:
+ *
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 createCollectdTimeSeries to 30 seconds:
*
*
*
@@ -64,25 +62,17 @@
*/
@javax.annotation.Generated("by GAPIC")
public class AgentTranslationServiceSettings extends ServiceApiSettings {
- /**
- * The default address of the service.
- */
+ /** The default address of the service. */
private static final String DEFAULT_SERVICE_ADDRESS = "monitoring.googleapis.com";
- /**
- * The default port of the service.
- */
+ /** The default port of the service. */
private static final int DEFAULT_SERVICE_PORT = 443;
- /**
- * The default scopes of the service.
- */
+ /** The default scopes of the service. */
private static final ImmutableList DEFAULT_SERVICE_SCOPES =
ImmutableList.builder().build();
- /**
- * The default connection settings of the service.
- */
+ /** The default connection settings of the service. */
public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS =
ConnectionSettings.newBuilder()
.setServiceAddress(DEFAULT_SERVICE_ADDRESS)
@@ -93,52 +83,38 @@ public class AgentTranslationServiceSettings extends ServiceApiSettings {
private final SimpleCallSettings
createCollectdTimeSeriesSettings;
- /**
- * Returns the object with the settings used for calls to createCollectdTimeSeries.
- */
+ /** Returns the object with the settings used for calls to createCollectdTimeSeries. */
public SimpleCallSettings
createCollectdTimeSeriesSettings() {
return createCollectdTimeSeriesSettings;
}
- /**
- * Returns the default service address.
- */
+ /** Returns the default service address. */
public static String getDefaultServiceAddress() {
return DEFAULT_SERVICE_ADDRESS;
}
- /**
- * Returns the default service port.
- */
+ /** Returns the default service port. */
public static int getDefaultServicePort() {
return DEFAULT_SERVICE_PORT;
}
- /**
- * Returns the default service scopes.
- */
+ /** Returns the default service scopes. */
public static ImmutableList getDefaultServiceScopes() {
return DEFAULT_SERVICE_SCOPES;
}
- /**
- * Returns a builder for this class with recommended defaults.
- */
+ /** Returns a builder for this class with recommended defaults. */
public static Builder defaultBuilder() {
return Builder.createDefault();
}
- /**
- * Returns a new builder for this class.
- */
+ /** Returns a new builder for this class. */
public static Builder newBuilder() {
return new Builder();
}
- /**
- * Returns a builder containing all the values of this settings class.
- */
+ /** Returns a builder containing all the values of this settings class. */
public Builder toBuilder() {
return new Builder(this);
}
@@ -155,9 +131,7 @@ private AgentTranslationServiceSettings(Builder settingsBuilder) throws IOExcept
createCollectdTimeSeriesSettings = settingsBuilder.createCollectdTimeSeriesSettings().build();
}
- /**
- * Builder for AgentTranslationServiceSettings.
- */
+ /** Builder for AgentTranslationServiceSettings. */
public static class Builder extends ServiceApiSettings.Builder {
private final ImmutableList methodSettingsBuilders;
@@ -274,18 +248,15 @@ public Builder setClientLibHeader(String name, String version) {
}
/**
- * Applies the given settings to all of the API methods in this service. Only
- * values that are non-null will be applied, so this method is not capable
- * of un-setting any values.
+ * Applies the given settings to all of the API methods in this service. Only values that are
+ * non-null will be applied, so this method is not capable of un-setting any values.
*/
public Builder applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings) throws Exception {
super.applyToAllApiMethods(methodSettingsBuilders, apiCallSettings);
return this;
}
- /**
- * Returns the builder for the settings used for calls to createCollectdTimeSeries.
- */
+ /** Returns the builder for the settings used for calls to createCollectdTimeSeries. */
public SimpleCallSettings.Builder
createCollectdTimeSeriesSettings() {
return createCollectdTimeSeriesSettings;
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/GroupServiceApi.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/GroupServiceApi.java
index 48f7a007e528..850406c119de 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/GroupServiceApi.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/GroupServiceApi.java
@@ -40,15 +40,12 @@
* Service Description: The Group API lets you inspect and manage your
* [groups](google.monitoring.v3.Group).
*
- * A group is a named filter that is used to identify
- * a collection of monitored resources. Groups are typically used to
- * mirror the physical and/or logical topology of the environment.
- * Because group membership is computed dynamically, monitored
- * resources that are started in the future are automatically placed
- * in matching groups. By using a group to name monitored resources in,
- * for example, an alert policy, the target of that alert policy is
- * updated automatically as monitored resources are added and removed
- * from the infrastructure.
+ * A group is a named filter that is used to identify a collection of monitored resources. Groups
+ * are typically used to mirror the physical and/or logical topology of the environment. Because
+ * group membership is computed dynamically, monitored resources that are started in the future are
+ * automatically placed in matching groups. By using a group to name monitored resources in, for
+ * example, an alert policy, the target of that alert policy is updated automatically as monitored
+ * resources are added and removed from the infrastructure.
*
*
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:
@@ -62,29 +59,28 @@
*
*
*
- * Note: close() needs to be called on the groupServiceApi object to clean up resources such
- * as threads. In the example above, try-with-resources is used, which automatically calls
- * close().
+ *
Note: close() needs to be called on the groupServiceApi 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:
+ *
The surface of this class includes several types of Java methods for each of the API's
+ * methods:
*
*
- * - A "flattened" method. With this type of method, the fields of the request type have been
- * converted into function parameters. It may be the case that not all fields are available
- * as parameters, and not every API method will have a flattened method entry point.
- *
- A "request object" method. This type of method only takes one parameter, a request
- * object, which must be constructed before the call. Not every API method will have a request
- * object method.
- *
- A "callable" method. This type of method takes no parameters and returns an immutable
- * ApiCallable object, which can be used to initiate calls to the service.
+ *
- A "flattened" method. With this type of method, the fields of the request type have been
+ * converted into function parameters. It may be the case that not all fields are available as
+ * parameters, and not every API method will have a flattened method entry point.
+ *
- A "request object" method. This type of method only takes one parameter, a request object,
+ * which must be constructed before the call. Not every API method will have a request object
+ * method.
+ *
- A "callable" method. This type of method takes no parameters and returns an immutable
+ * ApiCallable object, which can be used to initiate calls to the service.
*
*
* 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.
+ *
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 GroupServiceSettings to
* create(). For example:
@@ -126,68 +122,49 @@ public class GroupServiceApi implements AutoCloseable {
private static final PathTemplate GROUP_PATH_TEMPLATE =
PathTemplate.createWithoutUrlEncoding("projects/{project}/groups/{group}");
- /**
- * Formats a string containing the fully-qualified path to represent
- * a project resource.
- */
+ /** Formats a string containing the fully-qualified path to represent a project resource. */
public static final String formatProjectName(String project) {
return PROJECT_PATH_TEMPLATE.instantiate("project", project);
}
- /**
- * Formats a string containing the fully-qualified path to represent
- * a group resource.
- */
+ /** Formats a string containing the fully-qualified path to represent a group resource. */
public static final String formatGroupName(String project, String group) {
return GROUP_PATH_TEMPLATE.instantiate(
"project", project,
"group", group);
}
- /**
- * Parses the project from the given fully-qualified path which
- * represents a project resource.
- */
+ /** Parses the project from the given fully-qualified path which represents a project resource. */
public static final String parseProjectFromProjectName(String projectName) {
return PROJECT_PATH_TEMPLATE.parse(projectName).get("project");
}
- /**
- * Parses the project from the given fully-qualified path which
- * represents a group resource.
- */
+ /** Parses the project from the given fully-qualified path which represents a group resource. */
public static final String parseProjectFromGroupName(String groupName) {
return GROUP_PATH_TEMPLATE.parse(groupName).get("project");
}
- /**
- * Parses the group from the given fully-qualified path which
- * represents a group resource.
- */
+ /** Parses the group from the given fully-qualified path which represents a group resource. */
public static final String parseGroupFromGroupName(String groupName) {
return GROUP_PATH_TEMPLATE.parse(groupName).get("group");
}
- /**
- * Constructs an instance of GroupServiceApi with default settings.
- */
+ /** Constructs an instance of GroupServiceApi with default settings. */
public static final GroupServiceApi create() throws IOException {
return create(GroupServiceSettings.defaultBuilder().build());
}
/**
- * Constructs an instance of GroupServiceApi, using the given settings.
- * The channels are created based on the settings passed in, or defaults for any
- * settings that are not set.
+ * Constructs an instance of GroupServiceApi, 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 GroupServiceApi create(GroupServiceSettings settings) throws IOException {
return new GroupServiceApi(settings);
}
/**
- * Constructs an instance of GroupServiceApi, using the given settings.
- * This is protected so that it easy to make a subclass, but otherwise, the static
- * factory methods should be preferred.
+ * Constructs an instance of GroupServiceApi, using the given settings. This is protected so that
+ * it easy to make a subclass, but otherwise, the static factory methods should be preferred.
*/
protected GroupServiceApi(GroupServiceSettings settings) throws IOException {
this.settings = settings;
@@ -238,10 +215,10 @@ public final GroupServiceSettings getSettings() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists the existing groups. The project ID in the URL path must refer
- * to a Stackdriver account.
+ * Lists the existing groups. The project ID in the URL path must refer to a Stackdriver account.
+ *
+ *
Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* String formattedName = GroupServiceApi.formatProjectName("[PROJECT]");
@@ -264,10 +241,10 @@ public final PagedListResponse lis
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists the existing groups. The project ID in the URL path must refer
- * to a Stackdriver account.
+ * Lists the existing groups. The project ID in the URL path must refer to a Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* String formattedName = GroupServiceApi.formatProjectName("[PROJECT]");
@@ -290,10 +267,10 @@ public final PagedListResponse lis
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists the existing groups. The project ID in the URL path must refer
- * to a Stackdriver account.
+ * Lists the existing groups. The project ID in the URL path must refer to a Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* String formattedName = GroupServiceApi.formatProjectName("[PROJECT]");
@@ -321,10 +298,10 @@ public final ApiCallable listGroupsCallab
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets a single group. The project ID in the URL path must refer to a
- * Stackdriver account.
+ * Gets a single group. The project ID in the URL path must refer to a Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* String formattedName = GroupServiceApi.formatGroupName("[PROJECT]", "[GROUP]");
@@ -333,7 +310,7 @@ public final ApiCallable listGroupsCallab
*
*
* @param name The group to retrieve. The format is
- * `"projects/{project_id_or_number}/groups/{group_id}"`.
+ * `"projects/{project_id_or_number}/groups/{group_id}"`.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final Group getGroup(String name) {
@@ -344,10 +321,10 @@ public final Group getGroup(String name) {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets a single group. The project ID in the URL path must refer to a
- * Stackdriver account.
+ * Gets a single group. The project ID in the URL path must refer to a Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* String formattedName = GroupServiceApi.formatGroupName("[PROJECT]", "[GROUP]");
@@ -367,10 +344,10 @@ private final Group getGroup(GetGroupRequest request) {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets a single group. The project ID in the URL path must refer to a
- * Stackdriver account.
+ * Gets a single group. The project ID in the URL path must refer to a Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* String formattedName = GroupServiceApi.formatGroupName("[PROJECT]", "[GROUP]");
@@ -389,10 +366,10 @@ public final ApiCallable getGroupCallable() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates a new group. The project ID in the URL path must refer to a
- * Stackdriver account.
+ * Creates a new group. The project ID in the URL path must refer to a Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* String formattedName = GroupServiceApi.formatProjectName("[PROJECT]");
@@ -403,9 +380,9 @@ public final ApiCallable getGroupCallable() {
*
*
* @param name The project in which to create the group. The format is
- * `"projects/{project_id_or_number}"`.
- * @param group A group definition. It is an error to define the `name` field because
- * the system assigns the name.
+ * `"projects/{project_id_or_number}"`.
+ * @param group A group definition. It is an error to define the `name` field because the system
+ * assigns the name.
* @param validateOnly If true, validate this request but do not create the group.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
@@ -422,10 +399,10 @@ public final Group createGroup(String name, Group group, boolean validateOnly) {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates a new group. The project ID in the URL path must refer to a
- * Stackdriver account.
+ * Creates a new group. The project ID in the URL path must refer to a Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* String formattedName = GroupServiceApi.formatProjectName("[PROJECT]");
@@ -449,10 +426,10 @@ public final Group createGroup(CreateGroupRequest request) {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates a new group. The project ID in the URL path must refer to a
- * Stackdriver account.
+ * Creates a new group. The project ID in the URL path must refer to a Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* String formattedName = GroupServiceApi.formatProjectName("[PROJECT]");
@@ -475,11 +452,11 @@ public final ApiCallable createGroupCallable() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Updates an existing group.
- * You can change any group attributes except `name`.
- * The project ID in the URL path must refer to a Stackdriver account.
+ * Updates an existing group. You can change any group attributes except `name`. The project ID in
+ * the URL path must refer to a Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* Group group = Group.newBuilder().build();
@@ -488,8 +465,8 @@ public final ApiCallable createGroupCallable() {
* }
*
*
- * @param group The new definition of the group. All fields of the existing group,
- * excepting `name`, are replaced with the corresponding fields of this group.
+ * @param group The new definition of the group. All fields of the existing group, excepting
+ * `name`, are replaced with the corresponding fields of this group.
* @param validateOnly If true, validate this request but do not update the existing group.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
@@ -501,11 +478,11 @@ public final Group updateGroup(Group group, boolean validateOnly) {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Updates an existing group.
- * You can change any group attributes except `name`.
- * The project ID in the URL path must refer to a Stackdriver account.
+ * Updates an existing group. You can change any group attributes except `name`. The project ID in
+ * the URL path must refer to a Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* Group group = Group.newBuilder().build();
@@ -527,11 +504,11 @@ public final Group updateGroup(UpdateGroupRequest request) {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Updates an existing group.
- * You can change any group attributes except `name`.
- * The project ID in the URL path must refer to a Stackdriver account.
+ * Updates an existing group. You can change any group attributes except `name`. The project ID in
+ * the URL path must refer to a Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* Group group = Group.newBuilder().build();
@@ -552,10 +529,10 @@ public final ApiCallable updateGroupCallable() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes an existing group. The project ID in the URL path must refer to a
- * Stackdriver account.
+ * Deletes an existing group. The project ID in the URL path must refer to a Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* String formattedName = GroupServiceApi.formatGroupName("[PROJECT]", "[GROUP]");
@@ -564,7 +541,7 @@ public final ApiCallable updateGroupCallable() {
*
*
* @param name The group to delete. The format is
- * `"projects/{project_id_or_number}/groups/{group_id}"`.
+ * `"projects/{project_id_or_number}/groups/{group_id}"`.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final void deleteGroup(String name) {
@@ -575,10 +552,10 @@ public final void deleteGroup(String name) {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes an existing group. The project ID in the URL path must refer to a
- * Stackdriver account.
+ * Deletes an existing group. The project ID in the URL path must refer to a Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* String formattedName = GroupServiceApi.formatGroupName("[PROJECT]", "[GROUP]");
@@ -598,10 +575,10 @@ private final void deleteGroup(DeleteGroupRequest request) {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes an existing group. The project ID in the URL path must refer to a
- * Stackdriver account.
+ * Deletes an existing group. The project ID in the URL path must refer to a Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* String formattedName = GroupServiceApi.formatGroupName("[PROJECT]", "[GROUP]");
@@ -620,10 +597,11 @@ public final ApiCallable deleteGroupCallable() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists the monitored resources that are members of a group. The project ID
- * in the URL path must refer to a Stackdriver account.
+ * Lists the monitored resources that are members of a group. The project ID in the URL path must
+ * refer to a Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* String formattedName = GroupServiceApi.formatGroupName("[PROJECT]", "[GROUP]");
@@ -636,18 +614,15 @@ public final ApiCallable deleteGroupCallable() {
*
*
* @param name The group whose members are listed. The format is
- * `"projects/{project_id_or_number}/groups/{group_id}"`.
- * @param filter An optional [list filter](/monitoring/api/learn_more#filtering) describing
- * the members to be returned. The filter may reference the type, labels, and
- * metadata of monitored resources that comprise the group.
- * For example, to return only resources representing Compute Engine VM
- * instances, use this filter:
- *
- * resource.type = "gce_instance"
- * @param interval An optional time interval for which results should be returned. Only
- * members that were part of the group during the specified interval are
- * included in the response. If no interval is provided then the group
- * membership over the last minute is returned.
+ * `"projects/{project_id_or_number}/groups/{group_id}"`.
+ * @param filter An optional [list filter](/monitoring/api/learn_more#filtering) describing the
+ * members to be returned. The filter may reference the type, labels, and metadata of
+ * monitored resources that comprise the group. For example, to return only resources
+ * representing Compute Engine VM instances, use this filter:
+ * resource.type = "gce_instance"
+ * @param interval An optional time interval for which results should be returned. Only members
+ * that were part of the group during the specified interval are included in the response. If
+ * no interval is provided then the group membership over the last minute is returned.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final PagedListResponse<
@@ -665,10 +640,11 @@ public final ApiCallable deleteGroupCallable() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists the monitored resources that are members of a group. The project ID
- * in the URL path must refer to a Stackdriver account.
+ * Lists the monitored resources that are members of a group. The project ID in the URL path must
+ * refer to a Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* String formattedName = GroupServiceApi.formatGroupName("[PROJECT]", "[GROUP]");
@@ -696,10 +672,11 @@ public final ApiCallable deleteGroupCallable() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists the monitored resources that are members of a group. The project ID
- * in the URL path must refer to a Stackdriver account.
+ * Lists the monitored resources that are members of a group. The project ID in the URL path must
+ * refer to a Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* String formattedName = GroupServiceApi.formatGroupName("[PROJECT]", "[GROUP]");
@@ -727,10 +704,11 @@ public final ApiCallable deleteGroupCallable() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists the monitored resources that are members of a group. The project ID
- * in the URL path must refer to a Stackdriver account.
+ * Lists the monitored resources that are members of a group. The project ID in the URL path must
+ * refer to a Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
* String formattedName = GroupServiceApi.formatGroupName("[PROJECT]", "[GROUP]");
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/GroupServiceSettings.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/GroupServiceSettings.java
index 2b2b02fea282..a5e1f1d06d73 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/GroupServiceSettings.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/GroupServiceSettings.java
@@ -15,7 +15,6 @@
import com.google.api.MonitoredResource;
import com.google.api.gax.core.ConnectionSettings;
-import com.google.api.gax.core.PagedListResponse;
import com.google.api.gax.core.RetrySettings;
import com.google.api.gax.grpc.ApiCallSettings;
import com.google.api.gax.grpc.PageStreamingCallSettings;
@@ -53,15 +52,14 @@
* The default instance has everything set to sensible defaults:
*
*
- * - The default service address (monitoring.googleapis.com) and default port (443)
- * are used.
- *
- Credentials are acquired automatically through Application Default Credentials.
- *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
- The default service address (monitoring.googleapis.com) and default port (443) are used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
*
*
- * 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 getGroup to 30 seconds:
+ *
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 getGroup to 30 seconds:
*
*
*
@@ -75,25 +73,17 @@
*/
@javax.annotation.Generated("by GAPIC")
public class GroupServiceSettings extends ServiceApiSettings {
- /**
- * The default address of the service.
- */
+ /** The default address of the service. */
private static final String DEFAULT_SERVICE_ADDRESS = "monitoring.googleapis.com";
- /**
- * The default port of the service.
- */
+ /** The default port of the service. */
private static final int DEFAULT_SERVICE_PORT = 443;
- /**
- * The default scopes of the service.
- */
+ /** The default scopes of the service. */
private static final ImmutableList DEFAULT_SERVICE_SCOPES =
ImmutableList.builder().build();
- /**
- * The default connection settings of the service.
- */
+ /** The default connection settings of the service. */
public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS =
ConnectionSettings.newBuilder()
.setServiceAddress(DEFAULT_SERVICE_ADDRESS)
@@ -111,89 +101,65 @@ public class GroupServiceSettings extends ServiceApiSettings {
ListGroupMembersRequest, ListGroupMembersResponse, MonitoredResource>
listGroupMembersSettings;
- /**
- * Returns the object with the settings used for calls to listGroups.
- */
+ /** Returns the object with the settings used for calls to listGroups. */
public PageStreamingCallSettings
listGroupsSettings() {
return listGroupsSettings;
}
- /**
- * Returns the object with the settings used for calls to getGroup.
- */
+ /** Returns the object with the settings used for calls to getGroup. */
public SimpleCallSettings getGroupSettings() {
return getGroupSettings;
}
- /**
- * Returns the object with the settings used for calls to createGroup.
- */
+ /** Returns the object with the settings used for calls to createGroup. */
public SimpleCallSettings createGroupSettings() {
return createGroupSettings;
}
- /**
- * Returns the object with the settings used for calls to updateGroup.
- */
+ /** Returns the object with the settings used for calls to updateGroup. */
public SimpleCallSettings updateGroupSettings() {
return updateGroupSettings;
}
- /**
- * Returns the object with the settings used for calls to deleteGroup.
- */
+ /** Returns the object with the settings used for calls to deleteGroup. */
public SimpleCallSettings deleteGroupSettings() {
return deleteGroupSettings;
}
- /**
- * Returns the object with the settings used for calls to listGroupMembers.
- */
+ /** Returns the object with the settings used for calls to listGroupMembers. */
public PageStreamingCallSettings<
ListGroupMembersRequest, ListGroupMembersResponse, MonitoredResource>
listGroupMembersSettings() {
return listGroupMembersSettings;
}
- /**
- * Returns the default service address.
- */
+ /** Returns the default service address. */
public static String getDefaultServiceAddress() {
return DEFAULT_SERVICE_ADDRESS;
}
- /**
- * Returns the default service port.
- */
+ /** Returns the default service port. */
public static int getDefaultServicePort() {
return DEFAULT_SERVICE_PORT;
}
- /**
- * Returns the default service scopes.
- */
+ /** Returns the default service scopes. */
public static ImmutableList getDefaultServiceScopes() {
return DEFAULT_SERVICE_SCOPES;
}
- /**
- * Returns a builder for this class with recommended defaults.
- */
+ /** Returns a builder for this class with recommended defaults. */
public static Builder defaultBuilder() {
return Builder.createDefault();
}
- /**
- * Returns a new builder for this class.
- */
+ /** Returns a new builder for this class. */
public static Builder newBuilder() {
return new Builder();
}
- /**
- * Returns a builder containing all the values of this settings class.
- */
+ /** Returns a builder containing all the values of this settings class. */
public Builder toBuilder() {
return new Builder(this);
}
@@ -289,9 +255,7 @@ public Iterable extractResources(ListGroupMembersResponse pay
}
};
- /**
- * Builder for GroupServiceSettings.
- */
+ /** Builder for GroupServiceSettings. */
public static class Builder extends ServiceApiSettings.Builder {
private final ImmutableList methodSettingsBuilders;
@@ -469,54 +433,41 @@ public Builder setClientLibHeader(String name, String version) {
}
/**
- * Applies the given settings to all of the API methods in this service. Only
- * values that are non-null will be applied, so this method is not capable
- * of un-setting any values.
+ * Applies the given settings to all of the API methods in this service. Only values that are
+ * non-null will be applied, so this method is not capable of un-setting any values.
*/
public Builder applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings) throws Exception {
super.applyToAllApiMethods(methodSettingsBuilders, apiCallSettings);
return this;
}
- /**
- * Returns the builder for the settings used for calls to listGroups.
- */
+ /** Returns the builder for the settings used for calls to listGroups. */
public PageStreamingCallSettings.Builder
listGroupsSettings() {
return listGroupsSettings;
}
- /**
- * Returns the builder for the settings used for calls to getGroup.
- */
+ /** Returns the builder for the settings used for calls to getGroup. */
public SimpleCallSettings.Builder getGroupSettings() {
return getGroupSettings;
}
- /**
- * Returns the builder for the settings used for calls to createGroup.
- */
+ /** Returns the builder for the settings used for calls to createGroup. */
public SimpleCallSettings.Builder createGroupSettings() {
return createGroupSettings;
}
- /**
- * Returns the builder for the settings used for calls to updateGroup.
- */
+ /** Returns the builder for the settings used for calls to updateGroup. */
public SimpleCallSettings.Builder updateGroupSettings() {
return updateGroupSettings;
}
- /**
- * Returns the builder for the settings used for calls to deleteGroup.
- */
+ /** Returns the builder for the settings used for calls to deleteGroup. */
public SimpleCallSettings.Builder deleteGroupSettings() {
return deleteGroupSettings;
}
- /**
- * Returns the builder for the settings used for calls to listGroupMembers.
- */
+ /** Returns the builder for the settings used for calls to listGroupMembers. */
public PageStreamingCallSettings.Builder<
ListGroupMembersRequest, ListGroupMembersResponse, MonitoredResource>
listGroupMembersSettings() {
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/MetricServiceApi.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/MetricServiceApi.java
index f1ba47dc1283..bd3599c6d493 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/MetricServiceApi.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/MetricServiceApi.java
@@ -40,8 +40,8 @@
// AUTO-GENERATED DOCUMENTATION AND SERVICE
/**
- * Service Description: Manages metric descriptors, monitored resource descriptors, and
- * time series data.
+ * Service Description: Manages metric descriptors, monitored resource descriptors, and time series
+ * data.
*
* 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:
@@ -55,29 +55,28 @@
*
*
*
- * Note: close() needs to be called on the metricServiceApi object to clean up resources such
- * as threads. In the example above, try-with-resources is used, which automatically calls
- * close().
+ *
Note: close() needs to be called on the metricServiceApi 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:
+ *
The surface of this class includes several types of Java methods for each of the API's
+ * methods:
*
*
- * - A "flattened" method. With this type of method, the fields of the request type have been
- * converted into function parameters. It may be the case that not all fields are available
- * as parameters, and not every API method will have a flattened method entry point.
- *
- A "request object" method. This type of method only takes one parameter, a request
- * object, which must be constructed before the call. Not every API method will have a request
- * object method.
- *
- A "callable" method. This type of method takes no parameters and returns an immutable
- * ApiCallable object, which can be used to initiate calls to the service.
+ *
- A "flattened" method. With this type of method, the fields of the request type have been
+ * converted into function parameters. It may be the case that not all fields are available as
+ * parameters, and not every API method will have a flattened method entry point.
+ *
- A "request object" method. This type of method only takes one parameter, a request object,
+ * which must be constructed before the call. Not every API method will have a request object
+ * method.
+ *
- A "callable" method. This type of method takes no parameters and returns an immutable
+ * ApiCallable object, which can be used to initiate calls to the service.
*
*
* 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.
+ *
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 MetricServiceSettings to
* create(). For example:
@@ -139,17 +138,14 @@ public class MetricServiceApi implements AutoCloseable {
PathTemplate.createWithoutUrlEncoding(
"projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}");
- /**
- * Formats a string containing the fully-qualified path to represent
- * a project resource.
- */
+ /** Formats a string containing the fully-qualified path to represent a project resource. */
public static final String formatProjectName(String project) {
return PROJECT_PATH_TEMPLATE.instantiate("project", project);
}
/**
- * Formats a string containing the fully-qualified path to represent
- * a metric_descriptor_path resource.
+ * Formats a string containing the fully-qualified path to represent a metric_descriptor_path
+ * resource.
*/
public static final String formatMetricDescriptorPathName(
String project, String metricDescriptorPath) {
@@ -159,8 +155,8 @@ public static final String formatMetricDescriptorPathName(
}
/**
- * Formats a string containing the fully-qualified path to represent
- * a monitored_resource_descriptor resource.
+ * Formats a string containing the fully-qualified path to represent a
+ * monitored_resource_descriptor resource.
*/
public static final String formatMonitoredResourceDescriptorName(
String project, String monitoredResourceDescriptor) {
@@ -169,17 +165,14 @@ public static final String formatMonitoredResourceDescriptorName(
"monitored_resource_descriptor", monitoredResourceDescriptor);
}
- /**
- * Parses the project from the given fully-qualified path which
- * represents a project resource.
- */
+ /** Parses the project from the given fully-qualified path which represents a project resource. */
public static final String parseProjectFromProjectName(String projectName) {
return PROJECT_PATH_TEMPLATE.parse(projectName).get("project");
}
/**
- * Parses the project from the given fully-qualified path which
- * represents a metricDescriptorPath resource.
+ * Parses the project from the given fully-qualified path which represents a metricDescriptorPath
+ * resource.
*/
public static final String parseProjectFromMetricDescriptorPathName(
String metricDescriptorPathName) {
@@ -187,8 +180,8 @@ public static final String parseProjectFromMetricDescriptorPathName(
}
/**
- * Parses the metric_descriptor_path from the given fully-qualified path which
- * represents a metricDescriptorPath resource.
+ * Parses the metric_descriptor_path from the given fully-qualified path which represents a
+ * metricDescriptorPath resource.
*/
public static final String parseMetricDescriptorPathFromMetricDescriptorPathName(
String metricDescriptorPathName) {
@@ -198,8 +191,8 @@ public static final String parseMetricDescriptorPathFromMetricDescriptorPathName
}
/**
- * Parses the project from the given fully-qualified path which
- * represents a monitoredResourceDescriptor resource.
+ * Parses the project from the given fully-qualified path which represents a
+ * monitoredResourceDescriptor resource.
*/
public static final String parseProjectFromMonitoredResourceDescriptorName(
String monitoredResourceDescriptorName) {
@@ -209,8 +202,8 @@ public static final String parseProjectFromMonitoredResourceDescriptorName(
}
/**
- * Parses the monitored_resource_descriptor from the given fully-qualified path which
- * represents a monitoredResourceDescriptor resource.
+ * Parses the monitored_resource_descriptor from the given fully-qualified path which represents a
+ * monitoredResourceDescriptor resource.
*/
public static final String parseMonitoredResourceDescriptorFromMonitoredResourceDescriptorName(
String monitoredResourceDescriptorName) {
@@ -219,26 +212,22 @@ public static final String parseMonitoredResourceDescriptorFromMonitoredResource
.get("monitored_resource_descriptor");
}
- /**
- * Constructs an instance of MetricServiceApi with default settings.
- */
+ /** Constructs an instance of MetricServiceApi with default settings. */
public static final MetricServiceApi create() throws IOException {
return create(MetricServiceSettings.defaultBuilder().build());
}
/**
- * Constructs an instance of MetricServiceApi, using the given settings.
- * The channels are created based on the settings passed in, or defaults for any
- * settings that are not set.
+ * Constructs an instance of MetricServiceApi, 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 MetricServiceApi create(MetricServiceSettings settings) throws IOException {
return new MetricServiceApi(settings);
}
/**
- * Constructs an instance of MetricServiceApi, using the given settings.
- * This is protected so that it easy to make a subclass, but otherwise, the static
- * factory methods should be preferred.
+ * Constructs an instance of MetricServiceApi, using the given settings. This is protected so that
+ * it easy to make a subclass, but otherwise, the static factory methods should be preferred.
*/
protected MetricServiceApi(MetricServiceSettings settings) throws IOException {
this.settings = settings;
@@ -299,9 +288,11 @@ public final MetricServiceSettings getSettings() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.
+ * Lists monitored resource descriptors that match a filter. This method does not require a
+ * Stackdriver account.
+ *
+ *
Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatProjectName("[PROJECT]");
@@ -313,14 +304,11 @@ public final MetricServiceSettings getSettings() {
*
*
* @param name The project on which to execute the request. The format is
- * `"projects/{project_id_or_number}"`.
- * @param filter An optional [filter](/monitoring/api/v3/filters) describing
- * the descriptors to be returned. The filter can reference
- * the descriptor's type and labels. For example, the
- * following filter returns only Google Compute Engine descriptors
- * that have an `id` label:
- *
- * resource.type = starts_with("gce_") AND resource.label:id
+ * `"projects/{project_id_or_number}"`.
+ * @param filter An optional [filter](/monitoring/api/v3/filters) describing the descriptors to be
+ * returned. The filter can reference the descriptor's type and labels. For example, the
+ * following filter returns only Google Compute Engine descriptors that have an `id` label:
+ * resource.type = starts_with("gce_") AND resource.label:id
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final PagedListResponse<
@@ -338,9 +326,11 @@ public final MetricServiceSettings getSettings() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.
+ * Lists monitored resource descriptors that match a filter. This method does not require a
+ * Stackdriver account.
+ *
+ *
Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatProjectName("[PROJECT]");
@@ -367,9 +357,11 @@ public final MetricServiceSettings getSettings() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.
+ * Lists monitored resource descriptors that match a filter. This method does not require a
+ * Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatProjectName("[PROJECT]");
@@ -397,9 +389,11 @@ public final MetricServiceSettings getSettings() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.
+ * Lists monitored resource descriptors that match a filter. This method does not require a
+ * Stackdriver account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatProjectName("[PROJECT]");
@@ -431,9 +425,11 @@ public final MetricServiceSettings getSettings() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets a single monitored resource descriptor. This method does not require a Stackdriver account.
+ * Gets a single monitored resource descriptor. This method does not require a Stackdriver
+ * account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatMonitoredResourceDescriptorName("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]");
@@ -441,10 +437,9 @@ public final MetricServiceSettings getSettings() {
* }
*
*
- * @param name 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`.
+ * @param name 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`.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final MonitoredResourceDescriptor getMonitoredResourceDescriptor(String name) {
@@ -456,9 +451,11 @@ public final MonitoredResourceDescriptor getMonitoredResourceDescriptor(String n
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets a single monitored resource descriptor. This method does not require a Stackdriver account.
+ * Gets a single monitored resource descriptor. This method does not require a Stackdriver
+ * account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatMonitoredResourceDescriptorName("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]");
@@ -479,9 +476,11 @@ private final MonitoredResourceDescriptor getMonitoredResourceDescriptor(
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Gets a single monitored resource descriptor. This method does not require a Stackdriver account.
+ * Gets a single monitored resource descriptor. This method does not require a Stackdriver
+ * account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatMonitoredResourceDescriptorName("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]");
@@ -501,9 +500,11 @@ private final MonitoredResourceDescriptor getMonitoredResourceDescriptor(
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists metric descriptors that match a filter. This method does not require a Stackdriver account.
+ * Lists metric descriptors that match a filter. This method does not require a Stackdriver
+ * account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatProjectName("[PROJECT]");
@@ -515,15 +516,12 @@ private final MonitoredResourceDescriptor getMonitoredResourceDescriptor(
*
*
* @param name The project on which to execute the request. The format is
- * `"projects/{project_id_or_number}"`.
- * @param filter If this field is empty, all custom and
- * system-defined metric descriptors are returned.
- * Otherwise, the [filter](/monitoring/api/v3/filters)
- * specifies which metric descriptors are to be
- * returned. For example, the following filter matches all
- * [custom metrics](/monitoring/custom-metrics):
- *
- * metric.type = starts_with("custom.googleapis.com/")
+ * `"projects/{project_id_or_number}"`.
+ * @param filter If this field is empty, all custom and system-defined metric descriptors are
+ * returned. Otherwise, the [filter](/monitoring/api/v3/filters) specifies which metric
+ * descriptors are to be returned. For example, the following filter matches all [custom
+ * metrics](/monitoring/custom-metrics):
+ * metric.type = starts_with("custom.googleapis.com/")
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final PagedListResponse<
@@ -537,9 +535,11 @@ private final MonitoredResourceDescriptor getMonitoredResourceDescriptor(
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists metric descriptors that match a filter. This method does not require a Stackdriver account.
+ * Lists metric descriptors that match a filter. This method does not require a Stackdriver
+ * account.
+ *
+ *
Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatProjectName("[PROJECT]");
@@ -565,9 +565,11 @@ private final MonitoredResourceDescriptor getMonitoredResourceDescriptor(
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists metric descriptors that match a filter. This method does not require a Stackdriver account.
+ * Lists metric descriptors that match a filter. This method does not require a Stackdriver
+ * account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatProjectName("[PROJECT]");
@@ -594,9 +596,11 @@ private final MonitoredResourceDescriptor getMonitoredResourceDescriptor(
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Lists metric descriptors that match a filter. This method does not require a Stackdriver account.
+ * Lists metric descriptors that match a filter. This method does not require a Stackdriver
+ * account.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatProjectName("[PROJECT]");
@@ -629,7 +633,8 @@ private final MonitoredResourceDescriptor getMonitoredResourceDescriptor(
/**
* Gets a single metric descriptor. This method does not require a Stackdriver account.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatMetricDescriptorPathName("[PROJECT]", "[METRIC_DESCRIPTOR_PATH]");
@@ -638,9 +643,8 @@ private final MonitoredResourceDescriptor getMonitoredResourceDescriptor(
*
*
* @param name 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
- * `"compute.googleapis.com/instance/disk/read_bytes_count"`.
+ * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. An example value of
+ * `{metric_id}` is `"compute.googleapis.com/instance/disk/read_bytes_count"`.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final MetricDescriptor getMetricDescriptor(String name) {
@@ -654,7 +658,8 @@ public final MetricDescriptor getMetricDescriptor(String name) {
/**
* Gets a single metric descriptor. This method does not require a Stackdriver account.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatMetricDescriptorPathName("[PROJECT]", "[METRIC_DESCRIPTOR_PATH]");
@@ -676,7 +681,8 @@ private final MetricDescriptor getMetricDescriptor(GetMetricDescriptorRequest re
/**
* Gets a single metric descriptor. This method does not require a Stackdriver account.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatMetricDescriptorPathName("[PROJECT]", "[METRIC_DESCRIPTOR_PATH]");
@@ -696,11 +702,11 @@ private final MetricDescriptor getMetricDescriptor(GetMetricDescriptorRequest re
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates a new metric descriptor.
- * User-created metric descriptors define
- * [custom metrics](/monitoring/custom-metrics).
+ * Creates a new metric descriptor. User-created metric descriptors define [custom
+ * metrics](/monitoring/custom-metrics).
+ *
+ * Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatProjectName("[PROJECT]");
@@ -710,9 +716,8 @@ private final MetricDescriptor getMetricDescriptor(GetMetricDescriptorRequest re
*
*
* @param name The project on which to execute the request. The format is
- * `"projects/{project_id_or_number}"`.
- * @param metricDescriptor The new [custom metric](/monitoring/custom-metrics)
- * descriptor.
+ * `"projects/{project_id_or_number}"`.
+ * @param metricDescriptor The new [custom metric](/monitoring/custom-metrics) descriptor.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final MetricDescriptor createMetricDescriptor(
@@ -728,11 +733,11 @@ public final MetricDescriptor createMetricDescriptor(
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates a new metric descriptor.
- * User-created metric descriptors define
- * [custom metrics](/monitoring/custom-metrics).
+ * Creates a new metric descriptor. User-created metric descriptors define [custom
+ * metrics](/monitoring/custom-metrics).
+ *
+ * Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatProjectName("[PROJECT]");
@@ -754,11 +759,11 @@ public final MetricDescriptor createMetricDescriptor(CreateMetricDescriptorReque
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates a new metric descriptor.
- * User-created metric descriptors define
- * [custom metrics](/monitoring/custom-metrics).
+ * Creates a new metric descriptor. User-created metric descriptors define [custom
+ * metrics](/monitoring/custom-metrics).
+ *
+ * Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatProjectName("[PROJECT]");
@@ -780,10 +785,11 @@ public final MetricDescriptor createMetricDescriptor(CreateMetricDescriptorReque
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes a metric descriptor. Only user-created
- * [custom metrics](/monitoring/custom-metrics) can be deleted.
+ * Deletes a metric descriptor. Only user-created [custom metrics](/monitoring/custom-metrics) can
+ * be deleted.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatMetricDescriptorPathName("[PROJECT]", "[METRIC_DESCRIPTOR_PATH]");
@@ -792,9 +798,8 @@ public final MetricDescriptor createMetricDescriptor(CreateMetricDescriptorReque
*
*
* @param name 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"`.
+ * `"projects/{project_id_or_number}/metricDescriptors/{metric_id}"`. An example of
+ * `{metric_id}` is: `"custom.googleapis.com/my_test_metric"`.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final void deleteMetricDescriptor(String name) {
@@ -806,10 +811,11 @@ public final void deleteMetricDescriptor(String name) {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes a metric descriptor. Only user-created
- * [custom metrics](/monitoring/custom-metrics) can be deleted.
+ * Deletes a metric descriptor. Only user-created [custom metrics](/monitoring/custom-metrics) can
+ * be deleted.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatMetricDescriptorPathName("[PROJECT]", "[METRIC_DESCRIPTOR_PATH]");
@@ -829,10 +835,11 @@ private final void deleteMetricDescriptor(DeleteMetricDescriptorRequest request)
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Deletes a metric descriptor. Only user-created
- * [custom metrics](/monitoring/custom-metrics) can be deleted.
+ * Deletes a metric descriptor. Only user-created [custom metrics](/monitoring/custom-metrics) can
+ * be deleted.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatMetricDescriptorPathName("[PROJECT]", "[METRIC_DESCRIPTOR_PATH]");
@@ -853,7 +860,8 @@ public final ApiCallable deleteMetricDescr
/**
* Lists time series that match a filter. This method does not require a Stackdriver account.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatProjectName("[PROJECT]");
@@ -888,7 +896,8 @@ public final ApiCallable deleteMetricDescr
/**
* Lists time series that match a filter. This method does not require a Stackdriver account.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatProjectName("[PROJECT]");
@@ -924,7 +933,8 @@ public final ApiCallable deleteMetricDescr
/**
* Lists time series that match a filter. This method does not require a Stackdriver account.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatProjectName("[PROJECT]");
@@ -962,12 +972,12 @@ public final ApiCallable listTime
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates or adds data to one or more time series.
- * The response is empty if all time series in the request were written.
- * If any time series could not be written, a corresponding failure message is
- * included in the error response.
+ * Creates or adds data to one or more time series. The response is empty if all time series in
+ * the request were written. If any time series could not be written, a corresponding failure
+ * message is included in the error response.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatProjectName("[PROJECT]");
@@ -977,12 +987,11 @@ public final ApiCallable listTime
*
*
* @param name The project on which to execute the request. The format is
- * `"projects/{project_id_or_number}"`.
- * @param timeSeries The new data to be added to a list of time series.
- * Adds at most one data point to each of several time series. The new data
- * point must be more recent than any other point in its time series. Each
- * `TimeSeries` value must fully specify a unique time series by supplying
- * all label values for the metric and the monitored resource.
+ * `"projects/{project_id_or_number}"`.
+ * @param timeSeries The new data to be added to a list of time series. Adds at most one data
+ * point to each of several time series. The new data point must be more recent than any other
+ * point in its time series. Each `TimeSeries` value must fully specify a unique time series
+ * by supplying all label values for the metric and the monitored resource.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final void createTimeSeries(String name, List timeSeries) {
@@ -994,12 +1003,12 @@ public final void createTimeSeries(String name, List timeSeries) {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates or adds data to one or more time series.
- * The response is empty if all time series in the request were written.
- * If any time series could not be written, a corresponding failure message is
- * included in the error response.
+ * Creates or adds data to one or more time series. The response is empty if all time series in
+ * the request were written. If any time series could not be written, a corresponding failure
+ * message is included in the error response.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatProjectName("[PROJECT]");
@@ -1021,12 +1030,12 @@ public final void createTimeSeries(CreateTimeSeriesRequest request) {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Creates or adds data to one or more time series.
- * The response is empty if all time series in the request were written.
- * If any time series could not be written, a corresponding failure message is
- * included in the error response.
+ * Creates or adds data to one or more time series. The response is empty if all time series in
+ * the request were written. If any time series could not be written, a corresponding failure
+ * message is included in the error response.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
* String formattedName = MetricServiceApi.formatProjectName("[PROJECT]");
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/MetricServiceSettings.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/MetricServiceSettings.java
index dd1ec8c244ca..c7c89badb66d 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/MetricServiceSettings.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/MetricServiceSettings.java
@@ -16,7 +16,6 @@
import com.google.api.MetricDescriptor;
import com.google.api.MonitoredResourceDescriptor;
import com.google.api.gax.core.ConnectionSettings;
-import com.google.api.gax.core.PagedListResponse;
import com.google.api.gax.core.RetrySettings;
import com.google.api.gax.grpc.ApiCallSettings;
import com.google.api.gax.grpc.PageStreamingCallSettings;
@@ -57,15 +56,14 @@
* The default instance has everything set to sensible defaults:
*
*
- * - The default service address (monitoring.googleapis.com) and default port (443)
- * are used.
- *
- Credentials are acquired automatically through Application Default Credentials.
- *
- Retries are configured for idempotent methods but not for non-idempotent methods.
+ *
- The default service address (monitoring.googleapis.com) and default port (443) are used.
+ *
- Credentials are acquired automatically through Application Default Credentials.
+ *
- Retries are configured for idempotent methods but not for non-idempotent methods.
*
*
- * 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 getMonitoredResourceDescriptor to 30 seconds:
+ *
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 getMonitoredResourceDescriptor to 30 seconds:
*
*
*
@@ -79,25 +77,17 @@
*/
@javax.annotation.Generated("by GAPIC")
public class MetricServiceSettings extends ServiceApiSettings {
- /**
- * The default address of the service.
- */
+ /** The default address of the service. */
private static final String DEFAULT_SERVICE_ADDRESS = "monitoring.googleapis.com";
- /**
- * The default port of the service.
- */
+ /** The default port of the service. */
private static final int DEFAULT_SERVICE_PORT = 443;
- /**
- * The default scopes of the service.
- */
+ /** The default scopes of the service. */
private static final ImmutableList DEFAULT_SERVICE_SCOPES =
ImmutableList.builder().build();
- /**
- * The default connection settings of the service.
- */
+ /** The default connection settings of the service. */
public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS =
ConnectionSettings.newBuilder()
.setServiceAddress(DEFAULT_SERVICE_ADDRESS)
@@ -125,9 +115,7 @@ public class MetricServiceSettings extends ServiceApiSettings {
listTimeSeriesSettings;
private final SimpleCallSettings createTimeSeriesSettings;
- /**
- * Returns the object with the settings used for calls to listMonitoredResourceDescriptors.
- */
+ /** Returns the object with the settings used for calls to listMonitoredResourceDescriptors. */
public PageStreamingCallSettings<
ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse,
MonitoredResourceDescriptor>
@@ -135,99 +123,73 @@ public class MetricServiceSettings extends ServiceApiSettings {
return listMonitoredResourceDescriptorsSettings;
}
- /**
- * Returns the object with the settings used for calls to getMonitoredResourceDescriptor.
- */
+ /** Returns the object with the settings used for calls to getMonitoredResourceDescriptor. */
public SimpleCallSettings
getMonitoredResourceDescriptorSettings() {
return getMonitoredResourceDescriptorSettings;
}
- /**
- * Returns the object with the settings used for calls to listMetricDescriptors.
- */
+ /** Returns the object with the settings used for calls to listMetricDescriptors. */
public PageStreamingCallSettings<
ListMetricDescriptorsRequest, ListMetricDescriptorsResponse, MetricDescriptor>
listMetricDescriptorsSettings() {
return listMetricDescriptorsSettings;
}
- /**
- * Returns the object with the settings used for calls to getMetricDescriptor.
- */
+ /** Returns the object with the settings used for calls to getMetricDescriptor. */
public SimpleCallSettings
getMetricDescriptorSettings() {
return getMetricDescriptorSettings;
}
- /**
- * Returns the object with the settings used for calls to createMetricDescriptor.
- */
+ /** Returns the object with the settings used for calls to createMetricDescriptor. */
public SimpleCallSettings
createMetricDescriptorSettings() {
return createMetricDescriptorSettings;
}
- /**
- * Returns the object with the settings used for calls to deleteMetricDescriptor.
- */
+ /** Returns the object with the settings used for calls to deleteMetricDescriptor. */
public SimpleCallSettings deleteMetricDescriptorSettings() {
return deleteMetricDescriptorSettings;
}
- /**
- * Returns the object with the settings used for calls to listTimeSeries.
- */
+ /** Returns the object with the settings used for calls to listTimeSeries. */
public PageStreamingCallSettings
listTimeSeriesSettings() {
return listTimeSeriesSettings;
}
- /**
- * Returns the object with the settings used for calls to createTimeSeries.
- */
+ /** Returns the object with the settings used for calls to createTimeSeries. */
public SimpleCallSettings createTimeSeriesSettings() {
return createTimeSeriesSettings;
}
- /**
- * Returns the default service address.
- */
+ /** Returns the default service address. */
public static String getDefaultServiceAddress() {
return DEFAULT_SERVICE_ADDRESS;
}
- /**
- * Returns the default service port.
- */
+ /** Returns the default service port. */
public static int getDefaultServicePort() {
return DEFAULT_SERVICE_PORT;
}
- /**
- * Returns the default service scopes.
- */
+ /** Returns the default service scopes. */
public static ImmutableList getDefaultServiceScopes() {
return DEFAULT_SERVICE_SCOPES;
}
- /**
- * Returns a builder for this class with recommended defaults.
- */
+ /** Returns a builder for this class with recommended defaults. */
public static Builder defaultBuilder() {
return Builder.createDefault();
}
- /**
- * Returns a new builder for this class.
- */
+ /** Returns a new builder for this class. */
public static Builder newBuilder() {
return new Builder();
}
- /**
- * Returns a builder containing all the values of this settings class.
- */
+ /** Returns a builder containing all the values of this settings class. */
public Builder toBuilder() {
return new Builder(this);
}
@@ -375,9 +337,7 @@ public Iterable extractResources(ListTimeSeriesResponse payload) {
}
};
- /**
- * Builder for MetricServiceSettings.
- */
+ /** Builder for MetricServiceSettings. */
public static class Builder extends ServiceApiSettings.Builder {
private final ImmutableList methodSettingsBuilders;
@@ -598,18 +558,15 @@ public Builder setClientLibHeader(String name, String version) {
}
/**
- * Applies the given settings to all of the API methods in this service. Only
- * values that are non-null will be applied, so this method is not capable
- * of un-setting any values.
+ * Applies the given settings to all of the API methods in this service. Only values that are
+ * non-null will be applied, so this method is not capable of un-setting any values.
*/
public Builder applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings) throws Exception {
super.applyToAllApiMethods(methodSettingsBuilders, apiCallSettings);
return this;
}
- /**
- * Returns the builder for the settings used for calls to listMonitoredResourceDescriptors.
- */
+ /** Returns the builder for the settings used for calls to listMonitoredResourceDescriptors. */
public PageStreamingCallSettings.Builder<
ListMonitoredResourceDescriptorsRequest, ListMonitoredResourceDescriptorsResponse,
MonitoredResourceDescriptor>
@@ -617,60 +574,46 @@ public Builder applyToAllApiMethods(ApiCallSettings.Builder apiCallSettings) thr
return listMonitoredResourceDescriptorsSettings;
}
- /**
- * Returns the builder for the settings used for calls to getMonitoredResourceDescriptor.
- */
+ /** Returns the builder for the settings used for calls to getMonitoredResourceDescriptor. */
public SimpleCallSettings.Builder<
GetMonitoredResourceDescriptorRequest, MonitoredResourceDescriptor>
getMonitoredResourceDescriptorSettings() {
return getMonitoredResourceDescriptorSettings;
}
- /**
- * Returns the builder for the settings used for calls to listMetricDescriptors.
- */
+ /** Returns the builder for the settings used for calls to listMetricDescriptors. */
public PageStreamingCallSettings.Builder<
ListMetricDescriptorsRequest, ListMetricDescriptorsResponse, MetricDescriptor>
listMetricDescriptorsSettings() {
return listMetricDescriptorsSettings;
}
- /**
- * Returns the builder for the settings used for calls to getMetricDescriptor.
- */
+ /** Returns the builder for the settings used for calls to getMetricDescriptor. */
public SimpleCallSettings.Builder
getMetricDescriptorSettings() {
return getMetricDescriptorSettings;
}
- /**
- * Returns the builder for the settings used for calls to createMetricDescriptor.
- */
+ /** Returns the builder for the settings used for calls to createMetricDescriptor. */
public SimpleCallSettings.Builder
createMetricDescriptorSettings() {
return createMetricDescriptorSettings;
}
- /**
- * Returns the builder for the settings used for calls to deleteMetricDescriptor.
- */
+ /** Returns the builder for the settings used for calls to deleteMetricDescriptor. */
public SimpleCallSettings.Builder
deleteMetricDescriptorSettings() {
return deleteMetricDescriptorSettings;
}
- /**
- * Returns the builder for the settings used for calls to listTimeSeries.
- */
+ /** Returns the builder for the settings used for calls to listTimeSeries. */
public PageStreamingCallSettings.Builder<
ListTimeSeriesRequest, ListTimeSeriesResponse, TimeSeries>
listTimeSeriesSettings() {
return listTimeSeriesSettings;
}
- /**
- * Returns the builder for the settings used for calls to createTimeSeries.
- */
+ /** Returns the builder for the settings used for calls to createTimeSeries. */
public SimpleCallSettings.Builder createTimeSeriesSettings() {
return createTimeSeriesSettings;
}
diff --git a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/package-info.java b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/package-info.java
index d37c7e7690ff..9d1a0e61adb7 100644
--- a/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/package-info.java
+++ b/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/spi/v3/package-info.java
@@ -15,26 +15,22 @@
/**
* A client to Stackdriver Monitoring API.
*
- * The interfaces provided are listed below, along with a usage sample
+ * The interfaces provided are listed below, along with a usage sample
*
- * ===============
- * GroupServiceApi
- * ===============
+ *
=============== GroupServiceApi ===============
*
- * Service Description: The Group API lets you inspect and manage your
+ *
Service Description: The Group API lets you inspect and manage your
* [groups](google.monitoring.v3.Group).
*
- * A group is a named filter that is used to identify
- * a collection of monitored resources. Groups are typically used to
- * mirror the physical and/or logical topology of the environment.
- * Because group membership is computed dynamically, monitored
- * resources that are started in the future are automatically placed
- * in matching groups. By using a group to name monitored resources in,
- * for example, an alert policy, the target of that alert policy is
- * updated automatically as monitored resources are added and removed
- * from the infrastructure.
- *
- * Sample for GroupServiceApi:
+ *
A group is a named filter that is used to identify a collection of monitored resources. Groups
+ * are typically used to mirror the physical and/or logical topology of the environment. Because
+ * group membership is computed dynamically, monitored resources that are started in the future are
+ * automatically placed in matching groups. By using a group to name monitored resources in, for
+ * example, an alert policy, the target of that alert policy is updated automatically as monitored
+ * resources are added and removed from the infrastructure.
+ *
+ *
Sample for GroupServiceApi:
+ *
*
*
* try (GroupServiceApi groupServiceApi = GroupServiceApi.create()) {
@@ -44,14 +40,13 @@
*
*
*
- * ================
- * MetricServiceApi
- * ================
+ * ================ MetricServiceApi ================
+ *
+ * Service Description: Manages metric descriptors, monitored resource descriptors, and time
+ * series data.
*
- * Service Description: Manages metric descriptors, monitored resource descriptors, and
- * time series data.
+ *
Sample for MetricServiceApi:
*
- * Sample for MetricServiceApi:
*
*
* try (MetricServiceApi metricServiceApi = MetricServiceApi.create()) {
@@ -61,15 +56,14 @@
*
*
*
- * ==========================
- * AgentTranslationServiceApi
- * ==========================
+ * ========================== AgentTranslationServiceApi ==========================
*
- * Service Description: The AgentTranslation API allows `collectd`-based agents to
- * write time series data to Cloud Monitoring.
- * See [google.monitoring.v3.MetricService.CreateTimeSeries] instead.
+ * Service Description: The AgentTranslation API allows `collectd`-based agents to write time
+ * series data to Cloud Monitoring. See [google.monitoring.v3.MetricService.CreateTimeSeries]
+ * instead.
+ *
+ *
Sample for AgentTranslationServiceApi:
*
- * Sample for AgentTranslationServiceApi:
*
*
* try (AgentTranslationServiceApi agentTranslationServiceApi = AgentTranslationServiceApi.create()) {
@@ -81,6 +75,5 @@
* }
*
*
- *
*/
package com.google.cloud.monitoring.spi.v3;
diff --git a/google-cloud-monitoring/src/test/java/com/google/cloud/monitoring/spi/v3/AgentTranslationServiceTest.java b/google-cloud-monitoring/src/test/java/com/google/cloud/monitoring/spi/v3/AgentTranslationServiceTest.java
index 21921b188880..5e622b537d0e 100644
--- a/google-cloud-monitoring/src/test/java/com/google/cloud/monitoring/spi/v3/AgentTranslationServiceTest.java
+++ b/google-cloud-monitoring/src/test/java/com/google/cloud/monitoring/spi/v3/AgentTranslationServiceTest.java
@@ -15,10 +15,8 @@
package com.google.cloud.monitoring.spi.v3;
import com.google.api.MonitoredResource;
-import com.google.api.gax.core.PagedListResponse;
import com.google.api.gax.testing.MockGrpcService;
import com.google.api.gax.testing.MockServiceHelper;
-import com.google.common.collect.Lists;
import com.google.monitoring.v3.CollectdPayload;
import com.google.monitoring.v3.CreateCollectdTimeSeriesRequest;
import com.google.protobuf.Empty;
diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherApi.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherApi.java
index 717563c89914..be922966c3c3 100644
--- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherApi.java
+++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherApi.java
@@ -56,32 +56,31 @@
*
*
*
- * Note: close() needs to be called on the publisherApi object to clean up resources such
- * as threads. In the example above, try-with-resources is used, which automatically calls
- * close().
+ *
Note: close() needs to be called on the publisherApi 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:
+ *
The surface of this class includes several types of Java methods for each of the API's
+ * methods:
*
*
- * - A "flattened" method. With this type of method, the fields of the request type have been
- * converted into function parameters. It may be the case that not all fields are available
- * as parameters, and not every API method will have a flattened method entry point.
- *
- A "request object" method. This type of method only takes one parameter, a request
- * object, which must be constructed before the call. Not every API method will have a request
- * object method.
- *
- A "callable" method. This type of method takes no parameters and returns an immutable
- * ApiCallable object, which can be used to initiate calls to the service.
+ *
- A "flattened" method. With this type of method, the fields of the request type have been
+ * converted into function parameters. It may be the case that not all fields are available as
+ * parameters, and not every API method will have a flattened method entry point.
+ *
- A "request object" method. This type of method only takes one parameter, a request object,
+ * which must be constructed before the call. Not every API method will have a request object
+ * method.
+ *
- A "callable" method. This type of method takes no parameters and returns an immutable
+ * ApiCallable object, which can be used to initiate calls to the service.
*
*
* 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.
+ *
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 PublisherSettings to
- * create(). For example:
+ *
This class can be customized by passing in a custom instance of PublisherSettings to create().
+ * For example:
*
*
*
@@ -124,68 +123,49 @@ public class PublisherApi implements AutoCloseable {
private static final PathTemplate TOPIC_PATH_TEMPLATE =
PathTemplate.createWithoutUrlEncoding("projects/{project}/topics/{topic}");
- /**
- * Formats a string containing the fully-qualified path to represent
- * a project resource.
- */
+ /** Formats a string containing the fully-qualified path to represent a project resource. */
public static final String formatProjectName(String project) {
return PROJECT_PATH_TEMPLATE.instantiate("project", project);
}
- /**
- * Formats a string containing the fully-qualified path to represent
- * a topic resource.
- */
+ /** Formats a string containing the fully-qualified path to represent a topic resource. */
public static final String formatTopicName(String project, String topic) {
return TOPIC_PATH_TEMPLATE.instantiate(
"project", project,
"topic", topic);
}
- /**
- * Parses the project from the given fully-qualified path which
- * represents a project resource.
- */
+ /** Parses the project from the given fully-qualified path which represents a project resource. */
public static final String parseProjectFromProjectName(String projectName) {
return PROJECT_PATH_TEMPLATE.parse(projectName).get("project");
}
- /**
- * Parses the project from the given fully-qualified path which
- * represents a topic resource.
- */
+ /** Parses the project from the given fully-qualified path which represents a topic resource. */
public static final String parseProjectFromTopicName(String topicName) {
return TOPIC_PATH_TEMPLATE.parse(topicName).get("project");
}
- /**
- * Parses the topic from the given fully-qualified path which
- * represents a topic resource.
- */
+ /** Parses the topic from the given fully-qualified path which represents a topic resource. */
public static final String parseTopicFromTopicName(String topicName) {
return TOPIC_PATH_TEMPLATE.parse(topicName).get("topic");
}
- /**
- * Constructs an instance of PublisherApi with default settings.
- */
+ /** Constructs an instance of PublisherApi with default settings. */
public static final PublisherApi create() throws IOException {
return create(PublisherSettings.defaultBuilder().build());
}
/**
- * Constructs an instance of PublisherApi, using the given settings.
- * The channels are created based on the settings passed in, or defaults for any
- * settings that are not set.
+ * Constructs an instance of PublisherApi, 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 PublisherApi create(PublisherSettings settings) throws IOException {
return new PublisherApi(settings);
}
/**
- * Constructs an instance of PublisherApi, using the given settings.
- * This is protected so that it easy to make a subclass, but otherwise, the static
- * factory methods should be preferred.
+ * Constructs an instance of PublisherApi, using the given settings. This is protected so that it
+ * easy to make a subclass, but otherwise, the static factory methods should be preferred.
*/
protected PublisherApi(PublisherSettings settings) throws IOException {
this.settings = settings;
@@ -247,7 +227,8 @@ public final PublisherSettings getSettings() {
/**
* Creates the given topic with the given name.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (PublisherApi publisherApi = PublisherApi.create()) {
* String formattedName = PublisherApi.formatTopicName("[PROJECT]", "[TOPIC]");
@@ -256,11 +237,10 @@ public final PublisherSettings getSettings() {
*
*
* @param name The name of the topic. It must have the format
- * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
- * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
- * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
- * signs (`%`). It must be between 3 and 255 characters in length, and it
- * must not start with `"goog"`.
+ * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only
+ * letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`),
+ * tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in
+ * length, and it must not start with `"goog"`.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final Topic createTopic(String name) {
@@ -273,7 +253,8 @@ public final Topic createTopic(String name) {
/**
* Creates the given topic with the given name.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (PublisherApi publisherApi = PublisherApi.create()) {
* String formattedName = PublisherApi.formatTopicName("[PROJECT]", "[TOPIC]");
@@ -295,7 +276,8 @@ private final Topic createTopic(Topic request) {
/**
* Creates the given topic with the given name.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (PublisherApi publisherApi = PublisherApi.create()) {
* String formattedName = PublisherApi.formatTopicName("[PROJECT]", "[TOPIC]");
@@ -314,11 +296,12 @@ public final ApiCallable createTopicCallable() {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
- * does not exist. The message payload must not be empty; it must contain
- * either a non-empty data field, or at least one attribute.
+ * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic does not exist. The
+ * message payload must not be empty; it must contain either a non-empty data field, or at least
+ * one attribute.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (PublisherApi publisherApi = PublisherApi.create()) {
* String formattedTopic = PublisherApi.formatTopicName("[PROJECT]", "[TOPIC]");
@@ -344,11 +327,12 @@ public final PublishResponse publish(String topic, List messages)
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
- * does not exist. The message payload must not be empty; it must contain
- * either a non-empty data field, or at least one attribute.
+ * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic does not exist. The
+ * message payload must not be empty; it must contain either a non-empty data field, or at least
+ * one attribute.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (PublisherApi publisherApi = PublisherApi.create()) {
* String formattedTopic = PublisherApi.formatTopicName("[PROJECT]", "[TOPIC]");
@@ -374,11 +358,12 @@ public final PublishResponse publish(PublishRequest request) {
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
- * does not exist. The message payload must not be empty; it must contain
- * either a non-empty data field, or at least one attribute.
+ * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic does not exist. The
+ * message payload must not be empty; it must contain either a non-empty data field, or at least
+ * one attribute.
+ *
+ * Sample code:
*
- * Sample code:
*
* try (PublisherApi publisherApi = PublisherApi.create()) {
* String formattedTopic = PublisherApi.formatTopicName("[PROJECT]", "[TOPIC]");
@@ -405,7 +390,8 @@ public final ApiCallable publishCallable() {
/**
* Gets the configuration of a topic.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (PublisherApi publisherApi = PublisherApi.create()) {
* String formattedTopic = PublisherApi.formatTopicName("[PROJECT]", "[TOPIC]");
@@ -426,7 +412,8 @@ public final Topic getTopic(String topic) {
/**
* Gets the configuration of a topic.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (PublisherApi publisherApi = PublisherApi.create()) {
* String formattedTopic = PublisherApi.formatTopicName("[PROJECT]", "[TOPIC]");
@@ -448,7 +435,8 @@ private final Topic getTopic(GetTopicRequest request) {
/**
* Gets the configuration of a topic.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (PublisherApi publisherApi = PublisherApi.create()) {
* String formattedTopic = PublisherApi.formatTopicName("[PROJECT]", "[TOPIC]");
@@ -469,7 +457,8 @@ public final ApiCallable getTopicCallable() {
/**
* Lists matching topics.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (PublisherApi publisherApi = PublisherApi.create()) {
* String formattedProject = PublisherApi.formatProjectName("[PROJECT]");
@@ -493,7 +482,8 @@ public final PagedListResponse lis
/**
* Lists matching topics.
*
- * Sample code:
+ * Sample code:
+ *
*
* try (PublisherApi publisherApi = PublisherApi.create()) {
* String formattedProject = PublisherApi.formatProjectName("[PROJECT]");
@@ -518,7 +508,8 @@ public final PagedListResponse lis
/**
* Lists matching topics.
*
- * Sample code:
+ *