diff --git a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorGroupServiceClient.java b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorGroupServiceClient.java
index 9015aa0f..7820b399 100644
--- a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorGroupServiceClient.java
+++ b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorGroupServiceClient.java
@@ -39,8 +39,8 @@
*
Example: <code>projects/my-project-123/groups/my-group</code>
+ * @param group Required. The group which replaces the resource on the server.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ErrorGroup getGroup(ErrorGroupName groupName) {
- GetGroupRequest request =
- GetGroupRequest.newBuilder()
- .setGroupName(groupName == null ? null : groupName.toString())
- .build();
- return getGroup(request);
+ public final ErrorGroup updateGroup(ErrorGroup group) {
+ UpdateGroupRequest request = UpdateGroupRequest.newBuilder().setGroup(group).build();
+ return updateGroup(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Get the specified group.
+ * Replace the data for the specified group. Fails if the group does not exist.
*
*
Example: <code>projects/my-project-123/groups/my-group</code>
+ * @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ErrorGroup getGroup(String groupName) {
- GetGroupRequest request = GetGroupRequest.newBuilder().setGroupName(groupName).build();
- return getGroup(request);
+ public final ErrorGroup updateGroup(UpdateGroupRequest request) {
+ return updateGroupCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Get the specified group.
+ * Replace the data for the specified group. Fails if the group does not exist.
*
*
updateGroupCallable() {
+ return stub.updateGroupCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
@@ -269,83 +257,95 @@ public final ErrorGroup getGroup(GetGroupRequest request) {
*
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
* ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
- * GetGroupRequest request = GetGroupRequest.newBuilder()
- * .setGroupName(groupName.toString())
- * .build();
- * ApiFuture<ErrorGroup> future = errorGroupServiceClient.getGroupCallable().futureCall(request);
- * // Do something
- * ErrorGroup response = future.get();
+ * ErrorGroup response = errorGroupServiceClient.getGroup(groupName);
* }
*
+ *
+ * @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>
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable getGroupCallable() {
- return stub.getGroupCallable();
+ public final ErrorGroup getGroup(ErrorGroupName groupName) {
+ GetGroupRequest request =
+ GetGroupRequest.newBuilder()
+ .setGroupName(groupName == null ? null : groupName.toString())
+ .build();
+ return getGroup(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Replace the data for the specified group. Fails if the group does not exist.
+ * Get the specified group.
*
* Sample code:
*
*
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
- * ErrorGroup group = ErrorGroup.newBuilder().build();
- * ErrorGroup response = errorGroupServiceClient.updateGroup(group);
+ * ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
+ * ErrorGroup response = errorGroupServiceClient.getGroup(groupName.toString());
* }
*
*
- * @param group Required. The group which replaces the resource on the server.
+ * @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>
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ErrorGroup updateGroup(ErrorGroup group) {
- UpdateGroupRequest request = UpdateGroupRequest.newBuilder().setGroup(group).build();
- return updateGroup(request);
+ public final ErrorGroup getGroup(String groupName) {
+ GetGroupRequest request = GetGroupRequest.newBuilder().setGroupName(groupName).build();
+ return getGroup(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Replace the data for the specified group. Fails if the group does not exist.
+ * Get the specified group.
*
*
Sample code:
*
*
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
- * ErrorGroup group = ErrorGroup.newBuilder().build();
- * UpdateGroupRequest request = UpdateGroupRequest.newBuilder()
- * .setGroup(group)
+ * ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
+ * GetGroupRequest request = GetGroupRequest.newBuilder()
+ * .setGroupName(groupName.toString())
* .build();
- * ErrorGroup response = errorGroupServiceClient.updateGroup(request);
+ * ErrorGroup response = errorGroupServiceClient.getGroup(request);
* }
*
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ErrorGroup updateGroup(UpdateGroupRequest request) {
- return updateGroupCallable().call(request);
+ public final ErrorGroup getGroup(GetGroupRequest request) {
+ return getGroupCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
- * Replace the data for the specified group. Fails if the group does not exist.
+ * Get the specified group.
*
* Sample code:
*
*
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
- * ErrorGroup group = ErrorGroup.newBuilder().build();
- * UpdateGroupRequest request = UpdateGroupRequest.newBuilder()
- * .setGroup(group)
+ * ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
+ * GetGroupRequest request = GetGroupRequest.newBuilder()
+ * .setGroupName(groupName.toString())
* .build();
- * ApiFuture<ErrorGroup> future = errorGroupServiceClient.updateGroupCallable().futureCall(request);
+ * ApiFuture<ErrorGroup> future = errorGroupServiceClient.getGroupCallable().futureCall(request);
* // Do something
* ErrorGroup response = future.get();
* }
*
*/
- public final UnaryCallable updateGroupCallable() {
- return stub.updateGroupCallable();
+ public final UnaryCallable getGroupCallable() {
+ return stub.getGroupCallable();
}
@Override
diff --git a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorGroupServiceSettings.java b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorGroupServiceSettings.java
index e96fabb4..856ba7dd 100644
--- a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorGroupServiceSettings.java
+++ b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorGroupServiceSettings.java
@@ -49,16 +49,16 @@
* The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- *
For example, to set the total timeout of getGroup to 30 seconds:
+ *
For example, to set the total timeout of updateGroup to 30 seconds:
*
*
*
* ErrorGroupServiceSettings.Builder errorGroupServiceSettingsBuilder =
* ErrorGroupServiceSettings.newBuilder();
* errorGroupServiceSettingsBuilder
- * .getGroupSettings()
+ * .updateGroupSettings()
* .setRetrySettings(
- * errorGroupServiceSettingsBuilder.getGroupSettings().getRetrySettings().toBuilder()
+ * errorGroupServiceSettingsBuilder.updateGroupSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* ErrorGroupServiceSettings errorGroupServiceSettings = errorGroupServiceSettingsBuilder.build();
@@ -68,16 +68,16 @@
@Generated("by gapic-generator")
@BetaApi
public class ErrorGroupServiceSettings extends ClientSettings {
- /** Returns the object with the settings used for calls to getGroup. */
- public UnaryCallSettings getGroupSettings() {
- return ((ErrorGroupServiceStubSettings) getStubSettings()).getGroupSettings();
- }
-
/** Returns the object with the settings used for calls to updateGroup. */
public UnaryCallSettings updateGroupSettings() {
return ((ErrorGroupServiceStubSettings) getStubSettings()).updateGroupSettings();
}
+ /** Returns the object with the settings used for calls to getGroup. */
+ public UnaryCallSettings getGroupSettings() {
+ return ((ErrorGroupServiceStubSettings) getStubSettings()).getGroupSettings();
+ }
+
public static final ErrorGroupServiceSettings create(ErrorGroupServiceStubSettings stub)
throws IOException {
return new ErrorGroupServiceSettings.Builder(stub.toBuilder()).build();
@@ -175,16 +175,16 @@ public Builder applyToAllUnaryMethods(
return this;
}
- /** Returns the builder for the settings used for calls to getGroup. */
- public UnaryCallSettings.Builder getGroupSettings() {
- return getStubSettingsBuilder().getGroupSettings();
- }
-
/** Returns the builder for the settings used for calls to updateGroup. */
public UnaryCallSettings.Builder updateGroupSettings() {
return getStubSettingsBuilder().updateGroupSettings();
}
+ /** Returns the builder for the settings used for calls to getGroup. */
+ public UnaryCallSettings.Builder getGroupSettings() {
+ return getStubSettingsBuilder().getGroupSettings();
+ }
+
@Override
public ErrorGroupServiceSettings build() throws IOException {
return new ErrorGroupServiceSettings(this);
diff --git a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorStatsServiceClient.java b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorStatsServiceClient.java
index 742e4198..2c5558d2 100644
--- a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorStatsServiceClient.java
+++ b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorStatsServiceClient.java
@@ -165,6 +165,101 @@ public ErrorStatsServiceStub getStub() {
return stub;
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes all error events of a given project.
+ *
+ * Sample code:
+ *
+ *
+ * try (ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.create()) {
+ * ProjectName projectName = ProjectName.of("[PROJECT]");
+ * DeleteEventsResponse response = errorStatsServiceClient.deleteEvents(projectName);
+ * }
+ *
+ *
+ * @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`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeleteEventsResponse deleteEvents(ProjectName projectName) {
+ DeleteEventsRequest request =
+ DeleteEventsRequest.newBuilder()
+ .setProjectName(projectName == null ? null : projectName.toString())
+ .build();
+ return deleteEvents(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes all error events of a given project.
+ *
+ * Sample code:
+ *
+ *
+ * try (ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.create()) {
+ * ProjectName projectName = ProjectName.of("[PROJECT]");
+ * DeleteEventsResponse response = errorStatsServiceClient.deleteEvents(projectName.toString());
+ * }
+ *
+ *
+ * @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`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeleteEventsResponse deleteEvents(String projectName) {
+ DeleteEventsRequest request =
+ DeleteEventsRequest.newBuilder().setProjectName(projectName).build();
+ return deleteEvents(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes all error events of a given project.
+ *
+ * Sample code:
+ *
+ *
+ * try (ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.create()) {
+ * ProjectName projectName = ProjectName.of("[PROJECT]");
+ * DeleteEventsRequest request = DeleteEventsRequest.newBuilder()
+ * .setProjectName(projectName.toString())
+ * .build();
+ * DeleteEventsResponse response = errorStatsServiceClient.deleteEvents(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DeleteEventsResponse deleteEvents(DeleteEventsRequest request) {
+ return deleteEventsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes all error events of a given project.
+ *
+ * Sample code:
+ *
+ *
+ * try (ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.create()) {
+ * ProjectName projectName = ProjectName.of("[PROJECT]");
+ * DeleteEventsRequest request = DeleteEventsRequest.newBuilder()
+ * .setProjectName(projectName.toString())
+ * .build();
+ * ApiFuture<DeleteEventsResponse> future = errorStatsServiceClient.deleteEventsCallable().futureCall(request);
+ * // Do something
+ * DeleteEventsResponse response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable deleteEventsCallable() {
+ return stub.deleteEventsCallable();
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Lists the specified groups.
@@ -472,101 +567,6 @@ public final UnaryCallable listEventsCall
return stub.listEventsCallable();
}
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Deletes all error events of a given project.
- *
- * Sample code:
- *
- *
- * try (ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.create()) {
- * ProjectName projectName = ProjectName.of("[PROJECT]");
- * DeleteEventsResponse response = errorStatsServiceClient.deleteEvents(projectName);
- * }
- *
- *
- * @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`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final DeleteEventsResponse deleteEvents(ProjectName projectName) {
- DeleteEventsRequest request =
- DeleteEventsRequest.newBuilder()
- .setProjectName(projectName == null ? null : projectName.toString())
- .build();
- return deleteEvents(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Deletes all error events of a given project.
- *
- * Sample code:
- *
- *
- * try (ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.create()) {
- * ProjectName projectName = ProjectName.of("[PROJECT]");
- * DeleteEventsResponse response = errorStatsServiceClient.deleteEvents(projectName.toString());
- * }
- *
- *
- * @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`.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final DeleteEventsResponse deleteEvents(String projectName) {
- DeleteEventsRequest request =
- DeleteEventsRequest.newBuilder().setProjectName(projectName).build();
- return deleteEvents(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Deletes all error events of a given project.
- *
- * Sample code:
- *
- *
- * try (ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.create()) {
- * ProjectName projectName = ProjectName.of("[PROJECT]");
- * DeleteEventsRequest request = DeleteEventsRequest.newBuilder()
- * .setProjectName(projectName.toString())
- * .build();
- * DeleteEventsResponse response = errorStatsServiceClient.deleteEvents(request);
- * }
- *
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final DeleteEventsResponse deleteEvents(DeleteEventsRequest request) {
- return deleteEventsCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Deletes all error events of a given project.
- *
- * Sample code:
- *
- *
- * try (ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.create()) {
- * ProjectName projectName = ProjectName.of("[PROJECT]");
- * DeleteEventsRequest request = DeleteEventsRequest.newBuilder()
- * .setProjectName(projectName.toString())
- * .build();
- * ApiFuture<DeleteEventsResponse> future = errorStatsServiceClient.deleteEventsCallable().futureCall(request);
- * // Do something
- * DeleteEventsResponse response = future.get();
- * }
- *
- */
- public final UnaryCallable deleteEventsCallable() {
- return stub.deleteEventsCallable();
- }
-
@Override
public final void close() {
stub.close();
diff --git a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorStatsServiceSettings.java b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorStatsServiceSettings.java
index 873ee200..4c3394ce 100644
--- a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorStatsServiceSettings.java
+++ b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorStatsServiceSettings.java
@@ -75,6 +75,11 @@
@Generated("by gapic-generator")
@BetaApi
public class ErrorStatsServiceSettings extends ClientSettings {
+ /** Returns the object with the settings used for calls to deleteEvents. */
+ public UnaryCallSettings deleteEventsSettings() {
+ return ((ErrorStatsServiceStubSettings) getStubSettings()).deleteEventsSettings();
+ }
+
/** Returns the object with the settings used for calls to listGroupStats. */
public PagedCallSettings<
ListGroupStatsRequest, ListGroupStatsResponse, ListGroupStatsPagedResponse>
@@ -88,11 +93,6 @@ public class ErrorStatsServiceSettings extends ClientSettings deleteEventsSettings() {
- return ((ErrorStatsServiceStubSettings) getStubSettings()).deleteEventsSettings();
- }
-
public static final ErrorStatsServiceSettings create(ErrorStatsServiceStubSettings stub)
throws IOException {
return new ErrorStatsServiceSettings.Builder(stub.toBuilder()).build();
@@ -190,6 +190,12 @@ public Builder applyToAllUnaryMethods(
return this;
}
+ /** Returns the builder for the settings used for calls to deleteEvents. */
+ public UnaryCallSettings.Builder
+ deleteEventsSettings() {
+ return getStubSettingsBuilder().deleteEventsSettings();
+ }
+
/** Returns the builder for the settings used for calls to listGroupStats. */
public PagedCallSettings.Builder<
ListGroupStatsRequest, ListGroupStatsResponse, ListGroupStatsPagedResponse>
@@ -203,12 +209,6 @@ public Builder applyToAllUnaryMethods(
return getStubSettingsBuilder().listEventsSettings();
}
- /** Returns the builder for the settings used for calls to deleteEvents. */
- public UnaryCallSettings.Builder
- deleteEventsSettings() {
- return getStubSettingsBuilder().deleteEventsSettings();
- }
-
@Override
public ErrorStatsServiceSettings build() throws IOException {
return new ErrorStatsServiceSettings(this);
diff --git a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/package-info.java b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/package-info.java
index 4ecf6f6d..2c9c6269 100644
--- a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/package-info.java
+++ b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/package-info.java
@@ -28,8 +28,8 @@
*
*
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
- * ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
- * ErrorGroup response = errorGroupServiceClient.getGroup(groupName);
+ * ErrorGroup group = ErrorGroup.newBuilder().build();
+ * ErrorGroup response = errorGroupServiceClient.updateGroup(group);
* }
*
*
diff --git a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorGroupServiceStub.java b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorGroupServiceStub.java
index 8b3b2abb..b658babd 100644
--- a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorGroupServiceStub.java
+++ b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorGroupServiceStub.java
@@ -33,14 +33,14 @@
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public abstract class ErrorGroupServiceStub implements BackgroundResource {
- public UnaryCallable getGroupCallable() {
- throw new UnsupportedOperationException("Not implemented: getGroupCallable()");
- }
-
public UnaryCallable updateGroupCallable() {
throw new UnsupportedOperationException("Not implemented: updateGroupCallable()");
}
+ public UnaryCallable getGroupCallable() {
+ throw new UnsupportedOperationException("Not implemented: getGroupCallable()");
+ }
+
@Override
public abstract void close();
}
diff --git a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorGroupServiceStubSettings.java b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorGroupServiceStubSettings.java
index 3fe2073f..ddc0d11a 100644
--- a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorGroupServiceStubSettings.java
+++ b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorGroupServiceStubSettings.java
@@ -58,16 +58,16 @@
* The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- *
For example, to set the total timeout of getGroup to 30 seconds:
+ *
For example, to set the total timeout of updateGroup to 30 seconds:
*
*
*
* ErrorGroupServiceStubSettings.Builder errorGroupServiceSettingsBuilder =
* ErrorGroupServiceStubSettings.newBuilder();
* errorGroupServiceSettingsBuilder
- * .getGroupSettings()
+ * .updateGroupSettings()
* .setRetrySettings(
- * errorGroupServiceSettingsBuilder.getGroupSettings().getRetrySettings().toBuilder()
+ * errorGroupServiceSettingsBuilder.updateGroupSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* ErrorGroupServiceStubSettings errorGroupServiceSettings = errorGroupServiceSettingsBuilder.build();
@@ -81,19 +81,19 @@ public class ErrorGroupServiceStubSettings extends StubSettings DEFAULT_SERVICE_SCOPES =
ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
- private final UnaryCallSettings getGroupSettings;
private final UnaryCallSettings updateGroupSettings;
-
- /** Returns the object with the settings used for calls to getGroup. */
- public UnaryCallSettings getGroupSettings() {
- return getGroupSettings;
- }
+ private final UnaryCallSettings getGroupSettings;
/** Returns the object with the settings used for calls to updateGroup. */
public UnaryCallSettings updateGroupSettings() {
return updateGroupSettings;
}
+ /** Returns the object with the settings used for calls to getGroup. */
+ public UnaryCallSettings getGroupSettings() {
+ return getGroupSettings;
+ }
+
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public ErrorGroupServiceStub createStub() throws IOException {
if (getTransportChannelProvider()
@@ -163,16 +163,16 @@ public Builder toBuilder() {
protected ErrorGroupServiceStubSettings(Builder settingsBuilder) throws IOException {
super(settingsBuilder);
- getGroupSettings = settingsBuilder.getGroupSettings().build();
updateGroupSettings = settingsBuilder.updateGroupSettings().build();
+ getGroupSettings = settingsBuilder.getGroupSettings().build();
}
/** Builder for ErrorGroupServiceStubSettings. */
public static class Builder extends StubSettings.Builder {
private final ImmutableList> unaryMethodSettingsBuilders;
- private final UnaryCallSettings.Builder getGroupSettings;
private final UnaryCallSettings.Builder updateGroupSettings;
+ private final UnaryCallSettings.Builder getGroupSettings;
private static final ImmutableMap>
RETRYABLE_CODE_DEFINITIONS;
@@ -215,12 +215,12 @@ protected Builder() {
protected Builder(ClientContext clientContext) {
super(clientContext);
- getGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
updateGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ getGroupSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
unaryMethodSettingsBuilders =
- ImmutableList.>of(getGroupSettings, updateGroupSettings);
+ ImmutableList.>of(updateGroupSettings, getGroupSettings);
initDefaults(this);
}
@@ -237,13 +237,13 @@ private static Builder createDefault() {
private static Builder initDefaults(Builder builder) {
builder
- .getGroupSettings()
+ .updateGroupSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
builder
- .updateGroupSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+ .getGroupSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
return builder;
@@ -252,11 +252,11 @@ private static Builder initDefaults(Builder builder) {
protected Builder(ErrorGroupServiceStubSettings settings) {
super(settings);
- getGroupSettings = settings.getGroupSettings.toBuilder();
updateGroupSettings = settings.updateGroupSettings.toBuilder();
+ getGroupSettings = settings.getGroupSettings.toBuilder();
unaryMethodSettingsBuilders =
- ImmutableList.>of(getGroupSettings, updateGroupSettings);
+ ImmutableList.>of(updateGroupSettings, getGroupSettings);
}
// NEXT_MAJOR_VER: remove 'throws Exception'
@@ -275,16 +275,16 @@ public Builder applyToAllUnaryMethods(
return unaryMethodSettingsBuilders;
}
- /** Returns the builder for the settings used for calls to getGroup. */
- public UnaryCallSettings.Builder getGroupSettings() {
- return getGroupSettings;
- }
-
/** Returns the builder for the settings used for calls to updateGroup. */
public UnaryCallSettings.Builder updateGroupSettings() {
return updateGroupSettings;
}
+ /** Returns the builder for the settings used for calls to getGroup. */
+ public UnaryCallSettings.Builder getGroupSettings() {
+ return getGroupSettings;
+ }
+
@Override
public ErrorGroupServiceStubSettings build() throws IOException {
return new ErrorGroupServiceStubSettings(this);
diff --git a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorStatsServiceStub.java b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorStatsServiceStub.java
index 92302fef..65ec1b77 100644
--- a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorStatsServiceStub.java
+++ b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorStatsServiceStub.java
@@ -39,6 +39,10 @@
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public abstract class ErrorStatsServiceStub implements BackgroundResource {
+ public UnaryCallable deleteEventsCallable() {
+ throw new UnsupportedOperationException("Not implemented: deleteEventsCallable()");
+ }
+
public UnaryCallable
listGroupStatsPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listGroupStatsPagedCallable()");
@@ -56,10 +60,6 @@ public UnaryCallable listEventsCallable()
throw new UnsupportedOperationException("Not implemented: listEventsCallable()");
}
- public UnaryCallable deleteEventsCallable() {
- throw new UnsupportedOperationException("Not implemented: deleteEventsCallable()");
- }
-
@Override
public abstract void close();
}
diff --git a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorStatsServiceStubSettings.java b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorStatsServiceStubSettings.java
index 0f86c048..14a4f144 100644
--- a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorStatsServiceStubSettings.java
+++ b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/ErrorStatsServiceStubSettings.java
@@ -96,12 +96,17 @@ public class ErrorStatsServiceStubSettings extends StubSettings DEFAULT_SERVICE_SCOPES =
ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
+ private final UnaryCallSettings deleteEventsSettings;
private final PagedCallSettings<
ListGroupStatsRequest, ListGroupStatsResponse, ListGroupStatsPagedResponse>
listGroupStatsSettings;
private final PagedCallSettings
listEventsSettings;
- private final UnaryCallSettings deleteEventsSettings;
+
+ /** Returns the object with the settings used for calls to deleteEvents. */
+ public UnaryCallSettings deleteEventsSettings() {
+ return deleteEventsSettings;
+ }
/** Returns the object with the settings used for calls to listGroupStats. */
public PagedCallSettings<
@@ -116,11 +121,6 @@ public class ErrorStatsServiceStubSettings extends StubSettings deleteEventsSettings() {
- return deleteEventsSettings;
- }
-
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public ErrorStatsServiceStub createStub() throws IOException {
if (getTransportChannelProvider()
@@ -190,9 +190,9 @@ public Builder toBuilder() {
protected ErrorStatsServiceStubSettings(Builder settingsBuilder) throws IOException {
super(settingsBuilder);
+ deleteEventsSettings = settingsBuilder.deleteEventsSettings().build();
listGroupStatsSettings = settingsBuilder.listGroupStatsSettings().build();
listEventsSettings = settingsBuilder.listEventsSettings().build();
- deleteEventsSettings = settingsBuilder.deleteEventsSettings().build();
}
private static final PagedListDescriptor<
@@ -310,14 +310,14 @@ public ApiFuture getFuturePagedResponse(
public static class Builder extends StubSettings.Builder {
private final ImmutableList> unaryMethodSettingsBuilders;
+ private final UnaryCallSettings.Builder
+ deleteEventsSettings;
private final PagedCallSettings.Builder<
ListGroupStatsRequest, ListGroupStatsResponse, ListGroupStatsPagedResponse>
listGroupStatsSettings;
private final PagedCallSettings.Builder<
ListEventsRequest, ListEventsResponse, ListEventsPagedResponse>
listEventsSettings;
- private final UnaryCallSettings.Builder
- deleteEventsSettings;
private static final ImmutableMap>
RETRYABLE_CODE_DEFINITIONS;
@@ -360,15 +360,15 @@ protected Builder() {
protected Builder(ClientContext clientContext) {
super(clientContext);
+ deleteEventsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
listGroupStatsSettings = PagedCallSettings.newBuilder(LIST_GROUP_STATS_PAGE_STR_FACT);
listEventsSettings = PagedCallSettings.newBuilder(LIST_EVENTS_PAGE_STR_FACT);
- deleteEventsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
unaryMethodSettingsBuilders =
ImmutableList.>of(
- listGroupStatsSettings, listEventsSettings, deleteEventsSettings);
+ deleteEventsSettings, listGroupStatsSettings, listEventsSettings);
initDefaults(this);
}
@@ -385,18 +385,18 @@ private static Builder createDefault() {
private static Builder initDefaults(Builder builder) {
builder
- .listGroupStatsSettings()
+ .deleteEventsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
builder
- .listEventsSettings()
+ .listGroupStatsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
builder
- .deleteEventsSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+ .listEventsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
return builder;
@@ -405,13 +405,13 @@ private static Builder initDefaults(Builder builder) {
protected Builder(ErrorStatsServiceStubSettings settings) {
super(settings);
+ deleteEventsSettings = settings.deleteEventsSettings.toBuilder();
listGroupStatsSettings = settings.listGroupStatsSettings.toBuilder();
listEventsSettings = settings.listEventsSettings.toBuilder();
- deleteEventsSettings = settings.deleteEventsSettings.toBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
- listGroupStatsSettings, listEventsSettings, deleteEventsSettings);
+ deleteEventsSettings, listGroupStatsSettings, listEventsSettings);
}
// NEXT_MAJOR_VER: remove 'throws Exception'
@@ -430,6 +430,12 @@ public Builder applyToAllUnaryMethods(
return unaryMethodSettingsBuilders;
}
+ /** Returns the builder for the settings used for calls to deleteEvents. */
+ public UnaryCallSettings.Builder
+ deleteEventsSettings() {
+ return deleteEventsSettings;
+ }
+
/** Returns the builder for the settings used for calls to listGroupStats. */
public PagedCallSettings.Builder<
ListGroupStatsRequest, ListGroupStatsResponse, ListGroupStatsPagedResponse>
@@ -443,12 +449,6 @@ public Builder applyToAllUnaryMethods(
return listEventsSettings;
}
- /** Returns the builder for the settings used for calls to deleteEvents. */
- public UnaryCallSettings.Builder
- deleteEventsSettings() {
- return deleteEventsSettings;
- }
-
@Override
public ErrorStatsServiceStubSettings build() throws IOException {
return new ErrorStatsServiceStubSettings(this);
diff --git a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/GrpcErrorGroupServiceStub.java b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/GrpcErrorGroupServiceStub.java
index 50f40eab..ace5a10a 100644
--- a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/GrpcErrorGroupServiceStub.java
+++ b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/GrpcErrorGroupServiceStub.java
@@ -44,14 +44,6 @@
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public class GrpcErrorGroupServiceStub extends ErrorGroupServiceStub {
- private static final MethodDescriptor getGroupMethodDescriptor =
- MethodDescriptor.newBuilder()
- .setType(MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(
- "google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/GetGroup")
- .setRequestMarshaller(ProtoUtils.marshaller(GetGroupRequest.getDefaultInstance()))
- .setResponseMarshaller(ProtoUtils.marshaller(ErrorGroup.getDefaultInstance()))
- .build();
private static final MethodDescriptor
updateGroupMethodDescriptor =
MethodDescriptor.newBuilder()
@@ -61,11 +53,19 @@ public class GrpcErrorGroupServiceStub extends ErrorGroupServiceStub {
.setRequestMarshaller(ProtoUtils.marshaller(UpdateGroupRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(ErrorGroup.getDefaultInstance()))
.build();
+ private static final MethodDescriptor getGroupMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/GetGroup")
+ .setRequestMarshaller(ProtoUtils.marshaller(GetGroupRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(ErrorGroup.getDefaultInstance()))
+ .build();
private final BackgroundResource backgroundResources;
- private final UnaryCallable getGroupCallable;
private final UnaryCallable updateGroupCallable;
+ private final UnaryCallable getGroupCallable;
private final GrpcStubCallableFactory callableFactory;
@@ -108,51 +108,51 @@ protected GrpcErrorGroupServiceStub(
throws IOException {
this.callableFactory = callableFactory;
- GrpcCallSettings getGroupTransportSettings =
- GrpcCallSettings.newBuilder()
- .setMethodDescriptor(getGroupMethodDescriptor)
+ GrpcCallSettings updateGroupTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(updateGroupMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
+ new RequestParamsExtractor() {
@Override
- public Map extract(GetGroupRequest request) {
+ public Map extract(UpdateGroupRequest request) {
ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("group_name", String.valueOf(request.getGroupName()));
+ params.put("group.name", String.valueOf(request.getGroup().getName()));
return params.build();
}
})
.build();
- GrpcCallSettings updateGroupTransportSettings =
- GrpcCallSettings.newBuilder()
- .setMethodDescriptor(updateGroupMethodDescriptor)
+ GrpcCallSettings getGroupTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getGroupMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
+ new RequestParamsExtractor() {
@Override
- public Map extract(UpdateGroupRequest request) {
+ public Map extract(GetGroupRequest request) {
ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("group.name", String.valueOf(request.getGroup().getName()));
+ params.put("group_name", String.valueOf(request.getGroupName()));
return params.build();
}
})
.build();
- this.getGroupCallable =
- callableFactory.createUnaryCallable(
- getGroupTransportSettings, settings.getGroupSettings(), clientContext);
this.updateGroupCallable =
callableFactory.createUnaryCallable(
updateGroupTransportSettings, settings.updateGroupSettings(), clientContext);
+ this.getGroupCallable =
+ callableFactory.createUnaryCallable(
+ getGroupTransportSettings, settings.getGroupSettings(), clientContext);
backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
}
- public UnaryCallable getGroupCallable() {
- return getGroupCallable;
- }
-
public UnaryCallable updateGroupCallable() {
return updateGroupCallable;
}
+ public UnaryCallable getGroupCallable() {
+ return getGroupCallable;
+ }
+
@Override
public final void close() {
shutdown();
diff --git a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/GrpcErrorStatsServiceStub.java b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/GrpcErrorStatsServiceStub.java
index 178ee2c3..22ca7e25 100644
--- a/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/GrpcErrorStatsServiceStub.java
+++ b/google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/stub/GrpcErrorStatsServiceStub.java
@@ -50,6 +50,16 @@
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public class GrpcErrorStatsServiceStub extends ErrorStatsServiceStub {
+ private static final MethodDescriptor
+ deleteEventsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/DeleteEvents")
+ .setRequestMarshaller(ProtoUtils.marshaller(DeleteEventsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(DeleteEventsResponse.getDefaultInstance()))
+ .build();
private static final MethodDescriptor
listGroupStatsMethodDescriptor =
MethodDescriptor.newBuilder()
@@ -70,25 +80,15 @@ public class GrpcErrorStatsServiceStub extends ErrorStatsServiceStub {
.setRequestMarshaller(ProtoUtils.marshaller(ListEventsRequest.getDefaultInstance()))
.setResponseMarshaller(ProtoUtils.marshaller(ListEventsResponse.getDefaultInstance()))
.build();
- private static final MethodDescriptor
- deleteEventsMethodDescriptor =
- MethodDescriptor.newBuilder()
- .setType(MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(
- "google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/DeleteEvents")
- .setRequestMarshaller(ProtoUtils.marshaller(DeleteEventsRequest.getDefaultInstance()))
- .setResponseMarshaller(
- ProtoUtils.marshaller(DeleteEventsResponse.getDefaultInstance()))
- .build();
private final BackgroundResource backgroundResources;
+ private final UnaryCallable deleteEventsCallable;
private final UnaryCallable listGroupStatsCallable;
private final UnaryCallable
listGroupStatsPagedCallable;
private final UnaryCallable listEventsCallable;
private final UnaryCallable listEventsPagedCallable;
- private final UnaryCallable deleteEventsCallable;
private final GrpcStubCallableFactory callableFactory;
@@ -131,6 +131,19 @@ protected GrpcErrorStatsServiceStub(
throws IOException {
this.callableFactory = callableFactory;
+ GrpcCallSettings deleteEventsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(deleteEventsMethodDescriptor)
+ .setParamsExtractor(
+ new RequestParamsExtractor() {
+ @Override
+ public Map extract(DeleteEventsRequest request) {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("project_name", String.valueOf(request.getProjectName()));
+ return params.build();
+ }
+ })
+ .build();
GrpcCallSettings
listGroupStatsTransportSettings =
GrpcCallSettings.newBuilder()
@@ -158,20 +171,10 @@ public Map extract(ListEventsRequest request) {
}
})
.build();
- GrpcCallSettings deleteEventsTransportSettings =
- GrpcCallSettings.newBuilder()
- .setMethodDescriptor(deleteEventsMethodDescriptor)
- .setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(DeleteEventsRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("project_name", String.valueOf(request.getProjectName()));
- return params.build();
- }
- })
- .build();
+ this.deleteEventsCallable =
+ callableFactory.createUnaryCallable(
+ deleteEventsTransportSettings, settings.deleteEventsSettings(), clientContext);
this.listGroupStatsCallable =
callableFactory.createUnaryCallable(
listGroupStatsTransportSettings, settings.listGroupStatsSettings(), clientContext);
@@ -184,13 +187,14 @@ public Map extract(DeleteEventsRequest request) {
this.listEventsPagedCallable =
callableFactory.createPagedCallable(
listEventsTransportSettings, settings.listEventsSettings(), clientContext);
- this.deleteEventsCallable =
- callableFactory.createUnaryCallable(
- deleteEventsTransportSettings, settings.deleteEventsSettings(), clientContext);
backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
}
+ public UnaryCallable deleteEventsCallable() {
+ return deleteEventsCallable;
+ }
+
public UnaryCallable
listGroupStatsPagedCallable() {
return listGroupStatsPagedCallable;
@@ -208,10 +212,6 @@ public UnaryCallable listEventsCallable()
return listEventsCallable;
}
- public UnaryCallable deleteEventsCallable() {
- return deleteEventsCallable;
- }
-
@Override
public final void close() {
shutdown();
diff --git a/google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/v1beta1/ErrorGroupServiceClientTest.java b/google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/v1beta1/ErrorGroupServiceClientTest.java
index 8d428358..378654ae 100644
--- a/google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/v1beta1/ErrorGroupServiceClientTest.java
+++ b/google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/v1beta1/ErrorGroupServiceClientTest.java
@@ -86,23 +86,23 @@ public void tearDown() throws Exception {
@Test
@SuppressWarnings("all")
- public void getGroupTest() {
+ public void updateGroupTest() {
ErrorGroupName name = ErrorGroupName.of("[PROJECT]", "[GROUP]");
String groupId = "groupId506361563";
ErrorGroup expectedResponse =
ErrorGroup.newBuilder().setName(name.toString()).setGroupId(groupId).build();
mockErrorGroupService.addResponse(expectedResponse);
- ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
+ ErrorGroup group = ErrorGroup.newBuilder().build();
- ErrorGroup actualResponse = client.getGroup(groupName);
+ ErrorGroup actualResponse = client.updateGroup(group);
Assert.assertEquals(expectedResponse, actualResponse);
List actualRequests = mockErrorGroupService.getRequests();
Assert.assertEquals(1, actualRequests.size());
- GetGroupRequest actualRequest = (GetGroupRequest) actualRequests.get(0);
+ UpdateGroupRequest actualRequest = (UpdateGroupRequest) actualRequests.get(0);
- Assert.assertEquals(groupName, ErrorGroupName.parse(actualRequest.getGroupName()));
+ Assert.assertEquals(group, actualRequest.getGroup());
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -111,14 +111,14 @@ public void getGroupTest() {
@Test
@SuppressWarnings("all")
- public void getGroupExceptionTest() throws Exception {
+ public void updateGroupExceptionTest() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
mockErrorGroupService.addException(exception);
try {
- ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
+ ErrorGroup group = ErrorGroup.newBuilder().build();
- client.getGroup(groupName);
+ client.updateGroup(group);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
// Expected exception
@@ -127,23 +127,23 @@ public void getGroupExceptionTest() throws Exception {
@Test
@SuppressWarnings("all")
- public void updateGroupTest() {
+ public void getGroupTest() {
ErrorGroupName name = ErrorGroupName.of("[PROJECT]", "[GROUP]");
String groupId = "groupId506361563";
ErrorGroup expectedResponse =
ErrorGroup.newBuilder().setName(name.toString()).setGroupId(groupId).build();
mockErrorGroupService.addResponse(expectedResponse);
- ErrorGroup group = ErrorGroup.newBuilder().build();
+ ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
- ErrorGroup actualResponse = client.updateGroup(group);
+ ErrorGroup actualResponse = client.getGroup(groupName);
Assert.assertEquals(expectedResponse, actualResponse);
List actualRequests = mockErrorGroupService.getRequests();
Assert.assertEquals(1, actualRequests.size());
- UpdateGroupRequest actualRequest = (UpdateGroupRequest) actualRequests.get(0);
+ GetGroupRequest actualRequest = (GetGroupRequest) actualRequests.get(0);
- Assert.assertEquals(group, actualRequest.getGroup());
+ Assert.assertEquals(groupName, ErrorGroupName.parse(actualRequest.getGroupName()));
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -152,14 +152,14 @@ public void updateGroupTest() {
@Test
@SuppressWarnings("all")
- public void updateGroupExceptionTest() throws Exception {
+ public void getGroupExceptionTest() throws Exception {
StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
mockErrorGroupService.addException(exception);
try {
- ErrorGroup group = ErrorGroup.newBuilder().build();
+ ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
- client.updateGroup(group);
+ client.getGroup(groupName);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
// Expected exception
diff --git a/google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/v1beta1/ErrorStatsServiceClientTest.java b/google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/v1beta1/ErrorStatsServiceClientTest.java
index 03299904..520da219 100644
--- a/google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/v1beta1/ErrorStatsServiceClientTest.java
+++ b/google-cloud-errorreporting/src/test/java/com/google/cloud/errorreporting/v1beta1/ErrorStatsServiceClientTest.java
@@ -94,6 +94,44 @@ public void tearDown() throws Exception {
client.close();
}
+ @Test
+ @SuppressWarnings("all")
+ public void deleteEventsTest() {
+ DeleteEventsResponse expectedResponse = DeleteEventsResponse.newBuilder().build();
+ mockErrorStatsService.addResponse(expectedResponse);
+
+ ProjectName projectName = ProjectName.of("[PROJECT]");
+
+ DeleteEventsResponse actualResponse = client.deleteEvents(projectName);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockErrorStatsService.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ DeleteEventsRequest actualRequest = (DeleteEventsRequest) actualRequests.get(0);
+
+ Assert.assertEquals(projectName, ProjectName.parse(actualRequest.getProjectName()));
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ @SuppressWarnings("all")
+ public void deleteEventsExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+ mockErrorStatsService.addException(exception);
+
+ try {
+ ProjectName projectName = ProjectName.of("[PROJECT]");
+
+ client.deleteEvents(projectName);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception
+ }
+ }
+
@Test
@SuppressWarnings("all")
public void listGroupStatsTest() {
@@ -195,42 +233,4 @@ public void listEventsExceptionTest() throws Exception {
// Expected exception
}
}
-
- @Test
- @SuppressWarnings("all")
- public void deleteEventsTest() {
- DeleteEventsResponse expectedResponse = DeleteEventsResponse.newBuilder().build();
- mockErrorStatsService.addResponse(expectedResponse);
-
- ProjectName projectName = ProjectName.of("[PROJECT]");
-
- DeleteEventsResponse actualResponse = client.deleteEvents(projectName);
- Assert.assertEquals(expectedResponse, actualResponse);
-
- List actualRequests = mockErrorStatsService.getRequests();
- Assert.assertEquals(1, actualRequests.size());
- DeleteEventsRequest actualRequest = (DeleteEventsRequest) actualRequests.get(0);
-
- Assert.assertEquals(projectName, ProjectName.parse(actualRequest.getProjectName()));
- Assert.assertTrue(
- channelProvider.isHeaderSent(
- ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
- GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
- }
-
- @Test
- @SuppressWarnings("all")
- public void deleteEventsExceptionTest() throws Exception {
- StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
- mockErrorStatsService.addException(exception);
-
- try {
- ProjectName projectName = ProjectName.of("[PROJECT]");
-
- client.deleteEvents(projectName);
- Assert.fail("No exception raised");
- } catch (InvalidArgumentException e) {
- // Expected exception
- }
- }
}
diff --git a/synth.metadata b/synth.metadata
index 7502bb29..4703697e 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -11,8 +11,8 @@
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "aed11c01e52921613b9ee469c2d85f5f33175fb7",
- "internalRef": "310660461"
+ "sha": "5a90d467aa65e7f038f87585e8fbb45d74475e7c",
+ "internalRef": "312088359"
}
},
{