diff --git a/logging/google/cloud/logging_v2/gapic/config_service_v2_client.py b/logging/google/cloud/logging_v2/gapic/config_service_v2_client.py index a24f9c544c77..a2bb6dbbc587 100644 --- a/logging/google/cloud/logging_v2/gapic/config_service_v2_client.py +++ b/logging/google/cloud/logging_v2/gapic/config_service_v2_client.py @@ -23,6 +23,7 @@ import google.api_core.gapic_v1.client_info import google.api_core.gapic_v1.config import google.api_core.gapic_v1.method +import google.api_core.gapic_v1.routing_header import google.api_core.grpc_helpers import google.api_core.page_iterator import google.api_core.path_template @@ -280,6 +281,19 @@ def list_sinks( request = logging_config_pb2.ListSinksRequest( parent=parent, page_size=page_size ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("parent", parent)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + iterator = google.api_core.page_iterator.GRPCIterator( client=None, method=functools.partial( @@ -356,6 +370,19 @@ def get_sink( ) request = logging_config_pb2.GetSinkRequest(sink_name=sink_name) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("sink_name", sink_name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + return self._inner_api_calls["get_sink"]( request, retry=retry, timeout=timeout, metadata=metadata ) @@ -448,6 +475,19 @@ def create_sink( request = logging_config_pb2.CreateSinkRequest( parent=parent, sink=sink, unique_writer_identity=unique_writer_identity ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("parent", parent)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + return self._inner_api_calls["create_sink"]( request, retry=retry, timeout=timeout, metadata=metadata ) @@ -561,6 +601,19 @@ def update_sink( unique_writer_identity=unique_writer_identity, update_mask=update_mask, ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("sink_name", sink_name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + return self._inner_api_calls["update_sink"]( request, retry=retry, timeout=timeout, metadata=metadata ) @@ -625,6 +678,19 @@ def delete_sink( ) request = logging_config_pb2.DeleteSinkRequest(sink_name=sink_name) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("sink_name", sink_name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + self._inner_api_calls["delete_sink"]( request, retry=retry, timeout=timeout, metadata=metadata ) @@ -711,6 +777,19 @@ def list_exclusions( request = logging_config_pb2.ListExclusionsRequest( parent=parent, page_size=page_size ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("parent", parent)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + iterator = google.api_core.page_iterator.GRPCIterator( client=None, method=functools.partial( @@ -787,6 +866,19 @@ def get_exclusion( ) request = logging_config_pb2.GetExclusionRequest(name=name) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("name", name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + return self._inner_api_calls["get_exclusion"]( request, retry=retry, timeout=timeout, metadata=metadata ) @@ -866,6 +958,19 @@ def create_exclusion( request = logging_config_pb2.CreateExclusionRequest( parent=parent, exclusion=exclusion ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("parent", parent)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + return self._inner_api_calls["create_exclusion"]( request, retry=retry, timeout=timeout, metadata=metadata ) @@ -956,6 +1061,19 @@ def update_exclusion( request = logging_config_pb2.UpdateExclusionRequest( name=name, exclusion=exclusion, update_mask=update_mask ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("name", name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + return self._inner_api_calls["update_exclusion"]( request, retry=retry, timeout=timeout, metadata=metadata ) @@ -1018,6 +1136,19 @@ def delete_exclusion( ) request = logging_config_pb2.DeleteExclusionRequest(name=name) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("name", name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + self._inner_api_calls["delete_exclusion"]( request, retry=retry, timeout=timeout, metadata=metadata ) diff --git a/logging/google/cloud/logging_v2/gapic/logging_service_v2_client.py b/logging/google/cloud/logging_v2/gapic/logging_service_v2_client.py index 1add4e7046c8..1f04984b82d7 100644 --- a/logging/google/cloud/logging_v2/gapic/logging_service_v2_client.py +++ b/logging/google/cloud/logging_v2/gapic/logging_service_v2_client.py @@ -23,6 +23,7 @@ import google.api_core.gapic_v1.client_info import google.api_core.gapic_v1.config import google.api_core.gapic_v1.method +import google.api_core.gapic_v1.routing_header import google.api_core.grpc_helpers import google.api_core.page_iterator import google.api_core.path_template @@ -247,6 +248,19 @@ def delete_log( ) request = logging_pb2.DeleteLogRequest(log_name=log_name) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("log_name", log_name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + self._inner_api_calls["delete_log"]( request, retry=retry, timeout=timeout, metadata=metadata ) @@ -700,6 +714,19 @@ def list_logs( ) request = logging_pb2.ListLogsRequest(parent=parent, page_size=page_size) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("parent", parent)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + iterator = google.api_core.page_iterator.GRPCIterator( client=None, method=functools.partial( diff --git a/logging/google/cloud/logging_v2/gapic/metrics_service_v2_client.py b/logging/google/cloud/logging_v2/gapic/metrics_service_v2_client.py index faca01a595fe..4a987ed47d2d 100644 --- a/logging/google/cloud/logging_v2/gapic/metrics_service_v2_client.py +++ b/logging/google/cloud/logging_v2/gapic/metrics_service_v2_client.py @@ -23,6 +23,7 @@ import google.api_core.gapic_v1.client_info import google.api_core.gapic_v1.config import google.api_core.gapic_v1.method +import google.api_core.gapic_v1.routing_header import google.api_core.grpc_helpers import google.api_core.page_iterator import google.api_core.path_template @@ -267,6 +268,19 @@ def list_log_metrics( request = logging_metrics_pb2.ListLogMetricsRequest( parent=parent, page_size=page_size ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("parent", parent)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + iterator = google.api_core.page_iterator.GRPCIterator( client=None, method=functools.partial( @@ -338,6 +352,19 @@ def get_log_metric( ) request = logging_metrics_pb2.GetLogMetricRequest(metric_name=metric_name) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("metric_name", metric_name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + return self._inner_api_calls["get_log_metric"]( request, retry=retry, timeout=timeout, metadata=metadata ) @@ -411,6 +438,19 @@ def create_log_metric( request = logging_metrics_pb2.CreateLogMetricRequest( parent=parent, metric=metric ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("parent", parent)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + return self._inner_api_calls["create_log_metric"]( request, retry=retry, timeout=timeout, metadata=metadata ) @@ -485,6 +525,19 @@ def update_log_metric( request = logging_metrics_pb2.UpdateLogMetricRequest( metric_name=metric_name, metric=metric ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("metric_name", metric_name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + return self._inner_api_calls["update_log_metric"]( request, retry=retry, timeout=timeout, metadata=metadata ) @@ -542,6 +595,19 @@ def delete_log_metric( ) request = logging_metrics_pb2.DeleteLogMetricRequest(metric_name=metric_name) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("metric_name", metric_name)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + self._inner_api_calls["delete_log_metric"]( request, retry=retry, timeout=timeout, metadata=metadata ) diff --git a/logging/synth.metadata b/logging/synth.metadata index d46efbb6bebe..9680da28f7c2 100644 --- a/logging/synth.metadata +++ b/logging/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-02-26T13:20:43.903128Z", + "updateTime": "2019-03-28T12:19:01.156618Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.14", - "dockerImage": "googleapis/artman@sha256:f3d61ae45abaeefb6be5f228cda22732c2f1b00fb687c79c4bd4f2c42bb1e1a7" + "version": "0.16.20", + "dockerImage": "googleapis/artman@sha256:e3c054a2fb85a12481c722af616c7fb6f1d02d862248385eecbec3e4240ebd1e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "29f098cb03a9983cc9cb15993de5da64419046f2", - "internalRef": "235621085" + "sha": "6a84b3267b0a95e922608b9891219075047eee29", + "internalRef": "240640999" } }, { "template": { "name": "python_library", "origin": "synthtool.gcp", - "version": "2019.1.16" + "version": "2019.2.26" } } ],