diff --git a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcAlertPolicyServiceStub.java b/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcAlertPolicyServiceStub.java index 910fc0c5b659..82218990264f 100644 --- a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcAlertPolicyServiceStub.java +++ b/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcAlertPolicyServiceStub.java @@ -23,7 +23,9 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; import com.google.monitoring.v3.AlertPolicy; import com.google.monitoring.v3.CreateAlertPolicyRequest; import com.google.monitoring.v3.DeleteAlertPolicyRequest; @@ -35,6 +37,7 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; +import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -151,22 +154,68 @@ protected GrpcAlertPolicyServiceStub( listAlertPoliciesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listAlertPoliciesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListAlertPoliciesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings getAlertPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getAlertPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetAlertPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createAlertPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createAlertPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateAlertPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteAlertPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteAlertPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteAlertPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings updateAlertPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateAlertPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateAlertPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "alert_policy.name", String.valueOf(request.getAlertPolicy().getName())); + return params.build(); + } + }) .build(); this.listAlertPoliciesCallable = diff --git a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcGroupServiceStub.java b/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcGroupServiceStub.java index 0d5dcdc226a6..31ff130890e2 100644 --- a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcGroupServiceStub.java +++ b/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcGroupServiceStub.java @@ -24,7 +24,9 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; import com.google.monitoring.v3.CreateGroupRequest; import com.google.monitoring.v3.DeleteGroupRequest; import com.google.monitoring.v3.GetGroupRequest; @@ -38,6 +40,7 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; +import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -153,27 +156,81 @@ protected GrpcGroupServiceStub( GrpcCallSettings listGroupsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listGroupsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListGroupsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings getGroupTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getGroupMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetGroupRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createGroupTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createGroupMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateGroupRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings updateGroupTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateGroupMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateGroupRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("group.name", String.valueOf(request.getGroup().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteGroupTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteGroupMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteGroupRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings listGroupMembersTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listGroupMembersMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListGroupMembersRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); this.listGroupsCallable = diff --git a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcMetricServiceStub.java b/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcMetricServiceStub.java index c748cab81b80..4c6256a8423c 100644 --- a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcMetricServiceStub.java +++ b/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcMetricServiceStub.java @@ -27,7 +27,9 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; import com.google.monitoring.v3.CreateMetricDescriptorRequest; import com.google.monitoring.v3.CreateTimeSeriesRequest; import com.google.monitoring.v3.DeleteMetricDescriptorRequest; @@ -43,6 +45,7 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; +import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -212,41 +215,115 @@ protected GrpcMetricServiceStub( . newBuilder() .setMethodDescriptor(listMonitoredResourceDescriptorsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + ListMonitoredResourceDescriptorsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings getMonitoredResourceDescriptorTransportSettings = GrpcCallSettings .newBuilder() .setMethodDescriptor(getMonitoredResourceDescriptorMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + GetMonitoredResourceDescriptorRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings listMetricDescriptorsTransportSettings = GrpcCallSettings .newBuilder() .setMethodDescriptor(listMetricDescriptorsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListMetricDescriptorsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings getMetricDescriptorTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getMetricDescriptorMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetMetricDescriptorRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createMetricDescriptorTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createMetricDescriptorMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateMetricDescriptorRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteMetricDescriptorTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteMetricDescriptorMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteMetricDescriptorRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings listTimeSeriesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listTimeSeriesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListTimeSeriesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createTimeSeriesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createTimeSeriesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateTimeSeriesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); this.listMonitoredResourceDescriptorsCallable = diff --git a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcNotificationChannelServiceStub.java b/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcNotificationChannelServiceStub.java index 97e85fecb798..1ee241a6e880 100644 --- a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcNotificationChannelServiceStub.java +++ b/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcNotificationChannelServiceStub.java @@ -24,7 +24,9 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; import com.google.monitoring.v3.CreateNotificationChannelRequest; import com.google.monitoring.v3.DeleteNotificationChannelRequest; import com.google.monitoring.v3.GetNotificationChannelDescriptorRequest; @@ -40,6 +42,7 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; +import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -219,6 +222,16 @@ protected GrpcNotificationChannelServiceStub( ListNotificationChannelDescriptorsResponse> newBuilder() .setMethodDescriptor(listNotificationChannelDescriptorsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + ListNotificationChannelDescriptorsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings getNotificationChannelDescriptorTransportSettings = @@ -226,32 +239,89 @@ protected GrpcNotificationChannelServiceStub( . newBuilder() .setMethodDescriptor(getNotificationChannelDescriptorMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + GetNotificationChannelDescriptorRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings listNotificationChannelsTransportSettings = GrpcCallSettings .newBuilder() .setMethodDescriptor(listNotificationChannelsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListNotificationChannelsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings getNotificationChannelTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getNotificationChannelMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetNotificationChannelRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createNotificationChannelTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createNotificationChannelMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateNotificationChannelRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings updateNotificationChannelTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateNotificationChannelMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateNotificationChannelRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "notification_channel.name", + String.valueOf(request.getNotificationChannel().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteNotificationChannelTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteNotificationChannelMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteNotificationChannelRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); this.listNotificationChannelDescriptorsCallable = diff --git a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcUptimeCheckServiceStub.java b/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcUptimeCheckServiceStub.java index d429882619e9..cf0d10b0a882 100644 --- a/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcUptimeCheckServiceStub.java +++ b/google-cloud-clients/google-cloud-monitoring/src/main/java/com/google/cloud/monitoring/v3/stub/GrpcUptimeCheckServiceStub.java @@ -24,7 +24,9 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; import com.google.monitoring.v3.CreateUptimeCheckConfigRequest; import com.google.monitoring.v3.DeleteUptimeCheckConfigRequest; import com.google.monitoring.v3.GetUptimeCheckConfigRequest; @@ -38,6 +40,7 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; +import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; @@ -175,26 +178,73 @@ protected GrpcUptimeCheckServiceStub( GrpcCallSettings .newBuilder() .setMethodDescriptor(listUptimeCheckConfigsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListUptimeCheckConfigsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings getUptimeCheckConfigTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getUptimeCheckConfigMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetUptimeCheckConfigRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings createUptimeCheckConfigTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createUptimeCheckConfigMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateUptimeCheckConfigRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings updateUptimeCheckConfigTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateUptimeCheckConfigMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateUptimeCheckConfigRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "uptime_check_config.name", + String.valueOf(request.getUptimeCheckConfig().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings deleteUptimeCheckConfigTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteUptimeCheckConfigMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteUptimeCheckConfigRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings listUptimeCheckIpsTransportSettings = diff --git a/google-cloud-clients/google-cloud-monitoring/synth.metadata b/google-cloud-clients/google-cloud-monitoring/synth.metadata index c3a44433a82f..e08b7e3582c2 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-27T07:50:46.085733Z", + "updateTime": "2019-03-28T07:49:55.263978Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.19", - "dockerImage": "googleapis/artman@sha256:70ba28fda87e032ae44e6df41b7fc342c1b0cce1ed90658c4890eb4f613038c2" + "version": "0.16.20", + "dockerImage": "googleapis/artman@sha256:e3c054a2fb85a12481c722af616c7fb6f1d02d862248385eecbec3e4240ebd1e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d4d57d766601105478c661132f2687e6984b92d5", - "internalRef": "240469931" + "sha": "6a84b3267b0a95e922608b9891219075047eee29", + "internalRef": "240640999" } } ],