diff --git a/google-api-grpc/proto-google-cloud-monitoring-v3/src/main/java/com/google/monitoring/v3/DroppedLabels.java b/google-api-grpc/proto-google-cloud-monitoring-v3/src/main/java/com/google/monitoring/v3/DroppedLabels.java new file mode 100644 index 000000000000..49bfe6d4affa --- /dev/null +++ b/google-api-grpc/proto-google-cloud-monitoring-v3/src/main/java/com/google/monitoring/v3/DroppedLabels.java @@ -0,0 +1,770 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/monitoring/v3/dropped_labels.proto + +package com.google.monitoring.v3; + +/** + * + * + *
+ * A set of (label, value) pairs which were dropped during aggregation, attached + * to google.api.Distribution.Exemplars in google.api.Distribution values during + * aggregation. + * These values are used in combination with the label values that remain on the + * aggregated Distribution timeseries to construct the full label set for the + * exemplar values. The resulting full label set may be used to identify the + * specific task/job/instance (for example) which may be contributing to a + * long-tail, while allowing the storage savings of only storing aggregated + * distribution values for a large group. + * Note that there are no guarantees on ordering of the labels from + * exemplar-to-exemplar and from distribution-to-distribution in the same + * stream, and there may be duplicates. It is up to clients to resolve any + * ambiguities. + *+ * + * Protobuf type {@code google.monitoring.v3.DroppedLabels} + */ +public final class DroppedLabels extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.monitoring.v3.DroppedLabels) + DroppedLabelsOrBuilder { + private static final long serialVersionUID = 0L; + // Use DroppedLabels.newBuilder() to construct. + private DroppedLabels(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private DroppedLabels() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DroppedLabels( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + label_ = + com.google.protobuf.MapField.newMapField(LabelDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry
+ * Map from label to its value, for all labels dropped in any aggregation. + *+ * + *
map<string, string> label = 1;
+ */
+ public boolean containsLabel(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetLabel().getMap().containsKey(key);
+ }
+ /** Use {@link #getLabelMap()} instead. */
+ @java.lang.Deprecated
+ public java.util.Map+ * Map from label to its value, for all labels dropped in any aggregation. + *+ * + *
map<string, string> label = 1;
+ */
+ public java.util.Map+ * Map from label to its value, for all labels dropped in any aggregation. + *+ * + *
map<string, string> label = 1;
+ */
+ public java.lang.String getLabelOrDefault(java.lang.String key, java.lang.String defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Map from label to its value, for all labels dropped in any aggregation. + *+ * + *
map<string, string> label = 1;
+ */
+ public java.lang.String getLabelOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * A set of (label, value) pairs which were dropped during aggregation, attached + * to google.api.Distribution.Exemplars in google.api.Distribution values during + * aggregation. + * These values are used in combination with the label values that remain on the + * aggregated Distribution timeseries to construct the full label set for the + * exemplar values. The resulting full label set may be used to identify the + * specific task/job/instance (for example) which may be contributing to a + * long-tail, while allowing the storage savings of only storing aggregated + * distribution values for a large group. + * Note that there are no guarantees on ordering of the labels from + * exemplar-to-exemplar and from distribution-to-distribution in the same + * stream, and there may be duplicates. It is up to clients to resolve any + * ambiguities. + *+ * + * Protobuf type {@code google.monitoring.v3.DroppedLabels} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Map from label to its value, for all labels dropped in any aggregation. + *+ * + *
map<string, string> label = 1;
+ */
+ public boolean containsLabel(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ return internalGetLabel().getMap().containsKey(key);
+ }
+ /** Use {@link #getLabelMap()} instead. */
+ @java.lang.Deprecated
+ public java.util.Map+ * Map from label to its value, for all labels dropped in any aggregation. + *+ * + *
map<string, string> label = 1;
+ */
+ public java.util.Map+ * Map from label to its value, for all labels dropped in any aggregation. + *+ * + *
map<string, string> label = 1;
+ */
+ public java.lang.String getLabelOrDefault(java.lang.String key, java.lang.String defaultValue) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Map from label to its value, for all labels dropped in any aggregation. + *+ * + *
map<string, string> label = 1;
+ */
+ public java.lang.String getLabelOrThrow(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ java.util.Map+ * Map from label to its value, for all labels dropped in any aggregation. + *+ * + *
map<string, string> label = 1;
+ */
+ public Builder removeLabel(java.lang.String key) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableLabel().getMutableMap().remove(key);
+ return this;
+ }
+ /** Use alternate mutation accessors instead. */
+ @java.lang.Deprecated
+ public java.util.Map+ * Map from label to its value, for all labels dropped in any aggregation. + *+ * + *
map<string, string> label = 1;
+ */
+ public Builder putLabel(java.lang.String key, java.lang.String value) {
+ if (key == null) {
+ throw new java.lang.NullPointerException();
+ }
+ if (value == null) {
+ throw new java.lang.NullPointerException();
+ }
+ internalGetMutableLabel().getMutableMap().put(key, value);
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Map from label to its value, for all labels dropped in any aggregation. + *+ * + *
map<string, string> label = 1;
+ */
+ public Builder putAllLabel(java.util.Map+ * Map from label to its value, for all labels dropped in any aggregation. + *+ * + *
map<string, string> label = 1;
+ */
+ int getLabelCount();
+ /**
+ *
+ *
+ * + * Map from label to its value, for all labels dropped in any aggregation. + *+ * + *
map<string, string> label = 1;
+ */
+ boolean containsLabel(java.lang.String key);
+ /** Use {@link #getLabelMap()} instead. */
+ @java.lang.Deprecated
+ java.util.Map+ * Map from label to its value, for all labels dropped in any aggregation. + *+ * + *
map<string, string> label = 1;
+ */
+ java.util.Map+ * Map from label to its value, for all labels dropped in any aggregation. + *+ * + *
map<string, string> label = 1;
+ */
+ java.lang.String getLabelOrDefault(java.lang.String key, java.lang.String defaultValue);
+ /**
+ *
+ *
+ * + * Map from label to its value, for all labels dropped in any aggregation. + *+ * + *
map<string, string> label = 1;
+ */
+ java.lang.String getLabelOrThrow(java.lang.String key);
+}
diff --git a/google-api-grpc/proto-google-cloud-monitoring-v3/src/main/java/com/google/monitoring/v3/DroppedLabelsProto.java b/google-api-grpc/proto-google-cloud-monitoring-v3/src/main/java/com/google/monitoring/v3/DroppedLabelsProto.java
new file mode 100644
index 000000000000..218d33656617
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-monitoring-v3/src/main/java/com/google/monitoring/v3/DroppedLabelsProto.java
@@ -0,0 +1,76 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/monitoring/v3/dropped_labels.proto
+
+package com.google.monitoring.v3;
+
+public final class DroppedLabelsProto {
+ private DroppedLabelsProto() {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_monitoring_v3_DroppedLabels_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_monitoring_v3_DroppedLabels_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_monitoring_v3_DroppedLabels_LabelEntry_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_monitoring_v3_DroppedLabels_LabelEntry_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ return descriptor;
+ }
+
+ private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
+
+ static {
+ java.lang.String[] descriptorData = {
+ "\n)google/monitoring/v3/dropped_labels.pr"
+ + "oto\022\024google.monitoring.v3\032\034google/api/an"
+ + "notations.proto\"|\n\rDroppedLabels\022=\n\005labe"
+ + "l\030\001 \003(\0132..google.monitoring.v3.DroppedLa"
+ + "bels.LabelEntry\032,\n\nLabelEntry\022\013\n\003key\030\001 \001"
+ + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001Bp\n\030com.google.moni"
+ + "toring.v3B\022DroppedLabelsProtoP\001Z>google."
+ + "golang.org/genproto/googleapis/monitorin"
+ + "g/v3;monitoringb\006proto3"
+ };
+ com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
+ new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
+ public com.google.protobuf.ExtensionRegistry assignDescriptors(
+ com.google.protobuf.Descriptors.FileDescriptor root) {
+ descriptor = root;
+ return null;
+ }
+ };
+ com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
+ descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ com.google.api.AnnotationsProto.getDescriptor(),
+ },
+ assigner);
+ internal_static_google_monitoring_v3_DroppedLabels_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_google_monitoring_v3_DroppedLabels_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_monitoring_v3_DroppedLabels_descriptor,
+ new java.lang.String[] {
+ "Label",
+ });
+ internal_static_google_monitoring_v3_DroppedLabels_LabelEntry_descriptor =
+ internal_static_google_monitoring_v3_DroppedLabels_descriptor.getNestedTypes().get(0);
+ internal_static_google_monitoring_v3_DroppedLabels_LabelEntry_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_monitoring_v3_DroppedLabels_LabelEntry_descriptor,
+ new java.lang.String[] {
+ "Key", "Value",
+ });
+ com.google.api.AnnotationsProto.getDescriptor();
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/google-api-grpc/proto-google-cloud-monitoring-v3/src/main/proto/google/monitoring/v3/dropped_labels.proto b/google-api-grpc/proto-google-cloud-monitoring-v3/src/main/proto/google/monitoring/v3/dropped_labels.proto
index d832aa454528..acbe8cf25ad1 100644
--- a/google-api-grpc/proto-google-cloud-monitoring-v3/src/main/proto/google/monitoring/v3/dropped_labels.proto
+++ b/google-api-grpc/proto-google-cloud-monitoring-v3/src/main/proto/google/monitoring/v3/dropped_labels.proto
@@ -20,6 +20,9 @@ package google.monitoring.v3;
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
+option java_multiple_files = true;
+option java_outer_classname = "DroppedLabelsProto";
+option java_package = "com.google.monitoring.v3";
// A set of (label, value) pairs which were dropped during aggregation, attached
// to google.api.Distribution.Exemplars in google.api.Distribution values during
diff --git a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/UptimeCheckServiceClient.java b/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/UptimeCheckServiceClient.java
index cfe1554df34f..8433f26744c3 100644
--- a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/UptimeCheckServiceClient.java
+++ b/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/UptimeCheckServiceClient.java
@@ -37,6 +37,7 @@
import com.google.monitoring.v3.ListUptimeCheckIpsResponse;
import com.google.monitoring.v3.UpdateUptimeCheckConfigRequest;
import com.google.monitoring.v3.UptimeCheckConfig;
+import com.google.monitoring.v3.UptimeCheckConfigName;
import com.google.monitoring.v3.UptimeCheckIp;
import com.google.protobuf.Empty;
import java.io.IOException;
@@ -59,8 +60,8 @@
*
*
* try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
- * String formattedName = UptimeCheckConfigName.format("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
- * UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(formattedName);
+ * UptimeCheckConfigName name = UptimeCheckConfigName.of("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ * UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(name);
* }
*
*
@@ -289,8 +290,34 @@ public final ListUptimeCheckConfigsPagedResponse listUptimeCheckConfigs(
*
*
* try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
- * String formattedName = UptimeCheckConfigName.format("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
- * UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(formattedName);
+ * UptimeCheckConfigName name = UptimeCheckConfigName.of("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ * UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(name);
+ * }
+ *
+ *
+ * @param name The uptime check configuration to retrieve. The format is
+ * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final UptimeCheckConfig getUptimeCheckConfig(UptimeCheckConfigName name) {
+
+ GetUptimeCheckConfigRequest request =
+ GetUptimeCheckConfigRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getUptimeCheckConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets a single uptime check configuration.
+ *
+ * Sample code: + * + *
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * UptimeCheckConfigName name = UptimeCheckConfigName.of("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ * UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(name.toString());
* }
*
*
@@ -313,9 +340,9 @@ public final UptimeCheckConfig getUptimeCheckConfig(String name) {
*
*
* try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
- * String formattedName = UptimeCheckConfigName.format("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ * UptimeCheckConfigName name = UptimeCheckConfigName.of("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
* GetUptimeCheckConfigRequest request = GetUptimeCheckConfigRequest.newBuilder()
- * .setName(formattedName)
+ * .setName(name.toString())
* .build();
* UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(request);
* }
@@ -336,9 +363,9 @@ public final UptimeCheckConfig getUptimeCheckConfig(GetUptimeCheckConfigRequest
*
*
* try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
- * String formattedName = UptimeCheckConfigName.format("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ * UptimeCheckConfigName name = UptimeCheckConfigName.of("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
* GetUptimeCheckConfigRequest request = GetUptimeCheckConfigRequest.newBuilder()
- * .setName(formattedName)
+ * .setName(name.toString())
* .build();
* ApiFuture<UptimeCheckConfig> future = uptimeCheckServiceClient.getUptimeCheckConfigCallable().futureCall(request);
* // Do something
@@ -523,8 +550,36 @@ public final UptimeCheckConfig updateUptimeCheckConfig(UpdateUptimeCheckConfigRe
*
*
* try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
- * String formattedName = UptimeCheckConfigName.format("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
- * uptimeCheckServiceClient.deleteUptimeCheckConfig(formattedName);
+ * UptimeCheckConfigName name = UptimeCheckConfigName.of("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ * uptimeCheckServiceClient.deleteUptimeCheckConfig(name);
+ * }
+ *
+ *
+ * @param name The uptime check configuration to delete. The format is
+ * `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteUptimeCheckConfig(UptimeCheckConfigName name) {
+
+ DeleteUptimeCheckConfigRequest request =
+ DeleteUptimeCheckConfigRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteUptimeCheckConfig(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes an uptime check configuration. Note that this method will fail if the uptime check
+ * configuration is referenced by an alert policy or other dependent configs that would be
+ * rendered invalid by the deletion.
+ *
+ * Sample code:
+ *
+ *
+ * try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
+ * UptimeCheckConfigName name = UptimeCheckConfigName.of("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ * uptimeCheckServiceClient.deleteUptimeCheckConfig(name.toString());
* }
*
*
@@ -549,9 +604,9 @@ public final void deleteUptimeCheckConfig(String name) {
*
*
* try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
- * String formattedName = UptimeCheckConfigName.format("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ * UptimeCheckConfigName name = UptimeCheckConfigName.of("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
* DeleteUptimeCheckConfigRequest request = DeleteUptimeCheckConfigRequest.newBuilder()
- * .setName(formattedName)
+ * .setName(name.toString())
* .build();
* uptimeCheckServiceClient.deleteUptimeCheckConfig(request);
* }
@@ -574,9 +629,9 @@ public final void deleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest request
*
*
* try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
- * String formattedName = UptimeCheckConfigName.format("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ * UptimeCheckConfigName name = UptimeCheckConfigName.of("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
* DeleteUptimeCheckConfigRequest request = DeleteUptimeCheckConfigRequest.newBuilder()
- * .setName(formattedName)
+ * .setName(name.toString())
* .build();
* ApiFuture<Void> future = uptimeCheckServiceClient.deleteUptimeCheckConfigCallable().futureCall(request);
* // Do something
diff --git a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/package-info.java b/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/package-info.java
index 5c405dc40d7a..297143cd6622 100644
--- a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/package-info.java
+++ b/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/package-info.java
@@ -109,8 +109,8 @@
*
*
* try (UptimeCheckServiceClient uptimeCheckServiceClient = UptimeCheckServiceClient.create()) {
- * String formattedName = UptimeCheckConfigName.format("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
- * UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(formattedName);
+ * UptimeCheckConfigName name = UptimeCheckConfigName.of("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ * UptimeCheckConfig response = uptimeCheckServiceClient.getUptimeCheckConfig(name);
* }
*
*
diff --git a/google-cloud-clients/google-cloud-monitoring/src/test/java/com/google/cloud/monitoring/v3/UptimeCheckServiceClientTest.java b/google-cloud-clients/google-cloud-monitoring/src/test/java/com/google/cloud/monitoring/v3/UptimeCheckServiceClientTest.java
index 1c367c49f0e0..6faa686b5e2f 100644
--- a/google-cloud-clients/google-cloud-monitoring/src/test/java/com/google/cloud/monitoring/v3/UptimeCheckServiceClientTest.java
+++ b/google-cloud-clients/google-cloud-monitoring/src/test/java/com/google/cloud/monitoring/v3/UptimeCheckServiceClientTest.java
@@ -166,16 +166,16 @@ public void getUptimeCheckConfigTest() {
.build();
mockUptimeCheckService.addResponse(expectedResponse);
- String formattedName = UptimeCheckConfigName.format("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ UptimeCheckConfigName name = UptimeCheckConfigName.of("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
- UptimeCheckConfig actualResponse = client.getUptimeCheckConfig(formattedName);
+ UptimeCheckConfig actualResponse = client.getUptimeCheckConfig(name);
Assert.assertEquals(expectedResponse, actualResponse);
List actualRequests = mockUptimeCheckService.getRequests();
Assert.assertEquals(1, actualRequests.size());
GetUptimeCheckConfigRequest actualRequest = (GetUptimeCheckConfigRequest) actualRequests.get(0);
- Assert.assertEquals(formattedName, actualRequest.getName());
+ Assert.assertEquals(name, UptimeCheckConfigName.parse(actualRequest.getName()));
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -189,9 +189,9 @@ public void getUptimeCheckConfigExceptionTest() throws Exception {
mockUptimeCheckService.addException(exception);
try {
- String formattedName = UptimeCheckConfigName.format("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ UptimeCheckConfigName name = UptimeCheckConfigName.of("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
- client.getUptimeCheckConfig(formattedName);
+ client.getUptimeCheckConfig(name);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
// Expected exception
@@ -302,16 +302,16 @@ public void deleteUptimeCheckConfigTest() {
Empty expectedResponse = Empty.newBuilder().build();
mockUptimeCheckService.addResponse(expectedResponse);
- String formattedName = UptimeCheckConfigName.format("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ UptimeCheckConfigName name = UptimeCheckConfigName.of("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
- client.deleteUptimeCheckConfig(formattedName);
+ client.deleteUptimeCheckConfig(name);
List actualRequests = mockUptimeCheckService.getRequests();
Assert.assertEquals(1, actualRequests.size());
DeleteUptimeCheckConfigRequest actualRequest =
(DeleteUptimeCheckConfigRequest) actualRequests.get(0);
- Assert.assertEquals(formattedName, actualRequest.getName());
+ Assert.assertEquals(name, UptimeCheckConfigName.parse(actualRequest.getName()));
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -325,9 +325,9 @@ public void deleteUptimeCheckConfigExceptionTest() throws Exception {
mockUptimeCheckService.addException(exception);
try {
- String formattedName = UptimeCheckConfigName.format("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
+ UptimeCheckConfigName name = UptimeCheckConfigName.of("[PROJECT]", "[UPTIME_CHECK_CONFIG]");
- client.deleteUptimeCheckConfig(formattedName);
+ client.deleteUptimeCheckConfig(name);
Assert.fail("No exception raised");
} catch (InvalidArgumentException e) {
// Expected exception
diff --git a/google-cloud-clients/google-cloud-monitoring/synth.metadata b/google-cloud-clients/google-cloud-monitoring/synth.metadata
index 03c6c0e07a28..c3a44433a82f 100644
--- a/google-cloud-clients/google-cloud-monitoring/synth.metadata
+++ b/google-cloud-clients/google-cloud-monitoring/synth.metadata
@@ -1,19 +1,19 @@
{
- "updateTime": "2019-03-06T08:47:52.711546Z",
+ "updateTime": "2019-03-27T07:50:46.085733Z",
"sources": [
{
"generator": {
"name": "artman",
- "version": "0.16.15",
- "dockerImage": "googleapis/artman@sha256:9caadfa59d48224cba5f3217eb9d61a155b78ccf31e628abef385bc5b7ed3bd2"
+ "version": "0.16.19",
+ "dockerImage": "googleapis/artman@sha256:70ba28fda87e032ae44e6df41b7fc342c1b0cce1ed90658c4890eb4f613038c2"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "856117505ff9075b3e9c0b5674113667b6cf9e00",
- "internalRef": "236931378"
+ "sha": "d4d57d766601105478c661132f2687e6984b92d5",
+ "internalRef": "240469931"
}
}
],