From a623d6ee6da21320cefd827f8acf4c9ee2a2b5b1 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Tue, 4 Jan 2022 22:52:15 +0000 Subject: [PATCH 01/18] feat: add generated snippets to docstrings Use snippet metadata proto to add generated snippets into method docstrings. Metadata generation is intentionally incomplete, the fields that are filled out are a minimal set to enable snippets in docstrings. The proto itself will move elsewhere, but it does not yet have a permanent home. --- gapic/generator/generator.py | 74 +- gapic/samplegen/samplegen.py | 30 +- gapic/samplegen_utils/snippet_index.py | 173 ++++ gapic/samplegen_utils/snippet_metadata.proto | 316 +++++++ gapic/samplegen_utils/snippet_metadata_pb2.py | 840 ++++++++++++++++++ gapic/schema/wrappers.py | 2 +- .../%sub/services/%service/async_client.py.j2 | 7 + .../%sub/services/%service/client.py.j2 | 7 + gapic/templates/examples/sample.py.j2 | 2 - snippet_metadata.proto | 276 ++++++ ...llusca_v1_snippets_list_resources_async.py | 2 - ...ollusca_v1_snippets_list_resources_sync.py | 2 - ...v1_snippets_method_bidi_streaming_async.py | 2 - ..._v1_snippets_method_bidi_streaming_sync.py | 2 - ...v1_snippets_method_lro_signatures_async.py | 2 - ..._v1_snippets_method_lro_signatures_sync.py | 2 - ..._v1_snippets_method_one_signature_async.py | 2 - ...a_v1_snippets_method_one_signature_sync.py | 2 - ..._snippets_method_server_streaming_async.py | 2 - ...1_snippets_method_server_streaming_sync.py | 2 - ...ollusca_v1_snippets_one_of_method_async.py | 2 - ...pets_one_of_method_required_field_async.py | 2 - ...ppets_one_of_method_required_field_sync.py | 2 - ...mollusca_v1_snippets_one_of_method_sync.py | 2 - .../snippet_metadata_v1_mollusca_v1.json | 611 +++++++++++++ tests/unit/__init__.py | 0 tests/unit/{samplegen => }/common_types.py | 2 +- tests/unit/generator/__init__.py | 0 tests/unit/generator/test_generator.py | 229 ++--- tests/unit/samplegen/__init__.py | 0 .../samplegen/golden_snippets/sample_basic.py | 2 - .../golden_snippets/sample_basic_async.py | 2 - .../sample_basic_unflattenable.py | 2 - .../sample_basic_void_method.py | 2 - tests/unit/samplegen/test_integration.py | 54 +- tests/unit/samplegen/test_manifest.py | 2 +- tests/unit/samplegen/test_samplegen.py | 4 +- tests/unit/samplegen/test_snippet_index.py | 213 +++++ tests/unit/samplegen/test_template.py | 2 +- 39 files changed, 2600 insertions(+), 280 deletions(-) create mode 100644 gapic/samplegen_utils/snippet_index.py create mode 100644 gapic/samplegen_utils/snippet_metadata.proto create mode 100644 gapic/samplegen_utils/snippet_metadata_pb2.py create mode 100644 snippet_metadata.proto create mode 100644 tests/snippetgen/goldens/snippet_metadata_v1_mollusca_v1.json create mode 100644 tests/unit/__init__.py rename tests/unit/{samplegen => }/common_types.py (97%) create mode 100644 tests/unit/generator/__init__.py create mode 100644 tests/unit/samplegen/__init__.py create mode 100644 tests/unit/samplegen/test_snippet_index.py diff --git a/gapic/generator/generator.py b/gapic/generator/generator.py index 7d2b2cc95c..48c66d926c 100644 --- a/gapic/generator/generator.py +++ b/gapic/generator/generator.py @@ -17,12 +17,14 @@ import itertools import re import os +import pathlib import typing -from typing import Any, DefaultDict, Dict, Mapping +from typing import Any, DefaultDict, Dict, Mapping, Tuple from hashlib import sha256 from collections import OrderedDict, defaultdict from gapic.samplegen_utils.utils import coerce_response_name, is_valid_sample_cfg, render_format_string from gapic.samplegen_utils.types import DuplicateSample +from gapic.samplegen_utils import snippet_index, snippet_metadata_pb2 from gapic.samplegen import manifest, samplegen from gapic.generator import formatter from gapic.schema import api @@ -93,6 +95,14 @@ def get_response( self._env.loader.list_templates(), # type: ignore ) + snippet_idx = snippet_index.SnippetIndex(api_schema) + if sample_templates: + sample_output, snippet_idx = self._generate_samples_and_manifest( + api_schema, self._env.get_template(sample_templates[0]), + opts=opts, + ) + output_files.update(sample_output) + # Iterate over each template and add the appropriate output files # based on that template. # Sample templates work differently: there's (usually) only one, @@ -107,16 +117,9 @@ def get_response( # Append to the output files dictionary. output_files.update( self._render_template( - template_name, api_schema=api_schema, opts=opts) + template_name, api_schema=api_schema, opts=opts, snippet_index=snippet_idx) ) - if sample_templates: - sample_output = self._generate_samples_and_manifest( - api_schema, self._env.get_template(sample_templates[0]), - opts=opts, - ) - output_files.update(sample_output) - # Return the CodeGeneratorResponse output. res = CodeGeneratorResponse( file=[i for i in output_files.values()]) # type: ignore @@ -124,7 +127,7 @@ def get_response( return res def _generate_samples_and_manifest( - self, api_schema: api.API, sample_template: jinja2.Template, *, opts: Options) -> Dict: + self, api_schema: api.API, sample_template: jinja2.Template, *, opts: Options) -> Tuple[Dict, Any]: """Generate samples and samplegen manifest for the API. Arguments: @@ -135,6 +138,8 @@ def _generate_samples_and_manifest( Returns: Dict[str, CodeGeneratorResponse.File]: A dict mapping filepath to rendered file. """ + index = snippet_index.SnippetIndex(api_schema=api_schema) + # The two-layer data structure lets us do two things: # * detect duplicate samples, which is an error # * detect distinct samples with the same ID, which are disambiguated @@ -181,7 +186,7 @@ def _generate_samples_and_manifest( if not id_is_unique: spec["id"] += f"_{spec_hash}" - sample = samplegen.generate_sample( + sample, snippet_metadata = samplegen.generate_sample( spec, api_schema, sample_template,) fpath = utils.to_snake_case(spec["id"]) + ".py" @@ -190,6 +195,11 @@ def _generate_samples_and_manifest( sample, ) + snippet_metadata.file = str(pathlib.Path(out_dir) / fpath) + + index.add_snippet( + snippet_index.Snippet(sample, snippet_metadata)) + output_files = { fname: CodeGeneratorResponse.File( content=formatter.fix_whitespace(sample), name=fname @@ -197,29 +207,18 @@ def _generate_samples_and_manifest( for fname, (_, sample) in fpath_to_spec_and_rendered.items() } - # TODO(busunkim): Re-enable manifest generation once metadata - # format has been formalized. - # https://docs.google.com/document/d/1ghBam8vMj3xdoe4xfXhzVcOAIwrkbTpkMLgKc9RPD9k/edit#heading=h.sakzausv6hue - # - # if output_files: - - # manifest_fname, manifest_doc = manifest.generate( - # ( - # (fname, spec) - # for fname, (spec, _) in fpath_to_spec_and_rendered.items() - # ), - # api_schema, - # ) - - # manifest_fname = os.path.join(out_dir, manifest_fname) - # output_files[manifest_fname] = CodeGeneratorResponse.File( - # content=manifest_doc.render(), name=manifest_fname - # ) + if len(index.metadata_index.snippets) > 0: + # NOTE(busunkim): Not all fields are yet populated in the snippet metadata. + # Expected filename: snippet_metadata_{metadata_schema_version}_{apishortname}_{apiversion}.json + snippet_metadata_path = str(pathlib.Path( + out_dir) / f"snippet_metadata_v1_{api_schema.naming.name}_{api_schema.naming.version}.json").lower() + output_files[snippet_metadata_path] = CodeGeneratorResponse.File( + content=formatter.fix_whitespace(index.get_metadata_json()), name=snippet_metadata_path) - return output_files + return output_files, index def _render_template( - self, template_name: str, *, api_schema: api.API, opts: Options, + self, template_name: str, *, api_schema: api.API, opts: Options, snippet_index: snippet_index.SnippetIndex, ) -> Dict[str, CodeGeneratorResponse.File]: """Render the requested templates. @@ -258,7 +257,7 @@ def _render_template( for subpackage in api_schema.subpackages.values(): answer.update( self._render_template( - template_name, api_schema=subpackage, opts=opts + template_name, api_schema=subpackage, opts=opts, snippet_index=snippet_index ) ) skip_subpackages = True @@ -275,7 +274,7 @@ def _render_template( answer.update( self._get_file( - template_name, api_schema=api_schema, proto=proto, opts=opts + template_name, api_schema=api_schema, proto=proto, opts=opts, snippet_index=snippet_index ) ) @@ -304,6 +303,7 @@ def _render_template( api_schema=api_schema, service=service, opts=opts, + snippet_index=snippet_index, ) ) return answer @@ -311,7 +311,7 @@ def _render_template( # This file is not iterating over anything else; return back # the one applicable file. answer.update(self._get_file( - template_name, api_schema=api_schema, opts=opts)) + template_name, api_schema=api_schema, opts=opts,snippet_index=snippet_index)) return answer def _is_desired_transport(self, template_name: str, opts: Options) -> bool: @@ -324,8 +324,8 @@ def _get_file( template_name: str, *, opts: Options, - api_schema=api.API, - **context: Mapping, + api_schema: api.API, + **context, ): """Render a template to a protobuf plugin File object.""" # Determine the target filename. @@ -353,7 +353,7 @@ def _get_file( return {fn: cgr_file} def _get_filename( - self, template_name: str, *, api_schema: api.API, context: dict = None, + self, template_name: str, *, api_schema: api.API, context, ) -> str: """Return the appropriate output filename for this template. diff --git a/gapic/samplegen/samplegen.py b/gapic/samplegen/samplegen.py index 35667f5af6..b7f493897d 100644 --- a/gapic/samplegen/samplegen.py +++ b/gapic/samplegen/samplegen.py @@ -24,13 +24,13 @@ from gapic import utils -from gapic.samplegen_utils import types +from gapic.samplegen_utils import types, snippet_metadata_pb2 # type: ignore from gapic.samplegen_utils.utils import is_valid_sample_cfg from gapic.schema import api from gapic.schema import wrappers from collections import defaultdict, namedtuple, ChainMap as chainmap -from typing import Any, ChainMap, Dict, FrozenSet, Generator, List, Mapping, Optional, Sequence +from typing import Any, ChainMap, Dict, FrozenSet, Generator, List, Mapping, Optional, Sequence, Tuple # There is no library stub file for this module, so ignore it. from google.api import resource_pb2 # type: ignore @@ -915,8 +915,6 @@ def _validate_loop(self, loop): def parse_handwritten_specs(sample_configs: Sequence[str]) -> Generator[Dict[str, Any], None, None]: """Parse a handwritten sample spec""" - STANDALONE_TYPE = "standalone" - for config_fpath in sample_configs: with open(config_fpath) as f: configs = yaml.safe_load_all(f.read()) @@ -927,11 +925,7 @@ def parse_handwritten_specs(sample_configs: Sequence[str]) -> Generator[Dict[str raise types.InvalidConfig( "Sample config is invalid", valid) for spec in cfg.get("samples", []): - # If unspecified, assume a sample config describes a standalone. - # If sample_types are specified, standalone samples must be - # explicitly enabled. - if STANDALONE_TYPE in spec.get("sample_type", [STANDALONE_TYPE]): - yield spec + yield spec def _generate_resource_path_request_object(field_name: str, message: wrappers.MessageType) -> List[Dict[str, str]]: @@ -1050,7 +1044,6 @@ def generate_sample_specs(api_schema: api.API, *, opts) -> Generator[Dict[str, A # [{START|END} ${apishortname}_generated_${api}_${apiVersion}_${serviceName}_${rpcName}_{sync|async}_${overloadDisambiguation}] region_tag = f"{api_short_name}_generated_{api_schema.naming.versioned_module_name}_{service_name}_{rpc_name}_{transport_type}" spec = { - "sample_type": "standalone", "rpc": rpc_name, "transport": transport, # `request` and `response` is populated in `preprocess_sample` @@ -1062,7 +1055,7 @@ def generate_sample_specs(api_schema: api.API, *, opts) -> Generator[Dict[str, A yield spec -def generate_sample(sample, api_schema, sample_template: jinja2.Template) -> str: +def generate_sample(sample, api_schema, sample_template: jinja2.Template) -> Tuple[str, Any]: """Generate a standalone, runnable sample. Writing the rendered output is left for the caller. @@ -1073,7 +1066,7 @@ def generate_sample(sample, api_schema, sample_template: jinja2.Template) -> str sample_template (jinja2.Template): The template representing a generic sample. Returns: - str: The rendered sample. + Tuple(str, snippet_metadata_pb2.Snippet): The rendered sample. """ service_name = sample["service"] service = api_schema.services.get(service_name) @@ -1100,6 +1093,17 @@ def generate_sample(sample, api_schema, sample_template: jinja2.Template) -> str v.validate_response(sample["response"]) + # Snippet Metadata can't be fully filled out in any one function + # In this function we add information from + # the API schema and sample dictionary. + snippet_metadata = snippet_metadata_pb2.Snippet() # type: ignore + snippet_metadata.region_tag = sample["region_tag"] + setattr(snippet_metadata.client_method, "async", + sample["transport"] == api.TRANSPORT_GRPC_ASYNC) + snippet_metadata.client_method.method.full_name = sample["rpc"] + snippet_metadata.client_method.method.service.short_name = sample["service"].split( + ".")[-1] + return sample_template.render( sample=sample, imports=[], @@ -1107,4 +1111,4 @@ def generate_sample(sample, api_schema, sample_template: jinja2.Template) -> str calling_form_enum=types.CallingForm, trim_blocks=True, lstrip_blocks=True, - ) + ), snippet_metadata diff --git a/gapic/samplegen_utils/snippet_index.py b/gapic/samplegen_utils/snippet_index.py new file mode 100644 index 0000000000..8de214c45e --- /dev/null +++ b/gapic/samplegen_utils/snippet_index.py @@ -0,0 +1,173 @@ + +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +from collections import namedtuple, OrderedDict +from typing import Optional, Dict +import re +import json +from google.protobuf import json_format + +from gapic.schema import api, metadata +from gapic.samplegen_utils import snippet_metadata_pb2 # type: ignore +from gapic.samplegen_utils import types + + +CLIENT_INIT_RE = re.compile(r"^\s+# Create a client") +REQUEST_INIT_RE = re.compile(r"^\s+# Initialize request argument\(s\)") +REQUEST_EXEC_RE = re.compile(r"^\s+# Make the request") +RESPONSE_HANDLING_RE = re.compile(r"^\s+# Handle response") + + + +class Snippet: + """A single snippet and its metadata""" + + def __init__(self, sample_str: str, sample_metadata): + self.sample_str = sample_str + self.metadata = sample_metadata + self._parse_snippet_segments() + + def _parse_snippet_segments(self): + """Parse sections of the snippet and update metadata""" + self.sample_lines = self.sample_str.splitlines(keepends=True) + + self._full_snippet = snippet_metadata_pb2.Snippet.Segment( + type=snippet_metadata_pb2.Snippet.Segment.SegmentType.FULL) + self._short_snippet = snippet_metadata_pb2.Snippet.Segment( + type=snippet_metadata_pb2.Snippet.Segment.SegmentType.SHORT) + self._client_init = snippet_metadata_pb2.Snippet.Segment( + type=snippet_metadata_pb2.Snippet.Segment.SegmentType.CLIENT_INITIALIZATION) + self._request_init = snippet_metadata_pb2.Snippet.Segment( + type=snippet_metadata_pb2.Snippet.Segment.SegmentType.REQUEST_INITIALIZATION) + self._request_exec = snippet_metadata_pb2.Snippet.Segment( + type=snippet_metadata_pb2.Snippet.Segment.SegmentType.REQUEST_EXECUTION) + self._response_handling = snippet_metadata_pb2.Snippet.Segment( + type=snippet_metadata_pb2.Snippet.Segment.SegmentType.RESPONSE_HANDLING, + end=len(self.sample_lines) + ) + + # Index starts at 1 since these represent line numbers + for i, line in enumerate(self.sample_lines, start=1): + if line.startswith("# [START"): # do not include region tag lines + self._full_snippet.start = i + 1 + self._short_snippet.start = self._full_snippet.start + elif line.startswith("# [END"): + self._full_snippet.end = i - 1 + self._short_snippet.end = self._full_snippet.end + elif CLIENT_INIT_RE.match(line): + self._client_init.start = i + elif REQUEST_INIT_RE.match(line): + self._client_init.end = i - 1 + self._request_init.start = i + elif REQUEST_EXEC_RE.match(line): + self._request_init.end = i - 1 + self._request_exec.start = i + elif RESPONSE_HANDLING_RE.match(line): + self._request_exec.end = i - 1 + self._response_handling.start = i + + for segment in [self._full_snippet, self._short_snippet, self._client_init, self._request_init, self._request_exec, self._response_handling]: + self.metadata.segments.append(segment) + + @property + def full_snippet(self) -> str: + """The portion between the START and END region tags""" + start_idx = self._full_snippet.start - 1 + end_idx = self._full_snippet.end + short_sample = "".join(self.sample_lines[start_idx:end_idx]) + + return short_sample + + +class SnippetIndex: + + def __init__(self, api_schema: api.API): + self.metadata_index = snippet_metadata_pb2.Index() # type: ignore + # Construct a dictionary to insert samples into based on the API schema + self._index: Dict[str, Dict[str, Dict[str, Optional[Snippet]]]] = {} + + for service in api_schema.services.values(): + self._index[service.name] = {} + # This will be need to be re-structured when one method can have + # more than one sample variant + for method in service.methods.keys(): + self._index[service.name][method] = { + "sync": None, + "async": None + } + + def add_snippet(self, snippet: Snippet) -> None: + """Add a single sample to the index. + + Args: + sample (Sample): The sample to be added. + + Raises: + KeyError: If the sample metadata references a service or method that does not exist. + """ + service_name = snippet.metadata.client_method.method.service.short_name + rpc_name = snippet.metadata.client_method.method.full_name + + service = self._index.get(service_name) + if service is None: + raise types.UnknownService( + "API does not have a service named '{}'.".format(service_name)) + + method = service.get(rpc_name) + if method is None: + raise types.RpcMethodNotFound( + "API does not have method '{}' in service '{}'".format(rpc_name, service_name)) + + if getattr(snippet.metadata.client_method, "async"): + method["async"] = snippet + else: + method["sync"] = snippet + + self.metadata_index.snippets.append(snippet.metadata) + + def get_snippet(self, service_name: str, rpc_name: str, sync=True) -> Optional[Snippet]: + """Fetch a single snippet from the index. + + Args: + service_name (str): The name of the service. + rpc_name (str): The name of the RPC. + sync (bool): True for the sync sample, False for the async sample. + + Returns: + Optional[Sample]: The snippet if it exists, or None. + """ + # Fetch a snippet from the snippet metadata index + service = self._index.get(service_name) + if service is None: + raise types.UnknownService( + "API does not have a service named '{}'.".format(service_name)) + method = service.get(rpc_name) + if method is None: + raise types.RpcMethodNotFound( + "API does not have method '{}' in service '{}'".format(rpc_name, service_name)) + + return method["sync" if sync else "async"] + + def get_metadata_json(self): + """JSON representation of Snippet Index.""" + + # MessageToJson does not provide a stable order of all the keys + # so we go through OrderedDict + # TODO: Figure out why MessageToJson ordering is unstable. + metadata_dict = OrderedDict(json_format.MessageToDict( + self.metadata_index, + )) + + return json.dumps(metadata_dict) + diff --git a/gapic/samplegen_utils/snippet_metadata.proto b/gapic/samplegen_utils/snippet_metadata.proto new file mode 100644 index 0000000000..ec82a31d6a --- /dev/null +++ b/gapic/samplegen_utils/snippet_metadata.proto @@ -0,0 +1,316 @@ +// Copyright 2021 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.tools.snippetgen.snippetindex.v1; + +option csharp_namespace = "Google.Cloud.Tools.SnippetGen.SnippetIndex.V1"; +option php_namespace = "Google\\Cloud\\Tools\\SnippetGen\\SnippetIndex\\V1"; +option ruby_package = "Google::Cloud::Tools::SnippetGen::SnippetIndex::V1"; + +// The snippet index for a single client library. +message Index { + // The Client Library these snippets are for. + ClientLibrary client_library = 1; + + // The list of snippets. + repeated Snippet snippets = 2; +} + +// One sample. +// Parts of this information will be language specific. +message Snippet { + // The region tag name. Does not include the square brackets or the START or + // END indicators. + string region_tag = 1; + + // The title of the snippet, for human consumption mostly. For generated + // snippets this may be the snippet method or file name, or obtained from + /// snippet configuration. + string title = 2; + + // A description of the snippet, for human consumption mostly. For generated + // snippets this may be the description of the service method, or obtained + // from snippet configuration. + string description = 3; + + // The file where the snippet code lives. + // The path should be relative to where this metadata file is stored on the + // GitHub repo root and should not include branch, tag, commitish, etc., + // as those will be the same as for the metadata file. + string file = 4; + + // The programming language the snippet is written in. + // This will match the client library language most of the time, but not + // always. For instance, in .NET, libraries are written in C# but some samples + // may be written in F# or VB .NET. + // Note that this does not contain information about the snippet supported + // platforms or language versions, etc. This is just a quick way to identify + // the generally supported langauge. + Language language = 5; + + // The client library method this snippet is for. + ClientMethod client_method = 6; + + // Wether this is the canonical snippet for the corresponding service method. + // This is to be interpreted in conjunction with origin as follows: + // For a given service method: + // - A handwritten canonical takes precedence over + // - A config canonical which in turn takes precedence over + // - A baseline canonical. + bool canonical = 7; + + // The origin of the snippet. + Origin origin = 8; + + // The different segments of the snippet. + // Must contain the FULL segment always. + // There may be overlap between segments. + repeated Segment segments = 9; + + // The origin of the snippet. + enum Origin { + // The origin has not been specified. Consumers should not see this value. + ORIGIN_UNSPECIFIED = 0; + + // The snippet is generated from the API definition only, including protos + // and descriptive information, i.e. the same information used to generate + // the client libraries themselves. + // No snippet configuration has been specified. This refers to SnippetGen + // phase 1. + API_DEFINITION = 1; + + // The snippet is generated from the API definition and a specific snippet + // configuration. This refers to SnippetGen phase 2. + CONFIG = 2; + + // The snippet is handwritten. + HANDWRITTEN = 3; + } + + // A segment of the snippet. + message Segment { + // The line where this segment begins, inclusive. + // For the FULL segment, this will be the START region tag line + 1. + int32 start = 1; + + // The line where this segment ends, inclusive. + // For the FULL segment, this will be the END region tag line - 1. + int32 end = 2; + + // The type of the segment. + SegmentType type = 3; + + // The type of the segment. + // Basically describes what this segment shows. + enum SegmentType { + // The segment type has not been specified. Consumers should not see this + // value. + SEGMENT_TYPE_UNSPECIFIED = 0; + + // The full sample including import statements. + // This corresponds to the sample as determined by the region tags. + FULL = 1; + + // A shorter version of the full sample, may not include imports and some + // langauge specific initialization code. This is to be used in contexts + // in which the full aspects of the sample are made clear outside the + // code. + SHORT = 2; + + // The segment contains the service client initialization code only. + // To be used in tutorials, codelabs, etc. + CLIENT_INITIALIZATION = 3; + + // The segment contains the request initialization code only. + // To be used in tutorials, codelabs, etc. + REQUEST_INITIALIZATION = 4; + + // The segment contains the request execution code only. + // To be used in tutorials, codelabs, etc. + REQUEST_EXECUTION = 5; + + // The segment contains the response handling code only. + // To be used in tutorials, codelabs, etc. + RESPONSE_HANDLING = 6; + } + } +} + +// A client library method. +// Will contain language specific information. +message ClientMethod { + // The short name of the method, usually the name it is declared with. + // This may not be unique within the service client because of overloads. + string short_name = 1; + + // The fully qualified name of the method, which is the short_name qualified + // by the full_name of the service client. + // This value is redundant, but present to make it easier for consumers to + // obtain it. + // This may not be unique within the service client because of overloads. + string full_name = 2; + + // Indicates wether this method is synchronous or asynchronous. + // Some languages may support only one of the variants, in which case, this + // field will always have the same value (for that language). + bool async = 3; + + // Parameters of this method in the same order as they appear on the method + // declaration. Must be empty if the method has no parameters. + repeated Parameter parameters = 4; + + // Fully qualified type name of this method result, if any. + string result_type = 5; + + // The service client this method is declared in. + ServiceClient client = 6; + + // The service method this client method is for. + Method method = 7; + + // A method parameter as described by its type and name. + message Parameter { + // Fully qualified type name of this parameter. + // May be empty for languages that don't specify a type. + string type = 1; + + // Name of the parameter as it appears on the method declaration. + string name = 2; + } +} + +// A service client defined in the client library specified in Index. +// Will contain language specific information. +message ServiceClient { + // The short name of the service client, usually the name it is declared with. + // This may not be unique within the client library because of + // namespaces/packages. + string short_name = 1; + + // The fully qualified name of the service client, which is the short_name + // qualified by the namespace/package/type name this client is declared in. + // This will be unique within the client libray. + string full_name = 2; +} + +// A client library. +// Will contain language specific information. +message ClientLibrary { + // The name of the client library. This value will be language dependent + // and may or may not include the library version. + // Usually this will be the name used to identify the library on per-language + // package managers. + // Examples: "Google.Cloud.Translate.V3", + // "cloud.google.com/go/translate/apiv3". + string name = 1; + + // The full version of the client library. May also be language dependent. + // Cannot be updated on metadata generation, but on library release. + // Examples: "4.3.0", "2.5.2-beta01" + string version = 2; + + // The programming language the library is written in. + // Note that this does not contain information about the library supported + // platforms or language versions, etc. This is just a quick way to identify + // the generally supported langauge. + Language language = 3; + + // The APIs this client library is for. + // Some languages bundle several APIs on the same client library. + repeated Api apis = 4; +} + +message Method { + // The short name of the method, which is the name used to + // declare it within the proto file. This is unique within the service, + // but may not be unique within the API. + string short_name = 1; + + // The full name of the method, which is the short name qualified + // by the full name of the service in which it is declared. + // This is globally unique. + string full_name = 2; + + // The service this method is declared in. + Service service = 3; +} + +// A service defined in the API the client library referenced in Index is for. +message Service { + // The short name of the service, which is the name used to + // declare it within the proto file. This is usually, but not + // absolutely necessarily, unique within an API. + // Example: "TranslationService" + string short_name = 1; + + // The full name of the service, which is the short name qualified + // by the package of the proto in which it is declared. + // This is globally unique. + // Example: "google.cloud.translate.v3.TranslationService" + string full_name = 2; +} + +// An API +message Api { + // The ID of the API, identical to the protobuf package + // ending with a version number. + // Example: "google.cloud.translate.v3" + string id = 1; + + // The full version inferred from the end of the ID. + // Examples: "v3", "v2beta1", "v1beta" + string version = 2; +} + +// A programming language +enum Language { + // The language has not been specified. Consumers should not see this value. + LANGUAGE_UNSPECIFIED = 0; + + C_PLUS_PLUS = 1; + + C_SHARP = 2; + + DART = 3; + + ELIXIR = 4; + + ERLANG = 5; + + F_SHARP = 6; + + GO = 7; + + JAVA = 8; + + JAVASCRIPT = 9; + + KOTLIN = 10; + + PHP = 11; + + PYTHON = 12; + + RUBY = 13; + + RUST = 14; + + SWIFT = 15; + + TYPESCRIPT = 16; + + VB_NET = 17; +} \ No newline at end of file diff --git a/gapic/samplegen_utils/snippet_metadata_pb2.py b/gapic/samplegen_utils/snippet_metadata_pb2.py new file mode 100644 index 0000000000..73a75da6c2 --- /dev/null +++ b/gapic/samplegen_utils/snippet_metadata_pb2.py @@ -0,0 +1,840 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: snippet_metadata.proto + +# type: ignore + +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='snippet_metadata.proto', + package='google.cloud.tools.snippetgen.snippetindex.v1', + syntax='proto3', + serialized_options=b'\252\002-Google.Cloud.Tools.SnippetGen.SnippetIndex.V1\312\002-Google\\Cloud\\Tools\\SnippetGen\\SnippetIndex\\V1\352\0022Google::Cloud::Tools::SnippetGen::SnippetIndex::V1', + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n\x16snippet_metadata.proto\x12-google.cloud.tools.snippetgen.snippetindex.v1\"\xa7\x01\n\x05Index\x12T\n\x0e\x63lient_library\x18\x01 \x01(\x0b\x32<.google.cloud.tools.snippetgen.snippetindex.v1.ClientLibrary\x12H\n\x08snippets\x18\x02 \x03(\x0b\x32\x36.google.cloud.tools.snippetgen.snippetindex.v1.Snippet\"\x9f\x06\n\x07Snippet\x12\x12\n\nregion_tag\x18\x01 \x01(\t\x12\r\n\x05title\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x0c\n\x04\x66ile\x18\x04 \x01(\t\x12I\n\x08language\x18\x05 \x01(\x0e\x32\x37.google.cloud.tools.snippetgen.snippetindex.v1.Language\x12R\n\rclient_method\x18\x06 \x01(\x0b\x32;.google.cloud.tools.snippetgen.snippetindex.v1.ClientMethod\x12\x11\n\tcanonical\x18\x07 \x01(\x08\x12M\n\x06origin\x18\x08 \x01(\x0e\x32=.google.cloud.tools.snippetgen.snippetindex.v1.Snippet.Origin\x12P\n\x08segments\x18\t \x03(\x0b\x32>.google.cloud.tools.snippetgen.snippetindex.v1.Snippet.Segment\x1a\xa7\x02\n\x07Segment\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\x12X\n\x04type\x18\x03 \x01(\x0e\x32J.google.cloud.tools.snippetgen.snippetindex.v1.Snippet.Segment.SegmentType\"\xa5\x01\n\x0bSegmentType\x12\x1c\n\x18SEGMENT_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\x12\t\n\x05SHORT\x10\x02\x12\x19\n\x15\x43LIENT_INITIALIZATION\x10\x03\x12\x1a\n\x16REQUEST_INITIALIZATION\x10\x04\x12\x15\n\x11REQUEST_EXECUTION\x10\x05\x12\x15\n\x11RESPONSE_HANDLING\x10\x06\"Q\n\x06Origin\x12\x16\n\x12ORIGIN_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x41PI_DEFINITION\x10\x01\x12\n\n\x06\x43ONFIG\x10\x02\x12\x0f\n\x0bHANDWRITTEN\x10\x03\"\xf2\x02\n\x0c\x43lientMethod\x12\x12\n\nshort_name\x18\x01 \x01(\t\x12\x11\n\tfull_name\x18\x02 \x01(\t\x12\r\n\x05\x61sync\x18\x03 \x01(\x08\x12Y\n\nparameters\x18\x04 \x03(\x0b\x32\x45.google.cloud.tools.snippetgen.snippetindex.v1.ClientMethod.Parameter\x12\x13\n\x0bresult_type\x18\x05 \x01(\t\x12L\n\x06\x63lient\x18\x06 \x01(\x0b\x32<.google.cloud.tools.snippetgen.snippetindex.v1.ServiceClient\x12\x45\n\x06method\x18\x07 \x01(\x0b\x32\x35.google.cloud.tools.snippetgen.snippetindex.v1.Method\x1a\'\n\tParameter\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"6\n\rServiceClient\x12\x12\n\nshort_name\x18\x01 \x01(\t\x12\x11\n\tfull_name\x18\x02 \x01(\t\"\xbb\x01\n\rClientLibrary\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12I\n\x08language\x18\x03 \x01(\x0e\x32\x37.google.cloud.tools.snippetgen.snippetindex.v1.Language\x12@\n\x04\x61pis\x18\x04 \x03(\x0b\x32\x32.google.cloud.tools.snippetgen.snippetindex.v1.Api\"x\n\x06Method\x12\x12\n\nshort_name\x18\x01 \x01(\t\x12\x11\n\tfull_name\x18\x02 \x01(\t\x12G\n\x07service\x18\x03 \x01(\x0b\x32\x36.google.cloud.tools.snippetgen.snippetindex.v1.Service\"0\n\x07Service\x12\x12\n\nshort_name\x18\x01 \x01(\t\x12\x11\n\tfull_name\x18\x02 \x01(\t\"\"\n\x03\x41pi\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t*\xef\x01\n\x08Language\x12\x18\n\x14LANGUAGE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x43_PLUS_PLUS\x10\x01\x12\x0b\n\x07\x43_SHARP\x10\x02\x12\x08\n\x04\x44\x41RT\x10\x03\x12\n\n\x06\x45LIXIR\x10\x04\x12\n\n\x06\x45RLANG\x10\x05\x12\x0b\n\x07\x46_SHARP\x10\x06\x12\x06\n\x02GO\x10\x07\x12\x08\n\x04JAVA\x10\x08\x12\x0e\n\nJAVASCRIPT\x10\t\x12\n\n\x06KOTLIN\x10\n\x12\x07\n\x03PHP\x10\x0b\x12\n\n\x06PYTHON\x10\x0c\x12\x08\n\x04RUBY\x10\r\x12\x08\n\x04RUST\x10\x0e\x12\t\n\x05SWIFT\x10\x0f\x12\x0e\n\nTYPESCRIPT\x10\x10\x12\n\n\x06VB_NET\x10\x11\x42\x95\x01\xaa\x02-Google.Cloud.Tools.SnippetGen.SnippetIndex.V1\xca\x02-Google\\Cloud\\Tools\\SnippetGen\\SnippetIndex\\V1\xea\x02\x32Google::Cloud::Tools::SnippetGen::SnippetIndex::V1b\x06proto3' +) + +_LANGUAGE = _descriptor.EnumDescriptor( + name='Language', + full_name='google.cloud.tools.snippetgen.snippetindex.v1.Language', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='LANGUAGE_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='C_PLUS_PLUS', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='C_SHARP', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='DART', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ELIXIR', index=4, number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='ERLANG', index=5, number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='F_SHARP', index=6, number=6, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='GO', index=7, number=7, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='JAVA', index=8, number=8, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='JAVASCRIPT', index=9, number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='KOTLIN', index=10, number=10, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='PHP', index=11, number=11, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='PYTHON', index=12, number=12, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='RUBY', index=13, number=13, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='RUST', index=14, number=14, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='SWIFT', index=15, number=15, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='TYPESCRIPT', index=16, number=16, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='VB_NET', index=17, number=17, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=1873, + serialized_end=2112, +) +_sym_db.RegisterEnumDescriptor(_LANGUAGE) + +Language = enum_type_wrapper.EnumTypeWrapper(_LANGUAGE) +LANGUAGE_UNSPECIFIED = 0 +C_PLUS_PLUS = 1 +C_SHARP = 2 +DART = 3 +ELIXIR = 4 +ERLANG = 5 +F_SHARP = 6 +GO = 7 +JAVA = 8 +JAVASCRIPT = 9 +KOTLIN = 10 +PHP = 11 +PYTHON = 12 +RUBY = 13 +RUST = 14 +SWIFT = 15 +TYPESCRIPT = 16 +VB_NET = 17 + + +_SNIPPET_SEGMENT_SEGMENTTYPE = _descriptor.EnumDescriptor( + name='SegmentType', + full_name='google.cloud.tools.snippetgen.snippetindex.v1.Snippet.Segment.SegmentType', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='SEGMENT_TYPE_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='FULL', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='SHORT', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='CLIENT_INITIALIZATION', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='REQUEST_INITIALIZATION', index=4, number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='REQUEST_EXECUTION', index=5, number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='RESPONSE_HANDLING', index=6, number=6, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=795, + serialized_end=960, +) +_sym_db.RegisterEnumDescriptor(_SNIPPET_SEGMENT_SEGMENTTYPE) + +_SNIPPET_ORIGIN = _descriptor.EnumDescriptor( + name='Origin', + full_name='google.cloud.tools.snippetgen.snippetindex.v1.Snippet.Origin', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='ORIGIN_UNSPECIFIED', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='API_DEFINITION', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='CONFIG', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='HANDWRITTEN', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=962, + serialized_end=1043, +) +_sym_db.RegisterEnumDescriptor(_SNIPPET_ORIGIN) + + +_INDEX = _descriptor.Descriptor( + name='Index', + full_name='google.cloud.tools.snippetgen.snippetindex.v1.Index', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='client_library', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Index.client_library', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='snippets', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Index.snippets', index=1, + number=2, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=74, + serialized_end=241, +) + + +_SNIPPET_SEGMENT = _descriptor.Descriptor( + name='Segment', + full_name='google.cloud.tools.snippetgen.snippetindex.v1.Snippet.Segment', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='start', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Snippet.Segment.start', index=0, + number=1, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='end', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Snippet.Segment.end', index=1, + number=2, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='type', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Snippet.Segment.type', index=2, + number=3, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _SNIPPET_SEGMENT_SEGMENTTYPE, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=665, + serialized_end=960, +) + +_SNIPPET = _descriptor.Descriptor( + name='Snippet', + full_name='google.cloud.tools.snippetgen.snippetindex.v1.Snippet', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='region_tag', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Snippet.region_tag', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='title', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Snippet.title', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='description', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Snippet.description', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='file', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Snippet.file', index=3, + number=4, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='language', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Snippet.language', index=4, + number=5, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='client_method', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Snippet.client_method', index=5, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='canonical', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Snippet.canonical', index=6, + number=7, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='origin', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Snippet.origin', index=7, + number=8, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='segments', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Snippet.segments', index=8, + number=9, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_SNIPPET_SEGMENT, ], + enum_types=[ + _SNIPPET_ORIGIN, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=244, + serialized_end=1043, +) + + +_CLIENTMETHOD_PARAMETER = _descriptor.Descriptor( + name='Parameter', + full_name='google.cloud.tools.snippetgen.snippetindex.v1.ClientMethod.Parameter', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='type', full_name='google.cloud.tools.snippetgen.snippetindex.v1.ClientMethod.Parameter.type', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='name', full_name='google.cloud.tools.snippetgen.snippetindex.v1.ClientMethod.Parameter.name', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1377, + serialized_end=1416, +) + +_CLIENTMETHOD = _descriptor.Descriptor( + name='ClientMethod', + full_name='google.cloud.tools.snippetgen.snippetindex.v1.ClientMethod', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='short_name', full_name='google.cloud.tools.snippetgen.snippetindex.v1.ClientMethod.short_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='full_name', full_name='google.cloud.tools.snippetgen.snippetindex.v1.ClientMethod.full_name', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='async', full_name='google.cloud.tools.snippetgen.snippetindex.v1.ClientMethod.async', index=2, + number=3, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='parameters', full_name='google.cloud.tools.snippetgen.snippetindex.v1.ClientMethod.parameters', index=3, + number=4, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='result_type', full_name='google.cloud.tools.snippetgen.snippetindex.v1.ClientMethod.result_type', index=4, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='client', full_name='google.cloud.tools.snippetgen.snippetindex.v1.ClientMethod.client', index=5, + number=6, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='method', full_name='google.cloud.tools.snippetgen.snippetindex.v1.ClientMethod.method', index=6, + number=7, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_CLIENTMETHOD_PARAMETER, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1046, + serialized_end=1416, +) + + +_SERVICECLIENT = _descriptor.Descriptor( + name='ServiceClient', + full_name='google.cloud.tools.snippetgen.snippetindex.v1.ServiceClient', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='short_name', full_name='google.cloud.tools.snippetgen.snippetindex.v1.ServiceClient.short_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='full_name', full_name='google.cloud.tools.snippetgen.snippetindex.v1.ServiceClient.full_name', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1418, + serialized_end=1472, +) + + +_CLIENTLIBRARY = _descriptor.Descriptor( + name='ClientLibrary', + full_name='google.cloud.tools.snippetgen.snippetindex.v1.ClientLibrary', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='google.cloud.tools.snippetgen.snippetindex.v1.ClientLibrary.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='version', full_name='google.cloud.tools.snippetgen.snippetindex.v1.ClientLibrary.version', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='language', full_name='google.cloud.tools.snippetgen.snippetindex.v1.ClientLibrary.language', index=2, + number=3, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='apis', full_name='google.cloud.tools.snippetgen.snippetindex.v1.ClientLibrary.apis', index=3, + number=4, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1475, + serialized_end=1662, +) + + +_METHOD = _descriptor.Descriptor( + name='Method', + full_name='google.cloud.tools.snippetgen.snippetindex.v1.Method', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='short_name', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Method.short_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='full_name', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Method.full_name', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='service', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Method.service', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1664, + serialized_end=1784, +) + + +_SERVICE = _descriptor.Descriptor( + name='Service', + full_name='google.cloud.tools.snippetgen.snippetindex.v1.Service', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='short_name', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Service.short_name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='full_name', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Service.full_name', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1786, + serialized_end=1834, +) + + +_API = _descriptor.Descriptor( + name='Api', + full_name='google.cloud.tools.snippetgen.snippetindex.v1.Api', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='id', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Api.id', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='version', full_name='google.cloud.tools.snippetgen.snippetindex.v1.Api.version', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1836, + serialized_end=1870, +) + +_INDEX.fields_by_name['client_library'].message_type = _CLIENTLIBRARY +_INDEX.fields_by_name['snippets'].message_type = _SNIPPET +_SNIPPET_SEGMENT.fields_by_name['type'].enum_type = _SNIPPET_SEGMENT_SEGMENTTYPE +_SNIPPET_SEGMENT.containing_type = _SNIPPET +_SNIPPET_SEGMENT_SEGMENTTYPE.containing_type = _SNIPPET_SEGMENT +_SNIPPET.fields_by_name['language'].enum_type = _LANGUAGE +_SNIPPET.fields_by_name['client_method'].message_type = _CLIENTMETHOD +_SNIPPET.fields_by_name['origin'].enum_type = _SNIPPET_ORIGIN +_SNIPPET.fields_by_name['segments'].message_type = _SNIPPET_SEGMENT +_SNIPPET_ORIGIN.containing_type = _SNIPPET +_CLIENTMETHOD_PARAMETER.containing_type = _CLIENTMETHOD +_CLIENTMETHOD.fields_by_name['parameters'].message_type = _CLIENTMETHOD_PARAMETER +_CLIENTMETHOD.fields_by_name['client'].message_type = _SERVICECLIENT +_CLIENTMETHOD.fields_by_name['method'].message_type = _METHOD +_CLIENTLIBRARY.fields_by_name['language'].enum_type = _LANGUAGE +_CLIENTLIBRARY.fields_by_name['apis'].message_type = _API +_METHOD.fields_by_name['service'].message_type = _SERVICE +DESCRIPTOR.message_types_by_name['Index'] = _INDEX +DESCRIPTOR.message_types_by_name['Snippet'] = _SNIPPET +DESCRIPTOR.message_types_by_name['ClientMethod'] = _CLIENTMETHOD +DESCRIPTOR.message_types_by_name['ServiceClient'] = _SERVICECLIENT +DESCRIPTOR.message_types_by_name['ClientLibrary'] = _CLIENTLIBRARY +DESCRIPTOR.message_types_by_name['Method'] = _METHOD +DESCRIPTOR.message_types_by_name['Service'] = _SERVICE +DESCRIPTOR.message_types_by_name['Api'] = _API +DESCRIPTOR.enum_types_by_name['Language'] = _LANGUAGE +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +Index = _reflection.GeneratedProtocolMessageType('Index', (_message.Message,), { + 'DESCRIPTOR': _INDEX, + '__module__': 'snippet_metadata_pb2' + # @@protoc_insertion_point(class_scope:google.cloud.tools.snippetgen.snippetindex.v1.Index) + }) +_sym_db.RegisterMessage(Index) + +Snippet = _reflection.GeneratedProtocolMessageType('Snippet', (_message.Message,), { + + 'Segment': _reflection.GeneratedProtocolMessageType('Segment', (_message.Message,), { + 'DESCRIPTOR': _SNIPPET_SEGMENT, + '__module__': 'snippet_metadata_pb2' + # @@protoc_insertion_point(class_scope:google.cloud.tools.snippetgen.snippetindex.v1.Snippet.Segment) + }), + 'DESCRIPTOR': _SNIPPET, + '__module__': 'snippet_metadata_pb2' + # @@protoc_insertion_point(class_scope:google.cloud.tools.snippetgen.snippetindex.v1.Snippet) + }) +_sym_db.RegisterMessage(Snippet) +_sym_db.RegisterMessage(Snippet.Segment) + +ClientMethod = _reflection.GeneratedProtocolMessageType('ClientMethod', (_message.Message,), { + + 'Parameter': _reflection.GeneratedProtocolMessageType('Parameter', (_message.Message,), { + 'DESCRIPTOR': _CLIENTMETHOD_PARAMETER, + '__module__': 'snippet_metadata_pb2' + # @@protoc_insertion_point(class_scope:google.cloud.tools.snippetgen.snippetindex.v1.ClientMethod.Parameter) + }), + 'DESCRIPTOR': _CLIENTMETHOD, + '__module__': 'snippet_metadata_pb2' + # @@protoc_insertion_point(class_scope:google.cloud.tools.snippetgen.snippetindex.v1.ClientMethod) + }) +_sym_db.RegisterMessage(ClientMethod) +_sym_db.RegisterMessage(ClientMethod.Parameter) + +ServiceClient = _reflection.GeneratedProtocolMessageType('ServiceClient', (_message.Message,), { + 'DESCRIPTOR': _SERVICECLIENT, + '__module__': 'snippet_metadata_pb2' + # @@protoc_insertion_point(class_scope:google.cloud.tools.snippetgen.snippetindex.v1.ServiceClient) + }) +_sym_db.RegisterMessage(ServiceClient) + +ClientLibrary = _reflection.GeneratedProtocolMessageType('ClientLibrary', (_message.Message,), { + 'DESCRIPTOR': _CLIENTLIBRARY, + '__module__': 'snippet_metadata_pb2' + # @@protoc_insertion_point(class_scope:google.cloud.tools.snippetgen.snippetindex.v1.ClientLibrary) + }) +_sym_db.RegisterMessage(ClientLibrary) + +Method = _reflection.GeneratedProtocolMessageType('Method', (_message.Message,), { + 'DESCRIPTOR': _METHOD, + '__module__': 'snippet_metadata_pb2' + # @@protoc_insertion_point(class_scope:google.cloud.tools.snippetgen.snippetindex.v1.Method) + }) +_sym_db.RegisterMessage(Method) + +Service = _reflection.GeneratedProtocolMessageType('Service', (_message.Message,), { + 'DESCRIPTOR': _SERVICE, + '__module__': 'snippet_metadata_pb2' + # @@protoc_insertion_point(class_scope:google.cloud.tools.snippetgen.snippetindex.v1.Service) + }) +_sym_db.RegisterMessage(Service) + +Api = _reflection.GeneratedProtocolMessageType('Api', (_message.Message,), { + 'DESCRIPTOR': _API, + '__module__': 'snippet_metadata_pb2' + # @@protoc_insertion_point(class_scope:google.cloud.tools.snippetgen.snippetindex.v1.Api) + }) +_sym_db.RegisterMessage(Api) + + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) diff --git a/gapic/schema/wrappers.py b/gapic/schema/wrappers.py index c4c9e6bec0..bd1a92e7cf 100644 --- a/gapic/schema/wrappers.py +++ b/gapic/schema/wrappers.py @@ -41,7 +41,7 @@ from google.api import resource_pb2 from google.api_core import exceptions from google.api_core import path_template -from google.cloud import extended_operations_pb2 as ex_ops_pb2 +from google.cloud import extended_operations_pb2 as ex_ops_pb2 # type: ignore from google.protobuf import descriptor_pb2 # type: ignore from google.protobuf.json_format import MessageToDict # type: ignore diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 index 2f30d6cfab..7bf11631d4 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 @@ -173,6 +173,13 @@ class {{ service.async_client_name }}: {% endif %} r"""{{ method.meta.doc|rst(width=72, indent=8) }} + .. code-block:: + {% with snippet = snippet_index.get_snippet(service.name, method.name, sync=True) %} + {% if snippet is not none %} + {{ snippet.full_snippet|indent(width=12) }} + {% endif %} + {% endwith %} + Args: {% if not method.client_streaming %} request (Union[{{ method.input.ident.sphinx }}, dict]): diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 index 25e4f2ca54..3fffc532bb 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 @@ -340,6 +340,13 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): {% endif %} r"""{{ method.meta.doc|rst(width=72, indent=8) }} + .. code-block:: + {% with snippet = snippet_index.get_snippet(service.name, method.name, sync=True) %} + {% if snippet is not none %} + {{ snippet.full_snippet|indent(width=12) }} + {% endif %} + {% endwith %} + Args: {% if not method.client_streaming %} request (Union[{{ method.input.ident.sphinx }}, dict]): diff --git a/gapic/templates/examples/sample.py.j2 b/gapic/templates/examples/sample.py.j2 index 3191860c0c..a754765804 100644 --- a/gapic/templates/examples/sample.py.j2 +++ b/gapic/templates/examples/sample.py.j2 @@ -32,8 +32,6 @@ from {{ sample.module_namespace|join(".") }} import {{ sample.module_name }} {# also need calling form #} {% if sample.transport == "grpc-async" %}async {% endif %}def sample_{{ frags.render_method_name(sample.rpc)|trim }}({{ frags.print_input_params(sample.request)|trim }}): - """{{ sample.description }}""" - {{ frags.render_client_setup(sample.module_name, sample.client_name)|indent }} {{ frags.render_request_setup(sample.request, sample.module_name, sample.request_type, calling_form, calling_form_enum)|indent }} {% with method_call = frags.render_method_call(sample, calling_form, calling_form_enum, sample.transport) %} diff --git a/snippet_metadata.proto b/snippet_metadata.proto new file mode 100644 index 0000000000..e553d0ffcb --- /dev/null +++ b/snippet_metadata.proto @@ -0,0 +1,276 @@ +syntax = "proto3"; + +package google.cloud.tools.snippetgen.snippetindex.v1; + +option csharp_namespace = "Google.Cloud.Tools.SnippetGen.SnippetIndex.V1"; + +// The snippet index for a single client library. +message Index { + // The Client Library these snippets are for. + ClientLibrary client_library = 1; + + // The list of snippets. + repeated Snippet snippets = 2; +} + +// One sample. +// Parts of this information will be language specific. +message Snippet { + // The region tag name. Does not include the square brackets or the START or + // END indicators. + string region_tag = 1; + + // The title of the snippet, for human consumption mostly. For generated + // snippets this may be the snippet method or file name, or obtained from + /// snippet configuration. + string title = 2; + + // A description of the snippet, for human consumption mostly. For generated + // snippets this may be the description of the service method, or obtained + // from snippet configuration. + string description = 3; + + // The file where the snippet code lives. + // The path should be relative to the GitHub repo root and should not include + // branch, tag, commitish, etc., as those will be the same as for the metadata + // file. + string file = 4; + + // The programming language name the snippet is written in. + // This will match the client library language most of the time, but not + // always. For instance, in .NET, libraries are written in C# but some samples + // may be written in F# or VB .NET. + // Note that this does not contain information about the snippet supported + // platforms or language versions, etc. This is just a quick way to identify + // the generally supported langauge. + LanguageName language = 5; + + // The client library method this snippet is for. + ClientMethod client_method = 6; + + // Wether this is the canonical snippet for the corresponding service method. + // This is to be interpreted in conjunction with origin as follows: + // For a given service method: + // - A handwritten canonical takes precedence over + // - A config canonical which in turn takes precedence over + // - A baseline canonical. + bool canonical = 7; + + // The origin of the snippet. + Origin origin = 8; + + // The different segments of the snippet. + // Must contain the FULL segment always. + // There may be overlap between segments. + repeated Segment segment = 9; + + // The origin of the snippet. + enum Origin { + // The origin has not been specified. Consumers should not see this value. + ORIGIN_UNSPECIFIED = 0; + + // The snippet is generated from proto and client library information only, + // no snippet configuration has been specified. This refers to SnippetGen + // phase 1. + BASELINE = 1; + + // The snippet is generated from a configuration. This refers to SnippetGen + // phase 2. + CONFIG = 2; + + // The snippet is handwritten. + HANDWRITTEN = 3; + } + + // A segment of the snippet. + message Segment { + // The line where this segment begins, inclusive. + int32 start = 1; + + // The line where this segment ends, inclusive. + int32 end = 2; + + // The type of the segment. + SegmentType type = 3; + + // The type of the segment. + // Basically describes what this segment shows. + enum SegmentType { + // The segment type has not been specified. Consumers should not see this + // value. + SEGMENT_TYPE_UNSPECIFIED = 0; + + // The full sample including import statements. + // This corresponds to the sample as determined by the region tags. + FULL = 1; + + // A shorter version of the full sample, may not include imports and some + // langauge specific initialization code. This is to be used in contexts + // in which the full aspects of the sample are made clear outside the + // code. + SHORT = 2; + + // The segment contains the service client initialization code only. + // To be used in tutorials, codelabs, etc. + CLIENT_INITIALIZATION = 3; + + // The segment contains the request initialization code only. + // To be used in tutorials, codelabs, etc. + REQUEST_INITIALIZATION = 4; + + // The segment contains the request execution code only. + // To be used in tutorials, codelabs, etc. + REQUEST_EXECUTION = 5; + + // The segment contains the response handling code only. + // To be used in tutorials, codelabs, etc. + RESPONSE_HANDLING = 6; + } + } +} + +// A client library method. +// Will contain language specific information. +message ClientMethod { + // The short name of the method, usually the name it is declared with. + // This may not be unique within the service client because of overloads. + string short_name = 1; + + // The fully qualified name of the method, which is the short_name qualified + // by the full_name of the service client. + // This value is redundant, but present to make it easier for consumers to + // obtain it. + // This may not be unique within the service client because of overloads. + string full_name = 2; + + // Indicates wether this method is synchronous or asynchronous. + // Some languages may support only one of the variants, in which case, this + // field will always have the same value (for that language). + bool async = 3; + + // Fully qualified type names of this method parameters in the same order as + // they appear on the method declaration. Must be empty if the method has no + // parameters. + repeated string parameter_type = 4; + + // Fully qualified type name of this method result, if any. + string result_type = 5; + + // The service client this method is declared in. + ServiceClient client = 6; + + // The service method this client method is for. + Method method = 7; +} + +// A service client defined in the client library specified in Index. +// Will contain language specific information. +message ServiceClient { + // The short name of the service client, usually the name it is declared with. + // This may not be unique within the client library because of + // namespaces/packages. + string short_name = 1; + + // The fully qualified name of the service client, which is the short_name + // qualified by the namespace/package/type name this client is declared in. + // This will be unique within the client libray. + string full_name = 2; +} + +// A client library. +// Will contain language specific information. +message ClientLibrary { + // The name of the client library. This value will be language dependent + // and may or may not include the library version. + // Usually this will be the name used to identify the library on per-language + // package managers. + // Examples: "Google.Cloud.Translate.V3", + // "cloud.google.com/go/translate/apiv3". + string name = 1; + + // The full version of the client library. May also be language dependent. + // Cannot be updated on metadata generation, but on library release. + // Examples: "4.3.0", "2.5.2-beta01" + string version = 2; + + // The programming language name the library is written in. + // Note that this does not contain information about the library supported + // platforms or language versions, etc. This is just a quick way to identify + // the generally supported langauge. + LanguageName language = 3; + + // The API this client library is for. + Api api = 4; +} + +message Method { + // The short name of the method, which is the name used to + // declare it within the proto file. This is unique within the service, + // but may not be unique within the API. + string short_name = 1; + + // The full name of the method, which is the short name qualified + // by the full name of the service in which it is declared. + // This is globally unique. + string full_name = 2; + + // The service this method is declared in. + Service service = 3; +} + +// A service defined in the API the client library referenced in Index is for. +message Service { + // The short name of the service, which is the name used to + // declare it within the proto file. This is usually, but not + // absolutely necessarily, unique within an API. + // Example: "TranslationService" + string short_name = 1; + + // The full name of the service, which is the short name qualified + // by the package of the proto in which it is declared. + // This is globally unique. + // Example: "google.cloud.translate.v3.TranslationService" + string full_name = 2; +} + +// An API +message Api { + // The ID of the API, identical to the protobuf package + // ending with a version number. + // Example: "google.cloud.translate.v3" + string id = 1; + + // The full version inferred from the end of the ID. + // Examples: "v3", "v2beta1", "v1beta" + string version = 2; +} + +// A programming language +enum LanguageName { + // The language has not been specified. Consumers should not see this value. + LANGUAGE_UNSPECIFIED = 0; + + CPP = 1; + + C_SHARP = 2; + + DART = 3; + + F_SHARP = 4; + + GO = 5; + + JAVA = 6; + + NODE_JS = 7; + + PHP = 8; + + PYTHON = 9; + + RUBY = 10; + + SWIFT = 11; + + VB_NET = 12; +} \ No newline at end of file diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_list_resources_async.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_list_resources_async.py index 649e56a88b..a0be0b9e2b 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_list_resources_async.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_list_resources_async.py @@ -28,8 +28,6 @@ async def sample_list_resources(): - """Snippet for list_resources""" - # Create a client client = mollusca_v1.SnippetsAsyncClient() diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_list_resources_sync.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_list_resources_sync.py index 8892452b84..ddab64b202 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_list_resources_sync.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_list_resources_sync.py @@ -28,8 +28,6 @@ def sample_list_resources(): - """Snippet for list_resources""" - # Create a client client = mollusca_v1.SnippetsClient() diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_bidi_streaming_async.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_bidi_streaming_async.py index 7e9605052e..2e0013366b 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_bidi_streaming_async.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_bidi_streaming_async.py @@ -28,8 +28,6 @@ async def sample_method_bidi_streaming(): - """Snippet for method_bidi_streaming""" - # Create a client client = mollusca_v1.SnippetsAsyncClient() diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_bidi_streaming_sync.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_bidi_streaming_sync.py index 269fe19732..50981f2356 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_bidi_streaming_sync.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_bidi_streaming_sync.py @@ -28,8 +28,6 @@ def sample_method_bidi_streaming(): - """Snippet for method_bidi_streaming""" - # Create a client client = mollusca_v1.SnippetsClient() diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_lro_signatures_async.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_lro_signatures_async.py index 392241b5e2..a66fcd660a 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_lro_signatures_async.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_lro_signatures_async.py @@ -28,8 +28,6 @@ async def sample_method_lro_signatures(): - """Snippet for method_lro_signatures""" - # Create a client client = mollusca_v1.SnippetsAsyncClient() diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_lro_signatures_sync.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_lro_signatures_sync.py index e0fa332206..2a8fd20deb 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_lro_signatures_sync.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_lro_signatures_sync.py @@ -28,8 +28,6 @@ def sample_method_lro_signatures(): - """Snippet for method_lro_signatures""" - # Create a client client = mollusca_v1.SnippetsClient() diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_one_signature_async.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_one_signature_async.py index 85cf60ef6c..36f286da93 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_one_signature_async.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_one_signature_async.py @@ -28,8 +28,6 @@ async def sample_method_one_signature(): - """Snippet for method_one_signature""" - # Create a client client = mollusca_v1.SnippetsAsyncClient() diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_one_signature_sync.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_one_signature_sync.py index d09678e58a..fad4a7d795 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_one_signature_sync.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_one_signature_sync.py @@ -28,8 +28,6 @@ def sample_method_one_signature(): - """Snippet for method_one_signature""" - # Create a client client = mollusca_v1.SnippetsClient() diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_server_streaming_async.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_server_streaming_async.py index 5dfc1b09ba..4a397d7985 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_server_streaming_async.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_server_streaming_async.py @@ -28,8 +28,6 @@ async def sample_method_server_streaming(): - """Snippet for method_server_streaming""" - # Create a client client = mollusca_v1.SnippetsAsyncClient() diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_server_streaming_sync.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_server_streaming_sync.py index 92782bcad3..1701a3abc2 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_server_streaming_sync.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_method_server_streaming_sync.py @@ -28,8 +28,6 @@ def sample_method_server_streaming(): - """Snippet for method_server_streaming""" - # Create a client client = mollusca_v1.SnippetsClient() diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_async.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_async.py index 2bc72ff6d2..4a6d9f6827 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_async.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_async.py @@ -28,8 +28,6 @@ async def sample_one_of_method(): - """Snippet for one_of_method""" - # Create a client client = mollusca_v1.SnippetsAsyncClient() diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_required_field_async.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_required_field_async.py index 4f074994b7..92a5bef4b4 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_required_field_async.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_required_field_async.py @@ -28,8 +28,6 @@ async def sample_one_of_method_required_field(): - """Snippet for one_of_method_required_field""" - # Create a client client = mollusca_v1.SnippetsAsyncClient() diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_required_field_sync.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_required_field_sync.py index 6e480d5000..3a3c4818c3 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_required_field_sync.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_required_field_sync.py @@ -28,8 +28,6 @@ def sample_one_of_method_required_field(): - """Snippet for one_of_method_required_field""" - # Create a client client = mollusca_v1.SnippetsClient() diff --git a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_sync.py b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_sync.py index ce2a728843..7372dfbd76 100644 --- a/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_sync.py +++ b/tests/snippetgen/goldens/mollusca_generated_mollusca_v1_snippets_one_of_method_sync.py @@ -28,8 +28,6 @@ def sample_one_of_method(): - """Snippet for one_of_method""" - # Create a client client = mollusca_v1.SnippetsClient() diff --git a/tests/snippetgen/goldens/snippet_metadata_v1_mollusca_v1.json b/tests/snippetgen/goldens/snippet_metadata_v1_mollusca_v1.json new file mode 100644 index 0000000000..c5badb1099 --- /dev/null +++ b/tests/snippetgen/goldens/snippet_metadata_v1_mollusca_v1.json @@ -0,0 +1,611 @@ +{ + "snippets": [ + { + "clientMethod": { + "method": { + "fullName": "MethodServerStreaming", + "service": { + "shortName": "Snippets" + } + } + }, + "file": "samples/generated_samples/mollusca_generated_mollusca_v1_snippets_method_server_streaming_sync.py", + "regionTag": "mollusca_generated_mollusca_v1_Snippets_MethodServerStreaming_sync", + "segment": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "OneOfMethodRequiredField", + "service": { + "shortName": "Snippets" + } + } + }, + "file": "samples/generated_samples/mollusca_generated_mollusca_v1_snippets_one_of_method_required_field_sync.py", + "regionTag": "mollusca_generated_mollusca_v1_Snippets_OneOfMethodRequiredField_sync", + "segment": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "OneOfMethod", + "service": { + "shortName": "Snippets" + } + } + }, + "file": "samples/generated_samples/mollusca_generated_mollusca_v1_snippets_one_of_method_sync.py", + "regionTag": "mollusca_generated_mollusca_v1_Snippets_OneOfMethod_sync", + "segment": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "MethodBidiStreaming", + "service": { + "shortName": "Snippets" + } + } + }, + "file": "samples/generated_samples/mollusca_generated_mollusca_v1_snippets_method_bidi_streaming_sync.py", + "regionTag": "mollusca_generated_mollusca_v1_Snippets_MethodBidiStreaming_sync", + "segment": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "ListResources", + "service": { + "shortName": "Snippets" + } + } + }, + "file": "samples/generated_samples/mollusca_generated_mollusca_v1_snippets_list_resources_sync.py", + "regionTag": "mollusca_generated_mollusca_v1_Snippets_ListResources_sync", + "segment": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "MethodOneSignature", + "service": { + "shortName": "Snippets" + } + } + }, + "file": "samples/generated_samples/mollusca_generated_mollusca_v1_snippets_method_one_signature_sync.py", + "regionTag": "mollusca_generated_mollusca_v1_Snippets_MethodOneSignature_sync", + "segment": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "MethodLroSignatures", + "service": { + "shortName": "Snippets" + } + } + }, + "file": "samples/generated_samples/mollusca_generated_mollusca_v1_snippets_method_lro_signatures_sync.py", + "regionTag": "mollusca_generated_mollusca_v1_Snippets_MethodLroSignatures_sync", + "segment": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "MethodBidiStreaming", + "service": { + "shortName": "Snippets" + } + } + }, + "file": "samples/generated_samples/mollusca_generated_mollusca_v1_snippets_method_bidi_streaming_async.py", + "regionTag": "mollusca_generated_mollusca_v1_Snippets_MethodBidiStreaming_async", + "segment": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "ListResources", + "service": { + "shortName": "Snippets" + } + } + }, + "file": "samples/generated_samples/mollusca_generated_mollusca_v1_snippets_list_resources_async.py", + "regionTag": "mollusca_generated_mollusca_v1_Snippets_ListResources_async", + "segment": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "OneOfMethodRequiredField", + "service": { + "shortName": "Snippets" + } + } + }, + "file": "samples/generated_samples/mollusca_generated_mollusca_v1_snippets_one_of_method_required_field_async.py", + "regionTag": "mollusca_generated_mollusca_v1_Snippets_OneOfMethodRequiredField_async", + "segment": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "MethodServerStreaming", + "service": { + "shortName": "Snippets" + } + } + }, + "file": "samples/generated_samples/mollusca_generated_mollusca_v1_snippets_method_server_streaming_async.py", + "regionTag": "mollusca_generated_mollusca_v1_Snippets_MethodServerStreaming_async", + "segment": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "OneOfMethod", + "service": { + "shortName": "Snippets" + } + } + }, + "file": "samples/generated_samples/mollusca_generated_mollusca_v1_snippets_one_of_method_async.py", + "regionTag": "mollusca_generated_mollusca_v1_Snippets_OneOfMethod_async", + "segment": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "MethodOneSignature", + "service": { + "shortName": "Snippets" + } + } + }, + "file": "samples/generated_samples/mollusca_generated_mollusca_v1_snippets_method_one_signature_async.py", + "regionTag": "mollusca_generated_mollusca_v1_Snippets_MethodOneSignature_async", + "segment": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "MethodLroSignatures", + "service": { + "shortName": "Snippets" + } + } + }, + "file": "samples/generated_samples/mollusca_generated_mollusca_v1_snippets_method_lro_signatures_async.py", + "regionTag": "mollusca_generated_mollusca_v1_Snippets_MethodLroSignatures_async", + "segment": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/unit/samplegen/common_types.py b/tests/unit/common_types.py similarity index 97% rename from tests/unit/samplegen/common_types.py rename to tests/unit/common_types.py index 538b9d6864..1d10553b7d 100644 --- a/tests/unit/samplegen/common_types.py +++ b/tests/unit/common_types.py @@ -91,7 +91,7 @@ def resource_path_args(self): DummyService = namedtuple("DummyService", [ - "methods", "client_name", "async_client_name", "resource_messages_dict"]) + "name", "methods", "client_name", "async_client_name", "resource_messages_dict"]) DummyService.__new__.__defaults__ = (False,) * len(DummyService._fields) DummyApiSchema = namedtuple("DummyApiSchema", diff --git a/tests/unit/generator/__init__.py b/tests/unit/generator/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/unit/generator/test_generator.py b/tests/unit/generator/test_generator.py index 62a12df90c..e599582743 100644 --- a/tests/unit/generator/test_generator.py +++ b/tests/unit/generator/test_generator.py @@ -24,13 +24,20 @@ from google.protobuf.compiler.plugin_pb2 import CodeGeneratorResponse from gapic.generator import generator -from gapic.samplegen_utils import types, yaml +from gapic.samplegen_utils import snippet_metadata_pb2, types, yaml +from ..common_types import (DummyApiSchema, DummyField, DummyIdent, DummyNaming, DummyMessage, DummyMessageTypePB, + DummyService, DummyMethod, message_factory, enum_factory) + from gapic.schema import api from gapic.schema import naming from gapic.schema import wrappers from gapic.utils import Options +dummy_snippet_metadata = snippet_metadata_pb2.Snippet() +dummy_snippet_metadata.client_method.method.service.short_name = "Mollusc" +dummy_snippet_metadata.client_method.method.full_name = "GetSquidStreaming" + def test_custom_template_directory(): # Create a generator. opts = Options.build("python-gapic-templates=/templates/") @@ -51,8 +58,8 @@ def test_get_response(): lt.assert_called_once() gt.assert_has_calls( [ - mock.call("foo/bar/baz.py.j2"), mock.call("molluscs/squid/sample.py.j2"), + mock.call("foo/bar/baz.py.j2"), ] ) assert len(cgr.file) == 1 @@ -71,8 +78,8 @@ def test_get_response_ignores_empty_files(): lt.assert_called_once() gt.assert_has_calls( [ - mock.call("foo/bar/baz.py.j2"), mock.call("molluscs/squid/sample.py.j2"), + mock.call("foo/bar/baz.py.j2"), ] ) assert len(cgr.file) == 0 @@ -93,8 +100,8 @@ def test_get_response_ignores_private_files(): lt.assert_called_once() gt.assert_has_calls( [ - mock.call("foo/bar/baz.py.j2"), mock.call("molluscs/squid/sample.py.j2"), + mock.call("foo/bar/baz.py.j2"), ] ) assert len(cgr.file) == 1 @@ -107,7 +114,6 @@ def test_get_response_fails_invalid_file_paths(): with mock.patch.object(jinja2.FileSystemLoader, "list_templates") as lt: lt.return_value = [ "foo/bar/%service/%proto/baz.py.j2", - "molluscs/squid/sample.py.j2", ] with pytest.raises(ValueError) as ex: g.get_response(api_schema=make_api(), @@ -402,9 +408,8 @@ def test_parse_sample_paths(fs): with pytest.raises(types.InvalidConfig): Options.build("samples=sampledir/,") - @mock.patch( - "gapic.samplegen.samplegen.generate_sample", return_value="", + "gapic.samplegen.samplegen.generate_sample", return_value=("", dummy_snippet_metadata), ) @mock.patch("time.gmtime",) def test_samplegen_config_to_output_files( @@ -431,8 +436,10 @@ def test_samplegen_config_to_output_files( samples: - id: squid_sample region_tag: humboldt_tag + service: Mollusc.v1.Mollusc rpc: get_squid_streaming - region_tag: clam_sample + service: Mollusc.v1.Mollusc rpc: get_clam """ ), @@ -442,8 +449,20 @@ def test_samplegen_config_to_output_files( # Need to have the sample template visible to the generator. g._env.loader = jinja2.DictLoader({"sample.py.j2": ""}) - api_schema = make_api(naming=naming.NewNaming( - name="Mollusc", version="v6")) + api_schema = DummyApiSchema( + services={"Mollusc": DummyService( + name="Mollusc", + methods={ + # For this test the generator only cares about the dictionary keys + # so we let the values be None + "GetSquidStreaming": None, + "GetClam": None, + }, + )}, + naming=DummyNaming(warehouse_package_name="mollusc-cephalopod-teuthida-", + versioned_module_name="teuthida_v1", module_namespace="mollusc.cephalopod"), + ) + actual_response = g.get_response( api_schema, opts=Options.build("")) expected_response = CodeGeneratorResponse( @@ -452,33 +471,9 @@ def test_samplegen_config_to_output_files( name="samples/generated_samples/squid_sample.py", content="\n",), CodeGeneratorResponse.File( name="samples/generated_samples/clam_sample.py", content="\n",), - # TODO(busunkim): Re-enable manifest generation once metadata - # format has been formalized. - # https://docs.google.com/document/d/1ghBam8vMj3xdoe4xfXhzVcOAIwrkbTpkMLgKc9RPD9k/edit#heading=h.sakzausv6hue - # CodeGeneratorResponse.File( - # name="samples/generated_samples/mollusc.v6.python.21120601.131313.manifest.yaml", - # content=dedent( - # """\ - # --- - # type: manifest/samples - # schema_version: 3 - # python: &python - # environment: python - # bin: python3 - # base_path: samples - # invocation: '{bin} {path} @args' - # samples: - # - <<: *python - # sample: squid_sample - # path: '{base_path}/squid_sample.py' - # region_tag: humboldt_tag - # - <<: *python - # sample: clam_sample - # path: '{base_path}/clam_sample.py' - # region_tag: clam_sample - # """ - # ), - # ), + CodeGeneratorResponse.File( + name="samples/generated_samples/snippet_metadata_v1_false_false.json", + content="{\"snippets\": [{\"file\": \"samples/generated_samples/squid_sample.py\", \"clientMethod\": {\"method\": {\"fullName\": \"GetSquidStreaming\", \"service\": {\"shortName\": \"Mollusc\"}}}, \"segments\": [{\"type\": \"FULL\"}, {\"type\": \"SHORT\"}, {\"type\": \"CLIENT_INITIALIZATION\"}, {\"type\": \"REQUEST_INITIALIZATION\"}, {\"type\": \"REQUEST_EXECUTION\"}, {\"type\": \"RESPONSE_HANDLING\"}]}, {\"file\": \"samples/generated_samples/clam_sample.py\", \"clientMethod\": {\"method\": {\"fullName\": \"GetSquidStreaming\", \"service\": {\"shortName\": \"Mollusc\"}}}, \"segments\": [{\"type\": \"FULL\"}, {\"type\": \"SHORT\"}, {\"type\": \"CLIENT_INITIALIZATION\"}, {\"type\": \"REQUEST_INITIALIZATION\"}, {\"type\": \"REQUEST_EXECUTION\"}, {\"type\": \"RESPONSE_HANDLING\"}, {\"type\": \"FULL\"}, {\"type\": \"SHORT\"}, {\"type\": \"CLIENT_INITIALIZATION\"}, {\"type\": \"REQUEST_INITIALIZATION\"}, {\"type\": \"REQUEST_EXECUTION\"}, {\"type\": \"RESPONSE_HANDLING\"}]}]}\n"), ] ) expected_response.supported_features |= ( @@ -514,7 +509,7 @@ def test_generate_autogen_samples(mock_generate_sample, mock_generate_specs): @mock.patch( - "gapic.samplegen.samplegen.generate_sample", return_value="", + "gapic.samplegen.samplegen.generate_sample", return_value=("", dummy_snippet_metadata), ) @mock.patch("time.gmtime",) def test_samplegen_id_disambiguation(mock_gmtime, mock_generate_sample, fs): @@ -556,8 +551,19 @@ def test_samplegen_id_disambiguation(mock_gmtime, mock_generate_sample, fs): # Need to have the sample template visible to the generator. g._env.loader = jinja2.DictLoader({"sample.py.j2": ""}) - api_schema = make_api(naming=naming.NewNaming( - name="Mollusc", version="v6")) + api_schema = DummyApiSchema( + services={"Mollusc": DummyService( + name="Mollusc", + methods={ + # For this test the generator only cares about the dictionary keys + # so we let the values be None + "GetSquidStreaming": None, + "GetClam": None, + }, + )}, + naming=DummyNaming(warehouse_package_name="mollusc-cephalopod-teuthida-", + versioned_module_name="teuthida_v1", module_namespace="mollusc.cephalopod"), + ) actual_response = g.get_response(api_schema, opts=Options.build("")) expected_response = CodeGeneratorResponse( @@ -570,36 +576,11 @@ def test_samplegen_id_disambiguation(mock_gmtime, mock_generate_sample, fs): ), CodeGeneratorResponse.File(name="samples/generated_samples/157884ee.py", content="\n",), - # TODO(busunkim): Re-enable manifest generation once metadata - # format has been formalized. - # https://docs.google.com/document/d/1ghBam8vMj3xdoe4xfXhzVcOAIwrkbTpkMLgKc9RPD9k/edit#heading=h.sakzausv6hue - # CodeGeneratorResponse.File( - # name="samples/generated_samples/mollusc.v6.python.21120601.131313.manifest.yaml", - # content=dedent( - # """\ - # --- - # type: manifest/samples - # schema_version: 3 - # python: &python - # environment: python - # bin: python3 - # base_path: samples - # invocation: '{bin} {path} @args' - # samples: - # - <<: *python - # sample: squid_sample_91a465c6 - # path: '{base_path}/squid_sample_91a465c6.py' - # region_tag: humboldt_tag - # - <<: *python - # sample: squid_sample_55051b38 - # path: '{base_path}/squid_sample_55051b38.py' - # region_tag: squid_sample - # - <<: *python - # sample: 157884ee - # path: '{base_path}/157884ee.py' - # """ - # ), - # ), + + CodeGeneratorResponse.File( + name="samples/generated_samples/snippet_metadata_v1_false_false.json", + content="{\"snippets\": [{\"file\": \"samples/generated_samples/squid_sample_91a465c6.py\", \"clientMethod\": {\"method\": {\"fullName\": \"GetSquidStreaming\", \"service\": {\"shortName\": \"Mollusc\"}}}, \"segments\": [{\"type\": \"FULL\"}, {\"type\": \"SHORT\"}, {\"type\": \"CLIENT_INITIALIZATION\"}, {\"type\": \"REQUEST_INITIALIZATION\"}, {\"type\": \"REQUEST_EXECUTION\"}, {\"type\": \"RESPONSE_HANDLING\"}]}, {\"file\": \"samples/generated_samples/squid_sample_55051b38.py\", \"clientMethod\": {\"method\": {\"fullName\": \"GetSquidStreaming\", \"service\": {\"shortName\": \"Mollusc\"}}}, \"segments\": [{\"type\": \"FULL\"}, {\"type\": \"SHORT\"}, {\"type\": \"CLIENT_INITIALIZATION\"}, {\"type\": \"REQUEST_INITIALIZATION\"}, {\"type\": \"REQUEST_EXECUTION\"}, {\"type\": \"RESPONSE_HANDLING\"}, {\"type\": \"FULL\"}, {\"type\": \"SHORT\"}, {\"type\": \"CLIENT_INITIALIZATION\"}, {\"type\": \"REQUEST_INITIALIZATION\"}, {\"type\": \"REQUEST_EXECUTION\"}, {\"type\": \"RESPONSE_HANDLING\"}]}, {\"file\": \"samples/generated_samples/157884ee.py\", \"clientMethod\": {\"method\": {\"fullName\": \"GetSquidStreaming\", \"service\": {\"shortName\": \"Mollusc\"}}}, \"segments\": [{\"type\": \"FULL\"}, {\"type\": \"SHORT\"}, {\"type\": \"CLIENT_INITIALIZATION\"}, {\"type\": \"REQUEST_INITIALIZATION\"}, {\"type\": \"REQUEST_EXECUTION\"}, {\"type\": \"RESPONSE_HANDLING\"}, {\"type\": \"FULL\"}, {\"type\": \"SHORT\"}, {\"type\": \"CLIENT_INITIALIZATION\"}, {\"type\": \"REQUEST_INITIALIZATION\"}, {\"type\": \"REQUEST_EXECUTION\"}, {\"type\": \"RESPONSE_HANDLING\"}, {\"type\": \"FULL\"}, {\"type\": \"SHORT\"}, {\"type\": \"CLIENT_INITIALIZATION\"}, {\"type\": \"REQUEST_INITIALIZATION\"}, {\"type\": \"REQUEST_EXECUTION\"}, {\"type\": \"RESPONSE_HANDLING\"}]}]}\n", + ), ] ) expected_response.supported_features |= ( @@ -639,116 +620,6 @@ def test_generator_duplicate_samples(fs): opts=Options.build("")) -@mock.patch("gapic.samplegen.samplegen.generate_sample", return_value="") -@mock.patch("time.gmtime",) -def test_dont_generate_in_code_samples(mock_gmtime, mock_generate_sample, fs): - # These time values are nothing special, - # they just need to be deterministic. - returner = mock.MagicMock() - returner.tm_year = 2112 - returner.tm_mon = 6 - returner.tm_mday = 1 - returner.tm_hour = 13 - returner.tm_min = 13 - returner.tm_sec = 13 - mock_gmtime.return_value = returner - - config_fpath = "samples.yaml" - fs.create_file( - config_fpath, - contents=dedent( - """ - type: com.google.api.codegen.samplegen.v1p2.SampleConfigProto - schema_version: 1.2.0 - samples: - - id: squid_sample - rpc: IdentifyMollusc - service: Mollusc.v1.Mollusc - sample_type: - - standalone - - incode/SQUID - - id: clam_sample - rpc: IdentifyMollusc - service: Mollusc.v1.Mollusc - sample_type: - - incode/CLAM - - id: whelk_sample - rpc: IdentifyMollusc - service: Mollusc.v1.Mollusc - sample_type: - - standalone - - id: octopus_sample - rpc: IdentifyMollusc - service: Mollusc.v1.Mollusc - """ - ), - ) - - generator = make_generator(f"samples={config_fpath}") - generator._env.loader = jinja2.DictLoader({"sample.py.j2": ""}) - api_schema = make_api( - make_proto( - descriptor_pb2.FileDescriptorProto( - name="mollusc.proto", - package="Mollusc.v1", - service=[descriptor_pb2.ServiceDescriptorProto( - name="Mollusc")], - ), - ), - naming=naming.NewNaming(name="Mollusc", version="v6"), - ) - - # Note that we do NOT expect a clam sample. - # There are four tests going on: - # 1) Just an explicit standalone sample type. - # 2) Multiple sample types, one of which is standalone. - # 3) Explicit sample types but NO standalone sample type. - # 4) Implicit standalone sample type. - expected = CodeGeneratorResponse( - file=[ - CodeGeneratorResponse.File( - name="samples/generated_samples/squid_sample.py", content="\n",), - CodeGeneratorResponse.File( - name="samples/generated_samples/whelk_sample.py", content="\n",), - CodeGeneratorResponse.File( - name="samples/generated_samples/octopus_sample.py", content="\n",), - # TODO(busunkim): Re-enable manifest generation once metadata - # format has been formalized. - # https://docs.google.com/document/d/1ghBam8vMj3xdoe4xfXhzVcOAIwrkbTpkMLgKc9RPD9k/edit#heading=h.sakzausv6hue - # CodeGeneratorResponse.File( - # name="samples/generated_samples/mollusc.v6.python.21120601.131313.manifest.yaml", - # content=dedent( - # """ --- - # type: manifest/samples - # schema_version: 3 - # python: &python - # environment: python - # bin: python3 - # base_path: samples - # invocation: \'{bin} {path} @args\' - # samples: - # - <<: *python - # sample: squid_sample - # path: \'{base_path}/squid_sample.py\' - # - <<: *python - # sample: whelk_sample - # path: \'{base_path}/whelk_sample.py\' - # - <<: *python - # sample: octopus_sample - # path: \'{base_path}/octopus_sample.py\' - # """ - # ), - # ), - ] - ) - expected.supported_features |= CodeGeneratorResponse.Feature.FEATURE_PROTO3_OPTIONAL - - actual = generator.get_response( - api_schema=api_schema, opts=Options.build("") - ) - assert actual == expected - - def make_generator(opts_str: str = "") -> generator.Generator: return generator.Generator(Options.build(opts_str)) diff --git a/tests/unit/samplegen/__init__.py b/tests/unit/samplegen/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/unit/samplegen/golden_snippets/sample_basic.py b/tests/unit/samplegen/golden_snippets/sample_basic.py index c6c44239c8..76b0b58bff 100644 --- a/tests/unit/samplegen/golden_snippets/sample_basic.py +++ b/tests/unit/samplegen/golden_snippets/sample_basic.py @@ -28,8 +28,6 @@ def sample_classify(video, location): - """Determine the full taxonomy of input mollusc""" - # Create a client client = molluscclient.MolluscServiceClient() diff --git a/tests/unit/samplegen/golden_snippets/sample_basic_async.py b/tests/unit/samplegen/golden_snippets/sample_basic_async.py index 8ad414a78f..71a6d3853c 100644 --- a/tests/unit/samplegen/golden_snippets/sample_basic_async.py +++ b/tests/unit/samplegen/golden_snippets/sample_basic_async.py @@ -28,8 +28,6 @@ async def sample_classify(video, location): - """Determine the full taxonomy of input mollusc""" - # Create a client client = molluscclient.MolluscServiceAsyncClient() diff --git a/tests/unit/samplegen/golden_snippets/sample_basic_unflattenable.py b/tests/unit/samplegen/golden_snippets/sample_basic_unflattenable.py index c6c44239c8..76b0b58bff 100644 --- a/tests/unit/samplegen/golden_snippets/sample_basic_unflattenable.py +++ b/tests/unit/samplegen/golden_snippets/sample_basic_unflattenable.py @@ -28,8 +28,6 @@ def sample_classify(video, location): - """Determine the full taxonomy of input mollusc""" - # Create a client client = molluscclient.MolluscServiceClient() diff --git a/tests/unit/samplegen/golden_snippets/sample_basic_void_method.py b/tests/unit/samplegen/golden_snippets/sample_basic_void_method.py index a6e7d48b6e..0b617f40ed 100644 --- a/tests/unit/samplegen/golden_snippets/sample_basic_void_method.py +++ b/tests/unit/samplegen/golden_snippets/sample_basic_void_method.py @@ -28,8 +28,6 @@ def sample_classify(video, location): - """Determine the full taxonomy of input mollusc""" - # Create a client client = molluscclient.MolluscServiceClient() diff --git a/tests/unit/samplegen/test_integration.py b/tests/unit/samplegen/test_integration.py index aefde2f1dc..937e103bb5 100644 --- a/tests/unit/samplegen/test_integration.py +++ b/tests/unit/samplegen/test_integration.py @@ -17,13 +17,16 @@ import pytest from pathlib import Path +from google.protobuf import json_format + import gapic.utils as utils from gapic.samplegen import samplegen from gapic.samplegen_utils import (types, utils as gapic_utils) +from gapic.samplegen_utils import snippet_metadata_pb2 from gapic.schema import (naming, wrappers) -from common_types import (DummyField, DummyMessage, +from ..common_types import (DummyField, DummyMessage, DummyMessageTypePB, DummyMethod, DummyService, DummyIdent, DummyApiSchema, DummyNaming, enum_factory, message_factory) @@ -105,6 +108,7 @@ def test_generate_sample_basic(): ) sample = {"service": "animalia.mollusca.v1.Mollusc", + "region_tag": "molluscs_generated_molluscs_v1_Mollusc_Classify_sync", "rpc": "Classify", "id": "mollusc_classify_sync", "description": "Determine the full taxonomy of input mollusc", @@ -119,13 +123,21 @@ def test_generate_sample_basic(): ], "response": [{"print": ['Mollusc is a "%s"', "$resp.taxonomy"]}]} - sample_str = samplegen.generate_sample( + sample_str, metadata = samplegen.generate_sample( sample, schema, env.get_template('examples/sample.py.j2') ) assert sample_str == golden_snippet("sample_basic.py") + assert json_format.MessageToDict(metadata) == { + 'regionTag': 'molluscs_generated_molluscs_v1_Mollusc_Classify_sync', + 'clientMethod': + {'method': { + 'fullName': 'Classify', + 'service': {'shortName': 'Mollusc'} + }} + } def test_generate_sample_basic_async(): @@ -180,6 +192,7 @@ def test_generate_sample_basic_async(): ) sample = {"service": "animalia.mollusca.v1.Mollusc", + "region_tag": "molluscs_generated_molluscs_v1_Mollusc_Classify_async", "rpc": "Classify", "transport": "grpc-async", "id": "mollusc_classify_sync", @@ -195,13 +208,23 @@ def test_generate_sample_basic_async(): ], "response": [{"print": ['Mollusc is a "%s"', "$resp.taxonomy"]}]} - sample_str = samplegen.generate_sample( + sample_str, metadata = samplegen.generate_sample( sample, schema, env.get_template('examples/sample.py.j2') ) assert sample_str == golden_snippet("sample_basic_async.py") + assert json_format.MessageToDict(metadata) == { + 'regionTag': 'molluscs_generated_molluscs_v1_Mollusc_Classify_async', + 'clientMethod': + { + 'async': True, + 'method': { + 'fullName': 'Classify', + 'service': {'shortName': 'Mollusc'} + }} + } def test_generate_sample_basic_unflattenable(): @@ -251,6 +274,7 @@ def test_generate_sample_basic_unflattenable(): ) sample = {"service": "animalia.mollusca.v1.Mollusc", + "region_tag": "molluscs_generated_molluscs_v1_Mollusc_Classify_sync", "rpc": "Classify", "id": "mollusc_classify_sync", "description": "Determine the full taxonomy of input mollusc", @@ -265,13 +289,22 @@ def test_generate_sample_basic_unflattenable(): ], "response": [{"print": ['Mollusc is a "%s"', "$resp.taxonomy"]}]} - sample_str = samplegen.generate_sample( + sample_str, metadata = samplegen.generate_sample( sample, schema, env.get_template('examples/sample.py.j2') ) assert sample_str == golden_snippet("sample_basic_unflattenable.py") + assert json_format.MessageToDict(metadata) == { + 'regionTag': 'molluscs_generated_molluscs_v1_Mollusc_Classify_sync', + 'clientMethod': + { + 'method': { + 'fullName': 'Classify', + 'service': {'shortName': 'Mollusc'} + }} + } def test_generate_sample_void_method(): @@ -320,6 +353,7 @@ def test_generate_sample_void_method(): ) sample = {"service": "animalia.mollusca.v1.Mollusc", + "region_tag": "molluscs_generated_molluscs_v1_Mollusc_Classify_sync", "rpc": "Classify", "id": "mollusc_classify_sync", "description": "Determine the full taxonomy of input mollusc", @@ -333,14 +367,22 @@ def test_generate_sample_void_method(): "input_parameter": "location"} ]} - sample_str = samplegen.generate_sample( + sample_str, metadata = samplegen.generate_sample( sample, schema, env.get_template('examples/sample.py.j2') ) assert sample_str == golden_snippet("sample_basic_void_method.py") - + assert json_format.MessageToDict(metadata) == { + 'regionTag': 'molluscs_generated_molluscs_v1_Mollusc_Classify_sync', + 'clientMethod': + { + 'method': { + 'fullName': 'Classify', + 'service': {'shortName': 'Mollusc'} + }} + } def test_generate_sample_service_not_found(): schema = DummyApiSchema({}, DummyNaming("pkg_name")) diff --git a/tests/unit/samplegen/test_manifest.py b/tests/unit/samplegen/test_manifest.py index d1eb23e787..5fe7217a30 100644 --- a/tests/unit/samplegen/test_manifest.py +++ b/tests/unit/samplegen/test_manifest.py @@ -19,7 +19,7 @@ import gapic.samplegen_utils.yaml as gapic_yaml import gapic.samplegen_utils.types as types import gapic.samplegen.manifest as manifest -from common_types import DummyApiSchema, DummyNaming +from ..common_types import DummyApiSchema, DummyNaming def test_generate_manifest(): diff --git a/tests/unit/samplegen/test_samplegen.py b/tests/unit/samplegen/test_samplegen.py index c42420be59..00608a2ae7 100644 --- a/tests/unit/samplegen/test_samplegen.py +++ b/tests/unit/samplegen/test_samplegen.py @@ -29,7 +29,7 @@ import gapic.schema.wrappers as wrappers from gapic.utils import Options -from common_types import (DummyApiSchema, DummyField, DummyIdent, DummyNaming, DummyMessage, DummyMessageTypePB, +from ..common_types import (DummyApiSchema, DummyField, DummyIdent, DummyNaming, DummyMessage, DummyMessageTypePB, DummyService, DummyMethod, message_factory, enum_factory) from gapic.samplegen_utils import utils @@ -2087,7 +2087,6 @@ def test_generate_sample_spec_basic(): assert len(specs) == 2 assert specs[0] == { - "sample_type": "standalone", "rpc": "Ramshorn", "transport": "grpc", "service": "animalia.mollusca.v1.Squid", @@ -2096,7 +2095,6 @@ def test_generate_sample_spec_basic(): } assert specs[1] == { - "sample_type": "standalone", "rpc": "Ramshorn", "transport": "grpc-async", "service": "animalia.mollusca.v1.Squid", diff --git a/tests/unit/samplegen/test_snippet_index.py b/tests/unit/samplegen/test_snippet_index.py new file mode 100644 index 0000000000..cbde8ddc36 --- /dev/null +++ b/tests/unit/samplegen/test_snippet_index.py @@ -0,0 +1,213 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from google.protobuf import json_format +import pytest + +from gapic.samplegen_utils import snippet_metadata_pb2 +from gapic.samplegen_utils import snippet_index, types +from ..common_types import DummyApiSchema, DummyService, DummyMethod + + +@pytest.fixture +def sample_str(): + return"""# [START mollusc_classify_sync] +from molluscs.v1 import molluscclient + + +def sample_classify(video, location): + # Create a client + client = molluscclient.MolluscServiceClient() + + # Initialize request argument(s) + classify_target = molluscclient.ClassifyTarget() + + # video = "path/to/mollusc/video.mkv" + with open(video, "rb") as f: + classify_target.video = f.read() + + # location = "New Zealand" + classify_target.location_annotation = location + + request = molluscclient.molluscs.v1.ClassifyRequest( + classify_target=classify_target, + ) + + # Make the request + response = client.classify(request=request) + + # Handle response + print(f"Mollusc is a \"{response.taxonomy}\"") + +# [END mollusc_classify_sync]""" + + +def test_snippet_init(sample_str): + # We are not trying to exhaustively test the snippet metadata protobuf, + # just checking that fields are not unset + sample_metadata = snippet_metadata_pb2.Snippet(title="classify_squid.py") + sample_metadata.language = snippet_metadata_pb2.Language.PYTHON + snippet = snippet_index.Snippet(sample_str, sample_metadata) + + assert snippet.sample_str == sample_str + + # It's easier to eyeball diffs on the dictionary representation + assert json_format.MessageToDict(snippet.metadata) == { + "language": "PYTHON", + "title": "classify_squid.py", + "segments": [ + {"end": 28, "start": 2, "type": "FULL"}, + {"end": 28, "start": 2, "type": "SHORT"}, + {"end": 8, "start": 6, "type": "CLIENT_INITIALIZATION"}, + {"end": 22, "start": 9, "type": "REQUEST_INITIALIZATION"}, + {"end": 25, "start": 23, "type": "REQUEST_EXECUTION"}, + {"end": 29, "start": 26, "type": "RESPONSE_HANDLING"}, + ] + } + + expected_full_snipppet = """from molluscs.v1 import molluscclient + + +def sample_classify(video, location): + # Create a client + client = molluscclient.MolluscServiceClient() + + # Initialize request argument(s) + classify_target = molluscclient.ClassifyTarget() + + # video = "path/to/mollusc/video.mkv" + with open(video, "rb") as f: + classify_target.video = f.read() + + # location = "New Zealand" + classify_target.location_annotation = location + + request = molluscclient.molluscs.v1.ClassifyRequest( + classify_target=classify_target, + ) + + # Make the request + response = client.classify(request=request) + + # Handle response + print(f"Mollusc is a \"{response.taxonomy}\"") + +""" + + assert snippet.full_snippet == expected_full_snipppet + + +def test_add_snippet_no_matching_service(sample_str): + snippet_metadata = snippet_metadata_pb2.Snippet( + ) + snippet_metadata.client_method.method.service.short_name = "Clam" + snippet = snippet_index.Snippet(sample_str, snippet_metadata) + + # No 'Clam' service in API Schema + index = snippet_index.SnippetIndex(api_schema=DummyApiSchema( + services={"Squid": DummyService(name="Squid", methods={})} + )) + with pytest.raises(types.UnknownService): + index.add_snippet(snippet) + +def test_add_snippet_no_matching_rpc(sample_str): + snippet_metadata = snippet_metadata_pb2.Snippet( + ) + snippet_metadata.client_method.method.service.short_name = "Squid" + snippet_metadata.client_method.full_name = "classify" + snippet = snippet_index.Snippet(sample_str, snippet_metadata) + + # No 'classify' method in 'Squid' service + index = snippet_index.SnippetIndex(api_schema=DummyApiSchema( + services={"Squid": DummyService(name="Squid", methods={"list": None})} + )) + with pytest.raises(types.RpcMethodNotFound): + index.add_snippet(snippet) + + +def test_add_snippet_sync(sample_str): + snippet_metadata = snippet_metadata_pb2.Snippet() + snippet_metadata.client_method.method.service.short_name = "Squid" + snippet_metadata.client_method.method.full_name = "classify" + snippet = snippet_index.Snippet(sample_str, snippet_metadata) + + index = snippet_index.SnippetIndex(api_schema=DummyApiSchema( + services={"Squid": DummyService(name="Squid", methods={"classify": DummyMethod()})} + )) + + index.add_snippet(snippet) + +def test_add_snippet_async(sample_str): + snippet_metadata = snippet_metadata_pb2.Snippet() + snippet_metadata.client_method.method.service.short_name = "Squid" + snippet_metadata.client_method.method.full_name = "classify" + setattr(snippet_metadata.client_method, "async", True) + snippet = snippet_index.Snippet(sample_str, snippet_metadata) + + index = snippet_index.SnippetIndex(api_schema=DummyApiSchema( + services={"Squid": DummyService(name="Squid", methods={"classify": DummyMethod()})} + )) + + index.add_snippet(snippet) + + +def test_get_snippet_no_matching_service(): + index = snippet_index.SnippetIndex(api_schema=DummyApiSchema( + services={"Squid": DummyService(name="Squid", methods={"classify": DummyMethod()})} + )) + + # No 'Clam' service in API Schema + with pytest.raises(types.UnknownService): + index.get_snippet(service_name="Clam", rpc_name="classify") + +def test_get_snippet_no_matching_rpc(): + index = snippet_index.SnippetIndex(api_schema=DummyApiSchema( + services={"Squid": DummyService(name="Squid", methods={"classify": DummyMethod()})} + )) + + # No 'list' RPC in 'Squid' service + with pytest.raises(types.RpcMethodNotFound): + index.get_snippet(service_name="Squid", rpc_name="list") + + +def test_get_snippet_sync(sample_str): + snippet_metadata = snippet_metadata_pb2.Snippet() + snippet_metadata.client_method.method.service.short_name = "Squid" + snippet_metadata.client_method.method.full_name = "classify" + snippet = snippet_index.Snippet(sample_str, snippet_metadata) + + index = snippet_index.SnippetIndex(api_schema=DummyApiSchema( + services={"Squid": DummyService(name="Squid", methods={"classify": DummyMethod()})} + )) + + index.add_snippet(snippet) + + index.get_snippet(service_name="Squid", rpc_name="classify") + + +def test_get_snippet_async(sample_str): + snippet_metadata = snippet_metadata_pb2.Snippet() + snippet_metadata.client_method.method.service.short_name = "Squid" + snippet_metadata.client_method.method.full_name = "classify" + setattr(snippet_metadata.client_method, "async", True) + snippet = snippet_index.Snippet(sample_str, snippet_metadata) + + index = snippet_index.SnippetIndex(api_schema=DummyApiSchema( + services={"Squid": DummyService(name="Squid", methods={"classify": DummyMethod()})} + )) + + index.add_snippet(snippet) + + index.get_snippet(service_name="Squid", rpc_name="classify", sync=False) + diff --git a/tests/unit/samplegen/test_template.py b/tests/unit/samplegen/test_template.py index 42b8bb2aad..15b59e5369 100644 --- a/tests/unit/samplegen/test_template.py +++ b/tests/unit/samplegen/test_template.py @@ -21,7 +21,7 @@ from gapic.samplegen_utils.types import CallingForm from textwrap import dedent -import common_types +from .. import common_types def check_template(template_fragment, expected_output, **kwargs): From 89df3185b430a6ab8f564380fcbff0aab53bffa1 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Mon, 10 Jan 2022 17:01:58 +0000 Subject: [PATCH 02/18] chore: delete extra proto file --- snippet_metadata.proto | 276 ----------------------------------------- 1 file changed, 276 deletions(-) delete mode 100644 snippet_metadata.proto diff --git a/snippet_metadata.proto b/snippet_metadata.proto deleted file mode 100644 index e553d0ffcb..0000000000 --- a/snippet_metadata.proto +++ /dev/null @@ -1,276 +0,0 @@ -syntax = "proto3"; - -package google.cloud.tools.snippetgen.snippetindex.v1; - -option csharp_namespace = "Google.Cloud.Tools.SnippetGen.SnippetIndex.V1"; - -// The snippet index for a single client library. -message Index { - // The Client Library these snippets are for. - ClientLibrary client_library = 1; - - // The list of snippets. - repeated Snippet snippets = 2; -} - -// One sample. -// Parts of this information will be language specific. -message Snippet { - // The region tag name. Does not include the square brackets or the START or - // END indicators. - string region_tag = 1; - - // The title of the snippet, for human consumption mostly. For generated - // snippets this may be the snippet method or file name, or obtained from - /// snippet configuration. - string title = 2; - - // A description of the snippet, for human consumption mostly. For generated - // snippets this may be the description of the service method, or obtained - // from snippet configuration. - string description = 3; - - // The file where the snippet code lives. - // The path should be relative to the GitHub repo root and should not include - // branch, tag, commitish, etc., as those will be the same as for the metadata - // file. - string file = 4; - - // The programming language name the snippet is written in. - // This will match the client library language most of the time, but not - // always. For instance, in .NET, libraries are written in C# but some samples - // may be written in F# or VB .NET. - // Note that this does not contain information about the snippet supported - // platforms or language versions, etc. This is just a quick way to identify - // the generally supported langauge. - LanguageName language = 5; - - // The client library method this snippet is for. - ClientMethod client_method = 6; - - // Wether this is the canonical snippet for the corresponding service method. - // This is to be interpreted in conjunction with origin as follows: - // For a given service method: - // - A handwritten canonical takes precedence over - // - A config canonical which in turn takes precedence over - // - A baseline canonical. - bool canonical = 7; - - // The origin of the snippet. - Origin origin = 8; - - // The different segments of the snippet. - // Must contain the FULL segment always. - // There may be overlap between segments. - repeated Segment segment = 9; - - // The origin of the snippet. - enum Origin { - // The origin has not been specified. Consumers should not see this value. - ORIGIN_UNSPECIFIED = 0; - - // The snippet is generated from proto and client library information only, - // no snippet configuration has been specified. This refers to SnippetGen - // phase 1. - BASELINE = 1; - - // The snippet is generated from a configuration. This refers to SnippetGen - // phase 2. - CONFIG = 2; - - // The snippet is handwritten. - HANDWRITTEN = 3; - } - - // A segment of the snippet. - message Segment { - // The line where this segment begins, inclusive. - int32 start = 1; - - // The line where this segment ends, inclusive. - int32 end = 2; - - // The type of the segment. - SegmentType type = 3; - - // The type of the segment. - // Basically describes what this segment shows. - enum SegmentType { - // The segment type has not been specified. Consumers should not see this - // value. - SEGMENT_TYPE_UNSPECIFIED = 0; - - // The full sample including import statements. - // This corresponds to the sample as determined by the region tags. - FULL = 1; - - // A shorter version of the full sample, may not include imports and some - // langauge specific initialization code. This is to be used in contexts - // in which the full aspects of the sample are made clear outside the - // code. - SHORT = 2; - - // The segment contains the service client initialization code only. - // To be used in tutorials, codelabs, etc. - CLIENT_INITIALIZATION = 3; - - // The segment contains the request initialization code only. - // To be used in tutorials, codelabs, etc. - REQUEST_INITIALIZATION = 4; - - // The segment contains the request execution code only. - // To be used in tutorials, codelabs, etc. - REQUEST_EXECUTION = 5; - - // The segment contains the response handling code only. - // To be used in tutorials, codelabs, etc. - RESPONSE_HANDLING = 6; - } - } -} - -// A client library method. -// Will contain language specific information. -message ClientMethod { - // The short name of the method, usually the name it is declared with. - // This may not be unique within the service client because of overloads. - string short_name = 1; - - // The fully qualified name of the method, which is the short_name qualified - // by the full_name of the service client. - // This value is redundant, but present to make it easier for consumers to - // obtain it. - // This may not be unique within the service client because of overloads. - string full_name = 2; - - // Indicates wether this method is synchronous or asynchronous. - // Some languages may support only one of the variants, in which case, this - // field will always have the same value (for that language). - bool async = 3; - - // Fully qualified type names of this method parameters in the same order as - // they appear on the method declaration. Must be empty if the method has no - // parameters. - repeated string parameter_type = 4; - - // Fully qualified type name of this method result, if any. - string result_type = 5; - - // The service client this method is declared in. - ServiceClient client = 6; - - // The service method this client method is for. - Method method = 7; -} - -// A service client defined in the client library specified in Index. -// Will contain language specific information. -message ServiceClient { - // The short name of the service client, usually the name it is declared with. - // This may not be unique within the client library because of - // namespaces/packages. - string short_name = 1; - - // The fully qualified name of the service client, which is the short_name - // qualified by the namespace/package/type name this client is declared in. - // This will be unique within the client libray. - string full_name = 2; -} - -// A client library. -// Will contain language specific information. -message ClientLibrary { - // The name of the client library. This value will be language dependent - // and may or may not include the library version. - // Usually this will be the name used to identify the library on per-language - // package managers. - // Examples: "Google.Cloud.Translate.V3", - // "cloud.google.com/go/translate/apiv3". - string name = 1; - - // The full version of the client library. May also be language dependent. - // Cannot be updated on metadata generation, but on library release. - // Examples: "4.3.0", "2.5.2-beta01" - string version = 2; - - // The programming language name the library is written in. - // Note that this does not contain information about the library supported - // platforms or language versions, etc. This is just a quick way to identify - // the generally supported langauge. - LanguageName language = 3; - - // The API this client library is for. - Api api = 4; -} - -message Method { - // The short name of the method, which is the name used to - // declare it within the proto file. This is unique within the service, - // but may not be unique within the API. - string short_name = 1; - - // The full name of the method, which is the short name qualified - // by the full name of the service in which it is declared. - // This is globally unique. - string full_name = 2; - - // The service this method is declared in. - Service service = 3; -} - -// A service defined in the API the client library referenced in Index is for. -message Service { - // The short name of the service, which is the name used to - // declare it within the proto file. This is usually, but not - // absolutely necessarily, unique within an API. - // Example: "TranslationService" - string short_name = 1; - - // The full name of the service, which is the short name qualified - // by the package of the proto in which it is declared. - // This is globally unique. - // Example: "google.cloud.translate.v3.TranslationService" - string full_name = 2; -} - -// An API -message Api { - // The ID of the API, identical to the protobuf package - // ending with a version number. - // Example: "google.cloud.translate.v3" - string id = 1; - - // The full version inferred from the end of the ID. - // Examples: "v3", "v2beta1", "v1beta" - string version = 2; -} - -// A programming language -enum LanguageName { - // The language has not been specified. Consumers should not see this value. - LANGUAGE_UNSPECIFIED = 0; - - CPP = 1; - - C_SHARP = 2; - - DART = 3; - - F_SHARP = 4; - - GO = 5; - - JAVA = 6; - - NODE_JS = 7; - - PHP = 8; - - PYTHON = 9; - - RUBY = 10; - - SWIFT = 11; - - VB_NET = 12; -} \ No newline at end of file From b50dd72b012eab33ed5cb54d8ef71d78b2d81e88 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Mon, 10 Jan 2022 17:18:44 +0000 Subject: [PATCH 03/18] chore: fix generator.py --- gapic/generator/generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gapic/generator/generator.py b/gapic/generator/generator.py index 48c66d926c..b79720dddf 100644 --- a/gapic/generator/generator.py +++ b/gapic/generator/generator.py @@ -353,7 +353,7 @@ def _get_file( return {fn: cgr_file} def _get_filename( - self, template_name: str, *, api_schema: api.API, context, + self, template_name: str, *, api_schema: api.API, context:dict = None, ) -> str: """Return the appropriate output filename for this template. From 7465546920341c495326f6f7bb14c8fdde2c1a37 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Tue, 11 Jan 2022 20:57:49 +0000 Subject: [PATCH 04/18] test: fix generator tests, format --- gapic/generator/generator.py | 13 +- tests/unit/generator/test_generator.py | 230 +++++++++++++++------ tests/unit/samplegen/test_integration.py | 25 +-- tests/unit/samplegen/test_snippet_index.py | 1 + 4 files changed, 184 insertions(+), 85 deletions(-) diff --git a/gapic/generator/generator.py b/gapic/generator/generator.py index b79720dddf..9499e3674f 100644 --- a/gapic/generator/generator.py +++ b/gapic/generator/generator.py @@ -95,10 +95,13 @@ def get_response( self._env.loader.list_templates(), # type: ignore ) + # We generate code snippets *before* the library code so snippets + # can be inserted into method docstrings. snippet_idx = snippet_index.SnippetIndex(api_schema) if sample_templates: sample_output, snippet_idx = self._generate_samples_and_manifest( - api_schema, self._env.get_template(sample_templates[0]), + api_schema, snippet_idx, self._env.get_template( + sample_templates[0]), opts=opts, ) output_files.update(sample_output) @@ -127,7 +130,7 @@ def get_response( return res def _generate_samples_and_manifest( - self, api_schema: api.API, sample_template: jinja2.Template, *, opts: Options) -> Tuple[Dict, Any]: + self, api_schema: api.API, index: snippet_index.SnippetIndex, sample_template: jinja2.Template, *, opts: Options) -> Tuple[Dict, Any]: """Generate samples and samplegen manifest for the API. Arguments: @@ -138,8 +141,6 @@ def _generate_samples_and_manifest( Returns: Dict[str, CodeGeneratorResponse.File]: A dict mapping filepath to rendered file. """ - index = snippet_index.SnippetIndex(api_schema=api_schema) - # The two-layer data structure lets us do two things: # * detect duplicate samples, which is an error # * detect distinct samples with the same ID, which are disambiguated @@ -311,7 +312,7 @@ def _render_template( # This file is not iterating over anything else; return back # the one applicable file. answer.update(self._get_file( - template_name, api_schema=api_schema, opts=opts,snippet_index=snippet_index)) + template_name, api_schema=api_schema, opts=opts, snippet_index=snippet_index)) return answer def _is_desired_transport(self, template_name: str, opts: Options) -> bool: @@ -353,7 +354,7 @@ def _get_file( return {fn: cgr_file} def _get_filename( - self, template_name: str, *, api_schema: api.API, context:dict = None, + self, template_name: str, *, api_schema: api.API, context: dict = None, ) -> str: """Return the appropriate output filename for this template. diff --git a/tests/unit/generator/test_generator.py b/tests/unit/generator/test_generator.py index e599582743..7d1e79d942 100644 --- a/tests/unit/generator/test_generator.py +++ b/tests/unit/generator/test_generator.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import json from textwrap import dedent from typing import Mapping from unittest import mock @@ -34,9 +35,14 @@ from gapic.utils import Options -dummy_snippet_metadata = snippet_metadata_pb2.Snippet() -dummy_snippet_metadata.client_method.method.service.short_name = "Mollusc" -dummy_snippet_metadata.client_method.method.full_name = "GetSquidStreaming" +def mock_generate_sample(*args, **kwargs): + dummy_snippet_metadata = snippet_metadata_pb2.Snippet() + dummy_snippet_metadata.client_method.method.service.short_name = args[0]["service"].split( + ".")[-1] + dummy_snippet_metadata.client_method.method.full_name = args[0]['rpc'] + + return "", dummy_snippet_metadata + def test_custom_template_directory(): # Create a generator. @@ -408,13 +414,9 @@ def test_parse_sample_paths(fs): with pytest.raises(types.InvalidConfig): Options.build("samples=sampledir/,") -@mock.patch( - "gapic.samplegen.samplegen.generate_sample", return_value=("", dummy_snippet_metadata), -) + @mock.patch("time.gmtime",) -def test_samplegen_config_to_output_files( - mock_gmtime, mock_generate_sample, fs, -): +def test_samplegen_config_to_output_files(mock_gmtime, fs): # These time values are nothing special, # they just need to be deterministic. returner = mock.MagicMock() @@ -437,10 +439,10 @@ def test_samplegen_config_to_output_files( - id: squid_sample region_tag: humboldt_tag service: Mollusc.v1.Mollusc - rpc: get_squid_streaming + rpc: GetSquidStreaming - region_tag: clam_sample service: Mollusc.v1.Mollusc - rpc: get_clam + rpc: GetClam """ ), ) @@ -453,41 +455,80 @@ def test_samplegen_config_to_output_files( services={"Mollusc": DummyService( name="Mollusc", methods={ - # For this test the generator only cares about the dictionary keys - # so we let the values be None - "GetSquidStreaming": None, - "GetClam": None, + # For this test the generator only cares about the dictionary keys + "GetSquidStreaming": DummyMethod(), + "GetClam": DummyMethod(), }, )}, - naming=DummyNaming(warehouse_package_name="mollusc-cephalopod-teuthida-", + naming=DummyNaming(name="mollusc", version="v1", warehouse_package_name="mollusc-cephalopod-teuthida-", versioned_module_name="teuthida_v1", module_namespace="mollusc.cephalopod"), ) - actual_response = g.get_response( - api_schema, opts=Options.build("")) - expected_response = CodeGeneratorResponse( - file=[ - CodeGeneratorResponse.File( - name="samples/generated_samples/squid_sample.py", content="\n",), - CodeGeneratorResponse.File( - name="samples/generated_samples/clam_sample.py", content="\n",), - CodeGeneratorResponse.File( - name="samples/generated_samples/snippet_metadata_v1_false_false.json", - content="{\"snippets\": [{\"file\": \"samples/generated_samples/squid_sample.py\", \"clientMethod\": {\"method\": {\"fullName\": \"GetSquidStreaming\", \"service\": {\"shortName\": \"Mollusc\"}}}, \"segments\": [{\"type\": \"FULL\"}, {\"type\": \"SHORT\"}, {\"type\": \"CLIENT_INITIALIZATION\"}, {\"type\": \"REQUEST_INITIALIZATION\"}, {\"type\": \"REQUEST_EXECUTION\"}, {\"type\": \"RESPONSE_HANDLING\"}]}, {\"file\": \"samples/generated_samples/clam_sample.py\", \"clientMethod\": {\"method\": {\"fullName\": \"GetSquidStreaming\", \"service\": {\"shortName\": \"Mollusc\"}}}, \"segments\": [{\"type\": \"FULL\"}, {\"type\": \"SHORT\"}, {\"type\": \"CLIENT_INITIALIZATION\"}, {\"type\": \"REQUEST_INITIALIZATION\"}, {\"type\": \"REQUEST_EXECUTION\"}, {\"type\": \"RESPONSE_HANDLING\"}, {\"type\": \"FULL\"}, {\"type\": \"SHORT\"}, {\"type\": \"CLIENT_INITIALIZATION\"}, {\"type\": \"REQUEST_INITIALIZATION\"}, {\"type\": \"REQUEST_EXECUTION\"}, {\"type\": \"RESPONSE_HANDLING\"}]}]}\n"), - ] - ) - expected_response.supported_features |= ( - CodeGeneratorResponse.Feature.FEATURE_PROTO3_OPTIONAL - ) + with mock.patch("gapic.samplegen.samplegen.generate_sample", side_effect=mock_generate_sample): + actual_response = g.get_response( + api_schema, opts=Options.build("")) + + expected_snippet_index_json = { + "snippets": [ + { + "clientMethod": { + "method": { + "fullName": "GetSquidStreaming", + "service": { + "shortName": "Mollusc" + } + } + }, + "file": "samples/generated_samples/squid_sample.py", + "segments": [ + {"type": "FULL"}, + {"type": "SHORT"}, + {"type": "CLIENT_INITIALIZATION"}, + {"type": "REQUEST_INITIALIZATION"}, + {"type": "REQUEST_EXECUTION"}, + {"type": "RESPONSE_HANDLING"} + ] + }, + { + "clientMethod": { + "method": { + "fullName": "GetClam", + "service": { + "shortName": "Mollusc" + } + } + }, + "file": "samples/generated_samples/clam_sample.py", + "segments": [ + {"type": "FULL"}, + {"type": "SHORT"}, + {"type": "CLIENT_INITIALIZATION"}, + {"type": "REQUEST_INITIALIZATION"}, + {"type": "REQUEST_EXECUTION"}, + {"type": "RESPONSE_HANDLING"} + ] + } + ] + } + + assert actual_response.supported_features == CodeGeneratorResponse.Feature.FEATURE_PROTO3_OPTIONAL + + assert len(actual_response.file) == 3 + assert actual_response.file[0] == CodeGeneratorResponse.File( + name="samples/generated_samples/squid_sample.py", content="\n",) + assert actual_response.file[1] == CodeGeneratorResponse.File( + name="samples/generated_samples/clam_sample.py", content="\n",) - assert actual_response == expected_response + assert actual_response.file[2].name == "samples/generated_samples/snippet_metadata_v1_mollusc_v1.json" + assert json.loads( + actual_response.file[2].content) == expected_snippet_index_json @mock.patch( "gapic.samplegen.samplegen.generate_sample_specs", return_value=[] ) @mock.patch( - "gapic.samplegen.samplegen.generate_sample", return_value="", + "gapic.samplegen.samplegen.generate_sample", return_value=("", snippet_metadata_pb2.Snippet()), ) def test_generate_autogen_samples(mock_generate_sample, mock_generate_specs): opts = Options.build("autogen-snippets") @@ -508,11 +549,8 @@ def test_generate_autogen_samples(mock_generate_sample, mock_generate_specs): ) -@mock.patch( - "gapic.samplegen.samplegen.generate_sample", return_value=("", dummy_snippet_metadata), -) @mock.patch("time.gmtime",) -def test_samplegen_id_disambiguation(mock_gmtime, mock_generate_sample, fs): +def test_samplegen_id_disambiguation(mock_gmtime, fs): # These time values are nothing special, # they just need to be deterministic. returner = mock.MagicMock() @@ -538,12 +576,15 @@ def test_samplegen_id_disambiguation(mock_gmtime, mock_generate_sample, fs): samples: - id: squid_sample region_tag: humboldt_tag - rpc: get_squid_streaming + rpc: GetSquidStreaming + service: Mollusc.v1.Mollusc # Note that this region tag collides with the id of the previous sample. - region_tag: squid_sample - rpc: get_squid_streaming + rpc: GetSquidStreaming + service: Mollusc.v1.Mollusc # No id or region tag. - - rpc: get_squid_streaming + - rpc: GetSquidStreaming + service: Mollusc.v1.Mollusc """ ), ) @@ -555,39 +596,94 @@ def test_samplegen_id_disambiguation(mock_gmtime, mock_generate_sample, fs): services={"Mollusc": DummyService( name="Mollusc", methods={ - # For this test the generator only cares about the dictionary keys - # so we let the values be None - "GetSquidStreaming": None, - "GetClam": None, + # The generator only cares about the dictionary keys + "GetSquidStreaming": DummyMethod(), + "GetClam": DummyMethod(), }, )}, - naming=DummyNaming(warehouse_package_name="mollusc-cephalopod-teuthida-", + naming=DummyNaming(name="mollusc", version="v1", warehouse_package_name="mollusc-cephalopod-teuthida-", versioned_module_name="teuthida_v1", module_namespace="mollusc.cephalopod"), ) - actual_response = g.get_response(api_schema, + with mock.patch("gapic.samplegen.samplegen.generate_sample", side_effect=mock_generate_sample): + actual_response = g.get_response(api_schema, opts=Options.build("")) - expected_response = CodeGeneratorResponse( - file=[ - CodeGeneratorResponse.File( - name="samples/generated_samples/squid_sample_91a465c6.py", content="\n", - ), - CodeGeneratorResponse.File( - name="samples/generated_samples/squid_sample_55051b38.py", content="\n", - ), - CodeGeneratorResponse.File(name="samples/generated_samples/157884ee.py", - content="\n",), - - CodeGeneratorResponse.File( - name="samples/generated_samples/snippet_metadata_v1_false_false.json", - content="{\"snippets\": [{\"file\": \"samples/generated_samples/squid_sample_91a465c6.py\", \"clientMethod\": {\"method\": {\"fullName\": \"GetSquidStreaming\", \"service\": {\"shortName\": \"Mollusc\"}}}, \"segments\": [{\"type\": \"FULL\"}, {\"type\": \"SHORT\"}, {\"type\": \"CLIENT_INITIALIZATION\"}, {\"type\": \"REQUEST_INITIALIZATION\"}, {\"type\": \"REQUEST_EXECUTION\"}, {\"type\": \"RESPONSE_HANDLING\"}]}, {\"file\": \"samples/generated_samples/squid_sample_55051b38.py\", \"clientMethod\": {\"method\": {\"fullName\": \"GetSquidStreaming\", \"service\": {\"shortName\": \"Mollusc\"}}}, \"segments\": [{\"type\": \"FULL\"}, {\"type\": \"SHORT\"}, {\"type\": \"CLIENT_INITIALIZATION\"}, {\"type\": \"REQUEST_INITIALIZATION\"}, {\"type\": \"REQUEST_EXECUTION\"}, {\"type\": \"RESPONSE_HANDLING\"}, {\"type\": \"FULL\"}, {\"type\": \"SHORT\"}, {\"type\": \"CLIENT_INITIALIZATION\"}, {\"type\": \"REQUEST_INITIALIZATION\"}, {\"type\": \"REQUEST_EXECUTION\"}, {\"type\": \"RESPONSE_HANDLING\"}]}, {\"file\": \"samples/generated_samples/157884ee.py\", \"clientMethod\": {\"method\": {\"fullName\": \"GetSquidStreaming\", \"service\": {\"shortName\": \"Mollusc\"}}}, \"segments\": [{\"type\": \"FULL\"}, {\"type\": \"SHORT\"}, {\"type\": \"CLIENT_INITIALIZATION\"}, {\"type\": \"REQUEST_INITIALIZATION\"}, {\"type\": \"REQUEST_EXECUTION\"}, {\"type\": \"RESPONSE_HANDLING\"}, {\"type\": \"FULL\"}, {\"type\": \"SHORT\"}, {\"type\": \"CLIENT_INITIALIZATION\"}, {\"type\": \"REQUEST_INITIALIZATION\"}, {\"type\": \"REQUEST_EXECUTION\"}, {\"type\": \"RESPONSE_HANDLING\"}, {\"type\": \"FULL\"}, {\"type\": \"SHORT\"}, {\"type\": \"CLIENT_INITIALIZATION\"}, {\"type\": \"REQUEST_INITIALIZATION\"}, {\"type\": \"REQUEST_EXECUTION\"}, {\"type\": \"RESPONSE_HANDLING\"}]}]}\n", - ), - ] + + expected_snippet_metadata_json = { + "snippets": [ + { + "clientMethod": { + "method": { + "fullName": "GetSquidStreaming", + "service": { + "shortName": "Mollusc" + } + } + }, + "file": "samples/generated_samples/squid_sample_1cfd0b3d.py", + "segments": [ + {"type": "FULL"}, + {"type": "SHORT"}, + {"type": "CLIENT_INITIALIZATION"}, + {"type": "REQUEST_INITIALIZATION"}, + {"type": "REQUEST_EXECUTION"}, + {"type": "RESPONSE_HANDLING"} + ] + }, + { + "clientMethod": { + "method": { + "fullName": "GetSquidStreaming", + "service": { + "shortName": "Mollusc" + } + } + }, + "file": "samples/generated_samples/squid_sample_cf4d4fa4.py", + "segments": [ + {"type": "FULL"}, + {"type": "SHORT"}, + {"type": "CLIENT_INITIALIZATION"}, + {"type": "REQUEST_INITIALIZATION"}, + {"type": "REQUEST_EXECUTION"}, + {"type": "RESPONSE_HANDLING"} + ] + }, + { + "clientMethod": { + "method": { + "fullName": "GetSquidStreaming", + "service": { + "shortName": "Mollusc" + } + } + }, + "file": "samples/generated_samples/7384949e.py", + "segments": [ + {"type": "FULL"}, + {"type": "SHORT"}, + {"type": "CLIENT_INITIALIZATION"}, + {"type": "REQUEST_INITIALIZATION"}, + {"type": "REQUEST_EXECUTION"}, + {"type": "RESPONSE_HANDLING"} + ] + } + ] + } + + assert actual_response.supported_features == CodeGeneratorResponse.Feature.FEATURE_PROTO3_OPTIONAL + assert len(actual_response.file) == 4 + assert actual_response.file[0] == CodeGeneratorResponse.File( + name="samples/generated_samples/squid_sample_1cfd0b3d.py", content="\n", ) - expected_response.supported_features |= ( - CodeGeneratorResponse.Feature.FEATURE_PROTO3_OPTIONAL + assert actual_response.file[1] == CodeGeneratorResponse.File( + name="samples/generated_samples/squid_sample_cf4d4fa4.py", content="\n", ) - - assert actual_response == expected_response + assert actual_response.file[2] == CodeGeneratorResponse.File( + name="samples/generated_samples/7384949e.py", content="\n", + ) + assert actual_response.file[3].name == "samples/generated_samples/snippet_metadata_v1_mollusc_v1.json" + assert json.loads( + actual_response.file[3].content) == expected_snippet_metadata_json def test_generator_duplicate_samples(fs): diff --git a/tests/unit/samplegen/test_integration.py b/tests/unit/samplegen/test_integration.py index 937e103bb5..503e28b0fd 100644 --- a/tests/unit/samplegen/test_integration.py +++ b/tests/unit/samplegen/test_integration.py @@ -132,10 +132,10 @@ def test_generate_sample_basic(): assert sample_str == golden_snippet("sample_basic.py") assert json_format.MessageToDict(metadata) == { 'regionTag': 'molluscs_generated_molluscs_v1_Mollusc_Classify_sync', - 'clientMethod': + 'clientMethod': {'method': { - 'fullName': 'Classify', - 'service': {'shortName': 'Mollusc'} + 'fullName': 'Classify', + 'service': {'shortName': 'Mollusc'} }} } @@ -216,14 +216,14 @@ def test_generate_sample_basic_async(): assert sample_str == golden_snippet("sample_basic_async.py") assert json_format.MessageToDict(metadata) == { - 'regionTag': 'molluscs_generated_molluscs_v1_Mollusc_Classify_async', - 'clientMethod': + 'regionTag': 'molluscs_generated_molluscs_v1_Mollusc_Classify_async', + 'clientMethod': { 'async': True, 'method': { 'fullName': 'Classify', 'service': {'shortName': 'Mollusc'} - }} + }} } @@ -297,13 +297,13 @@ def test_generate_sample_basic_unflattenable(): assert sample_str == golden_snippet("sample_basic_unflattenable.py") assert json_format.MessageToDict(metadata) == { - 'regionTag': 'molluscs_generated_molluscs_v1_Mollusc_Classify_sync', - 'clientMethod': + 'regionTag': 'molluscs_generated_molluscs_v1_Mollusc_Classify_sync', + 'clientMethod': { 'method': { 'fullName': 'Classify', 'service': {'shortName': 'Mollusc'} - }} + }} } @@ -375,15 +375,16 @@ def test_generate_sample_void_method(): assert sample_str == golden_snippet("sample_basic_void_method.py") assert json_format.MessageToDict(metadata) == { - 'regionTag': 'molluscs_generated_molluscs_v1_Mollusc_Classify_sync', - 'clientMethod': + 'regionTag': 'molluscs_generated_molluscs_v1_Mollusc_Classify_sync', + 'clientMethod': { 'method': { 'fullName': 'Classify', 'service': {'shortName': 'Mollusc'} - }} + }} } + def test_generate_sample_service_not_found(): schema = DummyApiSchema({}, DummyNaming("pkg_name")) sample = {"service": "Mollusc"} diff --git a/tests/unit/samplegen/test_snippet_index.py b/tests/unit/samplegen/test_snippet_index.py index 677245625e..83606895e8 100644 --- a/tests/unit/samplegen/test_snippet_index.py +++ b/tests/unit/samplegen/test_snippet_index.py @@ -125,6 +125,7 @@ def test_add_snippet_no_matching_service(sample_str): with pytest.raises(types.UnknownService): index.add_snippet(snippet) + def test_add_snippet_no_matching_rpc(sample_str): snippet_metadata = snippet_metadata_pb2.Snippet( ) From 8e07b88bc1433dfc26928005ab04255866fe02d7 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Tue, 11 Jan 2022 21:11:43 +0000 Subject: [PATCH 05/18] fix: adjust type annotation for _generate_samples_and_manifest --- gapic/generator/generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gapic/generator/generator.py b/gapic/generator/generator.py index 9499e3674f..0d9626bfbf 100644 --- a/gapic/generator/generator.py +++ b/gapic/generator/generator.py @@ -130,7 +130,7 @@ def get_response( return res def _generate_samples_and_manifest( - self, api_schema: api.API, index: snippet_index.SnippetIndex, sample_template: jinja2.Template, *, opts: Options) -> Tuple[Dict, Any]: + self, api_schema: api.API, index: snippet_index.SnippetIndex, sample_template: jinja2.Template, *, opts: Options) -> Tuple[Dict, snippet_index.SnippetIndex]: """Generate samples and samplegen manifest for the API. Arguments: @@ -139,7 +139,7 @@ def _generate_samples_and_manifest( opts (Options): Additional generator options. Returns: - Dict[str, CodeGeneratorResponse.File]: A dict mapping filepath to rendered file. + Tuple[Dict[str, CodeGeneratorResponse.File], snippet_index.SnippetIndex] : A dict mapping filepath to rendered file. """ # The two-layer data structure lets us do two things: # * detect duplicate samples, which is an error From e176b02025cd368455ed1b10489354b31d596a2c Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Tue, 11 Jan 2022 21:36:00 +0000 Subject: [PATCH 06/18] chore: update goldens --- .../services/asset_service/async_client.py | 253 ++ .../asset_v1/services/asset_service/client.py | 253 ++ ..._asset_service_analyze_iam_policy_async.py | 2 - ...ce_analyze_iam_policy_longrunning_async.py | 2 - ...ice_analyze_iam_policy_longrunning_sync.py | 2 - ...1_asset_service_analyze_iam_policy_sync.py | 2 - ..._service_batch_get_assets_history_async.py | 2 - ...t_service_batch_get_assets_history_sync.py | 2 - ...sset_v1_asset_service_create_feed_async.py | 2 - ...asset_v1_asset_service_create_feed_sync.py | 2 - ...sset_v1_asset_service_delete_feed_async.py | 2 - ...asset_v1_asset_service_delete_feed_sync.py | 2 - ...et_v1_asset_service_export_assets_async.py | 2 - ...set_v1_asset_service_export_assets_sync.py | 2 - ...d_asset_v1_asset_service_get_feed_async.py | 2 - ...ed_asset_v1_asset_service_get_feed_sync.py | 2 - ...sset_v1_asset_service_list_assets_async.py | 2 - ...asset_v1_asset_service_list_assets_sync.py | 2 - ...asset_v1_asset_service_list_feeds_async.py | 2 - ..._asset_v1_asset_service_list_feeds_sync.py | 2 - ...t_service_search_all_iam_policies_async.py | 2 - ...et_service_search_all_iam_policies_sync.py | 2 - ...sset_service_search_all_resources_async.py | 2 - ...asset_service_search_all_resources_sync.py | 2 - ...sset_v1_asset_service_update_feed_async.py | 2 - ...asset_v1_asset_service_update_feed_sync.py | 2 - .../snippet_metadata_v1_asset_v1.json | 1048 ++++++ .../services/iam_credentials/async_client.py | 96 + .../services/iam_credentials/client.py | 96 + ...credentials_generate_access_token_async.py | 2 - ..._credentials_generate_access_token_sync.py | 2 - ...iam_credentials_generate_id_token_async.py | 2 - ..._iam_credentials_generate_id_token_sync.py | 2 - ...ials_v1_iam_credentials_sign_blob_async.py | 2 - ...tials_v1_iam_credentials_sign_blob_sync.py | 2 - ...tials_v1_iam_credentials_sign_jwt_async.py | 2 - ...ntials_v1_iam_credentials_sign_jwt_sync.py | 2 - .../snippet_metadata_v1_credentials_v1.json | 360 ++ .../config_service_v2/async_client.py | 515 +++ .../services/config_service_v2/client.py | 515 +++ .../logging_service_v2/async_client.py | 130 + .../services/logging_service_v2/client.py | 130 + .../metrics_service_v2/async_client.py | 115 + .../services/metrics_service_v2/client.py | 115 + ...2_config_service_v2_create_bucket_async.py | 2 - ...v2_config_service_v2_create_bucket_sync.py | 2 - ...onfig_service_v2_create_exclusion_async.py | 2 - ...config_service_v2_create_exclusion_sync.py | 2 - ..._v2_config_service_v2_create_sink_async.py | 2 - ...g_v2_config_service_v2_create_sink_sync.py | 2 - ..._v2_config_service_v2_create_view_async.py | 2 - ...g_v2_config_service_v2_create_view_sync.py | 2 - ...2_config_service_v2_delete_bucket_async.py | 2 - ...v2_config_service_v2_delete_bucket_sync.py | 2 - ...onfig_service_v2_delete_exclusion_async.py | 2 - ...config_service_v2_delete_exclusion_sync.py | 2 - ..._v2_config_service_v2_delete_sink_async.py | 2 - ...g_v2_config_service_v2_delete_sink_sync.py | 2 - ..._v2_config_service_v2_delete_view_async.py | 2 - ...g_v2_config_service_v2_delete_view_sync.py | 2 - ...g_v2_config_service_v2_get_bucket_async.py | 2 - ...ng_v2_config_service_v2_get_bucket_sync.py | 2 - ...nfig_service_v2_get_cmek_settings_async.py | 2 - ...onfig_service_v2_get_cmek_settings_sync.py | 2 - ...2_config_service_v2_get_exclusion_async.py | 2 - ...v2_config_service_v2_get_exclusion_sync.py | 2 - ...ing_v2_config_service_v2_get_sink_async.py | 2 - ...ging_v2_config_service_v2_get_sink_sync.py | 2 - ...ing_v2_config_service_v2_get_view_async.py | 2 - ...ging_v2_config_service_v2_get_view_sync.py | 2 - ...v2_config_service_v2_list_buckets_async.py | 2 - ..._v2_config_service_v2_list_buckets_sync.py | 2 - ...config_service_v2_list_exclusions_async.py | 2 - ..._config_service_v2_list_exclusions_sync.py | 2 - ...g_v2_config_service_v2_list_sinks_async.py | 2 - ...ng_v2_config_service_v2_list_sinks_sync.py | 2 - ...g_v2_config_service_v2_list_views_async.py | 2 - ...ng_v2_config_service_v2_list_views_sync.py | 2 - ...config_service_v2_undelete_bucket_async.py | 2 - ..._config_service_v2_undelete_bucket_sync.py | 2 - ...2_config_service_v2_update_bucket_async.py | 2 - ...v2_config_service_v2_update_bucket_sync.py | 2 - ...g_service_v2_update_cmek_settings_async.py | 2 - ...ig_service_v2_update_cmek_settings_sync.py | 2 - ...onfig_service_v2_update_exclusion_async.py | 2 - ...config_service_v2_update_exclusion_sync.py | 2 - ..._v2_config_service_v2_update_sink_async.py | 2 - ...g_v2_config_service_v2_update_sink_sync.py | 2 - ..._v2_config_service_v2_update_view_async.py | 2 - ...g_v2_config_service_v2_update_view_sync.py | 2 - ..._v2_logging_service_v2_delete_log_async.py | 2 - ...g_v2_logging_service_v2_delete_log_sync.py | 2 - ...gging_service_v2_list_log_entries_async.py | 2 - ...ogging_service_v2_list_log_entries_sync.py | 2 - ...g_v2_logging_service_v2_list_logs_async.py | 2 - ...ng_v2_logging_service_v2_list_logs_sync.py | 2 - ...st_monitored_resource_descriptors_async.py | 2 - ...ist_monitored_resource_descriptors_sync.py | 2 - ...gging_service_v2_tail_log_entries_async.py | 2 - ...ogging_service_v2_tail_log_entries_sync.py | 2 - ...ging_service_v2_write_log_entries_async.py | 2 - ...gging_service_v2_write_log_entries_sync.py | 2 - ...rics_service_v2_create_log_metric_async.py | 2 - ...trics_service_v2_create_log_metric_sync.py | 2 - ...rics_service_v2_delete_log_metric_async.py | 2 - ...trics_service_v2_delete_log_metric_sync.py | 2 - ...metrics_service_v2_get_log_metric_async.py | 2 - ..._metrics_service_v2_get_log_metric_sync.py | 2 - ...trics_service_v2_list_log_metrics_async.py | 2 - ...etrics_service_v2_list_log_metrics_sync.py | 2 - ...rics_service_v2_update_log_metric_async.py | 2 - ...trics_service_v2_update_log_metric_sync.py | 2 - .../snippet_metadata_v1_logging_v2.json | 2966 +++++++++++++++++ .../services/cloud_redis/async_client.py | 232 ++ .../redis_v1/services/cloud_redis/client.py | 232 ++ ...is_v1_cloud_redis_create_instance_async.py | 2 - ...dis_v1_cloud_redis_create_instance_sync.py | 2 - ...is_v1_cloud_redis_delete_instance_async.py | 2 - ...dis_v1_cloud_redis_delete_instance_sync.py | 2 - ...is_v1_cloud_redis_export_instance_async.py | 2 - ...dis_v1_cloud_redis_export_instance_sync.py | 2 - ..._v1_cloud_redis_failover_instance_async.py | 2 - ...s_v1_cloud_redis_failover_instance_sync.py | 2 - ...redis_v1_cloud_redis_get_instance_async.py | 2 - ..._redis_v1_cloud_redis_get_instance_sync.py | 2 - ...is_v1_cloud_redis_import_instance_async.py | 2 - ...dis_v1_cloud_redis_import_instance_sync.py | 2 - ...dis_v1_cloud_redis_list_instances_async.py | 2 - ...edis_v1_cloud_redis_list_instances_sync.py | 2 - ...is_v1_cloud_redis_update_instance_async.py | 2 - ...dis_v1_cloud_redis_update_instance_sync.py | 2 - ...s_v1_cloud_redis_upgrade_instance_async.py | 2 - ...is_v1_cloud_redis_upgrade_instance_sync.py | 2 - .../snippet_metadata_v1_redis_v1.json | 773 +++++ 134 files changed, 7829 insertions(+), 236 deletions(-) create mode 100644 tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json create mode 100644 tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json create mode 100644 tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json create mode 100644 tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py index e4c02ed392..1db101c09f 100644 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py @@ -210,6 +210,31 @@ async def export_assets(self, the export operation result. For regular-size resource parent, the export operation usually finishes within 5 minutes. + + .. code-block:: + from google.cloud import asset_v1 + + def sample_export_assets(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + output_config = asset_v1.OutputConfig() + output_config.gcs_destination.uri = "uri_value" + + request = asset_v1.ExportAssetsRequest( + parent="parent_value", + output_config=output_config, + ) + + # Make the request + operation = client.export_assets(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + Args: request (Union[google.cloud.asset_v1.types.ExportAssetsRequest, dict]): The request object. Export asset request. @@ -279,6 +304,24 @@ async def list_assets(self, r"""Lists assets with time and resource types and returns paged results in response. + + .. code-block:: + from google.cloud import asset_v1 + + def sample_list_assets(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.ListAssetsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_assets(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.asset_v1.types.ListAssetsRequest, dict]): The request object. ListAssets request. @@ -372,6 +415,25 @@ async def batch_get_assets_history(self, specified asset does not exist, this API returns an INVALID_ARGUMENT error. + + .. code-block:: + from google.cloud import asset_v1 + + def sample_batch_get_assets_history(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.BatchGetAssetsHistoryRequest( + parent="parent_value", + ) + + # Make the request + response = client.batch_get_assets_history(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.asset_v1.types.BatchGetAssetsHistoryRequest, dict]): The request object. Batch get assets history request. @@ -434,6 +496,30 @@ async def create_feed(self, project/folder/organization to listen to its asset updates. + + .. code-block:: + from google.cloud import asset_v1 + + def sample_create_feed(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + feed = asset_v1.Feed() + feed.name = "name_value" + + request = asset_v1.CreateFeedRequest( + parent="parent_value", + feed_id="feed_id_value", + feed=feed, + ) + + # Make the request + response = client.create_feed(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.asset_v1.types.CreateFeedRequest, dict]): The request object. Create asset feed request. @@ -520,6 +606,28 @@ async def get_feed(self, ) -> asset_service.Feed: r"""Gets details about an asset feed. + .. code-block:: + from google.cloud import asset_v1 + + def sample_get_feed(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + project = "my-project-id" + feed = "feed_value" + name = f"projects/{project}/feeds/{feed}" + + request = asset_v1.GetFeedRequest( + name=name, + ) + + # Make the request + response = client.get_feed(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.asset_v1.types.GetFeedRequest, dict]): The request object. Get asset feed request. @@ -609,6 +717,25 @@ async def list_feeds(self, r"""Lists all asset feeds in a parent project/folder/organization. + + .. code-block:: + from google.cloud import asset_v1 + + def sample_list_feeds(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.ListFeedsRequest( + parent="parent_value", + ) + + # Make the request + response = client.list_feeds(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.asset_v1.types.ListFeedsRequest, dict]): The request object. List asset feeds request. @@ -692,6 +819,27 @@ async def update_feed(self, ) -> asset_service.Feed: r"""Updates an asset feed configuration. + .. code-block:: + from google.cloud import asset_v1 + + def sample_update_feed(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + feed = asset_v1.Feed() + feed.name = "name_value" + + request = asset_v1.UpdateFeedRequest( + feed=feed, + ) + + # Make the request + response = client.update_feed(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.asset_v1.types.UpdateFeedRequest, dict]): The request object. Update asset feed request. @@ -774,6 +922,25 @@ async def delete_feed(self, ) -> None: r"""Deletes an asset feed. + .. code-block:: + from google.cloud import asset_v1 + + def sample_delete_feed(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + project = "my-project-id" + feed = "feed_value" + name = f"projects/{project}/feeds/{feed}" + + request = asset_v1.DeleteFeedRequest( + name=name, + ) + + # Make the request + response = client.delete_feed(request=request) + Args: request (Union[google.cloud.asset_v1.types.DeleteFeedRequest, dict]): The request object. @@ -853,6 +1020,24 @@ async def search_all_resources(self, the ``cloudasset.assets.searchAllResources`` permission on the desired scope, otherwise the request will be rejected. + + .. code-block:: + from google.cloud import asset_v1 + + def sample_search_all_resources(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.SearchAllResourcesRequest( + scope="scope_value", + ) + + # Make the request + page_result = client.search_all_resources(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.asset_v1.types.SearchAllResourcesRequest, dict]): The request object. Search all resources request. @@ -1039,6 +1224,24 @@ async def search_all_iam_policies(self, ``cloudasset.assets.searchAllIamPolicies`` permission on the desired scope, otherwise the request will be rejected. + + .. code-block:: + from google.cloud import asset_v1 + + def sample_search_all_iam_policies(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.SearchAllIamPoliciesRequest( + scope="scope_value", + ) + + # Make the request + page_result = client.search_all_iam_policies(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.asset_v1.types.SearchAllIamPoliciesRequest, dict]): The request object. Search all IAM policies request. @@ -1201,6 +1404,28 @@ async def analyze_iam_policy(self, r"""Analyzes IAM policies to answer which identities have what accesses on which resources. + + .. code-block:: + from google.cloud import asset_v1 + + def sample_analyze_iam_policy(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + analysis_query = asset_v1.IamPolicyAnalysisQuery() + analysis_query.scope = "scope_value" + + request = asset_v1.AnalyzeIamPolicyRequest( + analysis_query=analysis_query, + ) + + # Make the request + response = client.analyze_iam_policy(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.asset_v1.types.AnalyzeIamPolicyRequest, dict]): The request object. A request message for @@ -1273,6 +1498,34 @@ async def analyze_iam_policy_longrunning(self, to poll the operation result. The metadata contains the request to help callers to map responses to requests. + + .. code-block:: + from google.cloud import asset_v1 + + def sample_analyze_iam_policy_longrunning(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + analysis_query = asset_v1.IamPolicyAnalysisQuery() + analysis_query.scope = "scope_value" + + output_config = asset_v1.IamPolicyAnalysisOutputConfig() + output_config.gcs_destination.uri = "uri_value" + + request = asset_v1.AnalyzeIamPolicyLongrunningRequest( + analysis_query=analysis_query, + output_config=output_config, + ) + + # Make the request + operation = client.analyze_iam_policy_longrunning(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + Args: request (Union[google.cloud.asset_v1.types.AnalyzeIamPolicyLongrunningRequest, dict]): The request object. A request message for diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py index 3d1da34da7..ae11560274 100644 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py @@ -397,6 +397,31 @@ def export_assets(self, the export operation result. For regular-size resource parent, the export operation usually finishes within 5 minutes. + + .. code-block:: + from google.cloud import asset_v1 + + def sample_export_assets(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + output_config = asset_v1.OutputConfig() + output_config.gcs_destination.uri = "uri_value" + + request = asset_v1.ExportAssetsRequest( + parent="parent_value", + output_config=output_config, + ) + + # Make the request + operation = client.export_assets(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + Args: request (Union[google.cloud.asset_v1.types.ExportAssetsRequest, dict]): The request object. Export asset request. @@ -467,6 +492,24 @@ def list_assets(self, r"""Lists assets with time and resource types and returns paged results in response. + + .. code-block:: + from google.cloud import asset_v1 + + def sample_list_assets(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.ListAssetsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_assets(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.asset_v1.types.ListAssetsRequest, dict]): The request object. ListAssets request. @@ -560,6 +603,25 @@ def batch_get_assets_history(self, specified asset does not exist, this API returns an INVALID_ARGUMENT error. + + .. code-block:: + from google.cloud import asset_v1 + + def sample_batch_get_assets_history(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.BatchGetAssetsHistoryRequest( + parent="parent_value", + ) + + # Make the request + response = client.batch_get_assets_history(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.asset_v1.types.BatchGetAssetsHistoryRequest, dict]): The request object. Batch get assets history request. @@ -616,6 +678,30 @@ def create_feed(self, project/folder/organization to listen to its asset updates. + + .. code-block:: + from google.cloud import asset_v1 + + def sample_create_feed(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + feed = asset_v1.Feed() + feed.name = "name_value" + + request = asset_v1.CreateFeedRequest( + parent="parent_value", + feed_id="feed_id_value", + feed=feed, + ) + + # Make the request + response = client.create_feed(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.asset_v1.types.CreateFeedRequest, dict]): The request object. Create asset feed request. @@ -702,6 +788,28 @@ def get_feed(self, ) -> asset_service.Feed: r"""Gets details about an asset feed. + .. code-block:: + from google.cloud import asset_v1 + + def sample_get_feed(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + project = "my-project-id" + feed = "feed_value" + name = f"projects/{project}/feeds/{feed}" + + request = asset_v1.GetFeedRequest( + name=name, + ) + + # Make the request + response = client.get_feed(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.asset_v1.types.GetFeedRequest, dict]): The request object. Get asset feed request. @@ -784,6 +892,25 @@ def list_feeds(self, r"""Lists all asset feeds in a parent project/folder/organization. + + .. code-block:: + from google.cloud import asset_v1 + + def sample_list_feeds(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.ListFeedsRequest( + parent="parent_value", + ) + + # Make the request + response = client.list_feeds(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.asset_v1.types.ListFeedsRequest, dict]): The request object. List asset feeds request. @@ -860,6 +987,27 @@ def update_feed(self, ) -> asset_service.Feed: r"""Updates an asset feed configuration. + .. code-block:: + from google.cloud import asset_v1 + + def sample_update_feed(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + feed = asset_v1.Feed() + feed.name = "name_value" + + request = asset_v1.UpdateFeedRequest( + feed=feed, + ) + + # Make the request + response = client.update_feed(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.asset_v1.types.UpdateFeedRequest, dict]): The request object. Update asset feed request. @@ -942,6 +1090,25 @@ def delete_feed(self, ) -> None: r"""Deletes an asset feed. + .. code-block:: + from google.cloud import asset_v1 + + def sample_delete_feed(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + project = "my-project-id" + feed = "feed_value" + name = f"projects/{project}/feeds/{feed}" + + request = asset_v1.DeleteFeedRequest( + name=name, + ) + + # Make the request + response = client.delete_feed(request=request) + Args: request (Union[google.cloud.asset_v1.types.DeleteFeedRequest, dict]): The request object. @@ -1014,6 +1181,24 @@ def search_all_resources(self, the ``cloudasset.assets.searchAllResources`` permission on the desired scope, otherwise the request will be rejected. + + .. code-block:: + from google.cloud import asset_v1 + + def sample_search_all_resources(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.SearchAllResourcesRequest( + scope="scope_value", + ) + + # Make the request + page_result = client.search_all_resources(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.asset_v1.types.SearchAllResourcesRequest, dict]): The request object. Search all resources request. @@ -1193,6 +1378,24 @@ def search_all_iam_policies(self, ``cloudasset.assets.searchAllIamPolicies`` permission on the desired scope, otherwise the request will be rejected. + + .. code-block:: + from google.cloud import asset_v1 + + def sample_search_all_iam_policies(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.SearchAllIamPoliciesRequest( + scope="scope_value", + ) + + # Make the request + page_result = client.search_all_iam_policies(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.asset_v1.types.SearchAllIamPoliciesRequest, dict]): The request object. Search all IAM policies request. @@ -1348,6 +1551,28 @@ def analyze_iam_policy(self, r"""Analyzes IAM policies to answer which identities have what accesses on which resources. + + .. code-block:: + from google.cloud import asset_v1 + + def sample_analyze_iam_policy(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + analysis_query = asset_v1.IamPolicyAnalysisQuery() + analysis_query.scope = "scope_value" + + request = asset_v1.AnalyzeIamPolicyRequest( + analysis_query=analysis_query, + ) + + # Make the request + response = client.analyze_iam_policy(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.asset_v1.types.AnalyzeIamPolicyRequest, dict]): The request object. A request message for @@ -1415,6 +1640,34 @@ def analyze_iam_policy_longrunning(self, to poll the operation result. The metadata contains the request to help callers to map responses to requests. + + .. code-block:: + from google.cloud import asset_v1 + + def sample_analyze_iam_policy_longrunning(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + analysis_query = asset_v1.IamPolicyAnalysisQuery() + analysis_query.scope = "scope_value" + + output_config = asset_v1.IamPolicyAnalysisOutputConfig() + output_config.gcs_destination.uri = "uri_value" + + request = asset_v1.AnalyzeIamPolicyLongrunningRequest( + analysis_query=analysis_query, + output_config=output_config, + ) + + # Make the request + operation = client.analyze_iam_policy_longrunning(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + Args: request (Union[google.cloud.asset_v1.types.AnalyzeIamPolicyLongrunningRequest, dict]): The request object. A request message for diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py index 8147347e66..1759b7e38c 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py @@ -28,8 +28,6 @@ async def sample_analyze_iam_policy(): - """Snippet for analyze_iam_policy""" - # Create a client client = asset_v1.AssetServiceAsyncClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py index 12e57510e8..51ef3ab86a 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py @@ -28,8 +28,6 @@ async def sample_analyze_iam_policy_longrunning(): - """Snippet for analyze_iam_policy_longrunning""" - # Create a client client = asset_v1.AssetServiceAsyncClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py index a4e998a182..eee8fb97ed 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py @@ -28,8 +28,6 @@ def sample_analyze_iam_policy_longrunning(): - """Snippet for analyze_iam_policy_longrunning""" - # Create a client client = asset_v1.AssetServiceClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py index 1a02995511..9dd1895509 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py @@ -28,8 +28,6 @@ def sample_analyze_iam_policy(): - """Snippet for analyze_iam_policy""" - # Create a client client = asset_v1.AssetServiceClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py index bdc83d37df..edae4c7f92 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py @@ -28,8 +28,6 @@ async def sample_batch_get_assets_history(): - """Snippet for batch_get_assets_history""" - # Create a client client = asset_v1.AssetServiceAsyncClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py index 5a4b1abbaa..5bf8c8de15 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py @@ -28,8 +28,6 @@ def sample_batch_get_assets_history(): - """Snippet for batch_get_assets_history""" - # Create a client client = asset_v1.AssetServiceClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py index d0b4a37a3a..a988dfe5d4 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py @@ -28,8 +28,6 @@ async def sample_create_feed(): - """Snippet for create_feed""" - # Create a client client = asset_v1.AssetServiceAsyncClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py index 9eb643290b..e330288229 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py @@ -28,8 +28,6 @@ def sample_create_feed(): - """Snippet for create_feed""" - # Create a client client = asset_v1.AssetServiceClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py index d4df7397d4..4439eee886 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py @@ -28,8 +28,6 @@ async def sample_delete_feed(): - """Snippet for delete_feed""" - # Create a client client = asset_v1.AssetServiceAsyncClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py index a49c063140..ac34a49c01 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py @@ -28,8 +28,6 @@ def sample_delete_feed(): - """Snippet for delete_feed""" - # Create a client client = asset_v1.AssetServiceClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py index 4edfb7ae3f..f384bea0ad 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py @@ -28,8 +28,6 @@ async def sample_export_assets(): - """Snippet for export_assets""" - # Create a client client = asset_v1.AssetServiceAsyncClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py index 62fcbbfff7..4ac84ea713 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py @@ -28,8 +28,6 @@ def sample_export_assets(): - """Snippet for export_assets""" - # Create a client client = asset_v1.AssetServiceClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py index bd91353f3c..29cd0a2b16 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py @@ -28,8 +28,6 @@ async def sample_get_feed(): - """Snippet for get_feed""" - # Create a client client = asset_v1.AssetServiceAsyncClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py index 493ff224ab..30849fccb7 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py @@ -28,8 +28,6 @@ def sample_get_feed(): - """Snippet for get_feed""" - # Create a client client = asset_v1.AssetServiceClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py index e21b4e35c3..0a6a0b4a09 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py @@ -28,8 +28,6 @@ async def sample_list_assets(): - """Snippet for list_assets""" - # Create a client client = asset_v1.AssetServiceAsyncClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py index ef1dd925c0..5fad10b12a 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py @@ -28,8 +28,6 @@ def sample_list_assets(): - """Snippet for list_assets""" - # Create a client client = asset_v1.AssetServiceClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py index 31a26bde20..8eec6bfab4 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py @@ -28,8 +28,6 @@ async def sample_list_feeds(): - """Snippet for list_feeds""" - # Create a client client = asset_v1.AssetServiceAsyncClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py index 9075f2cd9f..7aba515f8b 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py @@ -28,8 +28,6 @@ def sample_list_feeds(): - """Snippet for list_feeds""" - # Create a client client = asset_v1.AssetServiceClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py index 3893b85552..9be060836a 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py @@ -28,8 +28,6 @@ async def sample_search_all_iam_policies(): - """Snippet for search_all_iam_policies""" - # Create a client client = asset_v1.AssetServiceAsyncClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py index 53133196b1..e39c08295b 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py @@ -28,8 +28,6 @@ def sample_search_all_iam_policies(): - """Snippet for search_all_iam_policies""" - # Create a client client = asset_v1.AssetServiceClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py index d97f46fb4f..aba043b4b8 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py @@ -28,8 +28,6 @@ async def sample_search_all_resources(): - """Snippet for search_all_resources""" - # Create a client client = asset_v1.AssetServiceAsyncClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py index 30f66f6ef4..475d8b4ad5 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py @@ -28,8 +28,6 @@ def sample_search_all_resources(): - """Snippet for search_all_resources""" - # Create a client client = asset_v1.AssetServiceClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py index 6cebe148df..e409b05b71 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py @@ -28,8 +28,6 @@ async def sample_update_feed(): - """Snippet for update_feed""" - # Create a client client = asset_v1.AssetServiceAsyncClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py index d2046c2d9b..214f4886f2 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py +++ b/tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py @@ -28,8 +28,6 @@ def sample_update_feed(): - """Snippet for update_feed""" - # Create a client client = asset_v1.AssetServiceClient() diff --git a/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json b/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json new file mode 100644 index 0000000000..a46e4f1167 --- /dev/null +++ b/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json @@ -0,0 +1,1048 @@ +{ + "snippets": [ + { + "clientMethod": { + "method": { + "fullName": "CreateFeed", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "ListFeeds", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "BatchGetAssetsHistory", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "ExportAssets", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "AnalyzeIamPolicy", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "AnalyzeIamPolicyLongrunning", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "DeleteFeed", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_sync", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "UpdateFeed", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "SearchAllIamPolicies", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "SearchAllResources", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "GetFeed", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "ListAssets", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "DeleteFeed", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_async", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "ListAssets", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "SearchAllResources", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "AnalyzeIamPolicy", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "AnalyzeIamPolicyLongrunning", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "CreateFeed", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "ListFeeds", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "UpdateFeed", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "BatchGetAssetsHistory", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "GetFeed", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "ExportAssets", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "SearchAllIamPolicies", + "service": { + "shortName": "AssetService" + } + } + }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py index 1863e3521d..ccf0409a8d 100644 --- a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py +++ b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py @@ -208,6 +208,30 @@ async def generate_access_token(self, r"""Generates an OAuth 2.0 access token for a service account. + + .. code-block:: + from google.iam import credentials_v1 + + def sample_generate_access_token(): + # Create a client + client = credentials_v1.IAMCredentialsClient() + + # Initialize request argument(s) + project = "my-project-id" + service_account = "service_account_value" + name = f"projects/{project}/serviceAccounts/{service_account}" + + request = credentials_v1.GenerateAccessTokenRequest( + name=name, + scope=['scope_value_1', 'scope_value_2'], + ) + + # Make the request + response = client.generate_access_token(request=request) + + # Handle response + print(response) + Args: request (Union[google.iam.credentials_v1.types.GenerateAccessTokenRequest, dict]): The request object. @@ -341,6 +365,30 @@ async def generate_id_token(self, r"""Generates an OpenID Connect ID token for a service account. + + .. code-block:: + from google.iam import credentials_v1 + + def sample_generate_id_token(): + # Create a client + client = credentials_v1.IAMCredentialsClient() + + # Initialize request argument(s) + project = "my-project-id" + service_account = "service_account_value" + name = f"projects/{project}/serviceAccounts/{service_account}" + + request = credentials_v1.GenerateIdTokenRequest( + name=name, + audience="audience_value", + ) + + # Make the request + response = client.generate_id_token(request=request) + + # Handle response + print(response) + Args: request (Union[google.iam.credentials_v1.types.GenerateIdTokenRequest, dict]): The request object. @@ -467,6 +515,30 @@ async def sign_blob(self, r"""Signs a blob using a service account's system-managed private key. + + .. code-block:: + from google.iam import credentials_v1 + + def sample_sign_blob(): + # Create a client + client = credentials_v1.IAMCredentialsClient() + + # Initialize request argument(s) + project = "my-project-id" + service_account = "service_account_value" + name = f"projects/{project}/serviceAccounts/{service_account}" + + request = credentials_v1.SignBlobRequest( + name=name, + payload=b'payload_blob', + ) + + # Make the request + response = client.sign_blob(request=request) + + # Handle response + print(response) + Args: request (Union[google.iam.credentials_v1.types.SignBlobRequest, dict]): The request object. @@ -580,6 +652,30 @@ async def sign_jwt(self, r"""Signs a JWT using a service account's system-managed private key. + + .. code-block:: + from google.iam import credentials_v1 + + def sample_sign_jwt(): + # Create a client + client = credentials_v1.IAMCredentialsClient() + + # Initialize request argument(s) + project = "my-project-id" + service_account = "service_account_value" + name = f"projects/{project}/serviceAccounts/{service_account}" + + request = credentials_v1.SignJwtRequest( + name=name, + payload="payload_value", + ) + + # Make the request + response = client.sign_jwt(request=request) + + # Handle response + print(response) + Args: request (Union[google.iam.credentials_v1.types.SignJwtRequest, dict]): The request object. diff --git a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py index 3a856a9eed..6317456cc6 100644 --- a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py +++ b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py @@ -386,6 +386,30 @@ def generate_access_token(self, r"""Generates an OAuth 2.0 access token for a service account. + + .. code-block:: + from google.iam import credentials_v1 + + def sample_generate_access_token(): + # Create a client + client = credentials_v1.IAMCredentialsClient() + + # Initialize request argument(s) + project = "my-project-id" + service_account = "service_account_value" + name = f"projects/{project}/serviceAccounts/{service_account}" + + request = credentials_v1.GenerateAccessTokenRequest( + name=name, + scope=['scope_value_1', 'scope_value_2'], + ) + + # Make the request + response = client.generate_access_token(request=request) + + # Handle response + print(response) + Args: request (Union[google.iam.credentials_v1.types.GenerateAccessTokenRequest, dict]): The request object. @@ -512,6 +536,30 @@ def generate_id_token(self, r"""Generates an OpenID Connect ID token for a service account. + + .. code-block:: + from google.iam import credentials_v1 + + def sample_generate_id_token(): + # Create a client + client = credentials_v1.IAMCredentialsClient() + + # Initialize request argument(s) + project = "my-project-id" + service_account = "service_account_value" + name = f"projects/{project}/serviceAccounts/{service_account}" + + request = credentials_v1.GenerateIdTokenRequest( + name=name, + audience="audience_value", + ) + + # Make the request + response = client.generate_id_token(request=request) + + # Handle response + print(response) + Args: request (Union[google.iam.credentials_v1.types.GenerateIdTokenRequest, dict]): The request object. @@ -631,6 +679,30 @@ def sign_blob(self, r"""Signs a blob using a service account's system-managed private key. + + .. code-block:: + from google.iam import credentials_v1 + + def sample_sign_blob(): + # Create a client + client = credentials_v1.IAMCredentialsClient() + + # Initialize request argument(s) + project = "my-project-id" + service_account = "service_account_value" + name = f"projects/{project}/serviceAccounts/{service_account}" + + request = credentials_v1.SignBlobRequest( + name=name, + payload=b'payload_blob', + ) + + # Make the request + response = client.sign_blob(request=request) + + # Handle response + print(response) + Args: request (Union[google.iam.credentials_v1.types.SignBlobRequest, dict]): The request object. @@ -737,6 +809,30 @@ def sign_jwt(self, r"""Signs a JWT using a service account's system-managed private key. + + .. code-block:: + from google.iam import credentials_v1 + + def sample_sign_jwt(): + # Create a client + client = credentials_v1.IAMCredentialsClient() + + # Initialize request argument(s) + project = "my-project-id" + service_account = "service_account_value" + name = f"projects/{project}/serviceAccounts/{service_account}" + + request = credentials_v1.SignJwtRequest( + name=name, + payload="payload_value", + ) + + # Make the request + response = client.sign_jwt(request=request) + + # Handle response + print(response) + Args: request (Union[google.iam.credentials_v1.types.SignJwtRequest, dict]): The request object. diff --git a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py index 55a66bc125..650f82bdba 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py +++ b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py @@ -28,8 +28,6 @@ async def sample_generate_access_token(): - """Snippet for generate_access_token""" - # Create a client client = credentials_v1.IAMCredentialsAsyncClient() diff --git a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py index 9487ea9725..17fedfa26a 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py +++ b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py @@ -28,8 +28,6 @@ def sample_generate_access_token(): - """Snippet for generate_access_token""" - # Create a client client = credentials_v1.IAMCredentialsClient() diff --git a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py index 03dee14637..00d6538ca9 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py +++ b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py @@ -28,8 +28,6 @@ async def sample_generate_id_token(): - """Snippet for generate_id_token""" - # Create a client client = credentials_v1.IAMCredentialsAsyncClient() diff --git a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py index fd901f81fc..71e49cef58 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py +++ b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py @@ -28,8 +28,6 @@ def sample_generate_id_token(): - """Snippet for generate_id_token""" - # Create a client client = credentials_v1.IAMCredentialsClient() diff --git a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_async.py b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_async.py index 5929291181..b39981bbdd 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_async.py +++ b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_async.py @@ -28,8 +28,6 @@ async def sample_sign_blob(): - """Snippet for sign_blob""" - # Create a client client = credentials_v1.IAMCredentialsAsyncClient() diff --git a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py index d54b6a5e61..fbc18e178d 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py +++ b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py @@ -28,8 +28,6 @@ def sample_sign_blob(): - """Snippet for sign_blob""" - # Create a client client = credentials_v1.IAMCredentialsClient() diff --git a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py index bb72d42269..35e8655785 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py +++ b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py @@ -28,8 +28,6 @@ async def sample_sign_jwt(): - """Snippet for sign_jwt""" - # Create a client client = credentials_v1.IAMCredentialsAsyncClient() diff --git a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py index 6c05080885..298bfaf3e0 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py +++ b/tests/integration/goldens/credentials/samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py @@ -28,8 +28,6 @@ def sample_sign_jwt(): - """Snippet for sign_jwt""" - # Create a client client = credentials_v1.IAMCredentialsClient() diff --git a/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json b/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json new file mode 100644 index 0000000000..6475f3c075 --- /dev/null +++ b/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json @@ -0,0 +1,360 @@ +{ + "snippets": [ + { + "clientMethod": { + "method": { + "fullName": "GenerateIdToken", + "service": { + "shortName": "IAMCredentials" + } + } + }, + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "SignBlob", + "service": { + "shortName": "IAMCredentials" + } + } + }, + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "GenerateAccessToken", + "service": { + "shortName": "IAMCredentials" + } + } + }, + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "SignJwt", + "service": { + "shortName": "IAMCredentials" + } + } + }, + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "SignBlob", + "service": { + "shortName": "IAMCredentials" + } + } + }, + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_async.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "SignJwt", + "service": { + "shortName": "IAMCredentials" + } + } + }, + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "GenerateAccessToken", + "service": { + "shortName": "IAMCredentials" + } + } + }, + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "GenerateIdToken", + "service": { + "shortName": "IAMCredentials" + } + } + }, + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py index 584f512404..3b7c638a5d 100644 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py @@ -203,6 +203,28 @@ async def list_buckets(self, ) -> pagers.ListBucketsAsyncPager: r"""Lists buckets. + .. code-block:: + from google.cloud import logging_v2 + + def sample_list_buckets(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + bucket = "bucket_value" + parent = f"projects/{project}/locations/{location}/buckets/{bucket}" + + request = logging_v2.ListBucketsRequest( + parent=parent, + ) + + # Make the request + page_result = client.list_buckets(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.logging_v2.types.ListBucketsRequest, dict]): The request object. The parameters to `ListBuckets`. @@ -298,6 +320,29 @@ async def get_bucket(self, ) -> logging_config.LogBucket: r"""Gets a bucket. + .. code-block:: + from google.cloud import logging_v2 + + def sample_get_bucket(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + bucket = "bucket_value" + name = f"projects/{project}/locations/{location}/buckets/{bucket}" + + request = logging_v2.GetBucketRequest( + name=name, + ) + + # Make the request + response = client.get_bucket(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.GetBucketRequest, dict]): The request object. The parameters to `GetBucket`. @@ -352,6 +397,31 @@ async def create_bucket(self, entries. Once a bucket has been created, the region cannot be changed. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_create_bucket(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + bucket = "bucket_value" + parent = f"projects/{project}/locations/{location}/buckets/{bucket}" + + request = logging_v2.CreateBucketRequest( + parent=parent, + bucket_id="bucket_id_value", + ) + + # Make the request + response = client.create_bucket(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.CreateBucketRequest, dict]): The request object. The parameters to `CreateBucket`. @@ -414,6 +484,30 @@ async def update_bucket(self, A buckets region may not be modified after it is created. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_update_bucket(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + bucket = "bucket_value" + name = f"projects/{project}/locations/{location}/buckets/{bucket}" + + request = logging_v2.UpdateBucketRequest( + name=name, + ) + + # Make the request + response = client.update_bucket(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.UpdateBucketRequest, dict]): The request object. The parameters to `UpdateBucket`. @@ -468,6 +562,27 @@ async def delete_bucket(self, state. After 7 days, the bucket will be purged and all logs in the bucket will be permanently deleted. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_delete_bucket(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + bucket = "bucket_value" + name = f"projects/{project}/locations/{location}/buckets/{bucket}" + + request = logging_v2.DeleteBucketRequest( + name=name, + ) + + # Make the request + response = client.delete_bucket(request=request) + Args: request (Union[google.cloud.logging_v2.types.DeleteBucketRequest, dict]): The request object. The parameters to `DeleteBucket`. @@ -514,6 +629,27 @@ async def undelete_bucket(self, r"""Undeletes a bucket. A bucket that has been deleted may be undeleted within the grace period of 7 days. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_undelete_bucket(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + bucket = "bucket_value" + name = f"projects/{project}/locations/{location}/buckets/{bucket}" + + request = logging_v2.UndeleteBucketRequest( + name=name, + ) + + # Make the request + response = client.undelete_bucket(request=request) + Args: request (Union[google.cloud.logging_v2.types.UndeleteBucketRequest, dict]): The request object. The parameters to `UndeleteBucket`. @@ -560,6 +696,23 @@ async def list_views(self, ) -> pagers.ListViewsAsyncPager: r"""Lists views on a bucket. + .. code-block:: + from google.cloud import logging_v2 + + def sample_list_views(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + request = logging_v2.ListViewsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_views(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.logging_v2.types.ListViewsRequest, dict]): The request object. The parameters to `ListViews`. @@ -647,6 +800,30 @@ async def get_view(self, ) -> logging_config.LogView: r"""Gets a view. + .. code-block:: + from google.cloud import logging_v2 + + def sample_get_view(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + bucket = "bucket_value" + view = "view_value" + name = f"projects/{project}/locations/{location}/buckets/{bucket}/views/{view}" + + request = logging_v2.GetViewRequest( + name=name, + ) + + # Make the request + response = client.get_view(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.GetViewRequest, dict]): The request object. The parameters to `GetView`. @@ -702,6 +879,26 @@ async def create_view(self, r"""Creates a view over logs in a bucket. A bucket may contain a maximum of 50 views. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_create_view(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + request = logging_v2.CreateViewRequest( + parent="parent_value", + view_id="view_id_value", + ) + + # Make the request + response = client.create_view(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.CreateViewRequest, dict]): The request object. The parameters to `CreateView`. @@ -757,6 +954,25 @@ async def update_view(self, r"""Updates a view. This method replaces the following fields in the existing view with values from the new view: ``filter``. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_update_view(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + request = logging_v2.UpdateViewRequest( + name="name_value", + ) + + # Make the request + response = client.update_view(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.UpdateViewRequest, dict]): The request object. The parameters to `UpdateView`. @@ -811,6 +1027,27 @@ async def delete_view(self, ) -> None: r"""Deletes a view from a bucket. + .. code-block:: + from google.cloud import logging_v2 + + def sample_delete_view(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + bucket = "bucket_value" + view = "view_value" + name = f"projects/{project}/locations/{location}/buckets/{bucket}/views/{view}" + + request = logging_v2.DeleteViewRequest( + name=name, + ) + + # Make the request + response = client.delete_view(request=request) + Args: request (Union[google.cloud.logging_v2.types.DeleteViewRequest, dict]): The request object. The parameters to `DeleteView`. @@ -857,6 +1094,27 @@ async def list_sinks(self, ) -> pagers.ListSinksAsyncPager: r"""Lists sinks. + .. code-block:: + from google.cloud import logging_v2 + + def sample_list_sinks(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + sink = "sink_value" + parent = f"projects/{project}/sinks/{sink}" + + request = logging_v2.ListSinksRequest( + parent=parent, + ) + + # Make the request + page_result = client.list_sinks(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.logging_v2.types.ListSinksRequest, dict]): The request object. The parameters to `ListSinks`. @@ -957,6 +1215,28 @@ async def get_sink(self, ) -> logging_config.LogSink: r"""Gets a sink. + .. code-block:: + from google.cloud import logging_v2 + + def sample_get_sink(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + sink = "sink_value" + sink_name = f"projects/{project}/sinks/{sink}" + + request = logging_v2.GetSinkRequest( + sink_name=sink_name, + ) + + # Make the request + response = client.get_sink(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.GetSinkRequest, dict]): The request object. The parameters to `GetSink`. @@ -1059,6 +1339,34 @@ async def create_sink(self, permitted to write to the destination. A sink can export log entries only from the resource owning the sink. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_create_sink(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + sink = "sink_value" + parent = f"projects/{project}/sinks/{sink}" + + sink = logging_v2.LogSink() + sink.name = "name_value" + sink.destination = "destination_value" + + request = logging_v2.CreateSinkRequest( + parent=parent, + sink=sink, + ) + + # Make the request + response = client.create_sink(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.CreateSinkRequest, dict]): The request object. The parameters to `CreateSink`. @@ -1165,6 +1473,34 @@ async def update_sink(self, The updated sink might also have a new ``writer_identity``; see the ``unique_writer_identity`` field. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_update_sink(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + sink = "sink_value" + sink_name = f"projects/{project}/sinks/{sink}" + + sink = logging_v2.LogSink() + sink.name = "name_value" + sink.destination = "destination_value" + + request = logging_v2.UpdateSinkRequest( + sink_name=sink_name, + sink=sink, + ) + + # Make the request + response = client.update_sink(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.UpdateSinkRequest, dict]): The request object. The parameters to `UpdateSink`. @@ -1295,6 +1631,26 @@ async def delete_sink(self, r"""Deletes a sink. If the sink has a unique ``writer_identity``, then that service account is also deleted. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_delete_sink(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + sink = "sink_value" + sink_name = f"projects/{project}/sinks/{sink}" + + request = logging_v2.DeleteSinkRequest( + sink_name=sink_name, + ) + + # Make the request + response = client.delete_sink(request=request) + Args: request (Union[google.cloud.logging_v2.types.DeleteSinkRequest, dict]): The request object. The parameters to `DeleteSink`. @@ -1377,6 +1733,27 @@ async def list_exclusions(self, ) -> pagers.ListExclusionsAsyncPager: r"""Lists all the exclusions in a parent resource. + .. code-block:: + from google.cloud import logging_v2 + + def sample_list_exclusions(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + exclusion = "exclusion_value" + parent = f"projects/{project}/exclusions/{exclusion}" + + request = logging_v2.ListExclusionsRequest( + parent=parent, + ) + + # Make the request + page_result = client.list_exclusions(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.logging_v2.types.ListExclusionsRequest, dict]): The request object. The parameters to `ListExclusions`. @@ -1477,6 +1854,28 @@ async def get_exclusion(self, ) -> logging_config.LogExclusion: r"""Gets the description of an exclusion. + .. code-block:: + from google.cloud import logging_v2 + + def sample_get_exclusion(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + exclusion = "exclusion_value" + name = f"projects/{project}/exclusions/{exclusion}" + + request = logging_v2.GetExclusionRequest( + name=name, + ) + + # Make the request + response = client.get_exclusion(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.GetExclusionRequest, dict]): The request object. The parameters to `GetExclusion`. @@ -1581,6 +1980,34 @@ async def create_exclusion(self, can be excluded. You can have up to 10 exclusions in a resource. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_create_exclusion(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + exclusion = "exclusion_value" + parent = f"projects/{project}/exclusions/{exclusion}" + + exclusion = logging_v2.LogExclusion() + exclusion.name = "name_value" + exclusion.filter = "filter_value" + + request = logging_v2.CreateExclusionRequest( + parent=parent, + exclusion=exclusion, + ) + + # Make the request + response = client.create_exclusion(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.CreateExclusionRequest, dict]): The request object. The parameters to `CreateExclusion`. @@ -1687,6 +2114,34 @@ async def update_exclusion(self, r"""Changes one or more properties of an existing exclusion. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_update_exclusion(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + exclusion = "exclusion_value" + name = f"projects/{project}/exclusions/{exclusion}" + + exclusion = logging_v2.LogExclusion() + exclusion.name = "name_value" + exclusion.filter = "filter_value" + + request = logging_v2.UpdateExclusionRequest( + name=name, + exclusion=exclusion, + ) + + # Make the request + response = client.update_exclusion(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.UpdateExclusionRequest, dict]): The request object. The parameters to `UpdateExclusion`. @@ -1805,6 +2260,25 @@ async def delete_exclusion(self, ) -> None: r"""Deletes an exclusion. + .. code-block:: + from google.cloud import logging_v2 + + def sample_delete_exclusion(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + exclusion = "exclusion_value" + name = f"projects/{project}/exclusions/{exclusion}" + + request = logging_v2.DeleteExclusionRequest( + name=name, + ) + + # Make the request + response = client.delete_exclusion(request=request) + Args: request (Union[google.cloud.logging_v2.types.DeleteExclusionRequest, dict]): The request object. The parameters to `DeleteExclusion`. @@ -1895,6 +2369,28 @@ async def get_cmek_settings(self, Router `__ for more information. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_get_cmek_settings(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + name = f"projects/{project}/cmekSettings" + + request = logging_v2.GetCmekSettingsRequest( + name=name, + ) + + # Make the request + response = client.get_cmek_settings(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.GetCmekSettingsRequest, dict]): The request object. The parameters to @@ -1977,6 +2473,25 @@ async def update_cmek_settings(self, Router `__ for more information. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_update_cmek_settings(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + request = logging_v2.UpdateCmekSettingsRequest( + name="name_value", + ) + + # Make the request + response = client.update_cmek_settings(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.UpdateCmekSettingsRequest, dict]): The request object. The parameters to diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py index 377cfda453..c7a4cf5bfa 100644 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py @@ -417,6 +417,28 @@ def list_buckets(self, ) -> pagers.ListBucketsPager: r"""Lists buckets. + .. code-block:: + from google.cloud import logging_v2 + + def sample_list_buckets(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + bucket = "bucket_value" + parent = f"projects/{project}/locations/{location}/buckets/{bucket}" + + request = logging_v2.ListBucketsRequest( + parent=parent, + ) + + # Make the request + page_result = client.list_buckets(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.logging_v2.types.ListBucketsRequest, dict]): The request object. The parameters to `ListBuckets`. @@ -512,6 +534,29 @@ def get_bucket(self, ) -> logging_config.LogBucket: r"""Gets a bucket. + .. code-block:: + from google.cloud import logging_v2 + + def sample_get_bucket(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + bucket = "bucket_value" + name = f"projects/{project}/locations/{location}/buckets/{bucket}" + + request = logging_v2.GetBucketRequest( + name=name, + ) + + # Make the request + response = client.get_bucket(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.GetBucketRequest, dict]): The request object. The parameters to `GetBucket`. @@ -567,6 +612,31 @@ def create_bucket(self, entries. Once a bucket has been created, the region cannot be changed. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_create_bucket(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + bucket = "bucket_value" + parent = f"projects/{project}/locations/{location}/buckets/{bucket}" + + request = logging_v2.CreateBucketRequest( + parent=parent, + bucket_id="bucket_id_value", + ) + + # Make the request + response = client.create_bucket(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.CreateBucketRequest, dict]): The request object. The parameters to `CreateBucket`. @@ -630,6 +700,30 @@ def update_bucket(self, A buckets region may not be modified after it is created. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_update_bucket(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + bucket = "bucket_value" + name = f"projects/{project}/locations/{location}/buckets/{bucket}" + + request = logging_v2.UpdateBucketRequest( + name=name, + ) + + # Make the request + response = client.update_bucket(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.UpdateBucketRequest, dict]): The request object. The parameters to `UpdateBucket`. @@ -685,6 +779,27 @@ def delete_bucket(self, state. After 7 days, the bucket will be purged and all logs in the bucket will be permanently deleted. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_delete_bucket(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + bucket = "bucket_value" + name = f"projects/{project}/locations/{location}/buckets/{bucket}" + + request = logging_v2.DeleteBucketRequest( + name=name, + ) + + # Make the request + response = client.delete_bucket(request=request) + Args: request (Union[google.cloud.logging_v2.types.DeleteBucketRequest, dict]): The request object. The parameters to `DeleteBucket`. @@ -732,6 +847,27 @@ def undelete_bucket(self, r"""Undeletes a bucket. A bucket that has been deleted may be undeleted within the grace period of 7 days. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_undelete_bucket(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + bucket = "bucket_value" + name = f"projects/{project}/locations/{location}/buckets/{bucket}" + + request = logging_v2.UndeleteBucketRequest( + name=name, + ) + + # Make the request + response = client.undelete_bucket(request=request) + Args: request (Union[google.cloud.logging_v2.types.UndeleteBucketRequest, dict]): The request object. The parameters to `UndeleteBucket`. @@ -779,6 +915,23 @@ def list_views(self, ) -> pagers.ListViewsPager: r"""Lists views on a bucket. + .. code-block:: + from google.cloud import logging_v2 + + def sample_list_views(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + request = logging_v2.ListViewsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_views(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.logging_v2.types.ListViewsRequest, dict]): The request object. The parameters to `ListViews`. @@ -866,6 +1019,30 @@ def get_view(self, ) -> logging_config.LogView: r"""Gets a view. + .. code-block:: + from google.cloud import logging_v2 + + def sample_get_view(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + bucket = "bucket_value" + view = "view_value" + name = f"projects/{project}/locations/{location}/buckets/{bucket}/views/{view}" + + request = logging_v2.GetViewRequest( + name=name, + ) + + # Make the request + response = client.get_view(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.GetViewRequest, dict]): The request object. The parameters to `GetView`. @@ -922,6 +1099,26 @@ def create_view(self, r"""Creates a view over logs in a bucket. A bucket may contain a maximum of 50 views. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_create_view(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + request = logging_v2.CreateViewRequest( + parent="parent_value", + view_id="view_id_value", + ) + + # Make the request + response = client.create_view(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.CreateViewRequest, dict]): The request object. The parameters to `CreateView`. @@ -978,6 +1175,25 @@ def update_view(self, r"""Updates a view. This method replaces the following fields in the existing view with values from the new view: ``filter``. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_update_view(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + request = logging_v2.UpdateViewRequest( + name="name_value", + ) + + # Make the request + response = client.update_view(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.UpdateViewRequest, dict]): The request object. The parameters to `UpdateView`. @@ -1033,6 +1249,27 @@ def delete_view(self, ) -> None: r"""Deletes a view from a bucket. + .. code-block:: + from google.cloud import logging_v2 + + def sample_delete_view(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + bucket = "bucket_value" + view = "view_value" + name = f"projects/{project}/locations/{location}/buckets/{bucket}/views/{view}" + + request = logging_v2.DeleteViewRequest( + name=name, + ) + + # Make the request + response = client.delete_view(request=request) + Args: request (Union[google.cloud.logging_v2.types.DeleteViewRequest, dict]): The request object. The parameters to `DeleteView`. @@ -1080,6 +1317,27 @@ def list_sinks(self, ) -> pagers.ListSinksPager: r"""Lists sinks. + .. code-block:: + from google.cloud import logging_v2 + + def sample_list_sinks(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + sink = "sink_value" + parent = f"projects/{project}/sinks/{sink}" + + request = logging_v2.ListSinksRequest( + parent=parent, + ) + + # Make the request + page_result = client.list_sinks(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.logging_v2.types.ListSinksRequest, dict]): The request object. The parameters to `ListSinks`. @@ -1172,6 +1430,28 @@ def get_sink(self, ) -> logging_config.LogSink: r"""Gets a sink. + .. code-block:: + from google.cloud import logging_v2 + + def sample_get_sink(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + sink = "sink_value" + sink_name = f"projects/{project}/sinks/{sink}" + + request = logging_v2.GetSinkRequest( + sink_name=sink_name, + ) + + # Make the request + response = client.get_sink(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.GetSinkRequest, dict]): The request object. The parameters to `GetSink`. @@ -1266,6 +1546,34 @@ def create_sink(self, permitted to write to the destination. A sink can export log entries only from the resource owning the sink. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_create_sink(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + sink = "sink_value" + parent = f"projects/{project}/sinks/{sink}" + + sink = logging_v2.LogSink() + sink.name = "name_value" + sink.destination = "destination_value" + + request = logging_v2.CreateSinkRequest( + parent=parent, + sink=sink, + ) + + # Make the request + response = client.create_sink(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.CreateSinkRequest, dict]): The request object. The parameters to `CreateSink`. @@ -1372,6 +1680,34 @@ def update_sink(self, The updated sink might also have a new ``writer_identity``; see the ``unique_writer_identity`` field. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_update_sink(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + sink = "sink_value" + sink_name = f"projects/{project}/sinks/{sink}" + + sink = logging_v2.LogSink() + sink.name = "name_value" + sink.destination = "destination_value" + + request = logging_v2.UpdateSinkRequest( + sink_name=sink_name, + sink=sink, + ) + + # Make the request + response = client.update_sink(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.UpdateSinkRequest, dict]): The request object. The parameters to `UpdateSink`. @@ -1494,6 +1830,26 @@ def delete_sink(self, r"""Deletes a sink. If the sink has a unique ``writer_identity``, then that service account is also deleted. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_delete_sink(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + sink = "sink_value" + sink_name = f"projects/{project}/sinks/{sink}" + + request = logging_v2.DeleteSinkRequest( + sink_name=sink_name, + ) + + # Make the request + response = client.delete_sink(request=request) + Args: request (Union[google.cloud.logging_v2.types.DeleteSinkRequest, dict]): The request object. The parameters to `DeleteSink`. @@ -1568,6 +1924,27 @@ def list_exclusions(self, ) -> pagers.ListExclusionsPager: r"""Lists all the exclusions in a parent resource. + .. code-block:: + from google.cloud import logging_v2 + + def sample_list_exclusions(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + exclusion = "exclusion_value" + parent = f"projects/{project}/exclusions/{exclusion}" + + request = logging_v2.ListExclusionsRequest( + parent=parent, + ) + + # Make the request + page_result = client.list_exclusions(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.logging_v2.types.ListExclusionsRequest, dict]): The request object. The parameters to `ListExclusions`. @@ -1660,6 +2037,28 @@ def get_exclusion(self, ) -> logging_config.LogExclusion: r"""Gets the description of an exclusion. + .. code-block:: + from google.cloud import logging_v2 + + def sample_get_exclusion(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + exclusion = "exclusion_value" + name = f"projects/{project}/exclusions/{exclusion}" + + request = logging_v2.GetExclusionRequest( + name=name, + ) + + # Make the request + response = client.get_exclusion(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.GetExclusionRequest, dict]): The request object. The parameters to `GetExclusion`. @@ -1756,6 +2155,34 @@ def create_exclusion(self, can be excluded. You can have up to 10 exclusions in a resource. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_create_exclusion(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + exclusion = "exclusion_value" + parent = f"projects/{project}/exclusions/{exclusion}" + + exclusion = logging_v2.LogExclusion() + exclusion.name = "name_value" + exclusion.filter = "filter_value" + + request = logging_v2.CreateExclusionRequest( + parent=parent, + exclusion=exclusion, + ) + + # Make the request + response = client.create_exclusion(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.CreateExclusionRequest, dict]): The request object. The parameters to `CreateExclusion`. @@ -1862,6 +2289,34 @@ def update_exclusion(self, r"""Changes one or more properties of an existing exclusion. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_update_exclusion(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + exclusion = "exclusion_value" + name = f"projects/{project}/exclusions/{exclusion}" + + exclusion = logging_v2.LogExclusion() + exclusion.name = "name_value" + exclusion.filter = "filter_value" + + request = logging_v2.UpdateExclusionRequest( + name=name, + exclusion=exclusion, + ) + + # Make the request + response = client.update_exclusion(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.UpdateExclusionRequest, dict]): The request object. The parameters to `UpdateExclusion`. @@ -1980,6 +2435,25 @@ def delete_exclusion(self, ) -> None: r"""Deletes an exclusion. + .. code-block:: + from google.cloud import logging_v2 + + def sample_delete_exclusion(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + exclusion = "exclusion_value" + name = f"projects/{project}/exclusions/{exclusion}" + + request = logging_v2.DeleteExclusionRequest( + name=name, + ) + + # Make the request + response = client.delete_exclusion(request=request) + Args: request (Union[google.cloud.logging_v2.types.DeleteExclusionRequest, dict]): The request object. The parameters to `DeleteExclusion`. @@ -2062,6 +2536,28 @@ def get_cmek_settings(self, Router `__ for more information. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_get_cmek_settings(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + name = f"projects/{project}/cmekSettings" + + request = logging_v2.GetCmekSettingsRequest( + name=name, + ) + + # Make the request + response = client.get_cmek_settings(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.GetCmekSettingsRequest, dict]): The request object. The parameters to @@ -2145,6 +2641,25 @@ def update_cmek_settings(self, Router `__ for more information. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_update_cmek_settings(): + # Create a client + client = logging_v2.ConfigServiceV2Client() + + # Initialize request argument(s) + request = logging_v2.UpdateCmekSettingsRequest( + name="name_value", + ) + + # Make the request + response = client.update_cmek_settings(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.UpdateCmekSettingsRequest, dict]): The request object. The parameters to diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py index b5ee66a099..88fd4573ac 100644 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py @@ -199,6 +199,26 @@ async def delete_log(self, deleted. Entries received after the delete operation with a timestamp before the operation will be deleted. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_delete_log(): + # Create a client + client = logging_v2.LoggingServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + log = "log_value" + log_name = f"projects/{project}/logs/{log}" + + request = logging_v2.DeleteLogRequest( + log_name=log_name, + ) + + # Make the request + response = client.delete_log(request=request) + Args: request (Union[google.cloud.logging_v2.types.DeleteLogRequest, dict]): The request object. The parameters to DeleteLog. @@ -293,6 +313,28 @@ async def write_log_entries(self, maximum of 1000 different resources (projects, organizations, billing accounts or folders) + + .. code-block:: + from google.cloud import logging_v2 + + def sample_write_log_entries(): + # Create a client + client = logging_v2.LoggingServiceV2Client() + + # Initialize request argument(s) + entries = logging_v2.LogEntry() + entries.log_name = "log_name_value" + + request = logging_v2.WriteLogEntriesRequest( + entries=entries, + ) + + # Make the request + response = client.write_log_entries(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.WriteLogEntriesRequest, dict]): The request object. The parameters to WriteLogEntries. @@ -458,6 +500,28 @@ async def list_log_entries(self, For ways to export log entries, see `Exporting Logs `__. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_list_log_entries(): + # Create a client + client = logging_v2.LoggingServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + log = "log_value" + resource_names = f"projects/{project}/logs/{log}" + + request = logging_v2.ListLogEntriesRequest( + resource_names=resource_names, + ) + + # Make the request + page_result = client.list_log_entries(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.logging_v2.types.ListLogEntriesRequest, dict]): The request object. The parameters to `ListLogEntries`. @@ -590,6 +654,23 @@ async def list_monitored_resource_descriptors(self, r"""Lists the descriptors for monitored resource types used by Logging. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_list_monitored_resource_descriptors(): + # Create a client + client = logging_v2.LoggingServiceV2Client() + + # Initialize request argument(s) + request = logging_v2.ListMonitoredResourceDescriptorsRequest( + ) + + # Make the request + page_result = client.list_monitored_resource_descriptors(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.logging_v2.types.ListMonitoredResourceDescriptorsRequest, dict]): The request object. The parameters to @@ -660,6 +741,28 @@ async def list_logs(self, or billing accounts. Only logs that have entries are listed. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_list_logs(): + # Create a client + client = logging_v2.LoggingServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + log = "log_value" + parent = f"projects/{project}/logs/{log}" + + request = logging_v2.ListLogsRequest( + parent=parent, + ) + + # Make the request + page_result = client.list_logs(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.logging_v2.types.ListLogsRequest, dict]): The request object. The parameters to ListLogs. @@ -760,6 +863,33 @@ def tail_log_entries(self, Until the stream is terminated, it will continue reading logs. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_tail_log_entries(): + # Create a client + client = logging_v2.LoggingServiceV2Client() + + # Initialize request argument(s) + request = logging_v2.TailLogEntriesRequest( + resource_names=['resource_names_value_1', 'resource_names_value_2'], + ) + + # This method expects an iterator which contains + # 'logging_v2.TailLogEntriesRequest' objects + # Here we create a generator that yields a single `request` for + # demonstrative purposes. + requests = [request] + def request_generator(): + for request in requests: + yield request + + # Make the request + stream = client.tail_log_entries(requests=request_generator()) + for response in stream: + print(response) + Args: requests (AsyncIterator[`google.cloud.logging_v2.types.TailLogEntriesRequest`]): The request object AsyncIterator. The parameters to `TailLogEntries`. diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py index 6b5478a60f..e81ea97f34 100644 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py @@ -377,6 +377,26 @@ def delete_log(self, deleted. Entries received after the delete operation with a timestamp before the operation will be deleted. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_delete_log(): + # Create a client + client = logging_v2.LoggingServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + log = "log_value" + log_name = f"projects/{project}/logs/{log}" + + request = logging_v2.DeleteLogRequest( + log_name=log_name, + ) + + # Make the request + response = client.delete_log(request=request) + Args: request (Union[google.cloud.logging_v2.types.DeleteLogRequest, dict]): The request object. The parameters to DeleteLog. @@ -463,6 +483,28 @@ def write_log_entries(self, maximum of 1000 different resources (projects, organizations, billing accounts or folders) + + .. code-block:: + from google.cloud import logging_v2 + + def sample_write_log_entries(): + # Create a client + client = logging_v2.LoggingServiceV2Client() + + # Initialize request argument(s) + entries = logging_v2.LogEntry() + entries.log_name = "log_name_value" + + request = logging_v2.WriteLogEntriesRequest( + entries=entries, + ) + + # Make the request + response = client.write_log_entries(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.WriteLogEntriesRequest, dict]): The request object. The parameters to WriteLogEntries. @@ -619,6 +661,28 @@ def list_log_entries(self, For ways to export log entries, see `Exporting Logs `__. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_list_log_entries(): + # Create a client + client = logging_v2.LoggingServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + log = "log_value" + resource_names = f"projects/{project}/logs/{log}" + + request = logging_v2.ListLogEntriesRequest( + resource_names=resource_names, + ) + + # Make the request + page_result = client.list_log_entries(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.logging_v2.types.ListLogEntriesRequest, dict]): The request object. The parameters to `ListLogEntries`. @@ -743,6 +807,23 @@ def list_monitored_resource_descriptors(self, r"""Lists the descriptors for monitored resource types used by Logging. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_list_monitored_resource_descriptors(): + # Create a client + client = logging_v2.LoggingServiceV2Client() + + # Initialize request argument(s) + request = logging_v2.ListMonitoredResourceDescriptorsRequest( + ) + + # Make the request + page_result = client.list_monitored_resource_descriptors(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.logging_v2.types.ListMonitoredResourceDescriptorsRequest, dict]): The request object. The parameters to @@ -806,6 +887,28 @@ def list_logs(self, or billing accounts. Only logs that have entries are listed. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_list_logs(): + # Create a client + client = logging_v2.LoggingServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + log = "log_value" + parent = f"projects/{project}/logs/{log}" + + request = logging_v2.ListLogsRequest( + parent=parent, + ) + + # Make the request + page_result = client.list_logs(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.logging_v2.types.ListLogsRequest, dict]): The request object. The parameters to ListLogs. @@ -898,6 +1001,33 @@ def tail_log_entries(self, Until the stream is terminated, it will continue reading logs. + + .. code-block:: + from google.cloud import logging_v2 + + def sample_tail_log_entries(): + # Create a client + client = logging_v2.LoggingServiceV2Client() + + # Initialize request argument(s) + request = logging_v2.TailLogEntriesRequest( + resource_names=['resource_names_value_1', 'resource_names_value_2'], + ) + + # This method expects an iterator which contains + # 'logging_v2.TailLogEntriesRequest' objects + # Here we create a generator that yields a single `request` for + # demonstrative purposes. + requests = [request] + def request_generator(): + for request in requests: + yield request + + # Make the request + stream = client.tail_log_entries(requests=request_generator()) + for response in stream: + print(response) + Args: requests (Iterator[google.cloud.logging_v2.types.TailLogEntriesRequest]): The request object iterator. The parameters to `TailLogEntries`. diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py index b64d742352..16f2dd30f1 100644 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py @@ -196,6 +196,26 @@ async def list_log_metrics(self, ) -> pagers.ListLogMetricsAsyncPager: r"""Lists logs-based metrics. + .. code-block:: + from google.cloud import logging_v2 + + def sample_list_log_metrics(): + # Create a client + client = logging_v2.MetricsServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + parent = f"projects/{project}" + + request = logging_v2.ListLogMetricsRequest( + parent=parent, + ) + + # Make the request + page_result = client.list_log_metrics(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.logging_v2.types.ListLogMetricsRequest, dict]): The request object. The parameters to ListLogMetrics. @@ -293,6 +313,28 @@ async def get_log_metric(self, ) -> logging_metrics.LogMetric: r"""Gets a logs-based metric. + .. code-block:: + from google.cloud import logging_v2 + + def sample_get_log_metric(): + # Create a client + client = logging_v2.MetricsServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + metric = "metric_value" + metric_name = f"projects/{project}/metrics/{metric}" + + request = logging_v2.GetLogMetricRequest( + metric_name=metric_name, + ) + + # Make the request + response = client.get_log_metric(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.GetLogMetricRequest, dict]): The request object. The parameters to GetLogMetric. @@ -388,6 +430,33 @@ async def create_log_metric(self, ) -> logging_metrics.LogMetric: r"""Creates a logs-based metric. + .. code-block:: + from google.cloud import logging_v2 + + def sample_create_log_metric(): + # Create a client + client = logging_v2.MetricsServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + metric = "metric_value" + parent = f"projects/{project}/metrics/{metric}" + + metric = logging_v2.LogMetric() + metric.name = "name_value" + metric.filter = "filter_value" + + request = logging_v2.CreateLogMetricRequest( + parent=parent, + metric=metric, + ) + + # Make the request + response = client.create_log_metric(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.CreateLogMetricRequest, dict]): The request object. The parameters to CreateLogMetric. @@ -488,6 +557,33 @@ async def update_log_metric(self, ) -> logging_metrics.LogMetric: r"""Creates or updates a logs-based metric. + .. code-block:: + from google.cloud import logging_v2 + + def sample_update_log_metric(): + # Create a client + client = logging_v2.MetricsServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + metric = "metric_value" + metric_name = f"projects/{project}/metrics/{metric}" + + metric = logging_v2.LogMetric() + metric.name = "name_value" + metric.filter = "filter_value" + + request = logging_v2.UpdateLogMetricRequest( + metric_name=metric_name, + metric=metric, + ) + + # Make the request + response = client.update_log_metric(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.UpdateLogMetricRequest, dict]): The request object. The parameters to UpdateLogMetric. @@ -594,6 +690,25 @@ async def delete_log_metric(self, ) -> None: r"""Deletes a logs-based metric. + .. code-block:: + from google.cloud import logging_v2 + + def sample_delete_log_metric(): + # Create a client + client = logging_v2.MetricsServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + metric = "metric_value" + metric_name = f"projects/{project}/metrics/{metric}" + + request = logging_v2.DeleteLogMetricRequest( + metric_name=metric_name, + ) + + # Make the request + response = client.delete_log_metric(request=request) + Args: request (Union[google.cloud.logging_v2.types.DeleteLogMetricRequest, dict]): The request object. The parameters to DeleteLogMetric. diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py index e13a49a695..412c9ba9bb 100644 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py @@ -374,6 +374,26 @@ def list_log_metrics(self, ) -> pagers.ListLogMetricsPager: r"""Lists logs-based metrics. + .. code-block:: + from google.cloud import logging_v2 + + def sample_list_log_metrics(): + # Create a client + client = logging_v2.MetricsServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + parent = f"projects/{project}" + + request = logging_v2.ListLogMetricsRequest( + parent=parent, + ) + + # Make the request + page_result = client.list_log_metrics(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.logging_v2.types.ListLogMetricsRequest, dict]): The request object. The parameters to ListLogMetrics. @@ -463,6 +483,28 @@ def get_log_metric(self, ) -> logging_metrics.LogMetric: r"""Gets a logs-based metric. + .. code-block:: + from google.cloud import logging_v2 + + def sample_get_log_metric(): + # Create a client + client = logging_v2.MetricsServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + metric = "metric_value" + metric_name = f"projects/{project}/metrics/{metric}" + + request = logging_v2.GetLogMetricRequest( + metric_name=metric_name, + ) + + # Make the request + response = client.get_log_metric(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.GetLogMetricRequest, dict]): The request object. The parameters to GetLogMetric. @@ -550,6 +592,33 @@ def create_log_metric(self, ) -> logging_metrics.LogMetric: r"""Creates a logs-based metric. + .. code-block:: + from google.cloud import logging_v2 + + def sample_create_log_metric(): + # Create a client + client = logging_v2.MetricsServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + metric = "metric_value" + parent = f"projects/{project}/metrics/{metric}" + + metric = logging_v2.LogMetric() + metric.name = "name_value" + metric.filter = "filter_value" + + request = logging_v2.CreateLogMetricRequest( + parent=parent, + metric=metric, + ) + + # Make the request + response = client.create_log_metric(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.CreateLogMetricRequest, dict]): The request object. The parameters to CreateLogMetric. @@ -650,6 +719,33 @@ def update_log_metric(self, ) -> logging_metrics.LogMetric: r"""Creates or updates a logs-based metric. + .. code-block:: + from google.cloud import logging_v2 + + def sample_update_log_metric(): + # Create a client + client = logging_v2.MetricsServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + metric = "metric_value" + metric_name = f"projects/{project}/metrics/{metric}" + + metric = logging_v2.LogMetric() + metric.name = "name_value" + metric.filter = "filter_value" + + request = logging_v2.UpdateLogMetricRequest( + metric_name=metric_name, + metric=metric, + ) + + # Make the request + response = client.update_log_metric(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.logging_v2.types.UpdateLogMetricRequest, dict]): The request object. The parameters to UpdateLogMetric. @@ -748,6 +844,25 @@ def delete_log_metric(self, ) -> None: r"""Deletes a logs-based metric. + .. code-block:: + from google.cloud import logging_v2 + + def sample_delete_log_metric(): + # Create a client + client = logging_v2.MetricsServiceV2Client() + + # Initialize request argument(s) + project = "my-project-id" + metric = "metric_value" + metric_name = f"projects/{project}/metrics/{metric}" + + request = logging_v2.DeleteLogMetricRequest( + metric_name=metric_name, + ) + + # Make the request + response = client.delete_log_metric(request=request) + Args: request (Union[google.cloud.logging_v2.types.DeleteLogMetricRequest, dict]): The request object. The parameters to DeleteLogMetric. diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_async.py index 69dbb78e0b..3931b1d669 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_async.py @@ -28,8 +28,6 @@ async def sample_create_bucket(): - """Snippet for create_bucket""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_sync.py index 5aab6d3877..b850efd1fb 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_sync.py @@ -28,8 +28,6 @@ def sample_create_bucket(): - """Snippet for create_bucket""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_async.py index 331d889862..432f9d86a8 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_async.py @@ -28,8 +28,6 @@ async def sample_create_exclusion(): - """Snippet for create_exclusion""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py index 340489a851..e17a5e04e7 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py @@ -28,8 +28,6 @@ def sample_create_exclusion(): - """Snippet for create_exclusion""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_async.py index 72862fea5f..5d2bfcf7d2 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_async.py @@ -28,8 +28,6 @@ async def sample_create_sink(): - """Snippet for create_sink""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_sync.py index 8952205a4d..372a22657b 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_sync.py @@ -28,8 +28,6 @@ def sample_create_sink(): - """Snippet for create_sink""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_async.py index 555d13d0cb..4cd7a79399 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_async.py @@ -28,8 +28,6 @@ async def sample_create_view(): - """Snippet for create_view""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_sync.py index 518426012d..562fb087b8 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_sync.py @@ -28,8 +28,6 @@ def sample_create_view(): - """Snippet for create_view""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_async.py index 6f4783434a..0ff377493e 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_async.py @@ -28,8 +28,6 @@ async def sample_delete_bucket(): - """Snippet for delete_bucket""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_sync.py index 05caf82171..b3cc0f22fc 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_sync.py @@ -28,8 +28,6 @@ def sample_delete_bucket(): - """Snippet for delete_bucket""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_async.py index 9dc81ab344..f51384574e 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_async.py @@ -28,8 +28,6 @@ async def sample_delete_exclusion(): - """Snippet for delete_exclusion""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_sync.py index 06234bd4c5..f4fd093b5a 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_sync.py @@ -28,8 +28,6 @@ def sample_delete_exclusion(): - """Snippet for delete_exclusion""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_async.py index 9c16d136bd..35c3144c6c 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_async.py @@ -28,8 +28,6 @@ async def sample_delete_sink(): - """Snippet for delete_sink""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_sync.py index 03967671a2..ec1cf8acd2 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_sync.py @@ -28,8 +28,6 @@ def sample_delete_sink(): - """Snippet for delete_sink""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_async.py index da713a45c1..596d0ab208 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_async.py @@ -28,8 +28,6 @@ async def sample_delete_view(): - """Snippet for delete_view""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_sync.py index 6e228b20c4..f65d86c656 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_sync.py @@ -28,8 +28,6 @@ def sample_delete_view(): - """Snippet for delete_view""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_async.py index 450137ed52..e716961730 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_async.py @@ -28,8 +28,6 @@ async def sample_get_bucket(): - """Snippet for get_bucket""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_sync.py index 2ca4765dc9..5a84535f23 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_sync.py @@ -28,8 +28,6 @@ def sample_get_bucket(): - """Snippet for get_bucket""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py index 46dbf2c232..6335aa131f 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py @@ -28,8 +28,6 @@ async def sample_get_cmek_settings(): - """Snippet for get_cmek_settings""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py index 8aafd34f49..f7109b8dd0 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py @@ -28,8 +28,6 @@ def sample_get_cmek_settings(): - """Snippet for get_cmek_settings""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_async.py index d32f262506..461762b5a1 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_async.py @@ -28,8 +28,6 @@ async def sample_get_exclusion(): - """Snippet for get_exclusion""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py index 4e80012a4a..9a99f3a884 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py @@ -28,8 +28,6 @@ def sample_get_exclusion(): - """Snippet for get_exclusion""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_async.py index b92d24eefa..fac7632db4 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_async.py @@ -28,8 +28,6 @@ async def sample_get_sink(): - """Snippet for get_sink""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_sync.py index 008e2455ab..b18072a4e1 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_sync.py @@ -28,8 +28,6 @@ def sample_get_sink(): - """Snippet for get_sink""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_async.py index 8b76d7edbd..08d07c7536 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_async.py @@ -28,8 +28,6 @@ async def sample_get_view(): - """Snippet for get_view""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_sync.py index 0e21b01699..775157e1df 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_sync.py @@ -28,8 +28,6 @@ def sample_get_view(): - """Snippet for get_view""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_async.py index a530c83b5c..d2ed2615b2 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_async.py @@ -28,8 +28,6 @@ async def sample_list_buckets(): - """Snippet for list_buckets""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_sync.py index c6d6297947..3824790fe5 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_sync.py @@ -28,8 +28,6 @@ def sample_list_buckets(): - """Snippet for list_buckets""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_async.py index 1a9db61555..f8efb65633 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_async.py @@ -28,8 +28,6 @@ async def sample_list_exclusions(): - """Snippet for list_exclusions""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py index 19ccc14f56..ea485dd383 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py @@ -28,8 +28,6 @@ def sample_list_exclusions(): - """Snippet for list_exclusions""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_async.py index 739cb31262..87098906f3 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_async.py @@ -28,8 +28,6 @@ async def sample_list_sinks(): - """Snippet for list_sinks""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_sync.py index 534f3e9f27..c4ed69141c 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_sync.py @@ -28,8 +28,6 @@ def sample_list_sinks(): - """Snippet for list_sinks""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_async.py index a4843f371e..f53490638e 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_async.py @@ -28,8 +28,6 @@ async def sample_list_views(): - """Snippet for list_views""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_sync.py index d32a0aa110..4ae6c7d60f 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_sync.py @@ -28,8 +28,6 @@ def sample_list_views(): - """Snippet for list_views""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_async.py index 5fa49940a1..8a8161028f 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_async.py @@ -28,8 +28,6 @@ async def sample_undelete_bucket(): - """Snippet for undelete_bucket""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_sync.py index c2804473a5..d9a11f45dd 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_sync.py @@ -28,8 +28,6 @@ def sample_undelete_bucket(): - """Snippet for undelete_bucket""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_async.py index bd49a32b7f..595c4a8ffa 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_async.py @@ -28,8 +28,6 @@ async def sample_update_bucket(): - """Snippet for update_bucket""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_sync.py index de20ddf1e1..cb294ae3f6 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_sync.py @@ -28,8 +28,6 @@ def sample_update_bucket(): - """Snippet for update_bucket""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py index cd01d5b04a..74e24c67a7 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py @@ -28,8 +28,6 @@ async def sample_update_cmek_settings(): - """Snippet for update_cmek_settings""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py index a679dfa441..5e19a86ba4 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py @@ -28,8 +28,6 @@ def sample_update_cmek_settings(): - """Snippet for update_cmek_settings""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_async.py index 60d503ac15..b4d79d2d76 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_async.py @@ -28,8 +28,6 @@ async def sample_update_exclusion(): - """Snippet for update_exclusion""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_sync.py index 48726f9222..a3772807ba 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_sync.py @@ -28,8 +28,6 @@ def sample_update_exclusion(): - """Snippet for update_exclusion""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_async.py index 096a88890b..d43e5ac5e4 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_async.py @@ -28,8 +28,6 @@ async def sample_update_sink(): - """Snippet for update_sink""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_sync.py index 3597759584..ca50c1e353 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_sync.py @@ -28,8 +28,6 @@ def sample_update_sink(): - """Snippet for update_sink""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_async.py index 5177171f8f..3d4681021c 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_async.py @@ -28,8 +28,6 @@ async def sample_update_view(): - """Snippet for update_view""" - # Create a client client = logging_v2.ConfigServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_sync.py index 164e01f49b..9f134431d0 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_sync.py @@ -28,8 +28,6 @@ def sample_update_view(): - """Snippet for update_view""" - # Create a client client = logging_v2.ConfigServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_async.py index 1c9bc101aa..25f13bae6a 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_async.py @@ -28,8 +28,6 @@ async def sample_delete_log(): - """Snippet for delete_log""" - # Create a client client = logging_v2.LoggingServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_sync.py index 0b329d55a6..daa5767c49 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_sync.py @@ -28,8 +28,6 @@ def sample_delete_log(): - """Snippet for delete_log""" - # Create a client client = logging_v2.LoggingServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py index ac069139a6..fb156a9757 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py @@ -28,8 +28,6 @@ async def sample_list_log_entries(): - """Snippet for list_log_entries""" - # Create a client client = logging_v2.LoggingServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py index 227e887f0e..74968ae551 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py @@ -28,8 +28,6 @@ def sample_list_log_entries(): - """Snippet for list_log_entries""" - # Create a client client = logging_v2.LoggingServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_async.py index 2fe01050d2..17362e9d17 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_async.py @@ -28,8 +28,6 @@ async def sample_list_logs(): - """Snippet for list_logs""" - # Create a client client = logging_v2.LoggingServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_sync.py index 5c619ad49d..12491dadf8 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_sync.py @@ -28,8 +28,6 @@ def sample_list_logs(): - """Snippet for list_logs""" - # Create a client client = logging_v2.LoggingServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py index 6734d6a5c8..35fd5d0b00 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py @@ -28,8 +28,6 @@ async def sample_list_monitored_resource_descriptors(): - """Snippet for list_monitored_resource_descriptors""" - # Create a client client = logging_v2.LoggingServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py index 89da0c9c67..05cdb4a5aa 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py @@ -28,8 +28,6 @@ def sample_list_monitored_resource_descriptors(): - """Snippet for list_monitored_resource_descriptors""" - # Create a client client = logging_v2.LoggingServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py index 1c6e1db5be..6ddc30b036 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py @@ -28,8 +28,6 @@ async def sample_tail_log_entries(): - """Snippet for tail_log_entries""" - # Create a client client = logging_v2.LoggingServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py index e9a5dfc2ec..c01d944a8f 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py @@ -28,8 +28,6 @@ def sample_tail_log_entries(): - """Snippet for tail_log_entries""" - # Create a client client = logging_v2.LoggingServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py index 71120d98a2..5e019280f3 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py @@ -28,8 +28,6 @@ async def sample_write_log_entries(): - """Snippet for write_log_entries""" - # Create a client client = logging_v2.LoggingServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py index 7da931be50..9e03979e5c 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py @@ -28,8 +28,6 @@ def sample_write_log_entries(): - """Snippet for write_log_entries""" - # Create a client client = logging_v2.LoggingServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py index de5a085dda..212444858d 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py @@ -28,8 +28,6 @@ async def sample_create_log_metric(): - """Snippet for create_log_metric""" - # Create a client client = logging_v2.MetricsServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py index e3bd08822c..e81eb133b4 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py @@ -28,8 +28,6 @@ def sample_create_log_metric(): - """Snippet for create_log_metric""" - # Create a client client = logging_v2.MetricsServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_async.py index 5ed7562551..876f2bbad8 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_async.py @@ -28,8 +28,6 @@ async def sample_delete_log_metric(): - """Snippet for delete_log_metric""" - # Create a client client = logging_v2.MetricsServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_sync.py index 012322113c..fb2eb6f897 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_sync.py @@ -28,8 +28,6 @@ def sample_delete_log_metric(): - """Snippet for delete_log_metric""" - # Create a client client = logging_v2.MetricsServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py index cc0f0c5536..a9b77fe6fb 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py @@ -28,8 +28,6 @@ async def sample_get_log_metric(): - """Snippet for get_log_metric""" - # Create a client client = logging_v2.MetricsServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py index fb8499456f..4e18e335b9 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py @@ -28,8 +28,6 @@ def sample_get_log_metric(): - """Snippet for get_log_metric""" - # Create a client client = logging_v2.MetricsServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py index c640c59724..5742806d0d 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py @@ -28,8 +28,6 @@ async def sample_list_log_metrics(): - """Snippet for list_log_metrics""" - # Create a client client = logging_v2.MetricsServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py index 734d4c869b..9741359810 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py @@ -28,8 +28,6 @@ def sample_list_log_metrics(): - """Snippet for list_log_metrics""" - # Create a client client = logging_v2.MetricsServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py index 05fb745bb7..dcb6465393 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py @@ -28,8 +28,6 @@ async def sample_update_log_metric(): - """Snippet for update_log_metric""" - # Create a client client = logging_v2.MetricsServiceV2AsyncClient() diff --git a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py index 6e37f22e59..ad87904dc2 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py +++ b/tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py @@ -28,8 +28,6 @@ def sample_update_log_metric(): - """Snippet for update_log_metric""" - # Create a client client = logging_v2.MetricsServiceV2Client() diff --git a/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json b/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json new file mode 100644 index 0000000000..a0b7fd03f2 --- /dev/null +++ b/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json @@ -0,0 +1,2966 @@ +{ + "snippets": [ + { + "clientMethod": { + "method": { + "fullName": "WriteLogEntries", + "service": { + "shortName": "LoggingServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "ListMonitoredResourceDescriptors", + "service": { + "shortName": "LoggingServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "TailLogEntries", + "service": { + "shortName": "LoggingServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "DeleteLog", + "service": { + "shortName": "LoggingServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_sync", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "ListLogs", + "service": { + "shortName": "LoggingServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "ListLogEntries", + "service": { + "shortName": "LoggingServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "DeleteLog", + "service": { + "shortName": "LoggingServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_async", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "WriteLogEntries", + "service": { + "shortName": "LoggingServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "ListMonitoredResourceDescriptors", + "service": { + "shortName": "LoggingServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "ListLogEntries", + "service": { + "shortName": "LoggingServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "ListLogs", + "service": { + "shortName": "LoggingServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "TailLogEntries", + "service": { + "shortName": "LoggingServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "GetLogMetric", + "service": { + "shortName": "MetricsServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "ListLogMetrics", + "service": { + "shortName": "MetricsServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_async", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "CreateLogMetric", + "service": { + "shortName": "MetricsServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "DeleteLogMetric", + "service": { + "shortName": "MetricsServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_async", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "UpdateLogMetric", + "service": { + "shortName": "MetricsServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "GetLogMetric", + "service": { + "shortName": "MetricsServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "UpdateLogMetric", + "service": { + "shortName": "MetricsServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "DeleteLogMetric", + "service": { + "shortName": "MetricsServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_sync", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "ListLogMetrics", + "service": { + "shortName": "MetricsServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_sync", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "CreateLogMetric", + "service": { + "shortName": "MetricsServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "UpdateSink", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "ListSinks", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "CreateSink", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateSink_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "ListBuckets", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "UpdateExclusion", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "UndeleteBucket", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "ListExclusions", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "UpdateCmekSettings", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "CreateExclusion", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "DeleteView", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "DeleteSink", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_sync", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "CreateView", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "GetExclusion", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "GetBucket", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "DeleteBucket", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "UpdateBucket", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "GetView", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetView_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "UpdateView", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "GetCmekSettings", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "GetSink", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "CreateBucket", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "ListViews", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "DeleteExclusion", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_sync", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "DeleteView", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "UndeleteBucket", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "GetView", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetView_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "CreateExclusion", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "ListBuckets", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "DeleteBucket", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "GetSink", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "ListSinks", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "ListExclusions", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "UpdateExclusion", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "ListViews", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "UpdateCmekSettings", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "DeleteExclusion", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_async", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "UpdateView", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "UpdateBucket", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "CreateView", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "CreateSink", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateSink_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "DeleteSink", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_async", + "segments": [ + { + "end": 46, + "start": 27, + "type": "FULL" + }, + { + "end": 46, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "GetCmekSettings", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "CreateBucket", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "GetExclusion", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "UpdateSink", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "GetBucket", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py index 7ad1b6a796..e0e0155870 100644 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py @@ -228,6 +228,28 @@ async def list_instances(self, regions available to the project are queried, and the results are aggregated. + + .. code-block:: + from google.cloud import redis_v1 + + def sample_list_instances(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + parent = f"projects/{project}/locations/{location}" + + request = redis_v1.ListInstancesRequest( + parent=parent, + ) + + # Make the request + page_result = client.list_instances(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.redis_v1.types.ListInstancesRequest, dict]): The request object. Request for @@ -317,6 +339,29 @@ async def get_instance(self, ) -> cloud_redis.Instance: r"""Gets the details of a specific Redis instance. + .. code-block:: + from google.cloud import redis_v1 + + def sample_get_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + instance = "instance_value" + name = f"projects/{project}/locations/{location}/instances/{instance}" + + request = redis_v1.GetInstanceRequest( + name=name, + ) + + # Make the request + response = client.get_instance(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.redis_v1.types.GetInstanceRequest, dict]): The request object. Request for @@ -406,6 +451,38 @@ async def create_instance(self, The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. + + .. code-block:: + from google.cloud import redis_v1 + + def sample_create_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + parent = f"projects/{project}/locations/{location}" + + instance = redis_v1.Instance() + instance.name = "name_value" + instance.tier = "STANDARD_HA" + instance.memory_size_gb = 1499 + + request = redis_v1.CreateInstanceRequest( + parent=parent, + instance_id="instance_id_value", + instance=instance, + ) + + # Make the request + operation = client.create_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + Args: request (Union[google.cloud.redis_v1.types.CreateInstanceRequest, dict]): The request object. Request for @@ -523,6 +600,32 @@ async def update_instance(self, operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. + + .. code-block:: + from google.cloud import redis_v1 + + def sample_update_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + instance = redis_v1.Instance() + instance.name = "name_value" + instance.tier = "STANDARD_HA" + instance.memory_size_gb = 1499 + + request = redis_v1.UpdateInstanceRequest( + instance=instance, + ) + + # Make the request + operation = client.update_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + Args: request (Union[google.cloud.redis_v1.types.UpdateInstanceRequest, dict]): The request object. Request for @@ -627,6 +730,33 @@ async def upgrade_instance(self, r"""Upgrades Redis instance to the newer Redis version specified in the request. + + .. code-block:: + from google.cloud import redis_v1 + + def sample_upgrade_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + instance = "instance_value" + name = f"projects/{project}/locations/{location}/instances/{instance}" + + request = redis_v1.UpgradeInstanceRequest( + name=name, + redis_version="redis_version_value", + ) + + # Make the request + operation = client.upgrade_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + Args: request (Union[google.cloud.redis_v1.types.UpgradeInstanceRequest, dict]): The request object. Request for @@ -732,6 +862,31 @@ async def import_instance(self, The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. + + .. code-block:: + from google.cloud import redis_v1 + + def sample_import_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + input_config = redis_v1.InputConfig() + input_config.gcs_source.uri = "uri_value" + + request = redis_v1.ImportInstanceRequest( + name="name_value", + input_config=input_config, + ) + + # Make the request + operation = client.import_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + Args: request (Union[google.cloud.redis_v1.types.ImportInstanceRequest, dict]): The request object. Request for @@ -833,6 +988,31 @@ async def export_instance(self, The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. + + .. code-block:: + from google.cloud import redis_v1 + + def sample_export_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + output_config = redis_v1.OutputConfig() + output_config.gcs_destination.uri = "uri_value" + + request = redis_v1.ExportInstanceRequest( + name="name_value", + output_config=output_config, + ) + + # Make the request + operation = client.export_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + Args: request (Union[google.cloud.redis_v1.types.ExportInstanceRequest, dict]): The request object. Request for @@ -932,6 +1112,32 @@ async def failover_instance(self, replica node for a specific STANDARD tier Cloud Memorystore for Redis instance. + + .. code-block:: + from google.cloud import redis_v1 + + def sample_failover_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + instance = "instance_value" + name = f"projects/{project}/locations/{location}/instances/{instance}" + + request = redis_v1.FailoverInstanceRequest( + name=name, + ) + + # Make the request + operation = client.failover_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + Args: request (Union[google.cloud.redis_v1.types.FailoverInstanceRequest, dict]): The request object. Request for @@ -1030,6 +1236,32 @@ async def delete_instance(self, r"""Deletes a specific Redis instance. Instance stops serving and data is deleted. + + .. code-block:: + from google.cloud import redis_v1 + + def sample_delete_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + instance = "instance_value" + name = f"projects/{project}/locations/{location}/instances/{instance}" + + request = redis_v1.DeleteInstanceRequest( + name=name, + ) + + # Make the request + operation = client.delete_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + Args: request (Union[google.cloud.redis_v1.types.DeleteInstanceRequest, dict]): The request object. Request for diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py index 067f20f271..116198da20 100644 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py @@ -406,6 +406,28 @@ def list_instances(self, regions available to the project are queried, and the results are aggregated. + + .. code-block:: + from google.cloud import redis_v1 + + def sample_list_instances(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + parent = f"projects/{project}/locations/{location}" + + request = redis_v1.ListInstancesRequest( + parent=parent, + ) + + # Make the request + page_result = client.list_instances(request=request) + for response in page_result: + print(response) + Args: request (Union[google.cloud.redis_v1.types.ListInstancesRequest, dict]): The request object. Request for @@ -495,6 +517,29 @@ def get_instance(self, ) -> cloud_redis.Instance: r"""Gets the details of a specific Redis instance. + .. code-block:: + from google.cloud import redis_v1 + + def sample_get_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + instance = "instance_value" + name = f"projects/{project}/locations/{location}/instances/{instance}" + + request = redis_v1.GetInstanceRequest( + name=name, + ) + + # Make the request + response = client.get_instance(request=request) + + # Handle response + print(response) + Args: request (Union[google.cloud.redis_v1.types.GetInstanceRequest, dict]): The request object. Request for @@ -584,6 +629,38 @@ def create_instance(self, The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. + + .. code-block:: + from google.cloud import redis_v1 + + def sample_create_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + parent = f"projects/{project}/locations/{location}" + + instance = redis_v1.Instance() + instance.name = "name_value" + instance.tier = "STANDARD_HA" + instance.memory_size_gb = 1499 + + request = redis_v1.CreateInstanceRequest( + parent=parent, + instance_id="instance_id_value", + instance=instance, + ) + + # Make the request + operation = client.create_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + Args: request (Union[google.cloud.redis_v1.types.CreateInstanceRequest, dict]): The request object. Request for @@ -701,6 +778,32 @@ def update_instance(self, operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. + + .. code-block:: + from google.cloud import redis_v1 + + def sample_update_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + instance = redis_v1.Instance() + instance.name = "name_value" + instance.tier = "STANDARD_HA" + instance.memory_size_gb = 1499 + + request = redis_v1.UpdateInstanceRequest( + instance=instance, + ) + + # Make the request + operation = client.update_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + Args: request (Union[google.cloud.redis_v1.types.UpdateInstanceRequest, dict]): The request object. Request for @@ -805,6 +908,33 @@ def upgrade_instance(self, r"""Upgrades Redis instance to the newer Redis version specified in the request. + + .. code-block:: + from google.cloud import redis_v1 + + def sample_upgrade_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + instance = "instance_value" + name = f"projects/{project}/locations/{location}/instances/{instance}" + + request = redis_v1.UpgradeInstanceRequest( + name=name, + redis_version="redis_version_value", + ) + + # Make the request + operation = client.upgrade_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + Args: request (Union[google.cloud.redis_v1.types.UpgradeInstanceRequest, dict]): The request object. Request for @@ -910,6 +1040,31 @@ def import_instance(self, The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. + + .. code-block:: + from google.cloud import redis_v1 + + def sample_import_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + input_config = redis_v1.InputConfig() + input_config.gcs_source.uri = "uri_value" + + request = redis_v1.ImportInstanceRequest( + name="name_value", + input_config=input_config, + ) + + # Make the request + operation = client.import_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + Args: request (Union[google.cloud.redis_v1.types.ImportInstanceRequest, dict]): The request object. Request for @@ -1011,6 +1166,31 @@ def export_instance(self, The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. + + .. code-block:: + from google.cloud import redis_v1 + + def sample_export_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + output_config = redis_v1.OutputConfig() + output_config.gcs_destination.uri = "uri_value" + + request = redis_v1.ExportInstanceRequest( + name="name_value", + output_config=output_config, + ) + + # Make the request + operation = client.export_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + Args: request (Union[google.cloud.redis_v1.types.ExportInstanceRequest, dict]): The request object. Request for @@ -1110,6 +1290,32 @@ def failover_instance(self, replica node for a specific STANDARD tier Cloud Memorystore for Redis instance. + + .. code-block:: + from google.cloud import redis_v1 + + def sample_failover_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + instance = "instance_value" + name = f"projects/{project}/locations/{location}/instances/{instance}" + + request = redis_v1.FailoverInstanceRequest( + name=name, + ) + + # Make the request + operation = client.failover_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + Args: request (Union[google.cloud.redis_v1.types.FailoverInstanceRequest, dict]): The request object. Request for @@ -1208,6 +1414,32 @@ def delete_instance(self, r"""Deletes a specific Redis instance. Instance stops serving and data is deleted. + + .. code-block:: + from google.cloud import redis_v1 + + def sample_delete_instance(): + # Create a client + client = redis_v1.CloudRedisClient() + + # Initialize request argument(s) + project = "my-project-id" + location = "us-central1" + instance = "instance_value" + name = f"projects/{project}/locations/{location}/instances/{instance}" + + request = redis_v1.DeleteInstanceRequest( + name=name, + ) + + # Make the request + operation = client.delete_instance(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + Args: request (Union[google.cloud.redis_v1.types.DeleteInstanceRequest, dict]): The request object. Request for diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_async.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_async.py index 46b59320bf..39fb9f169c 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_async.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_async.py @@ -28,8 +28,6 @@ async def sample_create_instance(): - """Snippet for create_instance""" - # Create a client client = redis_v1.CloudRedisAsyncClient() diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_sync.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_sync.py index c0b84c7c52..fee1cc58b1 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_sync.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_sync.py @@ -28,8 +28,6 @@ def sample_create_instance(): - """Snippet for create_instance""" - # Create a client client = redis_v1.CloudRedisClient() diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_async.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_async.py index b63f325b09..0447c772f5 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_async.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_async.py @@ -28,8 +28,6 @@ async def sample_delete_instance(): - """Snippet for delete_instance""" - # Create a client client = redis_v1.CloudRedisAsyncClient() diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_sync.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_sync.py index 5a081bbc7f..20970e507f 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_sync.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_sync.py @@ -28,8 +28,6 @@ def sample_delete_instance(): - """Snippet for delete_instance""" - # Create a client client = redis_v1.CloudRedisClient() diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_async.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_async.py index 302890bb28..22bcf3e413 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_async.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_async.py @@ -28,8 +28,6 @@ async def sample_export_instance(): - """Snippet for export_instance""" - # Create a client client = redis_v1.CloudRedisAsyncClient() diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_sync.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_sync.py index adadccb214..3524ddc9aa 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_sync.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_sync.py @@ -28,8 +28,6 @@ def sample_export_instance(): - """Snippet for export_instance""" - # Create a client client = redis_v1.CloudRedisClient() diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_async.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_async.py index c89d149c4c..d0ce830de5 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_async.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_async.py @@ -28,8 +28,6 @@ async def sample_failover_instance(): - """Snippet for failover_instance""" - # Create a client client = redis_v1.CloudRedisAsyncClient() diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_sync.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_sync.py index 22295a3f6e..f322e8f0cf 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_sync.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_sync.py @@ -28,8 +28,6 @@ def sample_failover_instance(): - """Snippet for failover_instance""" - # Create a client client = redis_v1.CloudRedisClient() diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py index 4a024f308e..6be04525a9 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py @@ -28,8 +28,6 @@ async def sample_get_instance(): - """Snippet for get_instance""" - # Create a client client = redis_v1.CloudRedisAsyncClient() diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_sync.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_sync.py index 5ea1e2f7fc..f6c3a5e4f5 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_sync.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_sync.py @@ -28,8 +28,6 @@ def sample_get_instance(): - """Snippet for get_instance""" - # Create a client client = redis_v1.CloudRedisClient() diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_async.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_async.py index 739afbf6b0..f1a65c3e09 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_async.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_async.py @@ -28,8 +28,6 @@ async def sample_import_instance(): - """Snippet for import_instance""" - # Create a client client = redis_v1.CloudRedisAsyncClient() diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_sync.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_sync.py index 2f03a78c6f..e246a349ca 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_sync.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_sync.py @@ -28,8 +28,6 @@ def sample_import_instance(): - """Snippet for import_instance""" - # Create a client client = redis_v1.CloudRedisClient() diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_async.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_async.py index 60ae031bf2..35153ea3ff 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_async.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_async.py @@ -28,8 +28,6 @@ async def sample_list_instances(): - """Snippet for list_instances""" - # Create a client client = redis_v1.CloudRedisAsyncClient() diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_sync.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_sync.py index f428f6a9e1..6df89ddf35 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_sync.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_sync.py @@ -28,8 +28,6 @@ def sample_list_instances(): - """Snippet for list_instances""" - # Create a client client = redis_v1.CloudRedisClient() diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_async.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_async.py index 3ecf913760..89af4b83b5 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_async.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_async.py @@ -28,8 +28,6 @@ async def sample_update_instance(): - """Snippet for update_instance""" - # Create a client client = redis_v1.CloudRedisAsyncClient() diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_sync.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_sync.py index 16da68c748..83a3b74764 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_sync.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_sync.py @@ -28,8 +28,6 @@ def sample_update_instance(): - """Snippet for update_instance""" - # Create a client client = redis_v1.CloudRedisClient() diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py index c00e66a579..5b23157fd2 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py @@ -28,8 +28,6 @@ async def sample_upgrade_instance(): - """Snippet for upgrade_instance""" - # Create a client client = redis_v1.CloudRedisAsyncClient() diff --git a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py index 77052b6d55..602c18ffdc 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py +++ b/tests/integration/goldens/redis/samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py @@ -28,8 +28,6 @@ def sample_upgrade_instance(): - """Snippet for upgrade_instance""" - # Create a client client = redis_v1.CloudRedisClient() diff --git a/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json b/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json new file mode 100644 index 0000000000..92ed4dc500 --- /dev/null +++ b/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json @@ -0,0 +1,773 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "fullName": "UpgradeInstance", + "service": { + "shortName": "CloudRedis" + } + } + }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "ExportInstance", + "service": { + "shortName": "CloudRedis" + } + } + }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "CreateInstance", + "service": { + "shortName": "CloudRedis" + } + } + }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_async", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "ImportInstance", + "service": { + "shortName": "CloudRedis" + } + } + }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ImportInstance_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "GetInstance", + "service": { + "shortName": "CloudRedis" + } + } + }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "ListInstances", + "service": { + "shortName": "CloudRedis" + } + } + }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "DeleteInstance", + "service": { + "shortName": "CloudRedis" + } + } + }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "FailoverInstance", + "service": { + "shortName": "CloudRedis" + } + } + }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "fullName": "UpdateInstance", + "service": { + "shortName": "CloudRedis" + } + } + }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "GetInstance", + "service": { + "shortName": "CloudRedis" + } + } + }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "UpdateInstance", + "service": { + "shortName": "CloudRedis" + } + } + }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "DeleteInstance", + "service": { + "shortName": "CloudRedis" + } + } + }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "UpgradeInstance", + "service": { + "shortName": "CloudRedis" + } + } + }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "ExportInstance", + "service": { + "shortName": "CloudRedis" + } + } + }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "ListInstances", + "service": { + "shortName": "CloudRedis" + } + } + }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "CreateInstance", + "service": { + "shortName": "CloudRedis" + } + } + }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_sync", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "FailoverInstance", + "service": { + "shortName": "CloudRedis" + } + } + }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "ImportInstance", + "service": { + "shortName": "CloudRedis" + } + } + }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ImportInstance_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} From 8315803387dbd54df0d250a535e6dbc1cc58c0f1 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Tue, 11 Jan 2022 22:49:42 +0000 Subject: [PATCH 07/18] fix: stabilize metadata json --- gapic/samplegen_utils/snippet_index.py | 8 +- .../snippet_metadata_v1_asset_v1.json | 368 ++--- .../snippet_metadata_v1_credentials_v1.json | 52 +- .../snippet_metadata_v1_logging_v2.json | 1276 ++++++++--------- .../snippet_metadata_v1_redis_v1.json | 238 +-- 5 files changed, 973 insertions(+), 969 deletions(-) diff --git a/gapic/samplegen_utils/snippet_index.py b/gapic/samplegen_utils/snippet_index.py index a8594a92ee..3a364f2889 100644 --- a/gapic/samplegen_utils/snippet_index.py +++ b/gapic/samplegen_utils/snippet_index.py @@ -12,8 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import Optional, Dict import re +import json +from collections import OrderedDict +from typing import Optional, Dict from google.protobuf import json_format @@ -172,4 +174,6 @@ def get_snippet(self, service_name: str, rpc_name: str, sync: bool = True) -> Op def get_metadata_json(self) -> str: """JSON representation of Snippet Index.""" - return json_format.MessageToJson(self.metadata_index, sort_keys=True) + # protobuf's MessageToJson doesn't provide a stable order for list items + # so we use the json module instead + return json.dumps(json_format.MessageToDict(self.metadata_index), sort_keys=True, indent=2) diff --git a/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json b/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json index a46e4f1167..953104d801 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json +++ b/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json @@ -2,23 +2,24 @@ "snippets": [ { "clientMethod": { + "async": true, "method": { - "fullName": "CreateFeed", + "fullName": "DeleteFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_async", "segments": [ { - "end": 49, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 46, "start": 27, "type": "SHORT" }, @@ -28,41 +29,40 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "ListFeeds", + "fullName": "CreateFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_async", "segments": [ { - "end": 44, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 49, "start": 27, "type": "SHORT" }, @@ -72,41 +72,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "BatchGetAssetsHistory", + "fullName": "SearchAllResources", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_async", "segments": [ { - "end": 44, + "end": 43, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 43, "start": 27, "type": "SHORT" }, @@ -121,19 +122,18 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { "fullName": "ExportAssets", "service": { @@ -141,8 +141,8 @@ } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_async", "segments": [ { "end": 50, @@ -176,23 +176,24 @@ }, { "clientMethod": { + "async": true, "method": { - "fullName": "AnalyzeIamPolicy", + "fullName": "ListFeeds", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_async", "segments": [ { - "end": 47, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 44, "start": 27, "type": "SHORT" }, @@ -202,41 +203,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 41, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "AnalyzeIamPolicyLongrunning", + "fullName": "GetFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_async", "segments": [ { - "end": 53, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 48, "start": 27, "type": "SHORT" }, @@ -246,39 +248,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 46, + "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "DeleteFeed", + "fullName": "SearchAllIamPolicies", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_async", "segments": [ { - "end": 46, + "end": 43, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 43, "start": 27, "type": "SHORT" }, @@ -288,31 +293,32 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "UpdateFeed", + "fullName": "AnalyzeIamPolicy", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async", "segments": [ { "end": 47, @@ -348,23 +354,24 @@ }, { "clientMethod": { + "async": true, "method": { - "fullName": "SearchAllIamPolicies", + "fullName": "UpdateFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_async", "segments": [ { - "end": 43, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 47, "start": 27, "type": "SHORT" }, @@ -374,31 +381,34 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "SearchAllResources", + "fullName": "ListAssets", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_async", "segments": [ { "end": 43, @@ -432,23 +442,24 @@ }, { "clientMethod": { + "async": true, "method": { - "fullName": "GetFeed", + "fullName": "AnalyzeIamPolicyLongrunning", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async", "segments": [ { - "end": 48, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 53, "start": 27, "type": "SHORT" }, @@ -458,41 +469,40 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 45, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 43, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "ListAssets", + "fullName": "BatchGetAssetsHistory", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async", "segments": [ { - "end": 43, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 44, "start": 27, "type": "SHORT" }, @@ -507,35 +517,36 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "DeleteFeed", + "fullName": "ExportAssets", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_sync", "segments": [ { - "end": 46, + "end": 50, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 50, "start": 27, "type": "SHORT" }, @@ -554,31 +565,30 @@ "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 51, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "ListAssets", + "fullName": "AnalyzeIamPolicy", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync", "segments": [ { - "end": 43, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 47, "start": 27, "type": "SHORT" }, @@ -588,40 +598,41 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "SearchAllResources", + "fullName": "UpdateFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_sync", "segments": [ { - "end": 43, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 47, "start": 27, "type": "SHORT" }, @@ -631,40 +642,41 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "AnalyzeIamPolicy", + "fullName": "ListAssets", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_sync", "segments": [ { - "end": 47, + "end": 43, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 43, "start": 27, "type": "SHORT" }, @@ -674,42 +686,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 41, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "AnalyzeIamPolicyLongrunning", + "fullName": "ListFeeds", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_sync", "segments": [ { - "end": 53, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 44, "start": 27, "type": "SHORT" }, @@ -719,23 +728,24 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 46, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { "fullName": "CreateFeed", "service": { @@ -743,8 +753,8 @@ } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_sync", "segments": [ { "end": 49, @@ -780,24 +790,23 @@ }, { "clientMethod": { - "async": true, "method": { - "fullName": "ListFeeds", + "fullName": "SearchAllResources", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_sync", "segments": [ { - "end": 44, + "end": 43, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 43, "start": 27, "type": "SHORT" }, @@ -812,37 +821,34 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "UpdateFeed", + "fullName": "BatchGetAssetsHistory", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync", "segments": [ { - "end": 47, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 44, "start": 27, "type": "SHORT" }, @@ -852,42 +858,41 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 41, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "BatchGetAssetsHistory", + "fullName": "SearchAllIamPolicies", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_sync", "segments": [ { - "end": 44, + "end": 43, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 43, "start": 27, "type": "SHORT" }, @@ -902,20 +907,17 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { "fullName": "GetFeed", "service": { @@ -923,8 +925,8 @@ } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_sync", "segments": [ { "end": 48, @@ -960,24 +962,23 @@ }, { "clientMethod": { - "async": true, "method": { - "fullName": "ExportAssets", + "fullName": "AnalyzeIamPolicyLongrunning", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync", "segments": [ { - "end": 50, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 53, "start": 27, "type": "SHORT" }, @@ -987,40 +988,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 45, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 51, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "SearchAllIamPolicies", + "fullName": "DeleteFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_sync", "segments": [ { - "end": 43, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 46, "start": 27, "type": "SHORT" }, @@ -1030,16 +1030,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 47, "type": "RESPONSE_HANDLING" } ] diff --git a/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json b/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json index 6475f3c075..eaab44d9bb 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json +++ b/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json @@ -2,15 +2,16 @@ "snippets": [ { "clientMethod": { + "async": true, "method": { - "fullName": "GenerateIdToken", + "fullName": "GenerateAccessToken", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_sync", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_async", "segments": [ { "end": 49, @@ -46,15 +47,16 @@ }, { "clientMethod": { + "async": true, "method": { - "fullName": "SignBlob", + "fullName": "SignJwt", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_sync", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_async", "segments": [ { "end": 49, @@ -90,15 +92,16 @@ }, { "clientMethod": { + "async": true, "method": { - "fullName": "GenerateAccessToken", + "fullName": "SignBlob", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_sync", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_async.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_async", "segments": [ { "end": 49, @@ -134,15 +137,16 @@ }, { "clientMethod": { + "async": true, "method": { - "fullName": "SignJwt", + "fullName": "GenerateIdToken", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_sync", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_async", "segments": [ { "end": 49, @@ -178,16 +182,15 @@ }, { "clientMethod": { - "async": true, "method": { - "fullName": "SignBlob", + "fullName": "GenerateIdToken", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_async.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_async", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_sync", "segments": [ { "end": 49, @@ -223,7 +226,6 @@ }, { "clientMethod": { - "async": true, "method": { "fullName": "SignJwt", "service": { @@ -231,8 +233,8 @@ } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_async", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_sync", "segments": [ { "end": 49, @@ -268,7 +270,6 @@ }, { "clientMethod": { - "async": true, "method": { "fullName": "GenerateAccessToken", "service": { @@ -276,8 +277,8 @@ } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_async", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_sync", "segments": [ { "end": 49, @@ -313,16 +314,15 @@ }, { "clientMethod": { - "async": true, "method": { - "fullName": "GenerateIdToken", + "fullName": "SignBlob", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_async", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_sync", "segments": [ { "end": 49, diff --git a/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json b/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json index a0b7fd03f2..42d475452d 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json +++ b/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json @@ -2,23 +2,24 @@ "snippets": [ { "clientMethod": { + "async": true, "method": { - "fullName": "WriteLogEntries", + "fullName": "UpdateLogMetric", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_async", "segments": [ { - "end": 47, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 53, "start": 27, "type": "SHORT" }, @@ -28,41 +29,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 41, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "ListMonitoredResourceDescriptors", + "fullName": "GetLogMetric", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_async", "segments": [ { - "end": 42, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 42, + "end": 48, "start": 27, "type": "SHORT" }, @@ -72,39 +74,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 37, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 38, + "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 43, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "TailLogEntries", + "fullName": "ListLogMetrics", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_async", "segments": [ { - "end": 52, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 46, "start": 27, "type": "SHORT" }, @@ -114,31 +119,32 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "DeleteLog", + "fullName": "DeleteLogMetric", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_sync.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_async", "segments": [ { "end": 46, @@ -172,23 +178,24 @@ }, { "clientMethod": { + "async": true, "method": { - "fullName": "ListLogs", + "fullName": "CreateLogMetric", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_sync.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_async", "segments": [ { - "end": 47, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 53, "start": 27, "type": "SHORT" }, @@ -198,16 +205,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] @@ -215,22 +224,22 @@ { "clientMethod": { "method": { - "fullName": "ListLogEntries", + "fullName": "UpdateLogMetric", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_sync", "segments": [ { - "end": 47, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 53, "start": 27, "type": "SHORT" }, @@ -240,40 +249,41 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "DeleteLog", + "fullName": "GetLogMetric", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_async.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_async", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_sync", "segments": [ { - "end": 46, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 48, "start": 27, "type": "SHORT" }, @@ -288,35 +298,36 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 45, "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "WriteLogEntries", + "fullName": "CreateLogMetric", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_async", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_sync", "segments": [ { - "end": 47, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 53, "start": 27, "type": "SHORT" }, @@ -326,42 +337,41 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 41, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "ListMonitoredResourceDescriptors", + "fullName": "DeleteLogMetric", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_async", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_sync", "segments": [ { - "end": 42, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 42, + "end": 46, "start": 27, "type": "SHORT" }, @@ -371,40 +381,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 37, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 38, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 43, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "ListLogEntries", + "fullName": "ListLogMetrics", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_async", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_sync", "segments": [ { - "end": 47, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 46, "start": 27, "type": "SHORT" }, @@ -414,40 +423,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "ListLogs", + "fullName": "ListBuckets", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_async.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_sync", "segments": [ { - "end": 47, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 48, "start": 27, "type": "SHORT" }, @@ -457,40 +465,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 49, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "TailLogEntries", + "fullName": "UpdateView", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_sync", "segments": [ { - "end": 52, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 44, "start": 27, "type": "SHORT" }, @@ -500,40 +507,41 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "GetLogMetric", + "fullName": "CreateSink", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateSink_sync", "segments": [ { - "end": 48, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 53, "start": 27, "type": "SHORT" }, @@ -543,42 +551,41 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 43, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "ListLogMetrics", + "fullName": "UpdateSink", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_sync", "segments": [ { - "end": 46, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 53, "start": 27, "type": "SHORT" }, @@ -588,40 +595,41 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 41, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 42, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "CreateLogMetric", + "fullName": "UndeleteBucket", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_sync", "segments": [ { - "end": 53, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 47, "start": 27, "type": "SHORT" }, @@ -631,42 +639,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "DeleteLogMetric", + "fullName": "CreateView", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_async.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_sync", "segments": [ { - "end": 46, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 45, "start": 27, "type": "SHORT" }, @@ -676,40 +681,41 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 39, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 42, + "start": 40, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 46, + "start": 43, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "UpdateLogMetric", + "fullName": "DeleteView", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_sync", "segments": [ { - "end": 53, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 48, "start": 27, "type": "SHORT" }, @@ -719,18 +725,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 44, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 49, "type": "RESPONSE_HANDLING" } ] @@ -738,14 +742,14 @@ { "clientMethod": { "method": { - "fullName": "GetLogMetric", + "fullName": "GetExclusion", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_sync", "segments": [ { "end": 48, @@ -782,22 +786,22 @@ { "clientMethod": { "method": { - "fullName": "UpdateLogMetric", + "fullName": "ListViews", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_sync", "segments": [ { - "end": 53, + "end": 43, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 43, "start": 27, "type": "SHORT" }, @@ -807,18 +811,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 44, "type": "RESPONSE_HANDLING" } ] @@ -826,22 +828,22 @@ { "clientMethod": { "method": { - "fullName": "DeleteLogMetric", + "fullName": "DeleteBucket", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_sync.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_sync", "segments": [ { - "end": 46, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 47, "start": 27, "type": "SHORT" }, @@ -851,16 +853,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 48, "type": "RESPONSE_HANDLING" } ] @@ -868,22 +870,22 @@ { "clientMethod": { "method": { - "fullName": "ListLogMetrics", + "fullName": "GetBucket", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_sync", "segments": [ { - "end": 46, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 49, "start": 27, "type": "SHORT" }, @@ -893,16 +895,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 41, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 42, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] @@ -910,22 +914,22 @@ { "clientMethod": { "method": { - "fullName": "CreateLogMetric", + "fullName": "UpdateBucket", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_sync", "segments": [ { - "end": 53, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 49, "start": 27, "type": "SHORT" }, @@ -935,18 +939,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] @@ -954,22 +958,22 @@ { "clientMethod": { "method": { - "fullName": "UpdateSink", + "fullName": "ListExclusions", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_sync", "segments": [ { - "end": 53, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 47, "start": 27, "type": "SHORT" }, @@ -979,18 +983,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 48, "type": "RESPONSE_HANDLING" } ] @@ -998,22 +1000,22 @@ { "clientMethod": { "method": { - "fullName": "ListSinks", + "fullName": "GetSink", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_sync", "segments": [ { - "end": 47, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 48, "start": 27, "type": "SHORT" }, @@ -1028,11 +1030,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 45, "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] @@ -1040,14 +1044,14 @@ { "clientMethod": { "method": { - "fullName": "CreateSink", + "fullName": "CreateExclusion", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateSink_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_sync", "segments": [ { "end": 53, @@ -1084,22 +1088,66 @@ { "clientMethod": { "method": { - "fullName": "ListBuckets", + "fullName": "CreateBucket", + "service": { + "shortName": "ConfigServiceV2" + } + } + }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "fullName": "DeleteExclusion", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_sync", "segments": [ { - "end": 48, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 46, "start": 27, "type": "SHORT" }, @@ -1109,16 +1157,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 49, + "end": 47, "type": "RESPONSE_HANDLING" } ] @@ -1170,22 +1218,22 @@ { "clientMethod": { "method": { - "fullName": "UndeleteBucket", + "fullName": "GetView", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetView_sync", "segments": [ { - "end": 47, + "end": 50, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 50, "start": 27, "type": "SHORT" }, @@ -1195,16 +1243,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 44, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "end": 47, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 51, + "start": 48, "type": "RESPONSE_HANDLING" } ] @@ -1212,14 +1262,14 @@ { "clientMethod": { "method": { - "fullName": "ListExclusions", + "fullName": "GetCmekSettings", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_sync", "segments": [ { "end": 47, @@ -1237,16 +1287,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] @@ -1254,22 +1306,22 @@ { "clientMethod": { "method": { - "fullName": "UpdateCmekSettings", + "fullName": "DeleteSink", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_sync", "segments": [ { - "end": 44, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 46, "start": 27, "type": "SHORT" }, @@ -1279,18 +1331,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 47, "type": "RESPONSE_HANDLING" } ] @@ -1298,22 +1348,22 @@ { "clientMethod": { "method": { - "fullName": "CreateExclusion", + "fullName": "ListSinks", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_sync", "segments": [ { - "end": 53, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 47, "start": 27, "type": "SHORT" }, @@ -1323,18 +1373,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 48, "type": "RESPONSE_HANDLING" } ] @@ -1342,22 +1390,22 @@ { "clientMethod": { "method": { - "fullName": "DeleteView", + "fullName": "UpdateCmekSettings", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_sync", "segments": [ { - "end": 48, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 44, "start": 27, "type": "SHORT" }, @@ -1367,39 +1415,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 44, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 49, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "DeleteSink", + "fullName": "CreateSink", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateSink_async", "segments": [ { - "end": 46, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 53, "start": 27, "type": "SHORT" }, @@ -1409,39 +1460,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "CreateView", + "fullName": "CreateExclusion", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_async", "segments": [ { - "end": 45, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 53, "start": 27, "type": "SHORT" }, @@ -1451,41 +1505,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 39, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "GetExclusion", + "fullName": "DeleteExclusion", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_async", "segments": [ { - "end": 48, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 46, "start": 27, "type": "SHORT" }, @@ -1500,19 +1555,18 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 45, "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { "fullName": "GetBucket", "service": { @@ -1520,8 +1574,8 @@ } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_async", "segments": [ { "end": 49, @@ -1557,65 +1611,24 @@ }, { "clientMethod": { + "async": true, "method": { - "fullName": "DeleteBucket", - "service": { - "shortName": "ConfigServiceV2" - } - } - }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_sync", - "segments": [ - { - "end": 47, - "start": 27, - "type": "FULL" - }, - { - "end": 47, - "start": 27, - "type": "SHORT" - }, - { - "end": 33, - "start": 31, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 43, - "start": 34, - "type": "REQUEST_INITIALIZATION" - }, - { - "start": 44, - "type": "REQUEST_EXECUTION" - }, - { - "end": 48, - "type": "RESPONSE_HANDLING" - } - ] - }, - { - "clientMethod": { - "method": { - "fullName": "UpdateBucket", + "fullName": "UpdateSink", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_async", "segments": [ { - "end": 49, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 53, "start": 27, "type": "SHORT" }, @@ -1625,41 +1638,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "GetView", + "fullName": "GetExclusion", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetView_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_async", "segments": [ { - "end": 50, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 48, "start": 27, "type": "SHORT" }, @@ -1669,41 +1683,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 44, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 47, - "start": 45, + "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 51, - "start": 48, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "UpdateView", + "fullName": "DeleteSink", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_async", "segments": [ { - "end": 44, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 46, "start": 27, "type": "SHORT" }, @@ -1713,41 +1728,40 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "GetCmekSettings", + "fullName": "GetView", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetView_async", "segments": [ { - "end": 47, + "end": 50, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 50, "start": 27, "type": "SHORT" }, @@ -1757,41 +1771,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 41, + "end": 44, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "end": 47, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 51, + "start": 48, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "GetSink", + "fullName": "ListExclusions", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_async", "segments": [ { - "end": 48, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 47, "start": 27, "type": "SHORT" }, @@ -1806,36 +1821,35 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 45, "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "CreateBucket", + "fullName": "DeleteBucket", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_async", "segments": [ { - "end": 50, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 47, "start": 27, "type": "SHORT" }, @@ -1845,41 +1859,40 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 44, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 47, - "start": 45, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 51, - "start": 48, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "ListViews", + "fullName": "ListBuckets", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_async", "segments": [ { - "end": 43, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 48, "start": 27, "type": "SHORT" }, @@ -1889,39 +1902,40 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 49, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "DeleteExclusion", + "fullName": "CreateView", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_async", "segments": [ { - "end": 46, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 45, "start": 27, "type": "SHORT" }, @@ -1931,16 +1945,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 39, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 42, + "start": 40, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 46, + "start": 43, "type": "RESPONSE_HANDLING" } ] @@ -1949,22 +1965,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "DeleteView", + "fullName": "GetCmekSettings", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_async", "segments": [ { - "end": 48, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 47, "start": 27, "type": "SHORT" }, @@ -1974,16 +1990,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 44, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 49, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] @@ -1992,22 +2010,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "UndeleteBucket", + "fullName": "DeleteView", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_async", "segments": [ { - "end": 47, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 48, "start": 27, "type": "SHORT" }, @@ -2017,16 +2035,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 44, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 49, "type": "RESPONSE_HANDLING" } ] @@ -2035,22 +2053,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "GetView", + "fullName": "UpdateCmekSettings", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetView_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_async", "segments": [ { - "end": 50, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 44, "start": 27, "type": "SHORT" }, @@ -2060,18 +2078,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 44, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 47, - "start": 45, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 51, - "start": 48, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] @@ -2080,22 +2098,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "CreateExclusion", + "fullName": "UpdateView", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_async", "segments": [ { - "end": 53, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 44, "start": 27, "type": "SHORT" }, @@ -2105,18 +2123,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] @@ -2125,22 +2143,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListBuckets", + "fullName": "UndeleteBucket", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_async", "segments": [ { - "end": 48, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 47, "start": 27, "type": "SHORT" }, @@ -2159,7 +2177,7 @@ "type": "REQUEST_EXECUTION" }, { - "end": 49, + "end": 48, "type": "RESPONSE_HANDLING" } ] @@ -2168,22 +2186,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "DeleteBucket", + "fullName": "CreateBucket", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_async", "segments": [ { - "end": 47, + "end": 50, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 50, "start": 27, "type": "SHORT" }, @@ -2193,16 +2211,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 44, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "end": 47, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 51, + "start": 48, "type": "RESPONSE_HANDLING" } ] @@ -2211,22 +2231,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "GetSink", + "fullName": "ListViews", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_async", "segments": [ { - "end": 48, + "end": 43, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 43, "start": 27, "type": "SHORT" }, @@ -2236,18 +2256,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 43, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 44, "type": "RESPONSE_HANDLING" } ] @@ -2256,22 +2274,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListSinks", + "fullName": "GetSink", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_async", "segments": [ { - "end": 47, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 48, "start": 27, "type": "SHORT" }, @@ -2286,11 +2304,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 45, "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] @@ -2299,22 +2319,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListExclusions", + "fullName": "UpdateBucket", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_async", "segments": [ { - "end": 47, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 49, "start": 27, "type": "SHORT" }, @@ -2324,16 +2344,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] @@ -2342,22 +2364,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "UpdateExclusion", + "fullName": "ListSinks", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_async", "segments": [ { - "end": 53, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 47, "start": 27, "type": "SHORT" }, @@ -2367,18 +2389,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 48, "type": "RESPONSE_HANDLING" } ] @@ -2387,22 +2407,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListViews", + "fullName": "UpdateExclusion", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_async", "segments": [ { - "end": 43, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 53, "start": 27, "type": "SHORT" }, @@ -2412,16 +2432,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] @@ -2430,22 +2452,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "UpdateCmekSettings", + "fullName": "ListLogs", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_async", "segments": [ { - "end": 44, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 47, "start": 27, "type": "SHORT" }, @@ -2455,18 +2477,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 48, "type": "RESPONSE_HANDLING" } ] @@ -2475,22 +2495,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "DeleteExclusion", + "fullName": "TailLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_async", "segments": [ { - "end": 46, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 52, "start": 27, "type": "SHORT" }, @@ -2500,16 +2520,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 53, "type": "RESPONSE_HANDLING" } ] @@ -2518,22 +2538,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "UpdateView", + "fullName": "WriteLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_async", "segments": [ { - "end": 44, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 47, "start": 27, "type": "SHORT" }, @@ -2543,18 +2563,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] @@ -2563,22 +2583,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "UpdateBucket", + "fullName": "ListMonitoredResourceDescriptors", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_async", "segments": [ { - "end": 49, + "end": 42, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 42, "start": 27, "type": "SHORT" }, @@ -2588,18 +2608,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 37, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "start": 38, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 43, "type": "RESPONSE_HANDLING" } ] @@ -2608,22 +2626,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "CreateView", + "fullName": "DeleteLog", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_async", "segments": [ { - "end": 45, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 46, "start": 27, "type": "SHORT" }, @@ -2633,18 +2651,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 39, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 47, "type": "RESPONSE_HANDLING" } ] @@ -2653,22 +2669,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "CreateSink", + "fullName": "ListLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateSink_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_async", "segments": [ { - "end": 53, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 47, "start": 27, "type": "SHORT" }, @@ -2678,42 +2694,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "DeleteSink", + "fullName": "ListMonitoredResourceDescriptors", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_sync", "segments": [ { - "end": 46, + "end": 42, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 42, "start": 27, "type": "SHORT" }, @@ -2723,32 +2736,31 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 37, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 38, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 43, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "GetCmekSettings", + "fullName": "WriteLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_sync", "segments": [ { "end": 47, @@ -2784,24 +2796,23 @@ }, { "clientMethod": { - "async": true, "method": { - "fullName": "CreateBucket", + "fullName": "ListLogs", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_sync", "segments": [ { - "end": 50, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 47, "start": 27, "type": "SHORT" }, @@ -2811,42 +2822,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 44, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 47, - "start": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 51, - "start": 48, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "GetExclusion", + "fullName": "DeleteLog", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_sync", "segments": [ { - "end": 48, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 46, "start": 27, "type": "SHORT" }, @@ -2861,37 +2869,34 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 45, "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "UpdateSink", + "fullName": "TailLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_sync", "segments": [ { - "end": 53, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 52, "start": 27, "type": "SHORT" }, @@ -2906,37 +2911,34 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 50, "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "GetBucket", + "fullName": "ListLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_sync", "segments": [ { - "end": 49, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 47, "start": 27, "type": "SHORT" }, @@ -2946,18 +2948,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 48, "type": "RESPONSE_HANDLING" } ] diff --git a/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json b/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json index 92ed4dc500..84ae306a09 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json +++ b/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json @@ -4,22 +4,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "UpgradeInstance", + "fullName": "ExportInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_async", "segments": [ { - "end": 52, + "end": 50, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 50, "start": 27, "type": "SHORT" }, @@ -29,16 +29,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 44, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 51, "type": "RESPONSE_HANDLING" } ] @@ -47,22 +47,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "ExportInstance", + "fullName": "ListInstances", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_async", "segments": [ { - "end": 50, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 47, "start": 27, "type": "SHORT" }, @@ -81,7 +81,7 @@ "type": "REQUEST_EXECUTION" }, { - "end": 51, + "end": 48, "type": "RESPONSE_HANDLING" } ] @@ -90,22 +90,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "CreateInstance", + "fullName": "GetInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_async", "segments": [ { - "end": 57, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 57, + "end": 49, "start": 27, "type": "SHORT" }, @@ -115,16 +115,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 49, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 50, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 58, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] @@ -133,22 +135,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "ImportInstance", + "fullName": "UpgradeInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_ImportInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_async", "segments": [ { - "end": 50, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 52, "start": 27, "type": "SHORT" }, @@ -158,16 +160,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 44, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 51, + "end": 53, "type": "RESPONSE_HANDLING" } ] @@ -176,22 +178,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "GetInstance", + "fullName": "DeleteInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_async", "segments": [ { - "end": 49, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 51, "start": 27, "type": "SHORT" }, @@ -206,13 +208,11 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 46, "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 52, "type": "RESPONSE_HANDLING" } ] @@ -221,22 +221,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListInstances", + "fullName": "CreateInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_async", "segments": [ { - "end": 47, + "end": 57, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 57, "start": 27, "type": "SHORT" }, @@ -246,16 +246,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 49, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 50, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 58, "type": "RESPONSE_HANDLING" } ] @@ -264,14 +264,14 @@ "clientMethod": { "async": true, "method": { - "fullName": "DeleteInstance", + "fullName": "FailoverInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_async", "segments": [ { "end": 51, @@ -307,14 +307,14 @@ "clientMethod": { "async": true, "method": { - "fullName": "FailoverInstance", + "fullName": "UpdateInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_async", "segments": [ { "end": 51, @@ -350,22 +350,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "UpdateInstance", + "fullName": "ImportInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ImportInstance_async", "segments": [ { - "end": 51, + "end": 50, "start": 27, "type": "FULL" }, { - "end": 51, + "end": 50, "start": 27, "type": "SHORT" }, @@ -375,16 +375,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 52, + "end": 51, "type": "RESPONSE_HANDLING" } ] @@ -392,22 +392,22 @@ { "clientMethod": { "method": { - "fullName": "GetInstance", + "fullName": "FailoverInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_sync", "segments": [ { - "end": 49, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 51, "start": 27, "type": "SHORT" }, @@ -422,13 +422,11 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 46, "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 52, "type": "RESPONSE_HANDLING" } ] @@ -436,14 +434,14 @@ { "clientMethod": { "method": { - "fullName": "UpdateInstance", + "fullName": "DeleteInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_sync", "segments": [ { "end": 51, @@ -478,22 +476,22 @@ { "clientMethod": { "method": { - "fullName": "DeleteInstance", + "fullName": "ExportInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_sync", "segments": [ { - "end": 51, + "end": 50, "start": 27, "type": "FULL" }, { - "end": 51, + "end": 50, "start": 27, "type": "SHORT" }, @@ -503,16 +501,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 52, + "end": 51, "type": "RESPONSE_HANDLING" } ] @@ -520,22 +518,22 @@ { "clientMethod": { "method": { - "fullName": "UpgradeInstance", + "fullName": "UpdateInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_sync", "segments": [ { - "end": 52, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 51, "start": 27, "type": "SHORT" }, @@ -545,16 +543,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 44, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 52, "type": "RESPONSE_HANDLING" } ] @@ -562,22 +560,22 @@ { "clientMethod": { "method": { - "fullName": "ExportInstance", + "fullName": "GetInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_sync", "segments": [ { - "end": 50, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 49, "start": 27, "type": "SHORT" }, @@ -587,16 +585,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 51, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] @@ -604,22 +604,22 @@ { "clientMethod": { "method": { - "fullName": "ListInstances", + "fullName": "UpgradeInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_sync", "segments": [ { - "end": 47, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 52, "start": 27, "type": "SHORT" }, @@ -629,16 +629,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 44, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 53, "type": "RESPONSE_HANDLING" } ] @@ -646,22 +646,22 @@ { "clientMethod": { "method": { - "fullName": "CreateInstance", + "fullName": "ListInstances", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_sync", "segments": [ { - "end": 57, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 57, + "end": 47, "start": 27, "type": "SHORT" }, @@ -671,16 +671,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 49, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 50, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 58, + "end": 48, "type": "RESPONSE_HANDLING" } ] @@ -688,22 +688,22 @@ { "clientMethod": { "method": { - "fullName": "FailoverInstance", + "fullName": "CreateInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_sync", "segments": [ { - "end": 51, + "end": 57, "start": 27, "type": "FULL" }, { - "end": 51, + "end": 57, "start": 27, "type": "SHORT" }, @@ -713,16 +713,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 49, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 50, "type": "REQUEST_EXECUTION" }, { - "end": 52, + "end": 58, "type": "RESPONSE_HANDLING" } ] From c58c5ae0a7328ec18057b565129c0188b313d2d9 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Wed, 12 Jan 2022 00:01:38 +0000 Subject: [PATCH 08/18] chore: regen metadata files --- .../snippet_metadata_v1_asset_v1.json | 432 +++--- .../snippet_metadata_v1_credentials_v1.json | 42 +- .../snippet_metadata_v1_logging_v2.json | 1166 ++++++++--------- .../snippet_metadata_v1_redis_v1.json | 252 ++-- 4 files changed, 946 insertions(+), 946 deletions(-) diff --git a/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json b/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json index 953104d801..e70015063e 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json +++ b/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json @@ -2,24 +2,23 @@ "snippets": [ { "clientMethod": { - "async": true, "method": { - "fullName": "DeleteFeed", + "fullName": "ListAssets", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_sync", "segments": [ { - "end": 46, + "end": 43, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 43, "start": 27, "type": "SHORT" }, @@ -29,40 +28,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "CreateFeed", + "fullName": "SearchAllResources", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_sync", "segments": [ { - "end": 49, + "end": 43, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 43, "start": 27, "type": "SHORT" }, @@ -72,42 +70,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "SearchAllResources", + "fullName": "GetFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_sync", "segments": [ { - "end": 43, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 48, "start": 27, "type": "SHORT" }, @@ -117,40 +112,41 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "ExportAssets", + "fullName": "SearchAllIamPolicies", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_sync", "segments": [ { - "end": 50, + "end": 43, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 43, "start": 27, "type": "SHORT" }, @@ -160,40 +156,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 51, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "ListFeeds", + "fullName": "DeleteFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_sync", "segments": [ { - "end": 44, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 46, "start": 27, "type": "SHORT" }, @@ -203,42 +198,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "GetFeed", + "fullName": "ListFeeds", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_sync", "segments": [ { - "end": 48, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 44, "start": 27, "type": "SHORT" }, @@ -248,42 +240,41 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 43, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "SearchAllIamPolicies", + "fullName": "AnalyzeIamPolicyLongrunning", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync", "segments": [ { - "end": 43, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 53, "start": 27, "type": "SHORT" }, @@ -293,32 +284,31 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 45, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "AnalyzeIamPolicy", + "fullName": "UpdateFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_sync", "segments": [ { "end": 47, @@ -354,24 +344,23 @@ }, { "clientMethod": { - "async": true, "method": { - "fullName": "UpdateFeed", + "fullName": "BatchGetAssetsHistory", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync", "segments": [ { - "end": 47, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 44, "start": 27, "type": "SHORT" }, @@ -381,42 +370,41 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 41, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "ListAssets", + "fullName": "ExportAssets", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_sync", "segments": [ { - "end": 43, + "end": 50, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 50, "start": 27, "type": "SHORT" }, @@ -426,40 +414,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 51, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "AnalyzeIamPolicyLongrunning", + "fullName": "CreateFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_sync", "segments": [ { - "end": 53, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 49, "start": 27, "type": "SHORT" }, @@ -469,40 +456,41 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 46, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "BatchGetAssetsHistory", + "fullName": "AnalyzeIamPolicy", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync", "segments": [ { - "end": 44, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 47, "start": 27, "type": "SHORT" }, @@ -512,41 +500,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "ExportAssets", + "fullName": "AnalyzeIamPolicyLongrunning", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async", "segments": [ { - "end": 50, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 53, "start": 27, "type": "SHORT" }, @@ -556,39 +545,40 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 45, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 51, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "AnalyzeIamPolicy", + "fullName": "ListFeeds", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_async", "segments": [ { - "end": 47, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 44, "start": 27, "type": "SHORT" }, @@ -598,41 +588,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 41, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "UpdateFeed", + "fullName": "DeleteFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_async", "segments": [ { - "end": 47, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 46, "start": 27, "type": "SHORT" }, @@ -642,41 +633,40 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 41, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "ListAssets", + "fullName": "GetFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_async", "segments": [ { - "end": 43, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 48, "start": 27, "type": "SHORT" }, @@ -686,39 +676,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "ListFeeds", + "fullName": "CreateFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_async", "segments": [ { - "end": 44, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 49, "start": 27, "type": "SHORT" }, @@ -728,41 +721,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "CreateFeed", + "fullName": "BatchGetAssetsHistory", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async", "segments": [ { - "end": 49, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 44, "start": 27, "type": "SHORT" }, @@ -772,41 +766,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "SearchAllResources", + "fullName": "ExportAssets", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_async", "segments": [ { - "end": 43, + "end": 50, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 50, "start": 27, "type": "SHORT" }, @@ -816,39 +811,40 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 51, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "BatchGetAssetsHistory", + "fullName": "UpdateFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_async", "segments": [ { - "end": 44, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 47, "start": 27, "type": "SHORT" }, @@ -858,33 +854,34 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "SearchAllIamPolicies", + "fullName": "SearchAllResources", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_async", "segments": [ { "end": 43, @@ -918,23 +915,24 @@ }, { "clientMethod": { + "async": true, "method": { - "fullName": "GetFeed", + "fullName": "SearchAllIamPolicies", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_async", "segments": [ { - "end": 48, + "end": 43, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 43, "start": 27, "type": "SHORT" }, @@ -944,41 +942,40 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 43, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "AnalyzeIamPolicyLongrunning", + "fullName": "AnalyzeIamPolicy", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async", "segments": [ { - "end": 53, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 47, "start": 27, "type": "SHORT" }, @@ -988,39 +985,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 46, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "DeleteFeed", + "fullName": "ListAssets", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_async", "segments": [ { - "end": 46, + "end": 43, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 43, "start": 27, "type": "SHORT" }, @@ -1030,16 +1030,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 44, "type": "RESPONSE_HANDLING" } ] diff --git a/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json b/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json index eaab44d9bb..14d2df9b6d 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json +++ b/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json @@ -4,14 +4,14 @@ "clientMethod": { "async": true, "method": { - "fullName": "GenerateAccessToken", + "fullName": "GenerateIdToken", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_async", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_async", "segments": [ { "end": 49, @@ -49,14 +49,14 @@ "clientMethod": { "async": true, "method": { - "fullName": "SignJwt", + "fullName": "GenerateAccessToken", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_async", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_async", "segments": [ { "end": 49, @@ -139,14 +139,14 @@ "clientMethod": { "async": true, "method": { - "fullName": "GenerateIdToken", + "fullName": "SignJwt", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_async", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_async", "segments": [ { "end": 49, @@ -183,14 +183,14 @@ { "clientMethod": { "method": { - "fullName": "GenerateIdToken", + "fullName": "SignJwt", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_sync", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_sync", "segments": [ { "end": 49, @@ -227,14 +227,14 @@ { "clientMethod": { "method": { - "fullName": "SignJwt", + "fullName": "SignBlob", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_sync", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_sync", "segments": [ { "end": 49, @@ -271,14 +271,14 @@ { "clientMethod": { "method": { - "fullName": "GenerateAccessToken", + "fullName": "GenerateIdToken", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_sync", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_sync", "segments": [ { "end": 49, @@ -315,14 +315,14 @@ { "clientMethod": { "method": { - "fullName": "SignBlob", + "fullName": "GenerateAccessToken", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_sync", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_sync", "segments": [ { "end": 49, diff --git a/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json b/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json index 42d475452d..55538f76cb 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json +++ b/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json @@ -2,24 +2,23 @@ "snippets": [ { "clientMethod": { - "async": true, "method": { - "fullName": "UpdateLogMetric", + "fullName": "GetView", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetView_sync", "segments": [ { - "end": 53, + "end": 50, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 50, "start": 27, "type": "SHORT" }, @@ -29,34 +28,33 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 44, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 47, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 51, + "start": 48, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "GetLogMetric", + "fullName": "GetExclusion", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_sync", "segments": [ { "end": 48, @@ -92,24 +90,23 @@ }, { "clientMethod": { - "async": true, "method": { - "fullName": "ListLogMetrics", + "fullName": "CreateExclusion", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_sync", "segments": [ { - "end": 46, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 53, "start": 27, "type": "SHORT" }, @@ -119,32 +116,33 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 41, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 42, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "DeleteLogMetric", + "fullName": "DeleteSink", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_async.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_sync", "segments": [ { "end": 46, @@ -178,24 +176,23 @@ }, { "clientMethod": { - "async": true, "method": { - "fullName": "CreateLogMetric", + "fullName": "UndeleteBucket", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_sync", "segments": [ { - "end": 53, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 47, "start": 27, "type": "SHORT" }, @@ -205,18 +202,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 48, "type": "RESPONSE_HANDLING" } ] @@ -224,22 +219,22 @@ { "clientMethod": { "method": { - "fullName": "UpdateLogMetric", + "fullName": "GetSink", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_sync", "segments": [ { - "end": 53, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 48, "start": 27, "type": "SHORT" }, @@ -249,18 +244,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] @@ -268,22 +263,22 @@ { "clientMethod": { "method": { - "fullName": "GetLogMetric", + "fullName": "ListExclusions", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_sync", "segments": [ { - "end": 48, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 47, "start": 27, "type": "SHORT" }, @@ -298,13 +293,11 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 45, "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 48, "type": "RESPONSE_HANDLING" } ] @@ -312,22 +305,22 @@ { "clientMethod": { "method": { - "fullName": "CreateLogMetric", + "fullName": "GetBucket", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_sync", "segments": [ { - "end": 53, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 49, "start": 27, "type": "SHORT" }, @@ -337,18 +330,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] @@ -356,22 +349,22 @@ { "clientMethod": { "method": { - "fullName": "DeleteLogMetric", + "fullName": "UpdateBucket", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_sync.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_sync", "segments": [ { - "end": 46, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 49, "start": 27, "type": "SHORT" }, @@ -381,16 +374,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] @@ -398,22 +393,22 @@ { "clientMethod": { "method": { - "fullName": "ListLogMetrics", + "fullName": "CreateView", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_sync", "segments": [ { - "end": 46, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 45, "start": 27, "type": "SHORT" }, @@ -423,16 +418,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 41, + "end": 39, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 42, + "end": 42, + "start": 40, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 46, + "start": 43, "type": "RESPONSE_HANDLING" } ] @@ -440,22 +437,22 @@ { "clientMethod": { "method": { - "fullName": "ListBuckets", + "fullName": "ListSinks", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_sync", "segments": [ { - "end": 48, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 47, "start": 27, "type": "SHORT" }, @@ -465,16 +462,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 49, + "end": 48, "type": "RESPONSE_HANDLING" } ] @@ -482,22 +479,22 @@ { "clientMethod": { "method": { - "fullName": "UpdateView", + "fullName": "CreateSink", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateSink_sync", "segments": [ { - "end": 44, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 53, "start": 27, "type": "SHORT" }, @@ -507,18 +504,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] @@ -526,22 +523,22 @@ { "clientMethod": { "method": { - "fullName": "CreateSink", + "fullName": "ListViews", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateSink_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_sync", "segments": [ { - "end": 53, + "end": 43, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 43, "start": 27, "type": "SHORT" }, @@ -551,18 +548,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 44, "type": "RESPONSE_HANDLING" } ] @@ -570,22 +565,22 @@ { "clientMethod": { "method": { - "fullName": "UpdateSink", + "fullName": "ListBuckets", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_sync", "segments": [ { - "end": 53, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 48, "start": 27, "type": "SHORT" }, @@ -595,18 +590,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 49, "type": "RESPONSE_HANDLING" } ] @@ -614,14 +607,14 @@ { "clientMethod": { "method": { - "fullName": "UndeleteBucket", + "fullName": "DeleteBucket", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_sync", "segments": [ { "end": 47, @@ -656,22 +649,22 @@ { "clientMethod": { "method": { - "fullName": "CreateView", + "fullName": "UpdateSink", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_sync", "segments": [ { - "end": 45, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 53, "start": 27, "type": "SHORT" }, @@ -681,18 +674,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 39, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] @@ -700,22 +693,22 @@ { "clientMethod": { "method": { - "fullName": "DeleteView", + "fullName": "UpdateView", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_sync", "segments": [ { - "end": 48, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 44, "start": 27, "type": "SHORT" }, @@ -725,16 +718,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 44, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 49, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] @@ -742,14 +737,14 @@ { "clientMethod": { "method": { - "fullName": "GetExclusion", + "fullName": "DeleteView", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_sync", "segments": [ { "end": 48, @@ -767,18 +762,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 44, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 43, + "start": 45, "type": "REQUEST_EXECUTION" }, { "end": 49, - "start": 46, "type": "RESPONSE_HANDLING" } ] @@ -786,22 +779,22 @@ { "clientMethod": { "method": { - "fullName": "ListViews", + "fullName": "GetCmekSettings", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_sync", "segments": [ { - "end": 43, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 47, "start": 27, "type": "SHORT" }, @@ -811,16 +804,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] @@ -828,22 +823,22 @@ { "clientMethod": { "method": { - "fullName": "DeleteBucket", + "fullName": "UpdateCmekSettings", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_sync", "segments": [ { - "end": 47, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 44, "start": 27, "type": "SHORT" }, @@ -853,16 +848,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] @@ -870,22 +867,22 @@ { "clientMethod": { "method": { - "fullName": "GetBucket", + "fullName": "DeleteExclusion", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_sync", "segments": [ { - "end": 49, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 46, "start": 27, "type": "SHORT" }, @@ -895,18 +892,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 47, "type": "RESPONSE_HANDLING" } ] @@ -914,22 +909,22 @@ { "clientMethod": { "method": { - "fullName": "UpdateBucket", + "fullName": "UpdateExclusion", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_sync", "segments": [ { - "end": 49, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 53, "start": 27, "type": "SHORT" }, @@ -939,18 +934,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] @@ -958,22 +953,22 @@ { "clientMethod": { "method": { - "fullName": "ListExclusions", + "fullName": "CreateBucket", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_sync", "segments": [ { - "end": 47, + "end": 50, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 50, "start": 27, "type": "SHORT" }, @@ -983,39 +978,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 44, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 47, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 51, + "start": 48, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "GetSink", + "fullName": "UpdateCmekSettings", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_async", "segments": [ { - "end": 48, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 44, "start": 27, "type": "SHORT" }, @@ -1025,41 +1023,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 43, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "CreateExclusion", + "fullName": "DeleteExclusion", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_async", "segments": [ { - "end": 53, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 46, "start": 27, "type": "SHORT" }, @@ -1069,41 +1068,40 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "CreateBucket", + "fullName": "GetBucket", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_async", "segments": [ { - "end": 50, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 49, "start": 27, "type": "SHORT" }, @@ -1113,33 +1111,34 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 44, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 47, - "start": 45, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 51, - "start": 48, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "DeleteExclusion", + "fullName": "DeleteSink", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_async", "segments": [ { "end": 46, @@ -1173,23 +1172,24 @@ }, { "clientMethod": { + "async": true, "method": { - "fullName": "UpdateExclusion", + "fullName": "GetSink", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_async", "segments": [ { - "end": 53, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 48, "start": 27, "type": "SHORT" }, @@ -1199,41 +1199,42 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "GetView", + "fullName": "UndeleteBucket", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetView_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_async", "segments": [ { - "end": 50, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 47, "start": 27, "type": "SHORT" }, @@ -1243,41 +1244,40 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 44, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 47, - "start": 45, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 51, - "start": 48, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "GetCmekSettings", + "fullName": "ListBuckets", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_async", "segments": [ { - "end": 47, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 48, "start": 27, "type": "SHORT" }, @@ -1287,41 +1287,40 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 41, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 49, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "DeleteSink", + "fullName": "ListSinks", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_async", "segments": [ { - "end": 46, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 47, "start": 27, "type": "SHORT" }, @@ -1340,30 +1339,31 @@ "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "ListSinks", + "fullName": "ListViews", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_async", "segments": [ { - "end": 47, + "end": 43, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 43, "start": 27, "type": "SHORT" }, @@ -1373,39 +1373,40 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "UpdateCmekSettings", + "fullName": "ListExclusions", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_async", "segments": [ { - "end": 44, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 47, "start": 27, "type": "SHORT" }, @@ -1415,18 +1416,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 48, "type": "RESPONSE_HANDLING" } ] @@ -1480,14 +1479,14 @@ "clientMethod": { "async": true, "method": { - "fullName": "CreateExclusion", + "fullName": "UpdateSink", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_async", "segments": [ { "end": 53, @@ -1525,22 +1524,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "DeleteExclusion", + "fullName": "CreateView", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_async", "segments": [ { - "end": 46, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 45, "start": 27, "type": "SHORT" }, @@ -1550,16 +1549,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 39, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 42, + "start": 40, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 46, + "start": 43, "type": "RESPONSE_HANDLING" } ] @@ -1568,14 +1569,14 @@ "clientMethod": { "async": true, "method": { - "fullName": "GetBucket", + "fullName": "UpdateBucket", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_async", "segments": [ { "end": 49, @@ -1613,22 +1614,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "UpdateSink", + "fullName": "DeleteBucket", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_async", "segments": [ { - "end": 53, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 47, "start": 27, "type": "SHORT" }, @@ -1638,18 +1639,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 48, "type": "RESPONSE_HANDLING" } ] @@ -1658,22 +1657,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "GetExclusion", + "fullName": "GetCmekSettings", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_async", "segments": [ { - "end": 48, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 47, "start": 27, "type": "SHORT" }, @@ -1683,18 +1682,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 43, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] @@ -1703,22 +1702,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "DeleteSink", + "fullName": "CreateExclusion", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_async", "segments": [ { - "end": 46, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 53, "start": 27, "type": "SHORT" }, @@ -1728,16 +1727,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] @@ -1791,22 +1792,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListExclusions", + "fullName": "CreateBucket", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_async", "segments": [ { - "end": 47, + "end": 50, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 50, "start": 27, "type": "SHORT" }, @@ -1816,16 +1817,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 44, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 47, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 51, + "start": 48, "type": "RESPONSE_HANDLING" } ] @@ -1834,22 +1837,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "DeleteBucket", + "fullName": "UpdateExclusion", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_async", "segments": [ { - "end": 47, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 53, "start": 27, "type": "SHORT" }, @@ -1859,16 +1862,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] @@ -1877,14 +1882,14 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListBuckets", + "fullName": "GetExclusion", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_async", "segments": [ { "end": 48, @@ -1902,16 +1907,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] @@ -1920,22 +1927,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "CreateView", + "fullName": "UpdateView", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_async", "segments": [ { - "end": 45, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 44, "start": 27, "type": "SHORT" }, @@ -1945,18 +1952,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 39, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] @@ -1965,22 +1972,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "GetCmekSettings", + "fullName": "DeleteView", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_async", "segments": [ { - "end": 47, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 48, "start": 27, "type": "SHORT" }, @@ -1990,42 +1997,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 41, + "end": 44, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 49, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "DeleteView", + "fullName": "TailLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_sync", "segments": [ { - "end": 48, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 52, "start": 27, "type": "SHORT" }, @@ -2035,40 +2039,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 44, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 49, + "end": 53, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "UpdateCmekSettings", + "fullName": "ListMonitoredResourceDescriptors", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_sync", "segments": [ { - "end": 44, + "end": 42, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 42, "start": 27, "type": "SHORT" }, @@ -2078,42 +2081,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 37, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "start": 38, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 43, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "UpdateView", + "fullName": "ListLogs", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_sync", "segments": [ { - "end": 44, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 47, "start": 27, "type": "SHORT" }, @@ -2123,34 +2123,31 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "UndeleteBucket", + "fullName": "WriteLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_sync", "segments": [ { "end": 47, @@ -2168,40 +2165,41 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "CreateBucket", + "fullName": "DeleteLog", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_sync", "segments": [ { - "end": 50, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 46, "start": 27, "type": "SHORT" }, @@ -2211,42 +2209,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 44, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 47, - "start": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 51, - "start": 48, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "ListViews", + "fullName": "ListLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_sync", "segments": [ { - "end": 43, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 47, "start": 27, "type": "SHORT" }, @@ -2256,16 +2251,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 38, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 48, "type": "RESPONSE_HANDLING" } ] @@ -2274,22 +2269,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "GetSink", + "fullName": "WriteLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_async", "segments": [ { - "end": 48, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 48, + "end": 47, "start": 27, "type": "SHORT" }, @@ -2299,18 +2294,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 43, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] @@ -2319,22 +2314,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "UpdateBucket", + "fullName": "ListLogs", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_async", "segments": [ { - "end": 49, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 47, "start": 27, "type": "SHORT" }, @@ -2344,18 +2339,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 48, "type": "RESPONSE_HANDLING" } ] @@ -2364,22 +2357,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListSinks", + "fullName": "TailLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_async", "segments": [ { - "end": 47, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 52, "start": 27, "type": "SHORT" }, @@ -2389,16 +2382,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 53, "type": "RESPONSE_HANDLING" } ] @@ -2407,22 +2400,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "UpdateExclusion", + "fullName": "DeleteLog", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_async", "segments": [ { - "end": 53, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 46, "start": 27, "type": "SHORT" }, @@ -2432,18 +2425,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 47, "type": "RESPONSE_HANDLING" } ] @@ -2452,22 +2443,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListLogs", + "fullName": "ListMonitoredResourceDescriptors", "service": { "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_async.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_async", "segments": [ { - "end": 47, + "end": 42, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 42, "start": 27, "type": "SHORT" }, @@ -2477,16 +2468,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 37, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 38, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 43, "type": "RESPONSE_HANDLING" } ] @@ -2495,22 +2486,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "TailLogEntries", + "fullName": "ListLogEntries", "service": { "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_async", "segments": [ { - "end": 52, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 47, "start": 27, "type": "SHORT" }, @@ -2520,16 +2511,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 48, "type": "RESPONSE_HANDLING" } ] @@ -2538,22 +2529,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "WriteLogEntries", + "fullName": "DeleteLogMetric", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_async", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_async", "segments": [ { - "end": 47, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 46, "start": 27, "type": "SHORT" }, @@ -2563,18 +2554,16 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 41, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 47, "type": "RESPONSE_HANDLING" } ] @@ -2583,22 +2572,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListMonitoredResourceDescriptors", + "fullName": "UpdateLogMetric", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_async", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_async", "segments": [ { - "end": 42, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 42, + "end": 53, "start": 27, "type": "SHORT" }, @@ -2608,16 +2597,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 37, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 38, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 43, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] @@ -2626,22 +2617,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "DeleteLog", + "fullName": "CreateLogMetric", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_async.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_async", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_async", "segments": [ { - "end": 46, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 46, + "end": 53, "start": 27, "type": "SHORT" }, @@ -2651,16 +2642,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] @@ -2669,22 +2662,22 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListLogEntries", + "fullName": "ListLogMetrics", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_async", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_async", "segments": [ { - "end": 47, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 46, "start": 27, "type": "SHORT" }, @@ -2694,39 +2687,40 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "ListMonitoredResourceDescriptors", + "fullName": "GetLogMetric", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_async", "segments": [ { - "end": 42, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 42, + "end": 48, "start": 27, "type": "SHORT" }, @@ -2736,16 +2730,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 37, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 38, + "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 43, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] @@ -2753,22 +2749,22 @@ { "clientMethod": { "method": { - "fullName": "WriteLogEntries", + "fullName": "UpdateLogMetric", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_sync", "segments": [ { - "end": 47, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 53, "start": 27, "type": "SHORT" }, @@ -2778,18 +2774,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 41, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] @@ -2797,22 +2793,22 @@ { "clientMethod": { "method": { - "fullName": "ListLogs", + "fullName": "DeleteLogMetric", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_sync.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_sync", "segments": [ { - "end": 47, + "end": 46, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 46, "start": 27, "type": "SHORT" }, @@ -2831,7 +2827,7 @@ "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 47, "type": "RESPONSE_HANDLING" } ] @@ -2839,14 +2835,14 @@ { "clientMethod": { "method": { - "fullName": "DeleteLog", + "fullName": "ListLogMetrics", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_sync.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_sync", "segments": [ { "end": 46, @@ -2864,12 +2860,12 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 41, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 42, "type": "REQUEST_EXECUTION" }, { @@ -2881,22 +2877,22 @@ { "clientMethod": { "method": { - "fullName": "TailLogEntries", + "fullName": "GetLogMetric", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_sync", "segments": [ { - "end": 52, + "end": 48, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 48, "start": 27, "type": "SHORT" }, @@ -2906,16 +2902,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 47, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, + "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] @@ -2923,22 +2921,22 @@ { "clientMethod": { "method": { - "fullName": "ListLogEntries", + "fullName": "CreateLogMetric", "service": { - "shortName": "LoggingServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_sync", "segments": [ { - "end": 47, + "end": 53, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 53, "start": 27, "type": "SHORT" }, @@ -2948,16 +2946,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 47, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] diff --git a/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json b/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json index 84ae306a09..9bf161f842 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json +++ b/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json @@ -2,24 +2,23 @@ "snippets": [ { "clientMethod": { - "async": true, "method": { - "fullName": "ExportInstance", + "fullName": "UpgradeInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_sync", "segments": [ { - "end": 50, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 52, "start": 27, "type": "SHORT" }, @@ -29,40 +28,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 44, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 51, + "end": 53, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "ListInstances", + "fullName": "UpdateInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_sync", "segments": [ { - "end": 47, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 51, "start": 27, "type": "SHORT" }, @@ -72,40 +70,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 52, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "GetInstance", + "fullName": "CreateInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_sync", "segments": [ { - "end": 49, + "end": 57, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 57, "start": 27, "type": "SHORT" }, @@ -115,42 +112,39 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 49, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "start": 50, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 58, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "UpgradeInstance", + "fullName": "GetInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_sync", "segments": [ { - "end": 52, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 49, "start": 27, "type": "SHORT" }, @@ -160,32 +154,33 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 44, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "DeleteInstance", + "fullName": "FailoverInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_sync", "segments": [ { "end": 51, @@ -219,24 +214,23 @@ }, { "clientMethod": { - "async": true, "method": { - "fullName": "CreateInstance", + "fullName": "ListInstances", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_sync", "segments": [ { - "end": 57, + "end": 47, "start": 27, "type": "FULL" }, { - "end": 57, + "end": 47, "start": 27, "type": "SHORT" }, @@ -246,32 +240,31 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 49, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 50, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 58, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { - "fullName": "FailoverInstance", + "fullName": "DeleteInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_sync", "segments": [ { "end": 51, @@ -305,24 +298,23 @@ }, { "clientMethod": { - "async": true, "method": { - "fullName": "UpdateInstance", + "fullName": "ExportInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_sync", "segments": [ { - "end": 51, + "end": 50, "start": 27, "type": "FULL" }, { - "end": 51, + "end": 50, "start": 27, "type": "SHORT" }, @@ -332,23 +324,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 52, + "end": 51, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { - "async": true, "method": { "fullName": "ImportInstance", "service": { @@ -356,8 +347,8 @@ } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_ImportInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ImportInstance_sync", "segments": [ { "end": 50, @@ -391,23 +382,24 @@ }, { "clientMethod": { + "async": true, "method": { - "fullName": "FailoverInstance", + "fullName": "ImportInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ImportInstance_async", "segments": [ { - "end": 51, + "end": 50, "start": 27, "type": "FULL" }, { - "end": 51, + "end": 50, "start": 27, "type": "SHORT" }, @@ -417,39 +409,40 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 52, + "end": 51, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "DeleteInstance", + "fullName": "CreateInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_async", "segments": [ { - "end": 51, + "end": 57, "start": 27, "type": "FULL" }, { - "end": 51, + "end": 57, "start": 27, "type": "SHORT" }, @@ -459,39 +452,40 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 49, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 50, "type": "REQUEST_EXECUTION" }, { - "end": 52, + "end": 58, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "ExportInstance", + "fullName": "UpgradeInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_async", "segments": [ { - "end": 50, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 52, "start": 27, "type": "SHORT" }, @@ -501,39 +495,40 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 44, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 51, + "end": 53, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "UpdateInstance", + "fullName": "GetInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_async", "segments": [ { - "end": 51, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 51, + "end": 49, "start": 27, "type": "SHORT" }, @@ -548,34 +543,37 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 46, "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 52, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "GetInstance", + "fullName": "UpdateInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_async", "segments": [ { - "end": 49, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 51, "start": 27, "type": "SHORT" }, @@ -590,36 +588,35 @@ "type": "REQUEST_INITIALIZATION" }, { - "end": 46, "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 52, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "UpgradeInstance", + "fullName": "DeleteInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_async", "segments": [ { - "end": 52, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 51, "start": 27, "type": "SHORT" }, @@ -629,22 +626,23 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 44, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 52, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { "fullName": "ListInstances", "service": { @@ -652,8 +650,8 @@ } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_async", "segments": [ { "end": 47, @@ -687,23 +685,24 @@ }, { "clientMethod": { + "async": true, "method": { - "fullName": "CreateInstance", + "fullName": "FailoverInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_async", "segments": [ { - "end": 57, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 57, + "end": 51, "start": 27, "type": "SHORT" }, @@ -713,31 +712,32 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 49, + "end": 43, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 50, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 58, + "end": 52, "type": "RESPONSE_HANDLING" } ] }, { "clientMethod": { + "async": true, "method": { - "fullName": "ImportInstance", + "fullName": "ExportInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_ImportInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_async", "segments": [ { "end": 50, From 906be9cbaa27ddc38c71ccc290c3efa0e86daeb3 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Wed, 12 Jan 2022 00:13:50 +0000 Subject: [PATCH 09/18] fix: use OrderedDict --- gapic/samplegen_utils/snippet_index.py | 6 +- .../snippet_metadata_v1_asset_v1.json | 474 +++--- .../snippet_metadata_v1_credentials_v1.json | 148 +- .../snippet_metadata_v1_logging_v2.json | 1444 ++++++++--------- .../snippet_metadata_v1_redis_v1.json | 298 ++-- 5 files changed, 1185 insertions(+), 1185 deletions(-) diff --git a/gapic/samplegen_utils/snippet_index.py b/gapic/samplegen_utils/snippet_index.py index 3a364f2889..2f16c7c118 100644 --- a/gapic/samplegen_utils/snippet_index.py +++ b/gapic/samplegen_utils/snippet_index.py @@ -174,6 +174,6 @@ def get_snippet(self, service_name: str, rpc_name: str, sync: bool = True) -> Op def get_metadata_json(self) -> str: """JSON representation of Snippet Index.""" - # protobuf's MessageToJson doesn't provide a stable order for list items - # so we use the json module instead - return json.dumps(json_format.MessageToDict(self.metadata_index), sort_keys=True, indent=2) + # Downstream tools assume the generator will produce the exact + # same output when run over the same API multiple times + return json.dumps(OrderedDict(json_format.MessageToDict(self.metadata_index)), indent=2) diff --git a/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json b/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json index e70015063e..ab4a95191c 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json +++ b/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json @@ -1,567 +1,579 @@ { "snippets": [ { + "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "ListAssets", + "fullName": "GetFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_sync", "segments": [ { - "end": 43, "start": 27, + "end": 48, "type": "FULL" }, { - "end": 43, "start": 27, + "end": 48, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 43, + "end": 45, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "start": 46, + "end": 49, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "SearchAllResources", + "fullName": "AnalyzeIamPolicy", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_sync", "segments": [ { - "end": 43, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 43, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, "start": 34, + "end": 41, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 42, + "end": 44, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "start": 45, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "GetFeed", + "fullName": "CreateFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_sync", "segments": [ { - "end": 48, "start": 27, + "end": 49, "type": "FULL" }, { - "end": 48, "start": 27, + "end": 49, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 43, + "start": 44, + "end": 46, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "start": 47, + "end": 50, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "SearchAllIamPolicies", + "fullName": "BatchGetAssetsHistory", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_sync", "segments": [ { - "end": 43, "start": 27, + "end": 44, "type": "FULL" }, { - "end": 43, "start": 27, + "end": 44, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, "start": 34, + "end": 38, "type": "REQUEST_INITIALIZATION" }, { "start": 39, + "end": 41, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "start": 42, + "end": 45, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "DeleteFeed", + "fullName": "SearchAllResources", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_sync", "segments": [ { - "end": 46, "start": 27, + "end": 43, "type": "FULL" }, { - "end": 46, "start": 27, + "end": 43, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "ListFeeds", + "fullName": "ListAssets", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_sync", "segments": [ { - "end": 44, "start": 27, + "end": 43, "type": "FULL" }, { - "end": 44, "start": 27, + "end": 43, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, "start": 34, + "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "AnalyzeIamPolicyLongrunning", + "fullName": "DeleteFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync", "segments": [ { - "end": 53, "start": 27, + "end": 46, "type": "FULL" }, { - "end": 53, "start": 27, + "end": 46, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 45, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 46, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "UpdateFeed", + "fullName": "AnalyzeIamPolicyLongrunning", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_sync", "segments": [ { - "end": 47, "start": 27, + "end": 53, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 53, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 41, "start": 34, + "end": 45, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "BatchGetAssetsHistory", + "fullName": "ExportAssets", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync", "segments": [ { - "end": 44, "start": 27, + "end": 50, "type": "FULL" }, { - "end": 44, "start": 27, + "end": 50, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 51, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "ExportAssets", + "fullName": "UpdateFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_sync", "segments": [ { - "end": 50, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 50, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 41, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 42, + "end": 44, "type": "REQUEST_EXECUTION" }, { - "end": 51, + "start": 45, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "CreateFeed", + "fullName": "SearchAllIamPolicies", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_sync", "segments": [ { - "end": 49, "start": 27, + "end": 43, "type": "FULL" }, { - "end": 49, "start": 27, + "end": 43, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_async", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "AnalyzeIamPolicy", + "fullName": "ListFeeds", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync", "segments": [ { - "end": 47, "start": 27, + "end": 44, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 44, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 41, "start": 34, + "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "start": 39, + "end": 41, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "start": 42, + "end": 45, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "AnalyzeIamPolicyLongrunning", + "fullName": "SearchAllIamPolicies", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async", "segments": [ { - "end": 53, "start": 27, + "end": 43, "type": "FULL" }, { - "end": 53, "start": 27, + "end": 43, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 45, "start": 34, + "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "start": 46, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py", "clientMethod": { - "async": true, "method": { "fullName": "ListFeeds", "service": { @@ -569,177 +581,169 @@ } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_async", "segments": [ { - "end": 44, "start": 27, + "end": 44, "type": "FULL" }, { - "end": 44, "start": 27, + "end": 44, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, "start": 34, + "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, "start": 39, + "end": 41, "type": "REQUEST_EXECUTION" }, { - "end": 45, "start": 42, + "end": 45, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "DeleteFeed", + "fullName": "ListAssets", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_async", "segments": [ { - "end": 46, "start": 27, + "end": 43, "type": "FULL" }, { - "end": 46, "start": 27, + "end": 43, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "GetFeed", + "fullName": "ExportAssets", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_async", "segments": [ { - "end": 48, "start": 27, + "end": 50, "type": "FULL" }, { - "end": 48, "start": 27, + "end": 50, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 51, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "CreateFeed", + "fullName": "DeleteFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_async", "segments": [ { - "end": 49, "start": 27, + "end": 46, "type": "FULL" }, { - "end": 49, "start": 27, + "end": 46, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py", "clientMethod": { - "async": true, "method": { "fullName": "BatchGetAssetsHistory", "service": { @@ -747,87 +751,85 @@ } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async", "segments": [ { - "end": 44, "start": 27, + "end": 44, "type": "FULL" }, { - "end": 44, "start": 27, + "end": 44, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, "start": 34, + "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, "start": 39, + "end": 41, "type": "REQUEST_EXECUTION" }, { - "end": 45, "start": 42, + "end": 45, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "ExportAssets", + "fullName": "SearchAllResources", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_async", "segments": [ { - "end": 50, "start": 27, + "end": 43, "type": "FULL" }, { - "end": 50, "start": 27, + "end": 43, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 51, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py", "clientMethod": { - "async": true, "method": { "fullName": "UpdateFeed", "service": { @@ -835,130 +837,129 @@ } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_async", "segments": [ { - "end": 47, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 41, "start": 34, + "end": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, "start": 42, + "end": 44, "type": "REQUEST_EXECUTION" }, { - "end": 48, "start": 45, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "SearchAllResources", + "fullName": "AnalyzeIamPolicyLongrunning", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_async", "segments": [ { - "end": 43, "start": 27, + "end": 53, "type": "FULL" }, { - "end": 43, "start": 27, + "end": 53, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, "start": 34, + "end": 45, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "SearchAllIamPolicies", + "fullName": "GetFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_async", "segments": [ { - "end": 43, "start": 27, + "end": 48, "type": "FULL" }, { - "end": 43, "start": 27, + "end": 48, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 43, + "end": 45, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "start": 46, + "end": 49, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py", "clientMethod": { - "async": true, "method": { "fullName": "AnalyzeIamPolicy", "service": { @@ -966,80 +967,79 @@ } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async", "segments": [ { - "end": 47, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 41, "start": 34, + "end": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, "start": 42, + "end": 44, "type": "REQUEST_EXECUTION" }, { - "end": 48, "start": 45, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_sync", + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "ListAssets", + "fullName": "CreateFeed", "service": { "shortName": "AssetService" } } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_async", "segments": [ { - "end": 43, "start": 27, + "end": 49, "type": "FULL" }, { - "end": 43, "start": 27, + "end": 49, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 44, + "end": 46, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "start": 47, + "end": 50, "type": "RESPONSE_HANDLING" } ] diff --git a/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json b/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json index 14d2df9b6d..45f469ab7b 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json +++ b/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json @@ -1,98 +1,97 @@ { "snippets": [ { + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_sync", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "GenerateIdToken", + "fullName": "GenerateAccessToken", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_async", "segments": [ { - "end": 49, "start": 27, + "end": 49, "type": "FULL" }, { - "end": 49, "start": 27, + "end": 49, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, "start": 44, + "end": 46, "type": "REQUEST_EXECUTION" }, { - "end": 50, "start": 47, + "end": 50, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_sync", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "GenerateAccessToken", + "fullName": "SignJwt", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_async", "segments": [ { - "end": 49, "start": 27, + "end": 49, "type": "FULL" }, { - "end": 49, "start": 27, + "end": 49, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, "start": 44, + "end": 46, "type": "REQUEST_EXECUTION" }, { - "end": 50, "start": 47, + "end": 50, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_sync", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py", "clientMethod": { - "async": true, "method": { "fullName": "SignBlob", "service": { @@ -100,132 +99,133 @@ } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_async.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_async", "segments": [ { - "end": 49, "start": 27, + "end": 49, "type": "FULL" }, { - "end": 49, "start": 27, + "end": 49, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, "start": 44, + "end": 46, "type": "REQUEST_EXECUTION" }, { - "end": 50, "start": 47, + "end": 50, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_sync", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "SignJwt", + "fullName": "GenerateIdToken", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_async", "segments": [ { - "end": 49, "start": 27, + "end": 49, "type": "FULL" }, { - "end": 49, "start": 27, + "end": 49, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, "start": 44, + "end": 46, "type": "REQUEST_EXECUTION" }, { - "end": 50, "start": 47, + "end": 50, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_async", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "SignJwt", + "fullName": "GenerateIdToken", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_sync", "segments": [ { - "end": 49, "start": 27, + "end": 49, "type": "FULL" }, { - "end": 49, "start": 27, + "end": 49, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, "start": 44, + "end": 46, "type": "REQUEST_EXECUTION" }, { - "end": 50, "start": 47, + "end": 50, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_async", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_async.py", "clientMethod": { + "async": true, "method": { "fullName": "SignBlob", "service": { @@ -233,125 +233,125 @@ } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_sync", "segments": [ { - "end": 49, "start": 27, + "end": 49, "type": "FULL" }, { - "end": 49, "start": 27, + "end": 49, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, "start": 44, + "end": 46, "type": "REQUEST_EXECUTION" }, { - "end": 50, "start": 47, + "end": 50, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_async", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "GenerateIdToken", + "fullName": "GenerateAccessToken", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_sync", "segments": [ { - "end": 49, "start": 27, + "end": 49, "type": "FULL" }, { - "end": 49, "start": 27, + "end": 49, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, "start": 44, + "end": 46, "type": "REQUEST_EXECUTION" }, { - "end": 50, "start": 47, + "end": 50, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_async", + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "GenerateAccessToken", + "fullName": "SignJwt", "service": { "shortName": "IAMCredentials" } } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py", - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_sync", "segments": [ { - "end": 49, "start": 27, + "end": 49, "type": "FULL" }, { - "end": 49, "start": 27, + "end": 49, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, "start": 44, + "end": 46, "type": "REQUEST_EXECUTION" }, { - "end": 50, "start": 47, + "end": 50, "type": "RESPONSE_HANDLING" } ] diff --git a/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json b/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json index 55538f76cb..d733a79260 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json +++ b/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json @@ -1,295 +1,290 @@ { "snippets": [ { + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_sync.py", "clientMethod": { "method": { - "fullName": "GetView", + "fullName": "ListLogs", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetView_sync", "segments": [ { - "end": 50, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 50, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 44, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "end": 47, - "start": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 51, - "start": 48, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_sync.py", "clientMethod": { "method": { - "fullName": "GetExclusion", + "fullName": "DeleteLog", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_sync", "segments": [ { - "end": 48, "start": 27, + "end": 46, "type": "FULL" }, { - "end": 48, "start": 27, + "end": 46, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py", "clientMethod": { "method": { - "fullName": "CreateExclusion", + "fullName": "TailLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_sync", "segments": [ { - "end": 53, "start": 27, + "end": 52, "type": "FULL" }, { - "end": 53, "start": 27, + "end": 52, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 47, "start": 34, + "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 53, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py", "clientMethod": { "method": { - "fullName": "DeleteSink", + "fullName": "WriteLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_sync", "segments": [ { - "end": 46, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 46, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 41, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 42, + "end": 44, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "start": 45, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py", "clientMethod": { "method": { - "fullName": "UndeleteBucket", + "fullName": "ListMonitoredResourceDescriptors", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_sync", "segments": [ { - "end": 47, "start": 27, + "end": 42, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 42, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 37, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 38, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 43, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py", "clientMethod": { "method": { - "fullName": "GetSink", + "fullName": "ListLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_sync", "segments": [ { - "end": 48, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 48, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "ListExclusions", + "fullName": "ListLogs", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_sync", "segments": [ { - "end": 47, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { @@ -303,597 +298,602 @@ ] }, { + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "GetBucket", + "fullName": "TailLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_sync", "segments": [ { - "end": 49, "start": 27, + "end": 52, "type": "FULL" }, { - "end": 49, "start": 27, + "end": 52, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 53, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "UpdateBucket", + "fullName": "DeleteLog", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_sync", "segments": [ { - "end": 49, "start": 27, + "end": 46, "type": "FULL" }, { - "end": 49, "start": 27, + "end": 46, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "CreateView", + "fullName": "ListLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_sync", "segments": [ { - "end": 45, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 45, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 39, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "ListSinks", + "fullName": "WriteLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_sync", "segments": [ { - "end": 47, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 41, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 42, + "end": 44, "type": "REQUEST_EXECUTION" }, { + "start": 45, "end": 48, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_async", + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "CreateSink", + "fullName": "ListMonitoredResourceDescriptors", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateSink_sync", "segments": [ { - "end": 53, "start": 27, + "end": 42, "type": "FULL" }, { - "end": 53, "start": 27, + "end": 42, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 47, "start": 34, + "end": 37, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 38, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 43, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py", "clientMethod": { "method": { - "fullName": "ListViews", + "fullName": "GetLogMetric", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_sync", "segments": [ { - "end": 43, "start": 27, + "end": 48, "type": "FULL" }, { - "end": 43, "start": 27, + "end": 48, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 43, + "end": 45, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "start": 46, + "end": 49, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py", "clientMethod": { "method": { - "fullName": "ListBuckets", + "fullName": "UpdateLogMetric", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_sync", "segments": [ { - "end": 48, "start": 27, + "end": 53, "type": "FULL" }, { - "end": 48, "start": 27, + "end": 53, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 48, + "end": 50, "type": "REQUEST_EXECUTION" }, { - "end": 49, + "start": 51, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py", "clientMethod": { "method": { - "fullName": "DeleteBucket", + "fullName": "CreateLogMetric", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_sync", "segments": [ { - "end": 47, "start": 27, + "end": 53, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 53, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 48, + "end": 50, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "start": 51, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py", "clientMethod": { "method": { - "fullName": "UpdateSink", + "fullName": "ListLogMetrics", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_sync", "segments": [ { - "end": 53, "start": 27, + "end": 46, "type": "FULL" }, { - "end": 53, "start": 27, + "end": 46, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 47, "start": 34, + "end": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_sync.py", "clientMethod": { "method": { - "fullName": "UpdateView", + "fullName": "DeleteLogMetric", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_sync", "segments": [ { - "end": 44, "start": 27, + "end": 46, "type": "FULL" }, { - "end": 44, "start": 27, + "end": 46, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_async", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "DeleteView", + "fullName": "UpdateLogMetric", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_sync", "segments": [ { - "end": 48, "start": 27, + "end": 53, "type": "FULL" }, { - "end": 48, "start": 27, + "end": 53, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 44, "start": 34, + "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, + "start": 48, + "end": 50, "type": "REQUEST_EXECUTION" }, { - "end": 49, + "start": 51, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_async", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "GetCmekSettings", + "fullName": "ListLogMetrics", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_sync", "segments": [ { - "end": 47, "start": 27, + "end": 46, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 46, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 41, "start": 34, + "end": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_async", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "UpdateCmekSettings", + "fullName": "CreateLogMetric", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_sync", "segments": [ { - "end": 44, "start": 27, + "end": 53, "type": "FULL" }, { - "end": 44, "start": 27, + "end": 53, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, "start": 34, + "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "start": 48, + "end": 50, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "start": 51, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_async", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "DeleteExclusion", + "fullName": "DeleteLogMetric", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_sync", "segments": [ { - "end": 46, "start": 27, + "end": 46, "type": "FULL" }, { - "end": 46, "start": 27, + "end": 46, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { @@ -907,392 +907,388 @@ ] }, { + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_async", + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "UpdateExclusion", + "fullName": "GetLogMetric", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_sync", "segments": [ { - "end": 53, "start": 27, + "end": 48, "type": "FULL" }, { - "end": 53, "start": 27, + "end": 48, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 47, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 43, + "end": 45, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "start": 46, + "end": 49, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_sync.py", "clientMethod": { "method": { - "fullName": "CreateBucket", + "fullName": "UpdateSink", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_sync.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_sync", "segments": [ { - "end": 50, "start": 27, + "end": 53, "type": "FULL" }, { - "end": 50, "start": 27, + "end": 53, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 44, "start": 34, + "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "end": 47, - "start": 45, + "start": 48, + "end": 50, "type": "REQUEST_EXECUTION" }, { - "end": 51, - "start": 48, + "start": 51, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "UpdateCmekSettings", + "fullName": "ListViews", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_async", "segments": [ { - "end": 44, "start": 27, + "end": 43, "type": "FULL" }, { - "end": 44, "start": 27, + "end": 43, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, "start": 34, + "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "DeleteExclusion", + "fullName": "GetSink", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_async", "segments": [ { - "end": 46, "start": 27, + "end": 48, "type": "FULL" }, { - "end": 46, "start": 27, + "end": 48, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { "start": 43, + "end": 45, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "start": 46, + "end": 49, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "GetBucket", + "fullName": "ListBuckets", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_async", "segments": [ { - "end": 49, "start": 27, + "end": 48, "type": "FULL" }, { - "end": 49, "start": 27, + "end": 48, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 49, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "DeleteSink", + "fullName": "GetExclusion", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_async", "segments": [ { - "end": 46, "start": 27, + "end": 48, "type": "FULL" }, { - "end": 46, "start": 27, + "end": 48, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { "start": 43, + "end": 45, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "start": 46, + "end": 49, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "GetSink", + "fullName": "GetCmekSettings", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_async", "segments": [ { - "end": 48, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 48, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 43, + "start": 42, + "end": 44, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "start": 45, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "UndeleteBucket", + "fullName": "UpdateBucket", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_async", "segments": [ { - "end": 47, "start": 27, + "end": 49, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 49, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { "start": 44, + "end": 46, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "start": 47, + "end": 50, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "ListBuckets", + "fullName": "DeleteView", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_async", "segments": [ { - "end": 48, "start": 27, + "end": 48, "type": "FULL" }, { - "end": 48, "start": 27, + "end": 48, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 44, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 45, "type": "REQUEST_EXECUTION" }, { @@ -1302,227 +1298,227 @@ ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateSink_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "ListSinks", + "fullName": "CreateSink", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_async", "segments": [ { - "end": 47, "start": 27, + "end": 53, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 53, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 48, + "end": 50, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "start": 51, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "ListViews", + "fullName": "UpdateCmekSettings", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_async", "segments": [ { - "end": 43, "start": 27, + "end": 44, "type": "FULL" }, { - "end": 43, "start": 27, + "end": 44, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, "start": 34, + "end": 38, "type": "REQUEST_INITIALIZATION" }, { "start": 39, + "end": 41, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "start": 42, + "end": 45, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "ListExclusions", + "fullName": "GetBucket", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_async", "segments": [ { - "end": 47, "start": 27, + "end": 49, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 49, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 44, + "end": 46, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "start": 47, + "end": 50, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "CreateSink", + "fullName": "ListExclusions", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateSink_async", "segments": [ { - "end": 53, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 53, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 47, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "UpdateSink", + "fullName": "UpdateView", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_async", "segments": [ { - "end": 53, "start": 27, + "end": 44, "type": "FULL" }, { - "end": 53, "start": 27, + "end": 44, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 47, "start": 34, + "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 39, + "end": 41, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "start": 42, + "end": 45, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_sync.py", "clientMethod": { - "async": true, "method": { "fullName": "CreateView", "service": { @@ -1530,601 +1526,589 @@ } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_async", "segments": [ { - "end": 45, "start": 27, + "end": 45, "type": "FULL" }, { - "end": 45, "start": 27, + "end": 45, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 39, "start": 34, + "end": 39, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, "start": 40, + "end": 42, "type": "REQUEST_EXECUTION" }, { - "end": 46, "start": 43, + "end": 46, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "UpdateBucket", + "fullName": "DeleteBucket", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_async", "segments": [ { - "end": 49, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 49, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "DeleteBucket", + "fullName": "DeleteSink", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_async", "segments": [ { - "end": 47, "start": 27, + "end": 46, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 46, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetView_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "GetCmekSettings", + "fullName": "GetView", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_async", "segments": [ { - "end": 47, "start": 27, + "end": 50, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 50, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 41, "start": 34, + "end": 44, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "start": 45, + "end": 47, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "start": 48, + "end": 51, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "CreateExclusion", + "fullName": "CreateBucket", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_async", "segments": [ { - "end": 53, "start": 27, + "end": 50, "type": "FULL" }, { - "end": 53, "start": 27, + "end": 50, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 47, "start": 34, + "end": 44, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 45, + "end": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "start": 48, + "end": 51, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "GetView", + "fullName": "UndeleteBucket", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetView_async", "segments": [ { - "end": 50, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 50, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 44, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "end": 47, - "start": 45, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 51, - "start": 48, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "CreateBucket", + "fullName": "CreateExclusion", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_async", "segments": [ { - "end": 50, "start": 27, + "end": 53, "type": "FULL" }, { - "end": 50, "start": 27, + "end": 53, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 44, "start": 34, + "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "end": 47, - "start": 45, + "start": 48, + "end": 50, "type": "REQUEST_EXECUTION" }, { - "end": 51, - "start": 48, + "start": 51, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "UpdateExclusion", + "fullName": "DeleteExclusion", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_async", "segments": [ { - "end": 53, "start": 27, + "end": 46, "type": "FULL" }, { - "end": 53, "start": 27, + "end": 46, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 47, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "GetExclusion", + "fullName": "ListSinks", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_async", "segments": [ { - "end": 48, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 48, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_sync", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_sync.py", "clientMethod": { - "async": true, "method": { - "fullName": "UpdateView", + "fullName": "UpdateExclusion", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_async", "segments": [ { - "end": 44, "start": 27, + "end": 53, "type": "FULL" }, { - "end": 44, "start": 27, + "end": 53, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, "start": 34, + "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "start": 48, + "end": 50, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "start": 51, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_async.py", "clientMethod": { "async": true, "method": { - "fullName": "DeleteView", + "fullName": "CreateBucket", "service": { "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_async.py", - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_async", "segments": [ { - "end": 48, "start": 27, + "end": 50, "type": "FULL" }, { - "end": 48, "start": 27, + "end": 50, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 44, "start": 34, + "end": 44, "type": "REQUEST_INITIALIZATION" }, { "start": 45, + "end": 47, "type": "REQUEST_EXECUTION" }, { - "end": 49, + "start": 48, + "end": 51, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "TailLogEntries", + "fullName": "GetExclusion", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_sync", "segments": [ { - "end": 52, "start": 27, + "end": 48, "type": "FULL" }, { - "end": 52, "start": 27, + "end": 48, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 47, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, + "start": 43, + "end": 45, "type": "REQUEST_EXECUTION" }, { - "end": 53, + "start": 46, + "end": 49, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "ListMonitoredResourceDescriptors", + "fullName": "UndeleteBucket", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_sync", "segments": [ { - "end": 42, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 42, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 37, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 38, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 43, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "ListLogs", + "fullName": "DeleteSink", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_sync.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_sync", "segments": [ { - "end": 47, "start": 27, + "end": 46, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 46, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { @@ -2132,387 +2116,394 @@ "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "WriteLogEntries", + "fullName": "DeleteBucket", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_sync", "segments": [ { - "end": 47, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 41, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "start": 44, "type": "REQUEST_EXECUTION" }, { "end": 48, - "start": 45, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "DeleteLog", + "fullName": "CreateExclusion", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_sync.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_sync", "segments": [ { - "end": 46, "start": 27, + "end": 53, "type": "FULL" }, { - "end": 46, "start": 27, + "end": 53, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 48, + "end": 50, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "start": 51, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateSink_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "ListLogEntries", + "fullName": "CreateSink", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_sync", "segments": [ { - "end": 47, "start": 27, + "end": 53, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 53, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 48, + "end": 50, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "start": 51, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_async.py", "clientMethod": { "async": true, "method": { - "fullName": "WriteLogEntries", + "fullName": "ListExclusions", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_async", "segments": [ { - "end": 47, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 41, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "start": 43, "type": "REQUEST_EXECUTION" }, { "end": 48, - "start": 45, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_async.py", "clientMethod": { "async": true, "method": { - "fullName": "ListLogs", + "fullName": "UpdateView", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_async.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_async", "segments": [ { - "end": 47, "start": 27, + "end": 44, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 44, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 39, + "end": 41, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "start": 42, + "end": 45, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_async.py", "clientMethod": { "async": true, "method": { - "fullName": "TailLogEntries", + "fullName": "ListBuckets", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_async", "segments": [ { - "end": 52, "start": 27, + "end": 48, "type": "FULL" }, { - "end": 52, "start": 27, + "end": 48, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 47, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 49, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_async.py", "clientMethod": { "async": true, "method": { - "fullName": "DeleteLog", + "fullName": "ListViews", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_async.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_async", "segments": [ { - "end": 46, "start": 27, + "end": 43, "type": "FULL" }, { - "end": 46, "start": 27, + "end": 43, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_async.py", "clientMethod": { "async": true, "method": { - "fullName": "ListMonitoredResourceDescriptors", + "fullName": "UpdateSink", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_async", "segments": [ { - "end": 42, "start": 27, + "end": 53, "type": "FULL" }, { - "end": 42, "start": 27, + "end": 53, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 37, "start": 34, + "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 38, + "start": 48, + "end": 50, "type": "REQUEST_EXECUTION" }, { - "end": 43, + "start": 51, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_async.py", "clientMethod": { "async": true, "method": { - "fullName": "ListLogEntries", + "fullName": "DeleteExclusion", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py", - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_async", "segments": [ { - "end": 47, "start": 27, + "end": 46, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 46, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { @@ -2520,444 +2511,453 @@ "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_async.py", "clientMethod": { "async": true, "method": { - "fullName": "DeleteLogMetric", + "fullName": "GetSink", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_async.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_async", "segments": [ { - "end": 46, "start": 27, + "end": 48, "type": "FULL" }, { - "end": 46, "start": 27, + "end": 48, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { "start": 43, + "end": 45, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "start": 46, + "end": 49, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetView_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_async.py", "clientMethod": { "async": true, "method": { - "fullName": "UpdateLogMetric", + "fullName": "GetView", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_async", "segments": [ { - "end": 53, "start": 27, + "end": 50, "type": "FULL" }, { - "end": 53, "start": 27, + "end": 50, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 47, "start": 34, + "end": 44, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 45, + "end": 47, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "start": 48, + "end": 51, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_async.py", "clientMethod": { "async": true, "method": { - "fullName": "CreateLogMetric", + "fullName": "CreateView", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_async", "segments": [ { - "end": 53, "start": 27, + "end": 45, "type": "FULL" }, { - "end": 53, "start": 27, + "end": 45, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 47, "start": 34, + "end": 39, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 40, + "end": 42, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "start": 43, + "end": 46, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_async.py", "clientMethod": { "async": true, "method": { - "fullName": "ListLogMetrics", + "fullName": "UpdateBucket", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_async", "segments": [ { - "end": 46, "start": 27, + "end": 49, "type": "FULL" }, { - "end": 46, "start": 27, + "end": 49, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 41, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 42, + "start": 44, + "end": 46, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "start": 47, + "end": 50, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_async.py", "clientMethod": { "async": true, "method": { - "fullName": "GetLogMetric", + "fullName": "DeleteView", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_async", "segments": [ { - "end": 48, "start": 27, + "end": 48, "type": "FULL" }, { - "end": 48, "start": 27, + "end": 48, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 44, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 43, + "start": 45, "type": "REQUEST_EXECUTION" }, { "end": 49, - "start": 46, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "UpdateLogMetric", + "fullName": "GetBucket", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_sync", "segments": [ { - "end": 53, "start": 27, + "end": 49, "type": "FULL" }, { - "end": 53, "start": 27, + "end": 49, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 47, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 44, + "end": 46, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "start": 47, + "end": 50, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "DeleteLogMetric", + "fullName": "UpdateExclusion", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_sync.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_sync", "segments": [ { - "end": 46, "start": 27, + "end": 53, "type": "FULL" }, { - "end": 46, "start": 27, + "end": 53, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 48, + "end": 50, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "start": 51, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "ListLogMetrics", + "fullName": "UpdateCmekSettings", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_sync", "segments": [ { - "end": 46, "start": 27, + "end": 44, "type": "FULL" }, { - "end": 46, "start": 27, + "end": 44, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 41, "start": 34, + "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "start": 42, + "start": 39, + "end": 41, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "start": 42, + "end": 45, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "GetLogMetric", + "fullName": "GetCmekSettings", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_sync", "segments": [ { - "end": 48, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 48, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 45, - "start": 43, + "start": 42, + "end": 44, "type": "REQUEST_EXECUTION" }, { - "end": 49, - "start": 46, + "start": 45, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_async", + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_async.py", "clientMethod": { + "async": true, "method": { - "fullName": "CreateLogMetric", + "fullName": "ListSinks", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py", - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_sync", "segments": [ { - "end": 53, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 53, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 47, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "end": 50, - "start": 48, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 54, - "start": 51, + "end": 48, "type": "RESPONSE_HANDLING" } ] diff --git a/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json b/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json index 9bf161f842..c943d3499f 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json +++ b/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json @@ -1,77 +1,77 @@ { "snippets": [ { + "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_sync.py", "clientMethod": { "method": { - "fullName": "UpgradeInstance", + "fullName": "UpdateInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_sync", "segments": [ { - "end": 52, "start": 27, + "end": 51, "type": "FULL" }, { - "end": 52, "start": 27, + "end": 51, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 44, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 52, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_sync.py", "clientMethod": { "method": { - "fullName": "UpdateInstance", + "fullName": "DeleteInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_sync", "segments": [ { - "end": 51, "start": 27, + "end": 51, "type": "FULL" }, { - "end": 51, "start": 27, + "end": 51, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { @@ -85,48 +85,50 @@ ] }, { + "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_sync.py", "clientMethod": { "method": { - "fullName": "CreateInstance", + "fullName": "ExportInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_sync", "segments": [ { - "end": 57, "start": 27, + "end": 50, "type": "FULL" }, { - "end": 57, "start": 27, + "end": 50, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 49, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 50, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 58, + "end": 51, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_sync.py", "clientMethod": { "method": { "fullName": "GetInstance", @@ -135,155 +137,153 @@ } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_sync", "segments": [ { - "end": 49, "start": 27, + "end": 49, "type": "FULL" }, { - "end": 49, "start": 27, + "end": 49, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, "start": 44, + "end": 46, "type": "REQUEST_EXECUTION" }, { - "end": 50, "start": 47, + "end": 50, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py", "clientMethod": { "method": { - "fullName": "FailoverInstance", + "fullName": "UpgradeInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_sync", "segments": [ { - "end": 51, "start": 27, + "end": 52, "type": "FULL" }, { - "end": 51, "start": 27, + "end": 52, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 44, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 52, + "end": 53, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_sync.py", "clientMethod": { "method": { - "fullName": "ListInstances", + "fullName": "CreateInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_sync", "segments": [ { - "end": 47, "start": 27, + "end": 57, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 57, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 49, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 50, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 58, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_sync.py", "clientMethod": { "method": { - "fullName": "DeleteInstance", + "fullName": "FailoverInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_sync", "segments": [ { - "end": 51, "start": 27, + "end": 51, "type": "FULL" }, { - "end": 51, "start": 27, + "end": 51, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { @@ -297,35 +297,35 @@ ] }, { + "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_sync.py", "clientMethod": { "method": { - "fullName": "ExportInstance", + "fullName": "ListInstances", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_sync", "segments": [ { - "end": 50, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 50, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { @@ -333,12 +333,14 @@ "type": "REQUEST_EXECUTION" }, { - "end": 51, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "redis_generated_redis_v1_CloudRedis_ImportInstance_sync", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_sync.py", "clientMethod": { "method": { "fullName": "ImportInstance", @@ -347,27 +349,25 @@ } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_sync.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_ImportInstance_sync", "segments": [ { - "end": 50, "start": 27, + "end": 50, "type": "FULL" }, { - "end": 50, "start": 27, + "end": 50, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { @@ -381,253 +381,251 @@ ] }, { + "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_async.py", "clientMethod": { "async": true, "method": { - "fullName": "ImportInstance", + "fullName": "FailoverInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_ImportInstance_async", "segments": [ { - "end": 50, "start": 27, + "end": 51, "type": "FULL" }, { - "end": 50, "start": 27, + "end": 51, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 51, + "end": 52, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py", "clientMethod": { "async": true, "method": { - "fullName": "CreateInstance", + "fullName": "UpgradeInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_async", "segments": [ { - "end": 57, "start": 27, + "end": 52, "type": "FULL" }, { - "end": 57, "start": 27, + "end": 52, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 49, "start": 34, + "end": 44, "type": "REQUEST_INITIALIZATION" }, { - "start": 50, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 58, + "end": 53, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "redis_generated_redis_v1_CloudRedis_ImportInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_async.py", "clientMethod": { "async": true, "method": { - "fullName": "UpgradeInstance", + "fullName": "ImportInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_async", "segments": [ { - "end": 52, "start": 27, + "end": 50, "type": "FULL" }, { - "end": 52, "start": 27, + "end": 50, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 44, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 51, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_async.py", "clientMethod": { "async": true, "method": { - "fullName": "GetInstance", + "fullName": "DeleteInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_async", "segments": [ { - "end": 49, "start": 27, + "end": 51, "type": "FULL" }, { - "end": 49, "start": 27, + "end": 51, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 52, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_async.py", "clientMethod": { "async": true, "method": { - "fullName": "UpdateInstance", + "fullName": "CreateInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_async", "segments": [ { - "end": 51, "start": 27, + "end": 57, "type": "FULL" }, { - "end": 51, "start": 27, + "end": 57, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 49, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 50, "type": "REQUEST_EXECUTION" }, { - "end": 52, + "end": 58, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_async.py", "clientMethod": { "async": true, "method": { - "fullName": "DeleteInstance", + "fullName": "UpdateInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_async", "segments": [ { - "end": 51, "start": 27, + "end": 51, "type": "FULL" }, { - "end": 51, "start": 27, + "end": 51, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { @@ -641,92 +639,96 @@ ] }, { + "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py", "clientMethod": { "async": true, "method": { - "fullName": "ListInstances", + "fullName": "GetInstance", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_async", "segments": [ { - "end": 47, "start": 27, + "end": 49, "type": "FULL" }, { - "end": 47, "start": 27, + "end": 49, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 44, + "end": 46, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "start": 47, + "end": 50, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_async.py", "clientMethod": { "async": true, "method": { - "fullName": "FailoverInstance", + "fullName": "ListInstances", "service": { "shortName": "CloudRedis" } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_async", "segments": [ { - "end": 51, "start": 27, + "end": 47, "type": "FULL" }, { - "end": 51, "start": 27, + "end": 47, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 52, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { + "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_async", + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_async.py", "clientMethod": { "async": true, "method": { @@ -736,27 +738,25 @@ } } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_async.py", - "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_async", "segments": [ { - "end": 50, "start": 27, + "end": 50, "type": "FULL" }, { - "end": 50, "start": 27, + "end": 50, "type": "SHORT" }, { - "end": 33, "start": 31, + "end": 33, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, "start": 34, + "end": 42, "type": "REQUEST_INITIALIZATION" }, { From 767a0aebcaf2e15bc8630f8812138994366bc63c Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Thu, 13 Jan 2022 17:17:47 +0000 Subject: [PATCH 10/18] fix:sort snippets by region tag --- gapic/samplegen_utils/snippet_index.py | 4 +- .../snippet_metadata_v1_asset_v1.json | 468 +++--- .../snippet_metadata_v1_credentials_v1.json | 140 +- .../snippet_metadata_v1_logging_v2.json | 1462 ++++++++--------- .../snippet_metadata_v1_redis_v1.json | 318 ++-- 5 files changed, 1197 insertions(+), 1195 deletions(-) diff --git a/gapic/samplegen_utils/snippet_index.py b/gapic/samplegen_utils/snippet_index.py index 2f16c7c118..b849a47cc2 100644 --- a/gapic/samplegen_utils/snippet_index.py +++ b/gapic/samplegen_utils/snippet_index.py @@ -174,6 +174,8 @@ def get_snippet(self, service_name: str, rpc_name: str, sync: bool = True) -> Op def get_metadata_json(self) -> str: """JSON representation of Snippet Index.""" + # Downstream tools assume the generator will produce the exact # same output when run over the same API multiple times - return json.dumps(OrderedDict(json_format.MessageToDict(self.metadata_index)), indent=2) + self.metadata_index.snippets.sort(key=lambda s: s.region_tag) + return json.dumps(json_format.MessageToDict(self.metadata_index), indent=2, sort_keys=True) diff --git a/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json b/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json index ab4a95191c..6bd698b80e 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json +++ b/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json @@ -1,388 +1,388 @@ { "snippets": [ { - "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_async", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py", "clientMethod": { "async": true, "method": { - "fullName": "GetFeed", + "fullName": "AnalyzeIamPolicyLongrunning", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async", "segments": [ { + "end": 53, "start": 27, - "end": 48, "type": "FULL" }, { + "end": 53, "start": 27, - "end": 48, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 45, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, - "end": 45, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "start": 46, - "end": 49, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "AnalyzeIamPolicy", + "fullName": "AnalyzeIamPolicyLongrunning", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync", "segments": [ { + "end": 53, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 53, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 45, "start": 34, - "end": 41, "type": "REQUEST_INITIALIZATION" }, { - "start": 42, - "end": 44, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "start": 45, - "end": 48, + "end": 54, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_async", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py", "clientMethod": { "async": true, "method": { - "fullName": "CreateFeed", + "fullName": "AnalyzeIamPolicy", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async", "segments": [ { + "end": 47, "start": 27, - "end": 49, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 49, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 41, "start": 34, - "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, - "end": 46, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "start": 47, - "end": 50, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "BatchGetAssetsHistory", + "fullName": "AnalyzeIamPolicy", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync", "segments": [ { + "end": 47, "start": 27, - "end": 44, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 44, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 41, "start": 34, - "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, - "end": 41, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "start": 42, - "end": 45, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_async", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py", "clientMethod": { "async": true, "method": { - "fullName": "SearchAllResources", + "fullName": "BatchGetAssetsHistory", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async", "segments": [ { + "end": 44, "start": 27, - "end": 43, "type": "FULL" }, { + "end": 44, "start": 27, - "end": 43, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 38, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { + "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_async", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "ListAssets", + "fullName": "BatchGetAssetsHistory", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync", "segments": [ { + "end": 44, "start": 27, - "end": 43, "type": "FULL" }, { + "end": 44, "start": 27, - "end": 43, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 38, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { + "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_async", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py", "clientMethod": { "async": true, "method": { - "fullName": "DeleteFeed", + "fullName": "CreateFeed", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_async", "segments": [ { + "end": 49, "start": 27, - "end": 46, "type": "FULL" }, { + "end": 49, "start": 27, - "end": 46, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 43, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "AnalyzeIamPolicyLongrunning", + "fullName": "CreateFeed", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_sync", "segments": [ { + "end": 49, "start": 27, - "end": 53, "type": "FULL" }, { + "end": 49, "start": 27, - "end": 53, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 43, "start": 34, - "end": 45, "type": "REQUEST_INITIALIZATION" }, { - "start": 46, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_async", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py", "clientMethod": { "async": true, "method": { - "fullName": "ExportAssets", + "fullName": "DeleteFeed", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_async", "segments": [ { + "end": 46, "start": 27, - "end": 50, "type": "FULL" }, { + "end": 46, "start": 27, - "end": 50, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 42, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { @@ -390,234 +390,230 @@ "type": "REQUEST_EXECUTION" }, { - "end": 51, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_async", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "UpdateFeed", + "fullName": "DeleteFeed", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_sync", "segments": [ { + "end": 46, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 46, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 41, "type": "REQUEST_INITIALIZATION" }, { - "start": 42, - "end": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "start": 45, - "end": 48, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_async", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py", "clientMethod": { "async": true, "method": { - "fullName": "SearchAllIamPolicies", + "fullName": "ExportAssets", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_async", "segments": [ { + "end": 50, "start": 27, - "end": 43, "type": "FULL" }, { + "end": 50, "start": 27, - "end": 43, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 51, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_async", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "ListFeeds", + "fullName": "ExportAssets", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_sync", "segments": [ { + "end": 50, "start": 27, - "end": 44, "type": "FULL" }, { + "end": 50, "start": 27, - "end": 44, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, - "end": 41, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "start": 42, - "end": 45, + "end": 51, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_sync", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "SearchAllIamPolicies", + "fullName": "GetFeed", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_async", "segments": [ { + "end": 48, "start": 27, - "end": 43, "type": "FULL" }, { + "end": 48, "start": 27, - "end": 43, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_sync", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py", "clientMethod": { "method": { - "fullName": "ListFeeds", + "fullName": "GetFeed", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_sync", "segments": [ { + "end": 48, "start": 27, - "end": 44, "type": "FULL" }, { + "end": 48, "start": 27, - "end": 44, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, - "end": 41, + "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "start": 42, - "end": 45, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_sync", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py", "clientMethod": { + "async": true, "method": { "fullName": "ListAssets", "service": { @@ -625,25 +621,27 @@ } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_async", "segments": [ { - "start": 27, "end": 43, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 43, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 38, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { @@ -657,163 +655,167 @@ ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_sync", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py", "clientMethod": { "method": { - "fullName": "ExportAssets", + "fullName": "ListAssets", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_sync", "segments": [ { + "end": 43, "start": 27, - "end": 50, "type": "FULL" }, { + "end": 43, "start": 27, - "end": 50, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 38, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 51, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_sync", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "DeleteFeed", + "fullName": "ListFeeds", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_async", "segments": [ { + "end": 44, "start": 27, - "end": 46, "type": "FULL" }, { + "end": 44, "start": 27, - "end": 46, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 38, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py", "clientMethod": { "method": { - "fullName": "BatchGetAssetsHistory", + "fullName": "ListFeeds", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_sync", "segments": [ { - "start": 27, "end": 44, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 44, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 38, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "start": 42, "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_sync", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "SearchAllResources", + "fullName": "SearchAllIamPolicies", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_async", "segments": [ { - "start": 27, "end": 43, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 43, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 38, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { @@ -827,219 +829,217 @@ ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_sync", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py", "clientMethod": { "method": { - "fullName": "UpdateFeed", + "fullName": "SearchAllIamPolicies", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_sync", "segments": [ { + "end": 43, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 43, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 38, "start": 34, - "end": 41, "type": "REQUEST_INITIALIZATION" }, { - "start": 42, - "end": 44, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "start": 45, - "end": 48, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "AnalyzeIamPolicyLongrunning", + "fullName": "SearchAllResources", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_async", "segments": [ { + "end": 43, "start": 27, - "end": 53, "type": "FULL" }, { + "end": 43, "start": 27, - "end": 53, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 38, "start": 34, - "end": 45, "type": "REQUEST_INITIALIZATION" }, { - "start": 46, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_sync", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py", "clientMethod": { "method": { - "fullName": "GetFeed", + "fullName": "SearchAllResources", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_sync", "segments": [ { + "end": 43, "start": 27, - "end": 48, "type": "FULL" }, { + "end": 43, "start": 27, - "end": 48, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 38, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, - "end": 45, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "start": 46, - "end": 49, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "AnalyzeIamPolicy", + "fullName": "UpdateFeed", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_async", "segments": [ { - "start": 27, "end": 47, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 47, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 41, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 42, "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "start": 45, "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_sync", - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py", "clientMethod": { "method": { - "fullName": "CreateFeed", + "fullName": "UpdateFeed", "service": { "shortName": "AssetService" } } }, + "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_sync", "segments": [ { + "end": 47, "start": 27, - "end": 49, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 49, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 41, "start": 34, - "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, - "end": 46, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "start": 47, - "end": 50, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] diff --git a/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json b/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json index 45f469ab7b..6993d507ef 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json +++ b/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json @@ -1,9 +1,8 @@ { "snippets": [ { - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_sync", - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py", "clientMethod": { + "async": true, "method": { "fullName": "GenerateAccessToken", "service": { @@ -11,130 +10,131 @@ } } }, + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_async", "segments": [ { - "start": 27, "end": 49, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 49, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 43, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "start": 47, "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_sync", - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py", "clientMethod": { "method": { - "fullName": "SignJwt", + "fullName": "GenerateAccessToken", "service": { "shortName": "IAMCredentials" } } }, + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_sync", "segments": [ { - "start": 27, "end": 49, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 49, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 43, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "start": 47, "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_sync", - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "SignBlob", + "fullName": "GenerateIdToken", "service": { "shortName": "IAMCredentials" } } }, + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_async", "segments": [ { - "start": 27, "end": 49, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 49, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 43, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "start": 47, "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_sync", - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py", "clientMethod": { "method": { "fullName": "GenerateIdToken", @@ -143,89 +143,88 @@ } } }, + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_sync", "segments": [ { - "start": 27, "end": 49, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 49, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 43, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "start": 47, "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_async", - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py", "clientMethod": { "async": true, "method": { - "fullName": "GenerateIdToken", + "fullName": "SignBlob", "service": { "shortName": "IAMCredentials" } } }, + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_async.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_async", "segments": [ { - "start": 27, "end": 49, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 49, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 43, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "start": 47, "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_async", - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_async.py", "clientMethod": { - "async": true, "method": { "fullName": "SignBlob", "service": { @@ -233,89 +232,88 @@ } } }, + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_sync", "segments": [ { - "start": 27, "end": 49, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 49, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 43, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "start": 47, "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_async", - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py", "clientMethod": { "async": true, "method": { - "fullName": "GenerateAccessToken", + "fullName": "SignJwt", "service": { "shortName": "IAMCredentials" } } }, + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_async", "segments": [ { - "start": 27, "end": 49, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 49, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 43, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "start": 47, "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_async", - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py", "clientMethod": { - "async": true, "method": { "fullName": "SignJwt", "service": { @@ -323,35 +321,37 @@ } } }, + "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py", + "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_sync", "segments": [ { - "start": 27, "end": 49, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 49, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 43, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "start": 47, "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] diff --git a/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json b/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json index d733a79260..8cf8d2a835 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json +++ b/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json @@ -1,423 +1,438 @@ { "snippets": [ { - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "ListLogs", + "fullName": "CreateBucket", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_async", "segments": [ { + "end": 50, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 50, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 44, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 47, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 51, + "start": 48, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_sync.py", "clientMethod": { "method": { - "fullName": "DeleteLog", + "fullName": "CreateBucket", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_sync", "segments": [ { + "end": 50, "start": 27, - "end": 46, "type": "FULL" }, { + "end": 50, "start": 27, - "end": 46, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 44, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 47, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 51, + "start": 48, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "TailLogEntries", + "fullName": "CreateExclusion", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_async", "segments": [ { + "end": 53, "start": 27, - "end": 52, "type": "FULL" }, { + "end": 53, "start": 27, - "end": 52, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 47, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { + "end": 50, "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py", "clientMethod": { "method": { - "fullName": "WriteLogEntries", + "fullName": "CreateExclusion", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_sync", "segments": [ { + "end": 53, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 53, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 47, "start": 34, - "end": 41, "type": "REQUEST_INITIALIZATION" }, { - "start": 42, - "end": 44, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "start": 45, - "end": 48, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "ListMonitoredResourceDescriptors", + "fullName": "CreateSink", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateSink_async", "segments": [ { + "end": 53, "start": 27, - "end": 42, "type": "FULL" }, { + "end": 53, "start": 27, - "end": 42, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 47, "start": 34, - "end": 37, "type": "REQUEST_INITIALIZATION" }, { - "start": 38, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 43, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py", "clientMethod": { "method": { - "fullName": "ListLogEntries", + "fullName": "CreateSink", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateSink_sync", "segments": [ { + "end": 53, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 53, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 47, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_async", - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_async.py", "clientMethod": { "async": true, "method": { - "fullName": "ListLogs", + "fullName": "CreateView", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_async", "segments": [ { + "end": 45, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 45, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 39, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 42, + "start": 40, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 46, + "start": 43, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_async", - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "TailLogEntries", + "fullName": "CreateView", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_sync", "segments": [ { + "end": 45, "start": 27, - "end": 52, "type": "FULL" }, { + "end": 45, "start": 27, - "end": 52, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 39, "start": 34, - "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, + "end": 42, + "start": 40, "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 46, + "start": 43, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_async", - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_async.py", "clientMethod": { "async": true, "method": { - "fullName": "DeleteLog", + "fullName": "DeleteBucket", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_async", "segments": [ { + "end": 47, "start": 27, - "end": 46, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 46, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 43, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_async", - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "ListLogEntries", + "fullName": "DeleteBucket", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_sync", "segments": [ { - "start": 27, "end": 47, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 47, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 43, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 44, "type": "REQUEST_EXECUTION" }, { @@ -427,1688 +442,1691 @@ ] }, { - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_async", - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py", "clientMethod": { "async": true, "method": { - "fullName": "WriteLogEntries", + "fullName": "DeleteExclusion", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_async", "segments": [ { + "end": 46, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 46, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 41, "type": "REQUEST_INITIALIZATION" }, { - "start": 42, - "end": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "start": 45, - "end": 48, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_async", - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "ListMonitoredResourceDescriptors", + "fullName": "DeleteExclusion", "service": { - "shortName": "LoggingServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_sync", "segments": [ { + "end": 46, "start": 27, - "end": 42, "type": "FULL" }, { + "end": 46, "start": 27, - "end": 42, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 37, "type": "REQUEST_INITIALIZATION" }, { - "start": 38, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 43, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "GetLogMetric", + "fullName": "DeleteSink", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_async", "segments": [ { + "end": 46, "start": 27, - "end": 48, "type": "FULL" }, { + "end": 46, "start": 27, - "end": 48, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 42, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { "start": 43, - "end": 45, "type": "REQUEST_EXECUTION" }, { - "start": 46, - "end": 49, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py", "clientMethod": { "method": { - "fullName": "UpdateLogMetric", + "fullName": "DeleteSink", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_sync", "segments": [ { + "end": 46, "start": 27, - "end": 53, "type": "FULL" }, { + "end": 46, "start": 27, - "end": 53, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, - "end": 50, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "start": 51, - "end": 54, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "CreateLogMetric", + "fullName": "DeleteView", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_async", "segments": [ { + "end": 48, "start": 27, - "end": 53, "type": "FULL" }, { + "end": 48, "start": 27, - "end": 53, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 44, "start": 34, - "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, - "end": 50, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "start": 51, - "end": 54, + "end": 49, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py", "clientMethod": { "method": { - "fullName": "ListLogMetrics", + "fullName": "DeleteView", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_sync", "segments": [ { + "end": 48, "start": 27, - "end": 46, "type": "FULL" }, { + "end": 48, "start": 27, - "end": 46, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 44, "start": 34, - "end": 41, "type": "REQUEST_INITIALIZATION" }, { - "start": 42, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 49, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "DeleteLogMetric", + "fullName": "GetBucket", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_async", "segments": [ { + "end": 49, "start": 27, - "end": 46, "type": "FULL" }, { + "end": 49, "start": 27, - "end": 46, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 43, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_async", - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "UpdateLogMetric", + "fullName": "GetBucket", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_sync", "segments": [ { + "end": 49, "start": 27, - "end": 53, "type": "FULL" }, { + "end": 49, "start": 27, - "end": 53, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 43, "start": 34, - "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, - "end": 50, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "start": 51, - "end": 54, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_async", - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py", "clientMethod": { "async": true, "method": { - "fullName": "ListLogMetrics", + "fullName": "GetCmekSettings", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_async", "segments": [ { + "end": 47, "start": 27, - "end": 46, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 46, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 41, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { + "end": 44, "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_async", - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "CreateLogMetric", + "fullName": "GetCmekSettings", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_sync", "segments": [ { + "end": 47, "start": 27, - "end": 53, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 53, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 41, "start": 34, - "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, - "end": 50, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "start": 51, - "end": 54, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_async", - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_async.py", "clientMethod": { "async": true, "method": { - "fullName": "DeleteLogMetric", + "fullName": "GetExclusion", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_async", "segments": [ { + "end": 48, "start": 27, - "end": 46, "type": "FULL" }, { + "end": 48, "start": 27, - "end": 46, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 42, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { + "end": 45, "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_async", - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "GetLogMetric", + "fullName": "GetExclusion", "service": { - "shortName": "MetricsServiceV2" + "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_sync", "segments": [ { - "start": 27, "end": 48, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 48, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 42, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "start": 46, "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "UpdateSink", + "fullName": "GetSink", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_async", "segments": [ { + "end": 48, "start": 27, - "end": 53, "type": "FULL" }, { + "end": 48, "start": 27, - "end": 53, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, - "end": 50, + "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "start": 51, - "end": 54, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_sync.py", "clientMethod": { "method": { - "fullName": "ListViews", + "fullName": "GetSink", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_sync", "segments": [ { + "end": 48, "start": 27, - "end": 43, "type": "FULL" }, { + "end": 48, "start": 27, - "end": 43, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "GetSink", + "fullName": "GetView", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetView_async", "segments": [ { + "end": 50, "start": 27, - "end": 48, "type": "FULL" }, { + "end": 50, "start": 27, - "end": 48, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 44, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, - "end": 45, + "end": 47, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "start": 46, - "end": 49, + "end": 51, + "start": 48, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_sync.py", "clientMethod": { "method": { - "fullName": "ListBuckets", + "fullName": "GetView", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetView_sync", "segments": [ { + "end": 50, "start": 27, - "end": 48, "type": "FULL" }, { + "end": 50, "start": 27, - "end": 48, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 44, "start": 34, - "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "end": 47, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 49, + "end": 51, + "start": 48, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "GetExclusion", + "fullName": "ListBuckets", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_async", "segments": [ { - "start": 27, "end": 48, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 48, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 43, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, - "end": 45, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "start": 46, "end": 49, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py", "clientMethod": { "method": { - "fullName": "GetCmekSettings", + "fullName": "ListBuckets", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_sync", "segments": [ { + "end": 48, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 48, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 43, "start": 34, - "end": 41, "type": "REQUEST_INITIALIZATION" }, { - "start": 42, - "end": 44, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "start": 45, - "end": 48, + "end": 49, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "UpdateBucket", + "fullName": "ListExclusions", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_async", "segments": [ { + "end": 47, "start": 27, - "end": 49, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 49, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, - "end": 46, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "start": 47, - "end": 50, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_sync.py", "clientMethod": { "method": { - "fullName": "DeleteView", + "fullName": "ListExclusions", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_sync", "segments": [ { + "end": 47, "start": 27, - "end": 48, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 48, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 44, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 49, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateSink_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "CreateSink", + "fullName": "ListSinks", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_async", "segments": [ { + "end": 47, "start": 27, - "end": 53, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 53, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, - "end": 50, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "start": 51, - "end": 54, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py", "clientMethod": { "method": { - "fullName": "UpdateCmekSettings", + "fullName": "ListSinks", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_sync", "segments": [ { + "end": 47, "start": 27, - "end": 44, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 44, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, - "end": 41, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "start": 42, - "end": 45, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "GetBucket", + "fullName": "ListViews", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_async", "segments": [ { + "end": 43, "start": 27, - "end": 49, "type": "FULL" }, { + "end": 43, "start": 27, - "end": 49, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 38, "start": 34, - "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, - "end": 46, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "start": 47, - "end": 50, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py", "clientMethod": { "method": { - "fullName": "ListExclusions", + "fullName": "ListViews", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_sync", "segments": [ { + "end": 43, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 43, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 38, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 44, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "UpdateView", + "fullName": "UndeleteBucket", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_async", "segments": [ { + "end": 47, "start": 27, - "end": 44, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 44, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 43, "start": 34, - "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, - "end": 41, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "start": 42, - "end": 45, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_sync.py", "clientMethod": { "method": { - "fullName": "CreateView", + "fullName": "UndeleteBucket", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_sync", "segments": [ { + "end": 47, "start": 27, - "end": 45, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 45, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 43, "start": 34, - "end": 39, "type": "REQUEST_INITIALIZATION" }, { - "start": 40, - "end": 42, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "start": 43, - "end": 46, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "DeleteBucket", + "fullName": "UpdateBucket", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_async", "segments": [ { + "end": 49, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 49, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 43, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { + "end": 46, "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_sync.py", "clientMethod": { "method": { - "fullName": "DeleteSink", + "fullName": "UpdateBucket", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_sync", "segments": [ { + "end": 49, "start": 27, - "end": 46, "type": "FULL" }, { + "end": 49, "start": 27, - "end": 46, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 43, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetView_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "GetView", + "fullName": "UpdateCmekSettings", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_async", "segments": [ { + "end": 44, "start": 27, - "end": 50, "type": "FULL" }, { + "end": 44, "start": 27, - "end": 50, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 38, "start": 34, - "end": 44, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, - "end": 47, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "start": 48, - "end": 51, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_sync.py", "clientMethod": { "method": { - "fullName": "CreateBucket", + "fullName": "UpdateCmekSettings", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_sync", "segments": [ { + "end": 44, "start": 27, - "end": 50, "type": "FULL" }, { + "end": 44, "start": 27, - "end": 50, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 38, "start": 34, - "end": 44, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, - "end": 47, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "start": 48, - "end": 51, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "UndeleteBucket", + "fullName": "UpdateExclusion", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_async", "segments": [ { + "end": 53, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 53, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 47, "start": 34, - "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py", "clientMethod": { "method": { - "fullName": "CreateExclusion", + "fullName": "UpdateExclusion", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_sync", "segments": [ { - "start": 27, "end": 53, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 53, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 47, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "start": 51, "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "DeleteExclusion", + "fullName": "UpdateSink", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_async", "segments": [ { + "end": 53, "start": 27, - "end": 46, "type": "FULL" }, { + "end": 53, "start": 27, - "end": 46, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 47, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_sync.py", "clientMethod": { "method": { - "fullName": "ListSinks", + "fullName": "UpdateSink", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_sync", "segments": [ { + "end": 53, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 53, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 47, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_sync", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "UpdateExclusion", + "fullName": "UpdateView", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_async.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_async", "segments": [ { + "end": 44, "start": 27, - "end": 53, "type": "FULL" }, { + "end": 44, "start": 27, - "end": 53, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 38, "start": 34, - "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, - "end": 50, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "start": 51, - "end": 54, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "CreateBucket", + "fullName": "UpdateView", "service": { "shortName": "ConfigServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_sync.py", + "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_sync", "segments": [ { + "end": 44, "start": 27, - "end": 50, "type": "FULL" }, { + "end": 44, "start": 27, - "end": 50, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 38, "start": 34, - "end": 44, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, - "end": 47, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "start": 48, - "end": 51, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_async.py", "clientMethod": { "async": true, "method": { - "fullName": "GetExclusion", + "fullName": "DeleteLog", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_async", "segments": [ { + "end": 46, "start": 27, - "end": 48, "type": "FULL" }, { + "end": 46, "start": 27, - "end": 48, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 42, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { "start": 43, - "end": 45, "type": "REQUEST_EXECUTION" }, { - "start": 46, - "end": 49, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "UndeleteBucket", + "fullName": "DeleteLog", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_sync", "segments": [ { + "end": 46, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 46, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_async.py", "clientMethod": { "async": true, "method": { - "fullName": "DeleteSink", + "fullName": "ListLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_async", "segments": [ { + "end": 47, "start": 27, - "end": 46, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 46, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 42, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { @@ -2116,46 +2134,45 @@ "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "DeleteBucket", + "fullName": "ListLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_sync", "segments": [ { - "start": 27, "end": 47, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 47, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { @@ -2165,799 +2182,782 @@ ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_async.py", "clientMethod": { "async": true, "method": { - "fullName": "CreateExclusion", + "fullName": "ListLogs", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_async", "segments": [ { + "end": 47, "start": 27, - "end": 53, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 53, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, - "end": 50, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "start": 51, - "end": 54, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateSink_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "CreateSink", + "fullName": "ListLogs", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_sync", "segments": [ { + "end": 47, "start": 27, - "end": 53, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 53, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, - "end": 50, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "start": 51, - "end": 54, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_async.py", "clientMethod": { "async": true, "method": { - "fullName": "ListExclusions", + "fullName": "ListMonitoredResourceDescriptors", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_async", "segments": [ { + "end": 42, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 42, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 37, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 38, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 43, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "UpdateView", + "fullName": "ListMonitoredResourceDescriptors", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_sync", "segments": [ { + "end": 42, "start": 27, - "end": 44, "type": "FULL" }, { + "end": 42, "start": 27, - "end": 44, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 37, "start": 34, - "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, - "end": 41, + "start": 38, "type": "REQUEST_EXECUTION" }, { - "start": 42, - "end": 45, + "end": 43, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_async.py", "clientMethod": { "async": true, "method": { - "fullName": "ListBuckets", + "fullName": "TailLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_async", "segments": [ { + "end": 52, "start": 27, - "end": 48, "type": "FULL" }, { + "end": 52, "start": 27, - "end": 48, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 47, "start": 34, - "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 49, + "end": 53, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "ListViews", + "fullName": "TailLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_sync", "segments": [ { + "end": 52, "start": 27, - "end": 43, "type": "FULL" }, { + "end": 52, "start": 27, - "end": 43, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 47, "start": 34, - "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 53, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_async.py", "clientMethod": { "async": true, "method": { - "fullName": "UpdateSink", + "fullName": "WriteLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_async", "segments": [ { + "end": 47, "start": 27, - "end": 53, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 53, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 41, "start": 34, - "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, - "end": 50, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "start": 51, - "end": 54, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "DeleteExclusion", + "fullName": "WriteLogEntries", "service": { - "shortName": "ConfigServiceV2" + "shortName": "LoggingServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py", + "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_sync", "segments": [ { + "end": 47, "start": 27, - "end": 46, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 46, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 41, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 44, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "end": 47, + "end": 48, + "start": 45, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_async.py", "clientMethod": { "async": true, "method": { - "fullName": "GetSink", + "fullName": "CreateLogMetric", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_async", "segments": [ { + "end": 53, "start": 27, - "end": 48, "type": "FULL" }, { + "end": 53, "start": 27, - "end": 48, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 47, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, - "end": 45, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "start": 46, - "end": 49, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetView_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "GetView", + "fullName": "CreateLogMetric", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_sync", "segments": [ { + "end": 53, "start": 27, - "end": 50, "type": "FULL" }, { + "end": 53, "start": 27, - "end": 50, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 47, "start": 34, - "end": 44, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, - "end": 47, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "start": 48, - "end": 51, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_async.py", "clientMethod": { "async": true, "method": { - "fullName": "CreateView", + "fullName": "DeleteLogMetric", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_async", "segments": [ { + "end": 46, "start": 27, - "end": 45, "type": "FULL" }, { + "end": 46, "start": 27, - "end": 45, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 39, "type": "REQUEST_INITIALIZATION" }, { - "start": 40, - "end": 42, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "start": 43, - "end": 46, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "UpdateBucket", + "fullName": "DeleteLogMetric", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_sync", "segments": [ { + "end": 46, "start": 27, - "end": 49, "type": "FULL" }, { + "end": 46, "start": 27, - "end": 49, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, - "end": 46, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "start": 47, - "end": 50, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_async.py", "clientMethod": { "async": true, "method": { - "fullName": "DeleteView", + "fullName": "GetLogMetric", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_async", "segments": [ { - "start": 27, "end": 48, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 48, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 44, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, + "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "GetBucket", + "fullName": "GetLogMetric", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_sync", "segments": [ { + "end": 48, "start": 27, - "end": 49, "type": "FULL" }, { + "end": 48, "start": 27, - "end": 49, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, - "end": 46, + "end": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "start": 47, - "end": 50, + "end": 49, + "start": 46, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_async.py", "clientMethod": { "async": true, "method": { - "fullName": "UpdateExclusion", + "fullName": "ListLogMetrics", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_async", "segments": [ { + "end": 46, "start": 27, - "end": 53, "type": "FULL" }, { + "end": 46, "start": 27, - "end": 53, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 41, "start": 34, - "end": 47, "type": "REQUEST_INITIALIZATION" }, { - "start": 48, - "end": 50, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "start": 51, - "end": 54, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "UpdateCmekSettings", + "fullName": "ListLogMetrics", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_sync", "segments": [ { + "end": 46, "start": 27, - "end": 44, "type": "FULL" }, { + "end": 46, "start": 27, - "end": 44, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 41, "start": 34, - "end": 38, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, - "end": 41, + "start": 42, "type": "REQUEST_EXECUTION" }, { - "start": 42, - "end": 45, + "end": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py", "clientMethod": { "async": true, "method": { - "fullName": "GetCmekSettings", + "fullName": "UpdateLogMetric", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_async", "segments": [ { + "end": 53, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 53, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 47, "start": 34, - "end": 41, "type": "REQUEST_INITIALIZATION" }, { - "start": 42, - "end": 44, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "start": 45, - "end": 48, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_async", - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "ListSinks", + "fullName": "UpdateLogMetric", "service": { - "shortName": "ConfigServiceV2" + "shortName": "MetricsServiceV2" } } }, + "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py", + "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_sync", "segments": [ { + "end": 53, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 53, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 47, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 50, + "start": 48, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 54, + "start": 51, "type": "RESPONSE_HANDLING" } ] diff --git a/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json b/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json index c943d3499f..83036955ca 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json +++ b/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json @@ -1,263 +1,263 @@ { "snippets": [ { - "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_sync", - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "UpdateInstance", + "fullName": "CreateInstance", "service": { "shortName": "CloudRedis" } } }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_async", "segments": [ { + "end": 57, "start": 27, - "end": 51, "type": "FULL" }, { + "end": 57, "start": 27, - "end": 51, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 49, "start": 34, - "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 50, "type": "REQUEST_EXECUTION" }, { - "end": 52, + "end": 58, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_sync", - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_sync.py", "clientMethod": { "method": { - "fullName": "DeleteInstance", + "fullName": "CreateInstance", "service": { "shortName": "CloudRedis" } } }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_sync", "segments": [ { + "end": 57, "start": 27, - "end": 51, "type": "FULL" }, { + "end": 57, "start": 27, - "end": 51, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 49, "start": 34, - "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 50, "type": "REQUEST_EXECUTION" }, { - "end": 52, + "end": 58, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_sync", - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "ExportInstance", + "fullName": "DeleteInstance", "service": { "shortName": "CloudRedis" } } }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_async", "segments": [ { + "end": 51, "start": 27, - "end": 50, "type": "FULL" }, { + "end": 51, "start": 27, - "end": 50, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 43, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 51, + "end": 52, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_sync", - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_sync.py", "clientMethod": { "method": { - "fullName": "GetInstance", + "fullName": "DeleteInstance", "service": { "shortName": "CloudRedis" } } }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_sync", "segments": [ { + "end": 51, "start": 27, - "end": 49, "type": "FULL" }, { + "end": 51, "start": 27, - "end": 49, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 43, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { "start": 44, - "end": 46, "type": "REQUEST_EXECUTION" }, { - "start": 47, - "end": 50, + "end": 52, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_sync", - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "UpgradeInstance", + "fullName": "ExportInstance", "service": { "shortName": "CloudRedis" } } }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_async", "segments": [ { + "end": 50, "start": 27, - "end": 52, "type": "FULL" }, { + "end": 50, "start": 27, - "end": 52, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 44, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 51, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_sync", - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_sync.py", "clientMethod": { "method": { - "fullName": "CreateInstance", + "fullName": "ExportInstance", "service": { "shortName": "CloudRedis" } } }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_sync", "segments": [ { + "end": 50, "start": 27, - "end": 57, "type": "FULL" }, { + "end": 50, "start": 27, - "end": 57, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 49, "type": "REQUEST_INITIALIZATION" }, { - "start": 50, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 58, + "end": 51, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_sync", - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_sync.py", "clientMethod": { + "async": true, "method": { "fullName": "FailoverInstance", "service": { @@ -265,25 +265,27 @@ } } }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_async", "segments": [ { - "start": 27, "end": 51, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 51, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 43, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { @@ -297,180 +299,181 @@ ] }, { - "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_sync", - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_sync.py", "clientMethod": { "method": { - "fullName": "ListInstances", + "fullName": "FailoverInstance", "service": { "shortName": "CloudRedis" } } }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_sync", "segments": [ { + "end": 51, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 51, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 43, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 52, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "redis_generated_redis_v1_CloudRedis_ImportInstance_sync", - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_sync.py", "clientMethod": { + "async": true, "method": { - "fullName": "ImportInstance", + "fullName": "GetInstance", "service": { "shortName": "CloudRedis" } } }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_async", "segments": [ { + "end": 49, "start": 27, - "end": 50, "type": "FULL" }, { + "end": 49, "start": 27, - "end": 50, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 43, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "end": 46, + "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 51, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_async", - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "FailoverInstance", + "fullName": "GetInstance", "service": { "shortName": "CloudRedis" } } }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_sync", "segments": [ { + "end": 49, "start": 27, - "end": 51, "type": "FULL" }, { + "end": 49, "start": 27, - "end": 51, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 43, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { + "end": 46, "start": 44, "type": "REQUEST_EXECUTION" }, { - "end": 52, + "end": 50, + "start": 47, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_async", - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py", "clientMethod": { "async": true, "method": { - "fullName": "UpgradeInstance", + "fullName": "ImportInstance", "service": { "shortName": "CloudRedis" } } }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ImportInstance_async", "segments": [ { + "end": 50, "start": 27, - "end": 52, "type": "FULL" }, { + "end": 50, "start": 27, - "end": 52, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 44, "type": "REQUEST_INITIALIZATION" }, { - "start": 45, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 53, + "end": 51, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "redis_generated_redis_v1_CloudRedis_ImportInstance_async", - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_async.py", "clientMethod": { - "async": true, "method": { "fullName": "ImportInstance", "service": { @@ -478,25 +481,27 @@ } } }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ImportInstance_sync", "segments": [ { - "start": 27, "end": 50, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 50, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 42, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { @@ -510,94 +515,91 @@ ] }, { - "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_async", - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_async.py", "clientMethod": { "async": true, "method": { - "fullName": "DeleteInstance", + "fullName": "ListInstances", "service": { "shortName": "CloudRedis" } } }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_async", "segments": [ { + "end": 47, "start": 27, - "end": 51, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 51, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 43, "type": "REQUEST_INITIALIZATION" }, { - "start": 44, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 52, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_async", - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "CreateInstance", + "fullName": "ListInstances", "service": { "shortName": "CloudRedis" } } }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_sync", "segments": [ { + "end": 47, "start": 27, - "end": 57, "type": "FULL" }, { + "end": 47, "start": 27, - "end": 57, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 42, "start": 34, - "end": 49, "type": "REQUEST_INITIALIZATION" }, { - "start": 50, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 58, + "end": 48, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_async", - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_async.py", "clientMethod": { "async": true, "method": { @@ -607,25 +609,27 @@ } } }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_async", "segments": [ { - "start": 27, "end": 51, + "start": 27, "type": "FULL" }, { - "start": 27, "end": 51, + "start": 27, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 43, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { @@ -639,132 +643,128 @@ ] }, { - "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_async", - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "GetInstance", + "fullName": "UpdateInstance", "service": { "shortName": "CloudRedis" } } }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_sync", "segments": [ { + "end": 51, "start": 27, - "end": 49, "type": "FULL" }, { + "end": 51, "start": 27, - "end": 49, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { - "start": 34, "end": 43, + "start": 34, "type": "REQUEST_INITIALIZATION" }, { "start": 44, - "end": 46, "type": "REQUEST_EXECUTION" }, { - "start": 47, - "end": 50, + "end": 52, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_async", - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_async.py", "clientMethod": { "async": true, "method": { - "fullName": "ListInstances", + "fullName": "UpgradeInstance", "service": { "shortName": "CloudRedis" } } }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_async", "segments": [ { + "end": 52, "start": 27, - "end": 47, "type": "FULL" }, { + "end": 52, "start": 27, - "end": 47, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 44, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 48, + "end": 53, "type": "RESPONSE_HANDLING" } ] }, { - "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_async", - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_async.py", "clientMethod": { - "async": true, "method": { - "fullName": "ExportInstance", + "fullName": "UpgradeInstance", "service": { "shortName": "CloudRedis" } } }, + "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py", + "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_sync", "segments": [ { + "end": 52, "start": 27, - "end": 50, "type": "FULL" }, { + "end": 52, "start": 27, - "end": 50, "type": "SHORT" }, { - "start": 31, "end": 33, + "start": 31, "type": "CLIENT_INITIALIZATION" }, { + "end": 44, "start": 34, - "end": 42, "type": "REQUEST_INITIALIZATION" }, { - "start": 43, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 51, + "end": 53, "type": "RESPONSE_HANDLING" } ] From 823ad2f998f12cd8d925fca0283a85842291d14d Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Thu, 13 Jan 2022 17:21:43 +0000 Subject: [PATCH 11/18] chore: format --- gapic/samplegen_utils/snippet_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gapic/samplegen_utils/snippet_index.py b/gapic/samplegen_utils/snippet_index.py index b849a47cc2..4d213631bc 100644 --- a/gapic/samplegen_utils/snippet_index.py +++ b/gapic/samplegen_utils/snippet_index.py @@ -174,7 +174,7 @@ def get_snippet(self, service_name: str, rpc_name: str, sync: bool = True) -> Op def get_metadata_json(self) -> str: """JSON representation of Snippet Index.""" - + # Downstream tools assume the generator will produce the exact # same output when run over the same API multiple times self.metadata_index.snippets.sort(key=lambda s: s.region_tag) From 1e3defcae10b74f44d19a21d9396960187459862 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Thu, 13 Jan 2022 18:02:30 +0000 Subject: [PATCH 12/18] fix: remove unnecessary conversion to dict --- gapic/samplegen_utils/snippet_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gapic/samplegen_utils/snippet_index.py b/gapic/samplegen_utils/snippet_index.py index 4d213631bc..65ed09dcda 100644 --- a/gapic/samplegen_utils/snippet_index.py +++ b/gapic/samplegen_utils/snippet_index.py @@ -178,4 +178,4 @@ def get_metadata_json(self) -> str: # Downstream tools assume the generator will produce the exact # same output when run over the same API multiple times self.metadata_index.snippets.sort(key=lambda s: s.region_tag) - return json.dumps(json_format.MessageToDict(self.metadata_index), indent=2, sort_keys=True) + return json_format.MessageToJson(self.metadata_index, sort_keys=True) From 11d84b4caff23ebb80bcd80a49d2773a7802c9c1 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Fri, 14 Jan 2022 22:04:26 +0000 Subject: [PATCH 13/18] chore: remove unused imports --- gapic/samplegen_utils/snippet_index.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/gapic/samplegen_utils/snippet_index.py b/gapic/samplegen_utils/snippet_index.py index 65ed09dcda..3d30bca9f4 100644 --- a/gapic/samplegen_utils/snippet_index.py +++ b/gapic/samplegen_utils/snippet_index.py @@ -13,8 +13,6 @@ # limitations under the License. import re -import json -from collections import OrderedDict from typing import Optional, Dict from google.protobuf import json_format From 446591a9da4682c7faf0b19a7ca5559fbbc6f062 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Sat, 15 Jan 2022 00:33:34 +0000 Subject: [PATCH 14/18] fix: fix left alignment issue in docstrings --- gapic/generator/generator.py | 4 +- gapic/samplegen/samplegen.py | 2 +- gapic/samplegen_utils/snippet_index.py | 1 + .../%sub/services/%service/async_client.py.j2 | 4 +- .../%sub/services/%service/client.py.j2 | 4 +- .../services/asset_service/async_client.py | 24 +++--- .../asset_v1/services/asset_service/client.py | 45 +++------- ...v1.json => snippet_metadata_asset_v1.json} | 0 .../services/iam_credentials/async_client.py | 8 +- .../services/iam_credentials/client.py | 16 +--- ...n => snippet_metadata_credentials_v1.json} | 0 .../config_service_v2/async_client.py | 46 +++++------ .../services/config_service_v2/client.py | 82 ++++++------------- .../logging_service_v2/async_client.py | 12 +-- .../services/logging_service_v2/client.py | 24 ++---- .../metrics_service_v2/async_client.py | 10 +-- .../services/metrics_service_v2/client.py | 15 ++-- ....json => snippet_metadata_logging_v2.json} | 0 .../services/cloud_redis/async_client.py | 18 ++-- .../redis_v1/services/cloud_redis/client.py | 35 ++------ ...v1.json => snippet_metadata_redis_v1.json} | 0 21 files changed, 126 insertions(+), 224 deletions(-) rename tests/integration/goldens/asset/samples/generated_samples/{snippet_metadata_v1_asset_v1.json => snippet_metadata_asset_v1.json} (100%) rename tests/integration/goldens/credentials/samples/generated_samples/{snippet_metadata_v1_credentials_v1.json => snippet_metadata_credentials_v1.json} (100%) rename tests/integration/goldens/logging/samples/generated_samples/{snippet_metadata_v1_logging_v2.json => snippet_metadata_logging_v2.json} (100%) rename tests/integration/goldens/redis/samples/generated_samples/{snippet_metadata_v1_redis_v1.json => snippet_metadata_redis_v1.json} (100%) diff --git a/gapic/generator/generator.py b/gapic/generator/generator.py index 0d9626bfbf..75bec7c5ad 100644 --- a/gapic/generator/generator.py +++ b/gapic/generator/generator.py @@ -208,11 +208,11 @@ def _generate_samples_and_manifest( for fname, (_, sample) in fpath_to_spec_and_rendered.items() } - if len(index.metadata_index.snippets) > 0: + if index.metadata_index.snippets: # NOTE(busunkim): Not all fields are yet populated in the snippet metadata. # Expected filename: snippet_metadata_{metadata_schema_version}_{apishortname}_{apiversion}.json snippet_metadata_path = str(pathlib.Path( - out_dir) / f"snippet_metadata_v1_{api_schema.naming.name}_{api_schema.naming.version}.json").lower() + out_dir) / f"snippet_metadata_{api_schema.naming.name}_{api_schema.naming.version}.json").lower() output_files[snippet_metadata_path] = CodeGeneratorResponse.File( content=formatter.fix_whitespace(index.get_metadata_json()), name=snippet_metadata_path) diff --git a/gapic/samplegen/samplegen.py b/gapic/samplegen/samplegen.py index b7f493897d..a11a553785 100644 --- a/gapic/samplegen/samplegen.py +++ b/gapic/samplegen/samplegen.py @@ -923,7 +923,7 @@ def parse_handwritten_specs(sample_configs: Sequence[str]) -> Generator[Dict[str valid = is_valid_sample_cfg(cfg) if not valid: raise types.InvalidConfig( - "Sample config is invalid", valid) + "Sample config in '{}' is invalid\n\n{}".format(config_fpath, cfg), valid) for spec in cfg.get("samples", []): yield spec diff --git a/gapic/samplegen_utils/snippet_index.py b/gapic/samplegen_utils/snippet_index.py index 3d30bca9f4..611aea321d 100644 --- a/gapic/samplegen_utils/snippet_index.py +++ b/gapic/samplegen_utils/snippet_index.py @@ -88,6 +88,7 @@ def full_snippet(self) -> str: """The portion between the START and END region tags.""" start_idx = self._full_snippet.start - 1 end_idx = self._full_snippet.end + self.sample_lines[start_idx] = self.sample_lines[start_idx].strip() return "".join(self.sample_lines[start_idx:end_idx]) diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 index d8d7c1a579..28eab1ce9f 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 @@ -207,10 +207,10 @@ class {{ service.async_client_name }}: {% endif %} r"""{{ method.meta.doc|rst(width=72, indent=8) }} - .. code-block:: {% with snippet = snippet_index.get_snippet(service.name, method.name, sync=True) %} {% if snippet is not none %} - {{ snippet.full_snippet|indent(width=12) }} + .. code-block:: +{{ snippet.full_snippet|indent(width=12, first=True) }} {% endif %} {% endwith %} diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 index 4bf550c38d..ce8edff456 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 @@ -363,10 +363,10 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): {% endif %} r"""{{ method.meta.doc|rst(width=72, indent=8) }} - .. code-block:: + {% with snippet = snippet_index.get_snippet(service.name, method.name, sync=True) %} {% if snippet is not none %} - {{ snippet.full_snippet|indent(width=12) }} +{{ snippet.full_snippet|indent(width=12, first=True) }} {% endif %} {% endwith %} diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py index 1db101c09f..d8889ba5c2 100644 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py @@ -212,7 +212,7 @@ async def export_assets(self, .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_export_assets(): # Create a client @@ -306,7 +306,7 @@ async def list_assets(self, .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_list_assets(): # Create a client @@ -417,7 +417,7 @@ async def batch_get_assets_history(self, .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_batch_get_assets_history(): # Create a client @@ -498,7 +498,7 @@ async def create_feed(self, .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_create_feed(): # Create a client @@ -607,7 +607,7 @@ async def get_feed(self, r"""Gets details about an asset feed. .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_get_feed(): # Create a client @@ -719,7 +719,7 @@ async def list_feeds(self, .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_list_feeds(): # Create a client @@ -820,7 +820,7 @@ async def update_feed(self, r"""Updates an asset feed configuration. .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_update_feed(): # Create a client @@ -923,7 +923,7 @@ async def delete_feed(self, r"""Deletes an asset feed. .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_delete_feed(): # Create a client @@ -1022,7 +1022,7 @@ async def search_all_resources(self, .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_search_all_resources(): # Create a client @@ -1226,7 +1226,7 @@ async def search_all_iam_policies(self, .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_search_all_iam_policies(): # Create a client @@ -1406,7 +1406,7 @@ async def analyze_iam_policy(self, .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_analyze_iam_policy(): # Create a client @@ -1500,7 +1500,7 @@ async def analyze_iam_policy_longrunning(self, .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_analyze_iam_policy_longrunning(): # Create a client diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py index ae11560274..44b4d15e3c 100644 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py @@ -397,9 +397,7 @@ def export_assets(self, the export operation result. For regular-size resource parent, the export operation usually finishes within 5 minutes. - - .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_export_assets(): # Create a client @@ -492,9 +490,7 @@ def list_assets(self, r"""Lists assets with time and resource types and returns paged results in response. - - .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_list_assets(): # Create a client @@ -603,9 +599,7 @@ def batch_get_assets_history(self, specified asset does not exist, this API returns an INVALID_ARGUMENT error. - - .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_batch_get_assets_history(): # Create a client @@ -678,9 +672,7 @@ def create_feed(self, project/folder/organization to listen to its asset updates. - - .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_create_feed(): # Create a client @@ -788,8 +780,7 @@ def get_feed(self, ) -> asset_service.Feed: r"""Gets details about an asset feed. - .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_get_feed(): # Create a client @@ -892,9 +883,7 @@ def list_feeds(self, r"""Lists all asset feeds in a parent project/folder/organization. - - .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_list_feeds(): # Create a client @@ -987,8 +976,7 @@ def update_feed(self, ) -> asset_service.Feed: r"""Updates an asset feed configuration. - .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_update_feed(): # Create a client @@ -1090,8 +1078,7 @@ def delete_feed(self, ) -> None: r"""Deletes an asset feed. - .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_delete_feed(): # Create a client @@ -1181,9 +1168,7 @@ def search_all_resources(self, the ``cloudasset.assets.searchAllResources`` permission on the desired scope, otherwise the request will be rejected. - - .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_search_all_resources(): # Create a client @@ -1378,9 +1363,7 @@ def search_all_iam_policies(self, ``cloudasset.assets.searchAllIamPolicies`` permission on the desired scope, otherwise the request will be rejected. - - .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_search_all_iam_policies(): # Create a client @@ -1551,9 +1534,7 @@ def analyze_iam_policy(self, r"""Analyzes IAM policies to answer which identities have what accesses on which resources. - - .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_analyze_iam_policy(): # Create a client @@ -1640,9 +1621,7 @@ def analyze_iam_policy_longrunning(self, to poll the operation result. The metadata contains the request to help callers to map responses to requests. - - .. code-block:: - from google.cloud import asset_v1 + from google.cloud import asset_v1 def sample_analyze_iam_policy_longrunning(): # Create a client diff --git a/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json b/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_asset_v1.json similarity index 100% rename from tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_v1_asset_v1.json rename to tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_asset_v1.json diff --git a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py index ccf0409a8d..54f5fb9fb2 100644 --- a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py +++ b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py @@ -210,7 +210,7 @@ async def generate_access_token(self, .. code-block:: - from google.iam import credentials_v1 + from google.iam import credentials_v1 def sample_generate_access_token(): # Create a client @@ -367,7 +367,7 @@ async def generate_id_token(self, .. code-block:: - from google.iam import credentials_v1 + from google.iam import credentials_v1 def sample_generate_id_token(): # Create a client @@ -517,7 +517,7 @@ async def sign_blob(self, .. code-block:: - from google.iam import credentials_v1 + from google.iam import credentials_v1 def sample_sign_blob(): # Create a client @@ -654,7 +654,7 @@ async def sign_jwt(self, .. code-block:: - from google.iam import credentials_v1 + from google.iam import credentials_v1 def sample_sign_jwt(): # Create a client diff --git a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py index 6317456cc6..7c7b15014b 100644 --- a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py +++ b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py @@ -386,9 +386,7 @@ def generate_access_token(self, r"""Generates an OAuth 2.0 access token for a service account. - - .. code-block:: - from google.iam import credentials_v1 + from google.iam import credentials_v1 def sample_generate_access_token(): # Create a client @@ -536,9 +534,7 @@ def generate_id_token(self, r"""Generates an OpenID Connect ID token for a service account. - - .. code-block:: - from google.iam import credentials_v1 + from google.iam import credentials_v1 def sample_generate_id_token(): # Create a client @@ -679,9 +675,7 @@ def sign_blob(self, r"""Signs a blob using a service account's system-managed private key. - - .. code-block:: - from google.iam import credentials_v1 + from google.iam import credentials_v1 def sample_sign_blob(): # Create a client @@ -809,9 +803,7 @@ def sign_jwt(self, r"""Signs a JWT using a service account's system-managed private key. - - .. code-block:: - from google.iam import credentials_v1 + from google.iam import credentials_v1 def sample_sign_jwt(): # Create a client diff --git a/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json b/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_credentials_v1.json similarity index 100% rename from tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_v1_credentials_v1.json rename to tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_credentials_v1.json diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py index 3b7c638a5d..6de72de831 100644 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py @@ -204,7 +204,7 @@ async def list_buckets(self, r"""Lists buckets. .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_list_buckets(): # Create a client @@ -321,7 +321,7 @@ async def get_bucket(self, r"""Gets a bucket. .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_get_bucket(): # Create a client @@ -399,7 +399,7 @@ async def create_bucket(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_create_bucket(): # Create a client @@ -486,7 +486,7 @@ async def update_bucket(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_update_bucket(): # Create a client @@ -564,7 +564,7 @@ async def delete_bucket(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_delete_bucket(): # Create a client @@ -631,7 +631,7 @@ async def undelete_bucket(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_undelete_bucket(): # Create a client @@ -697,7 +697,7 @@ async def list_views(self, r"""Lists views on a bucket. .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_list_views(): # Create a client @@ -801,7 +801,7 @@ async def get_view(self, r"""Gets a view. .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_get_view(): # Create a client @@ -881,7 +881,7 @@ async def create_view(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_create_view(): # Create a client @@ -956,7 +956,7 @@ async def update_view(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_update_view(): # Create a client @@ -1028,7 +1028,7 @@ async def delete_view(self, r"""Deletes a view from a bucket. .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_delete_view(): # Create a client @@ -1095,7 +1095,7 @@ async def list_sinks(self, r"""Lists sinks. .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_list_sinks(): # Create a client @@ -1216,7 +1216,7 @@ async def get_sink(self, r"""Gets a sink. .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_get_sink(): # Create a client @@ -1341,7 +1341,7 @@ async def create_sink(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_create_sink(): # Create a client @@ -1475,7 +1475,7 @@ async def update_sink(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_update_sink(): # Create a client @@ -1633,7 +1633,7 @@ async def delete_sink(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_delete_sink(): # Create a client @@ -1734,7 +1734,7 @@ async def list_exclusions(self, r"""Lists all the exclusions in a parent resource. .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_list_exclusions(): # Create a client @@ -1855,7 +1855,7 @@ async def get_exclusion(self, r"""Gets the description of an exclusion. .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_get_exclusion(): # Create a client @@ -1982,7 +1982,7 @@ async def create_exclusion(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_create_exclusion(): # Create a client @@ -2116,7 +2116,7 @@ async def update_exclusion(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_update_exclusion(): # Create a client @@ -2261,7 +2261,7 @@ async def delete_exclusion(self, r"""Deletes an exclusion. .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_delete_exclusion(): # Create a client @@ -2371,7 +2371,7 @@ async def get_cmek_settings(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_get_cmek_settings(): # Create a client @@ -2475,7 +2475,7 @@ async def update_cmek_settings(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_update_cmek_settings(): # Create a client diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py index c7a4cf5bfa..c22dfda06c 100644 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py @@ -417,8 +417,7 @@ def list_buckets(self, ) -> pagers.ListBucketsPager: r"""Lists buckets. - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_list_buckets(): # Create a client @@ -534,8 +533,7 @@ def get_bucket(self, ) -> logging_config.LogBucket: r"""Gets a bucket. - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_get_bucket(): # Create a client @@ -612,9 +610,7 @@ def create_bucket(self, entries. Once a bucket has been created, the region cannot be changed. - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_create_bucket(): # Create a client @@ -700,9 +696,7 @@ def update_bucket(self, A buckets region may not be modified after it is created. - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_update_bucket(): # Create a client @@ -779,9 +773,7 @@ def delete_bucket(self, state. After 7 days, the bucket will be purged and all logs in the bucket will be permanently deleted. - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_delete_bucket(): # Create a client @@ -847,9 +839,7 @@ def undelete_bucket(self, r"""Undeletes a bucket. A bucket that has been deleted may be undeleted within the grace period of 7 days. - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_undelete_bucket(): # Create a client @@ -915,8 +905,7 @@ def list_views(self, ) -> pagers.ListViewsPager: r"""Lists views on a bucket. - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_list_views(): # Create a client @@ -1019,8 +1008,7 @@ def get_view(self, ) -> logging_config.LogView: r"""Gets a view. - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_get_view(): # Create a client @@ -1099,9 +1087,7 @@ def create_view(self, r"""Creates a view over logs in a bucket. A bucket may contain a maximum of 50 views. - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_create_view(): # Create a client @@ -1175,9 +1161,7 @@ def update_view(self, r"""Updates a view. This method replaces the following fields in the existing view with values from the new view: ``filter``. - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_update_view(): # Create a client @@ -1249,8 +1233,7 @@ def delete_view(self, ) -> None: r"""Deletes a view from a bucket. - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_delete_view(): # Create a client @@ -1317,8 +1300,7 @@ def list_sinks(self, ) -> pagers.ListSinksPager: r"""Lists sinks. - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_list_sinks(): # Create a client @@ -1430,8 +1412,7 @@ def get_sink(self, ) -> logging_config.LogSink: r"""Gets a sink. - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_get_sink(): # Create a client @@ -1546,9 +1527,7 @@ def create_sink(self, permitted to write to the destination. A sink can export log entries only from the resource owning the sink. - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_create_sink(): # Create a client @@ -1680,9 +1659,7 @@ def update_sink(self, The updated sink might also have a new ``writer_identity``; see the ``unique_writer_identity`` field. - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_update_sink(): # Create a client @@ -1830,9 +1807,7 @@ def delete_sink(self, r"""Deletes a sink. If the sink has a unique ``writer_identity``, then that service account is also deleted. - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_delete_sink(): # Create a client @@ -1924,8 +1899,7 @@ def list_exclusions(self, ) -> pagers.ListExclusionsPager: r"""Lists all the exclusions in a parent resource. - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_list_exclusions(): # Create a client @@ -2037,8 +2011,7 @@ def get_exclusion(self, ) -> logging_config.LogExclusion: r"""Gets the description of an exclusion. - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_get_exclusion(): # Create a client @@ -2155,9 +2128,7 @@ def create_exclusion(self, can be excluded. You can have up to 10 exclusions in a resource. - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_create_exclusion(): # Create a client @@ -2289,9 +2260,7 @@ def update_exclusion(self, r"""Changes one or more properties of an existing exclusion. - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_update_exclusion(): # Create a client @@ -2435,8 +2404,7 @@ def delete_exclusion(self, ) -> None: r"""Deletes an exclusion. - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_delete_exclusion(): # Create a client @@ -2536,9 +2504,7 @@ def get_cmek_settings(self, Router `__ for more information. - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_get_cmek_settings(): # Create a client @@ -2641,9 +2607,7 @@ def update_cmek_settings(self, Router `__ for more information. - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_update_cmek_settings(): # Create a client diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py index 88fd4573ac..afb5acc68f 100644 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py @@ -201,7 +201,7 @@ async def delete_log(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_delete_log(): # Create a client @@ -315,7 +315,7 @@ async def write_log_entries(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_write_log_entries(): # Create a client @@ -502,7 +502,7 @@ async def list_log_entries(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_list_log_entries(): # Create a client @@ -656,7 +656,7 @@ async def list_monitored_resource_descriptors(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_list_monitored_resource_descriptors(): # Create a client @@ -743,7 +743,7 @@ async def list_logs(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_list_logs(): # Create a client @@ -865,7 +865,7 @@ def tail_log_entries(self, .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_tail_log_entries(): # Create a client diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py index e81ea97f34..c107a8a0c8 100644 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py @@ -377,9 +377,7 @@ def delete_log(self, deleted. Entries received after the delete operation with a timestamp before the operation will be deleted. - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_delete_log(): # Create a client @@ -483,9 +481,7 @@ def write_log_entries(self, maximum of 1000 different resources (projects, organizations, billing accounts or folders) - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_write_log_entries(): # Create a client @@ -661,9 +657,7 @@ def list_log_entries(self, For ways to export log entries, see `Exporting Logs `__. - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_list_log_entries(): # Create a client @@ -807,9 +801,7 @@ def list_monitored_resource_descriptors(self, r"""Lists the descriptors for monitored resource types used by Logging. - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_list_monitored_resource_descriptors(): # Create a client @@ -887,9 +879,7 @@ def list_logs(self, or billing accounts. Only logs that have entries are listed. - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_list_logs(): # Create a client @@ -1001,9 +991,7 @@ def tail_log_entries(self, Until the stream is terminated, it will continue reading logs. - - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_tail_log_entries(): # Create a client diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py index 16f2dd30f1..09df7eeaa8 100644 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py @@ -197,7 +197,7 @@ async def list_log_metrics(self, r"""Lists logs-based metrics. .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_list_log_metrics(): # Create a client @@ -314,7 +314,7 @@ async def get_log_metric(self, r"""Gets a logs-based metric. .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_get_log_metric(): # Create a client @@ -431,7 +431,7 @@ async def create_log_metric(self, r"""Creates a logs-based metric. .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_create_log_metric(): # Create a client @@ -558,7 +558,7 @@ async def update_log_metric(self, r"""Creates or updates a logs-based metric. .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_update_log_metric(): # Create a client @@ -691,7 +691,7 @@ async def delete_log_metric(self, r"""Deletes a logs-based metric. .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_delete_log_metric(): # Create a client diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py index 412c9ba9bb..02f116afe1 100644 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py @@ -374,8 +374,7 @@ def list_log_metrics(self, ) -> pagers.ListLogMetricsPager: r"""Lists logs-based metrics. - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_list_log_metrics(): # Create a client @@ -483,8 +482,7 @@ def get_log_metric(self, ) -> logging_metrics.LogMetric: r"""Gets a logs-based metric. - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_get_log_metric(): # Create a client @@ -592,8 +590,7 @@ def create_log_metric(self, ) -> logging_metrics.LogMetric: r"""Creates a logs-based metric. - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_create_log_metric(): # Create a client @@ -719,8 +716,7 @@ def update_log_metric(self, ) -> logging_metrics.LogMetric: r"""Creates or updates a logs-based metric. - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_update_log_metric(): # Create a client @@ -844,8 +840,7 @@ def delete_log_metric(self, ) -> None: r"""Deletes a logs-based metric. - .. code-block:: - from google.cloud import logging_v2 + from google.cloud import logging_v2 def sample_delete_log_metric(): # Create a client diff --git a/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json b/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_logging_v2.json similarity index 100% rename from tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_v1_logging_v2.json rename to tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_logging_v2.json diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py index e0e0155870..b662388e58 100644 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py @@ -230,7 +230,7 @@ async def list_instances(self, .. code-block:: - from google.cloud import redis_v1 + from google.cloud import redis_v1 def sample_list_instances(): # Create a client @@ -340,7 +340,7 @@ async def get_instance(self, r"""Gets the details of a specific Redis instance. .. code-block:: - from google.cloud import redis_v1 + from google.cloud import redis_v1 def sample_get_instance(): # Create a client @@ -453,7 +453,7 @@ async def create_instance(self, .. code-block:: - from google.cloud import redis_v1 + from google.cloud import redis_v1 def sample_create_instance(): # Create a client @@ -602,7 +602,7 @@ async def update_instance(self, .. code-block:: - from google.cloud import redis_v1 + from google.cloud import redis_v1 def sample_update_instance(): # Create a client @@ -732,7 +732,7 @@ async def upgrade_instance(self, .. code-block:: - from google.cloud import redis_v1 + from google.cloud import redis_v1 def sample_upgrade_instance(): # Create a client @@ -864,7 +864,7 @@ async def import_instance(self, .. code-block:: - from google.cloud import redis_v1 + from google.cloud import redis_v1 def sample_import_instance(): # Create a client @@ -990,7 +990,7 @@ async def export_instance(self, .. code-block:: - from google.cloud import redis_v1 + from google.cloud import redis_v1 def sample_export_instance(): # Create a client @@ -1114,7 +1114,7 @@ async def failover_instance(self, .. code-block:: - from google.cloud import redis_v1 + from google.cloud import redis_v1 def sample_failover_instance(): # Create a client @@ -1238,7 +1238,7 @@ async def delete_instance(self, .. code-block:: - from google.cloud import redis_v1 + from google.cloud import redis_v1 def sample_delete_instance(): # Create a client diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py index 116198da20..22c6a0ab5a 100644 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py @@ -406,9 +406,7 @@ def list_instances(self, regions available to the project are queried, and the results are aggregated. - - .. code-block:: - from google.cloud import redis_v1 + from google.cloud import redis_v1 def sample_list_instances(): # Create a client @@ -517,8 +515,7 @@ def get_instance(self, ) -> cloud_redis.Instance: r"""Gets the details of a specific Redis instance. - .. code-block:: - from google.cloud import redis_v1 + from google.cloud import redis_v1 def sample_get_instance(): # Create a client @@ -629,9 +626,7 @@ def create_instance(self, The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. - - .. code-block:: - from google.cloud import redis_v1 + from google.cloud import redis_v1 def sample_create_instance(): # Create a client @@ -778,9 +773,7 @@ def update_instance(self, operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. - - .. code-block:: - from google.cloud import redis_v1 + from google.cloud import redis_v1 def sample_update_instance(): # Create a client @@ -908,9 +901,7 @@ def upgrade_instance(self, r"""Upgrades Redis instance to the newer Redis version specified in the request. - - .. code-block:: - from google.cloud import redis_v1 + from google.cloud import redis_v1 def sample_upgrade_instance(): # Create a client @@ -1040,9 +1031,7 @@ def import_instance(self, The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. - - .. code-block:: - from google.cloud import redis_v1 + from google.cloud import redis_v1 def sample_import_instance(): # Create a client @@ -1166,9 +1155,7 @@ def export_instance(self, The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. - - .. code-block:: - from google.cloud import redis_v1 + from google.cloud import redis_v1 def sample_export_instance(): # Create a client @@ -1290,9 +1277,7 @@ def failover_instance(self, replica node for a specific STANDARD tier Cloud Memorystore for Redis instance. - - .. code-block:: - from google.cloud import redis_v1 + from google.cloud import redis_v1 def sample_failover_instance(): # Create a client @@ -1414,9 +1399,7 @@ def delete_instance(self, r"""Deletes a specific Redis instance. Instance stops serving and data is deleted. - - .. code-block:: - from google.cloud import redis_v1 + from google.cloud import redis_v1 def sample_delete_instance(): # Create a client diff --git a/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json b/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_redis_v1.json similarity index 100% rename from tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_v1_redis_v1.json rename to tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_redis_v1.json From f710bb79d70b5cd40aa0b79a4d2bf3814f0914f8 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Tue, 18 Jan 2022 16:50:08 +0000 Subject: [PATCH 15/18] fix: fix file path in snippet metadata --- gapic/generator/generator.py | 4 ++-- tests/unit/generator/test_generator.py | 14 +++++++------- tests/unit/samplegen/test_snippet_index.py | 1 - 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/gapic/generator/generator.py b/gapic/generator/generator.py index 75bec7c5ad..609f70bb0f 100644 --- a/gapic/generator/generator.py +++ b/gapic/generator/generator.py @@ -196,7 +196,7 @@ def _generate_samples_and_manifest( sample, ) - snippet_metadata.file = str(pathlib.Path(out_dir) / fpath) + snippet_metadata.file = fpath index.add_snippet( snippet_index.Snippet(sample, snippet_metadata)) @@ -210,7 +210,7 @@ def _generate_samples_and_manifest( if index.metadata_index.snippets: # NOTE(busunkim): Not all fields are yet populated in the snippet metadata. - # Expected filename: snippet_metadata_{metadata_schema_version}_{apishortname}_{apiversion}.json + # Expected filename: snippet_metadata_{apishortname}_{apiversion}.json snippet_metadata_path = str(pathlib.Path( out_dir) / f"snippet_metadata_{api_schema.naming.name}_{api_schema.naming.version}.json").lower() output_files[snippet_metadata_path] = CodeGeneratorResponse.File( diff --git a/tests/unit/generator/test_generator.py b/tests/unit/generator/test_generator.py index 7d1e79d942..bc8fe31ade 100644 --- a/tests/unit/generator/test_generator.py +++ b/tests/unit/generator/test_generator.py @@ -479,7 +479,7 @@ def test_samplegen_config_to_output_files(mock_gmtime, fs): } } }, - "file": "samples/generated_samples/squid_sample.py", + "file": "squid_sample.py", "segments": [ {"type": "FULL"}, {"type": "SHORT"}, @@ -498,7 +498,7 @@ def test_samplegen_config_to_output_files(mock_gmtime, fs): } } }, - "file": "samples/generated_samples/clam_sample.py", + "file": "clam_sample.py", "segments": [ {"type": "FULL"}, {"type": "SHORT"}, @@ -519,7 +519,7 @@ def test_samplegen_config_to_output_files(mock_gmtime, fs): assert actual_response.file[1] == CodeGeneratorResponse.File( name="samples/generated_samples/clam_sample.py", content="\n",) - assert actual_response.file[2].name == "samples/generated_samples/snippet_metadata_v1_mollusc_v1.json" + assert actual_response.file[2].name == "samples/generated_samples/snippet_metadata_mollusc_v1.json" assert json.loads( actual_response.file[2].content) == expected_snippet_index_json @@ -619,7 +619,7 @@ def test_samplegen_id_disambiguation(mock_gmtime, fs): } } }, - "file": "samples/generated_samples/squid_sample_1cfd0b3d.py", + "file": "squid_sample_1cfd0b3d.py", "segments": [ {"type": "FULL"}, {"type": "SHORT"}, @@ -638,7 +638,7 @@ def test_samplegen_id_disambiguation(mock_gmtime, fs): } } }, - "file": "samples/generated_samples/squid_sample_cf4d4fa4.py", + "file": "squid_sample_cf4d4fa4.py", "segments": [ {"type": "FULL"}, {"type": "SHORT"}, @@ -657,7 +657,7 @@ def test_samplegen_id_disambiguation(mock_gmtime, fs): } } }, - "file": "samples/generated_samples/7384949e.py", + "file": "7384949e.py", "segments": [ {"type": "FULL"}, {"type": "SHORT"}, @@ -681,7 +681,7 @@ def test_samplegen_id_disambiguation(mock_gmtime, fs): assert actual_response.file[2] == CodeGeneratorResponse.File( name="samples/generated_samples/7384949e.py", content="\n", ) - assert actual_response.file[3].name == "samples/generated_samples/snippet_metadata_v1_mollusc_v1.json" + assert actual_response.file[3].name == "samples/generated_samples/snippet_metadata_mollusc_v1.json" assert json.loads( actual_response.file[3].content) == expected_snippet_metadata_json diff --git a/tests/unit/samplegen/test_snippet_index.py b/tests/unit/samplegen/test_snippet_index.py index 83606895e8..b33dd82072 100644 --- a/tests/unit/samplegen/test_snippet_index.py +++ b/tests/unit/samplegen/test_snippet_index.py @@ -82,7 +82,6 @@ def test_snippet_init(sample_str): # and # [END ...] lines expected_full_snipppet = """from molluscs.v1 import molluscclient - def sample_classify(video, location): # Create a client client = molluscclient.MolluscServiceClient() From d6f24909e03e083297a2b3f6a05b14462ee3d0dc Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Tue, 18 Jan 2022 16:53:50 +0000 Subject: [PATCH 16/18] fix: use method shortName field --- gapic/samplegen/samplegen.py | 2 +- gapic/samplegen_utils/snippet_index.py | 2 +- tests/unit/generator/test_generator.py | 12 ++++++------ tests/unit/samplegen/test_integration.py | 8 ++++---- tests/unit/samplegen/test_snippet_index.py | 10 +++++----- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/gapic/samplegen/samplegen.py b/gapic/samplegen/samplegen.py index a11a553785..7f4c3dae31 100644 --- a/gapic/samplegen/samplegen.py +++ b/gapic/samplegen/samplegen.py @@ -1100,7 +1100,7 @@ def generate_sample(sample, api_schema, sample_template: jinja2.Template) -> Tup snippet_metadata.region_tag = sample["region_tag"] setattr(snippet_metadata.client_method, "async", sample["transport"] == api.TRANSPORT_GRPC_ASYNC) - snippet_metadata.client_method.method.full_name = sample["rpc"] + snippet_metadata.client_method.method.short_name = sample["rpc"] snippet_metadata.client_method.method.service.short_name = sample["service"].split( ".")[-1] diff --git a/gapic/samplegen_utils/snippet_index.py b/gapic/samplegen_utils/snippet_index.py index 611aea321d..8b7d3d0794 100644 --- a/gapic/samplegen_utils/snippet_index.py +++ b/gapic/samplegen_utils/snippet_index.py @@ -125,7 +125,7 @@ def add_snippet(self, snippet: Snippet) -> None: RpcMethodNotFound: If the method indicated by the snippet metadata is not found. """ service_name = snippet.metadata.client_method.method.service.short_name - rpc_name = snippet.metadata.client_method.method.full_name + rpc_name = snippet.metadata.client_method.method.short_name service = self._index.get(service_name) if service is None: diff --git a/tests/unit/generator/test_generator.py b/tests/unit/generator/test_generator.py index bc8fe31ade..ebf0367194 100644 --- a/tests/unit/generator/test_generator.py +++ b/tests/unit/generator/test_generator.py @@ -39,7 +39,7 @@ def mock_generate_sample(*args, **kwargs): dummy_snippet_metadata = snippet_metadata_pb2.Snippet() dummy_snippet_metadata.client_method.method.service.short_name = args[0]["service"].split( ".")[-1] - dummy_snippet_metadata.client_method.method.full_name = args[0]['rpc'] + dummy_snippet_metadata.client_method.method.short_name = args[0]['rpc'] return "", dummy_snippet_metadata @@ -473,7 +473,7 @@ def test_samplegen_config_to_output_files(mock_gmtime, fs): { "clientMethod": { "method": { - "fullName": "GetSquidStreaming", + "shortName": "GetSquidStreaming", "service": { "shortName": "Mollusc" } @@ -492,7 +492,7 @@ def test_samplegen_config_to_output_files(mock_gmtime, fs): { "clientMethod": { "method": { - "fullName": "GetClam", + "shortName": "GetClam", "service": { "shortName": "Mollusc" } @@ -613,7 +613,7 @@ def test_samplegen_id_disambiguation(mock_gmtime, fs): { "clientMethod": { "method": { - "fullName": "GetSquidStreaming", + "shortName": "GetSquidStreaming", "service": { "shortName": "Mollusc" } @@ -632,7 +632,7 @@ def test_samplegen_id_disambiguation(mock_gmtime, fs): { "clientMethod": { "method": { - "fullName": "GetSquidStreaming", + "shortName": "GetSquidStreaming", "service": { "shortName": "Mollusc" } @@ -651,7 +651,7 @@ def test_samplegen_id_disambiguation(mock_gmtime, fs): { "clientMethod": { "method": { - "fullName": "GetSquidStreaming", + "shortName": "GetSquidStreaming", "service": { "shortName": "Mollusc" } diff --git a/tests/unit/samplegen/test_integration.py b/tests/unit/samplegen/test_integration.py index 503e28b0fd..b1b439549e 100644 --- a/tests/unit/samplegen/test_integration.py +++ b/tests/unit/samplegen/test_integration.py @@ -134,7 +134,7 @@ def test_generate_sample_basic(): 'regionTag': 'molluscs_generated_molluscs_v1_Mollusc_Classify_sync', 'clientMethod': {'method': { - 'fullName': 'Classify', + 'shortName': 'Classify', 'service': {'shortName': 'Mollusc'} }} } @@ -221,7 +221,7 @@ def test_generate_sample_basic_async(): { 'async': True, 'method': { - 'fullName': 'Classify', + 'shortName': 'Classify', 'service': {'shortName': 'Mollusc'} }} } @@ -301,7 +301,7 @@ def test_generate_sample_basic_unflattenable(): 'clientMethod': { 'method': { - 'fullName': 'Classify', + 'shortName': 'Classify', 'service': {'shortName': 'Mollusc'} }} } @@ -379,7 +379,7 @@ def test_generate_sample_void_method(): 'clientMethod': { 'method': { - 'fullName': 'Classify', + 'shortName': 'Classify', 'service': {'shortName': 'Mollusc'} }} } diff --git a/tests/unit/samplegen/test_snippet_index.py b/tests/unit/samplegen/test_snippet_index.py index b33dd82072..8f9db94236 100644 --- a/tests/unit/samplegen/test_snippet_index.py +++ b/tests/unit/samplegen/test_snippet_index.py @@ -129,7 +129,7 @@ def test_add_snippet_no_matching_rpc(sample_str): snippet_metadata = snippet_metadata_pb2.Snippet( ) snippet_metadata.client_method.method.service.short_name = "Squid" - snippet_metadata.client_method.full_name = "classify" + snippet_metadata.client_method.short_name = "classify" snippet = snippet_index.Snippet(sample_str, snippet_metadata) # No 'classify' method in 'Squid' service @@ -165,7 +165,7 @@ def test_get_snippet_no_matching_rpc(): def test_add_and_get_snippet_sync(sample_str): snippet_metadata = snippet_metadata_pb2.Snippet() snippet_metadata.client_method.method.service.short_name = "Squid" - snippet_metadata.client_method.method.full_name = "classify" + snippet_metadata.client_method.method.short_name = "classify" snippet = snippet_index.Snippet(sample_str, snippet_metadata) index = snippet_index.SnippetIndex(api_schema=DummyApiSchema( @@ -181,7 +181,7 @@ def test_add_and_get_snippet_sync(sample_str): def test_add_and_get_snippet_async(sample_str): snippet_metadata = snippet_metadata_pb2.Snippet() snippet_metadata.client_method.method.service.short_name = "Squid" - snippet_metadata.client_method.method.full_name = "classify" + snippet_metadata.client_method.method.short_name = "classify" setattr(snippet_metadata.client_method, "async", True) snippet = snippet_index.Snippet(sample_str, snippet_metadata) @@ -198,7 +198,7 @@ def test_add_and_get_snippet_async(sample_str): def test_get_metadata_json(sample_str): snippet_metadata = snippet_metadata_pb2.Snippet() snippet_metadata.client_method.method.service.short_name = "Squid" - snippet_metadata.client_method.method.full_name = "classify" + snippet_metadata.client_method.method.short_name = "classify" snippet = snippet_index.Snippet(sample_str, snippet_metadata) index = snippet_index.SnippetIndex(api_schema=DummyApiSchema( @@ -209,7 +209,7 @@ def test_get_metadata_json(sample_str): index.add_snippet(snippet) assert json.loads(index.get_metadata_json()) == { - 'snippets': [{'clientMethod': {'method': {'fullName': 'classify', + 'snippets': [{'clientMethod': {'method': {'shortName': 'classify', 'service': {'shortName': 'Squid'}}}, 'segments': [{'end': 28, 'start': 2, 'type': 'FULL'}, {'end': 28, 'start': 2, 'type': 'SHORT'}, From 02f1258c9401808a7984a638e38006946f4ba6e1 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Tue, 18 Jan 2022 17:31:02 +0000 Subject: [PATCH 17/18] chore: update goldens --- .../snippet_metadata_asset_v1.json | 144 +++---- .../snippet_metadata_credentials_v1.json | 48 +-- .../snippet_metadata_logging_v2.json | 408 +++++++++--------- .../snippet_metadata_redis_v1.json | 108 ++--- 4 files changed, 354 insertions(+), 354 deletions(-) diff --git a/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_asset_v1.json b/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_asset_v1.json index 6bd698b80e..8f871de592 100644 --- a/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_asset_v1.json +++ b/tests/integration/goldens/asset/samples/generated_samples/snippet_metadata_asset_v1.json @@ -4,13 +4,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "AnalyzeIamPolicyLongrunning", "service": { "shortName": "AssetService" - } + }, + "shortName": "AnalyzeIamPolicyLongrunning" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py", + "file": "cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async", "segments": [ { @@ -46,13 +46,13 @@ { "clientMethod": { "method": { - "fullName": "AnalyzeIamPolicyLongrunning", "service": { "shortName": "AssetService" - } + }, + "shortName": "AnalyzeIamPolicyLongrunning" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py", + "file": "cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync", "segments": [ { @@ -89,13 +89,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "AnalyzeIamPolicy", "service": { "shortName": "AssetService" - } + }, + "shortName": "AnalyzeIamPolicy" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py", + "file": "cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async", "segments": [ { @@ -133,13 +133,13 @@ { "clientMethod": { "method": { - "fullName": "AnalyzeIamPolicy", "service": { "shortName": "AssetService" - } + }, + "shortName": "AnalyzeIamPolicy" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py", + "file": "cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync", "segments": [ { @@ -178,13 +178,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "BatchGetAssetsHistory", "service": { "shortName": "AssetService" - } + }, + "shortName": "BatchGetAssetsHistory" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py", + "file": "cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async", "segments": [ { @@ -222,13 +222,13 @@ { "clientMethod": { "method": { - "fullName": "BatchGetAssetsHistory", "service": { "shortName": "AssetService" - } + }, + "shortName": "BatchGetAssetsHistory" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py", + "file": "cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync", "segments": [ { @@ -267,13 +267,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "CreateFeed", "service": { "shortName": "AssetService" - } + }, + "shortName": "CreateFeed" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py", + "file": "cloudasset_generated_asset_v1_asset_service_create_feed_async.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_async", "segments": [ { @@ -311,13 +311,13 @@ { "clientMethod": { "method": { - "fullName": "CreateFeed", "service": { "shortName": "AssetService" - } + }, + "shortName": "CreateFeed" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py", + "file": "cloudasset_generated_asset_v1_asset_service_create_feed_sync.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_sync", "segments": [ { @@ -356,13 +356,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "DeleteFeed", "service": { "shortName": "AssetService" - } + }, + "shortName": "DeleteFeed" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py", + "file": "cloudasset_generated_asset_v1_asset_service_delete_feed_async.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_async", "segments": [ { @@ -398,13 +398,13 @@ { "clientMethod": { "method": { - "fullName": "DeleteFeed", "service": { "shortName": "AssetService" - } + }, + "shortName": "DeleteFeed" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py", + "file": "cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_sync", "segments": [ { @@ -441,13 +441,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "ExportAssets", "service": { "shortName": "AssetService" - } + }, + "shortName": "ExportAssets" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py", + "file": "cloudasset_generated_asset_v1_asset_service_export_assets_async.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_async", "segments": [ { @@ -483,13 +483,13 @@ { "clientMethod": { "method": { - "fullName": "ExportAssets", "service": { "shortName": "AssetService" - } + }, + "shortName": "ExportAssets" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py", + "file": "cloudasset_generated_asset_v1_asset_service_export_assets_sync.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_sync", "segments": [ { @@ -526,13 +526,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "GetFeed", "service": { "shortName": "AssetService" - } + }, + "shortName": "GetFeed" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py", + "file": "cloudasset_generated_asset_v1_asset_service_get_feed_async.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_async", "segments": [ { @@ -570,13 +570,13 @@ { "clientMethod": { "method": { - "fullName": "GetFeed", "service": { "shortName": "AssetService" - } + }, + "shortName": "GetFeed" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py", + "file": "cloudasset_generated_asset_v1_asset_service_get_feed_sync.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_sync", "segments": [ { @@ -615,13 +615,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListAssets", "service": { "shortName": "AssetService" - } + }, + "shortName": "ListAssets" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py", + "file": "cloudasset_generated_asset_v1_asset_service_list_assets_async.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_async", "segments": [ { @@ -657,13 +657,13 @@ { "clientMethod": { "method": { - "fullName": "ListAssets", "service": { "shortName": "AssetService" - } + }, + "shortName": "ListAssets" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py", + "file": "cloudasset_generated_asset_v1_asset_service_list_assets_sync.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_sync", "segments": [ { @@ -700,13 +700,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListFeeds", "service": { "shortName": "AssetService" - } + }, + "shortName": "ListFeeds" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py", + "file": "cloudasset_generated_asset_v1_asset_service_list_feeds_async.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_async", "segments": [ { @@ -744,13 +744,13 @@ { "clientMethod": { "method": { - "fullName": "ListFeeds", "service": { "shortName": "AssetService" - } + }, + "shortName": "ListFeeds" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py", + "file": "cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_sync", "segments": [ { @@ -789,13 +789,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "SearchAllIamPolicies", "service": { "shortName": "AssetService" - } + }, + "shortName": "SearchAllIamPolicies" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py", + "file": "cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_async", "segments": [ { @@ -831,13 +831,13 @@ { "clientMethod": { "method": { - "fullName": "SearchAllIamPolicies", "service": { "shortName": "AssetService" - } + }, + "shortName": "SearchAllIamPolicies" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py", + "file": "cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_sync", "segments": [ { @@ -874,13 +874,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "SearchAllResources", "service": { "shortName": "AssetService" - } + }, + "shortName": "SearchAllResources" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py", + "file": "cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_async", "segments": [ { @@ -916,13 +916,13 @@ { "clientMethod": { "method": { - "fullName": "SearchAllResources", "service": { "shortName": "AssetService" - } + }, + "shortName": "SearchAllResources" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py", + "file": "cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_sync", "segments": [ { @@ -959,13 +959,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "UpdateFeed", "service": { "shortName": "AssetService" - } + }, + "shortName": "UpdateFeed" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py", + "file": "cloudasset_generated_asset_v1_asset_service_update_feed_async.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_async", "segments": [ { @@ -1003,13 +1003,13 @@ { "clientMethod": { "method": { - "fullName": "UpdateFeed", "service": { "shortName": "AssetService" - } + }, + "shortName": "UpdateFeed" } }, - "file": "samples/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py", + "file": "cloudasset_generated_asset_v1_asset_service_update_feed_sync.py", "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_sync", "segments": [ { diff --git a/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_credentials_v1.json b/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_credentials_v1.json index 6993d507ef..8217a23d26 100644 --- a/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_credentials_v1.json +++ b/tests/integration/goldens/credentials/samples/generated_samples/snippet_metadata_credentials_v1.json @@ -4,13 +4,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "GenerateAccessToken", "service": { "shortName": "IAMCredentials" - } + }, + "shortName": "GenerateAccessToken" } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py", + "file": "iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_async.py", "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_async", "segments": [ { @@ -48,13 +48,13 @@ { "clientMethod": { "method": { - "fullName": "GenerateAccessToken", "service": { "shortName": "IAMCredentials" - } + }, + "shortName": "GenerateAccessToken" } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py", + "file": "iamcredentials_generated_credentials_v1_iam_credentials_generate_access_token_sync.py", "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateAccessToken_sync", "segments": [ { @@ -93,13 +93,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "GenerateIdToken", "service": { "shortName": "IAMCredentials" - } + }, + "shortName": "GenerateIdToken" } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py", + "file": "iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_async.py", "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_async", "segments": [ { @@ -137,13 +137,13 @@ { "clientMethod": { "method": { - "fullName": "GenerateIdToken", "service": { "shortName": "IAMCredentials" - } + }, + "shortName": "GenerateIdToken" } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py", + "file": "iamcredentials_generated_credentials_v1_iam_credentials_generate_id_token_sync.py", "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_GenerateIdToken_sync", "segments": [ { @@ -182,13 +182,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "SignBlob", "service": { "shortName": "IAMCredentials" - } + }, + "shortName": "SignBlob" } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_async.py", + "file": "iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_async.py", "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_async", "segments": [ { @@ -226,13 +226,13 @@ { "clientMethod": { "method": { - "fullName": "SignBlob", "service": { "shortName": "IAMCredentials" - } + }, + "shortName": "SignBlob" } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py", + "file": "iamcredentials_generated_credentials_v1_iam_credentials_sign_blob_sync.py", "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignBlob_sync", "segments": [ { @@ -271,13 +271,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "SignJwt", "service": { "shortName": "IAMCredentials" - } + }, + "shortName": "SignJwt" } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py", + "file": "iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_async.py", "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_async", "segments": [ { @@ -315,13 +315,13 @@ { "clientMethod": { "method": { - "fullName": "SignJwt", "service": { "shortName": "IAMCredentials" - } + }, + "shortName": "SignJwt" } }, - "file": "samples/generated_samples/iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py", + "file": "iamcredentials_generated_credentials_v1_iam_credentials_sign_jwt_sync.py", "regionTag": "iamcredentials_generated_credentials_v1_IAMCredentials_SignJwt_sync", "segments": [ { diff --git a/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_logging_v2.json b/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_logging_v2.json index 8cf8d2a835..c5479a62a7 100644 --- a/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_logging_v2.json +++ b/tests/integration/goldens/logging/samples/generated_samples/snippet_metadata_logging_v2.json @@ -4,13 +4,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "CreateBucket", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "CreateBucket" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_async.py", + "file": "logging_generated_logging_v2_config_service_v2_create_bucket_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_async", "segments": [ { @@ -48,13 +48,13 @@ { "clientMethod": { "method": { - "fullName": "CreateBucket", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "CreateBucket" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_bucket_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_create_bucket_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateBucket_sync", "segments": [ { @@ -93,13 +93,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "CreateExclusion", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "CreateExclusion" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_async.py", + "file": "logging_generated_logging_v2_config_service_v2_create_exclusion_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_async", "segments": [ { @@ -137,13 +137,13 @@ { "clientMethod": { "method": { - "fullName": "CreateExclusion", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "CreateExclusion" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_create_exclusion_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateExclusion_sync", "segments": [ { @@ -182,13 +182,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "CreateSink", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "CreateSink" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_async.py", + "file": "logging_generated_logging_v2_config_service_v2_create_sink_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateSink_async", "segments": [ { @@ -226,13 +226,13 @@ { "clientMethod": { "method": { - "fullName": "CreateSink", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "CreateSink" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_sink_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_create_sink_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateSink_sync", "segments": [ { @@ -271,13 +271,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "CreateView", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "CreateView" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_async.py", + "file": "logging_generated_logging_v2_config_service_v2_create_view_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_async", "segments": [ { @@ -315,13 +315,13 @@ { "clientMethod": { "method": { - "fullName": "CreateView", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "CreateView" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_create_view_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_create_view_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_CreateView_sync", "segments": [ { @@ -360,13 +360,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "DeleteBucket", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "DeleteBucket" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_async.py", + "file": "logging_generated_logging_v2_config_service_v2_delete_bucket_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_async", "segments": [ { @@ -402,13 +402,13 @@ { "clientMethod": { "method": { - "fullName": "DeleteBucket", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "DeleteBucket" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_bucket_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_delete_bucket_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteBucket_sync", "segments": [ { @@ -445,13 +445,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "DeleteExclusion", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "DeleteExclusion" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_async.py", + "file": "logging_generated_logging_v2_config_service_v2_delete_exclusion_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_async", "segments": [ { @@ -487,13 +487,13 @@ { "clientMethod": { "method": { - "fullName": "DeleteExclusion", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "DeleteExclusion" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_exclusion_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_delete_exclusion_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteExclusion_sync", "segments": [ { @@ -530,13 +530,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "DeleteSink", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "DeleteSink" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_async.py", + "file": "logging_generated_logging_v2_config_service_v2_delete_sink_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_async", "segments": [ { @@ -572,13 +572,13 @@ { "clientMethod": { "method": { - "fullName": "DeleteSink", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "DeleteSink" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_sink_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_delete_sink_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteSink_sync", "segments": [ { @@ -615,13 +615,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "DeleteView", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "DeleteView" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_async.py", + "file": "logging_generated_logging_v2_config_service_v2_delete_view_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_async", "segments": [ { @@ -657,13 +657,13 @@ { "clientMethod": { "method": { - "fullName": "DeleteView", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "DeleteView" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_delete_view_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_delete_view_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_DeleteView_sync", "segments": [ { @@ -700,13 +700,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "GetBucket", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "GetBucket" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_async.py", + "file": "logging_generated_logging_v2_config_service_v2_get_bucket_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_async", "segments": [ { @@ -744,13 +744,13 @@ { "clientMethod": { "method": { - "fullName": "GetBucket", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "GetBucket" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_bucket_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_get_bucket_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetBucket_sync", "segments": [ { @@ -789,13 +789,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "GetCmekSettings", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "GetCmekSettings" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py", + "file": "logging_generated_logging_v2_config_service_v2_get_cmek_settings_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_async", "segments": [ { @@ -833,13 +833,13 @@ { "clientMethod": { "method": { - "fullName": "GetCmekSettings", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "GetCmekSettings" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_get_cmek_settings_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetCmekSettings_sync", "segments": [ { @@ -878,13 +878,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "GetExclusion", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "GetExclusion" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_async.py", + "file": "logging_generated_logging_v2_config_service_v2_get_exclusion_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_async", "segments": [ { @@ -922,13 +922,13 @@ { "clientMethod": { "method": { - "fullName": "GetExclusion", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "GetExclusion" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_get_exclusion_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetExclusion_sync", "segments": [ { @@ -967,13 +967,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "GetSink", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "GetSink" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_async.py", + "file": "logging_generated_logging_v2_config_service_v2_get_sink_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_async", "segments": [ { @@ -1011,13 +1011,13 @@ { "clientMethod": { "method": { - "fullName": "GetSink", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "GetSink" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_sink_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_get_sink_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetSink_sync", "segments": [ { @@ -1056,13 +1056,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "GetView", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "GetView" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_async.py", + "file": "logging_generated_logging_v2_config_service_v2_get_view_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetView_async", "segments": [ { @@ -1100,13 +1100,13 @@ { "clientMethod": { "method": { - "fullName": "GetView", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "GetView" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_get_view_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_get_view_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_GetView_sync", "segments": [ { @@ -1145,13 +1145,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListBuckets", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "ListBuckets" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_async.py", + "file": "logging_generated_logging_v2_config_service_v2_list_buckets_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_async", "segments": [ { @@ -1187,13 +1187,13 @@ { "clientMethod": { "method": { - "fullName": "ListBuckets", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "ListBuckets" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_buckets_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_list_buckets_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListBuckets_sync", "segments": [ { @@ -1230,13 +1230,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListExclusions", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "ListExclusions" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_async.py", + "file": "logging_generated_logging_v2_config_service_v2_list_exclusions_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_async", "segments": [ { @@ -1272,13 +1272,13 @@ { "clientMethod": { "method": { - "fullName": "ListExclusions", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "ListExclusions" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_list_exclusions_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListExclusions_sync", "segments": [ { @@ -1315,13 +1315,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListSinks", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "ListSinks" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_async.py", + "file": "logging_generated_logging_v2_config_service_v2_list_sinks_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_async", "segments": [ { @@ -1357,13 +1357,13 @@ { "clientMethod": { "method": { - "fullName": "ListSinks", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "ListSinks" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_sinks_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_list_sinks_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListSinks_sync", "segments": [ { @@ -1400,13 +1400,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListViews", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "ListViews" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_async.py", + "file": "logging_generated_logging_v2_config_service_v2_list_views_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_async", "segments": [ { @@ -1442,13 +1442,13 @@ { "clientMethod": { "method": { - "fullName": "ListViews", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "ListViews" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_list_views_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_list_views_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_ListViews_sync", "segments": [ { @@ -1485,13 +1485,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "UndeleteBucket", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "UndeleteBucket" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_async.py", + "file": "logging_generated_logging_v2_config_service_v2_undelete_bucket_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_async", "segments": [ { @@ -1527,13 +1527,13 @@ { "clientMethod": { "method": { - "fullName": "UndeleteBucket", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "UndeleteBucket" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_undelete_bucket_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_undelete_bucket_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UndeleteBucket_sync", "segments": [ { @@ -1570,13 +1570,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "UpdateBucket", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "UpdateBucket" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_async.py", + "file": "logging_generated_logging_v2_config_service_v2_update_bucket_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_async", "segments": [ { @@ -1614,13 +1614,13 @@ { "clientMethod": { "method": { - "fullName": "UpdateBucket", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "UpdateBucket" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_bucket_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_update_bucket_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateBucket_sync", "segments": [ { @@ -1659,13 +1659,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "UpdateCmekSettings", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "UpdateCmekSettings" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py", + "file": "logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_async", "segments": [ { @@ -1703,13 +1703,13 @@ { "clientMethod": { "method": { - "fullName": "UpdateCmekSettings", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "UpdateCmekSettings" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_update_cmek_settings_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateCmekSettings_sync", "segments": [ { @@ -1748,13 +1748,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "UpdateExclusion", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "UpdateExclusion" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_async.py", + "file": "logging_generated_logging_v2_config_service_v2_update_exclusion_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_async", "segments": [ { @@ -1792,13 +1792,13 @@ { "clientMethod": { "method": { - "fullName": "UpdateExclusion", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "UpdateExclusion" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_exclusion_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_update_exclusion_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateExclusion_sync", "segments": [ { @@ -1837,13 +1837,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "UpdateSink", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "UpdateSink" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_async.py", + "file": "logging_generated_logging_v2_config_service_v2_update_sink_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_async", "segments": [ { @@ -1881,13 +1881,13 @@ { "clientMethod": { "method": { - "fullName": "UpdateSink", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "UpdateSink" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_sink_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_update_sink_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateSink_sync", "segments": [ { @@ -1926,13 +1926,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "UpdateView", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "UpdateView" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_async.py", + "file": "logging_generated_logging_v2_config_service_v2_update_view_async.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_async", "segments": [ { @@ -1970,13 +1970,13 @@ { "clientMethod": { "method": { - "fullName": "UpdateView", "service": { "shortName": "ConfigServiceV2" - } + }, + "shortName": "UpdateView" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_view_sync.py", + "file": "logging_generated_logging_v2_config_service_v2_update_view_sync.py", "regionTag": "logging_generated_logging_v2_ConfigServiceV2_UpdateView_sync", "segments": [ { @@ -2015,13 +2015,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "DeleteLog", "service": { "shortName": "LoggingServiceV2" - } + }, + "shortName": "DeleteLog" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_async.py", + "file": "logging_generated_logging_v2_logging_service_v2_delete_log_async.py", "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_async", "segments": [ { @@ -2057,13 +2057,13 @@ { "clientMethod": { "method": { - "fullName": "DeleteLog", "service": { "shortName": "LoggingServiceV2" - } + }, + "shortName": "DeleteLog" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_delete_log_sync.py", + "file": "logging_generated_logging_v2_logging_service_v2_delete_log_sync.py", "regionTag": "logging_generated_logging_v2_LoggingServiceV2_DeleteLog_sync", "segments": [ { @@ -2100,13 +2100,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListLogEntries", "service": { "shortName": "LoggingServiceV2" - } + }, + "shortName": "ListLogEntries" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py", + "file": "logging_generated_logging_v2_logging_service_v2_list_log_entries_async.py", "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_async", "segments": [ { @@ -2142,13 +2142,13 @@ { "clientMethod": { "method": { - "fullName": "ListLogEntries", "service": { "shortName": "LoggingServiceV2" - } + }, + "shortName": "ListLogEntries" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py", + "file": "logging_generated_logging_v2_logging_service_v2_list_log_entries_sync.py", "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogEntries_sync", "segments": [ { @@ -2185,13 +2185,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListLogs", "service": { "shortName": "LoggingServiceV2" - } + }, + "shortName": "ListLogs" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_async.py", + "file": "logging_generated_logging_v2_logging_service_v2_list_logs_async.py", "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_async", "segments": [ { @@ -2227,13 +2227,13 @@ { "clientMethod": { "method": { - "fullName": "ListLogs", "service": { "shortName": "LoggingServiceV2" - } + }, + "shortName": "ListLogs" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_logs_sync.py", + "file": "logging_generated_logging_v2_logging_service_v2_list_logs_sync.py", "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListLogs_sync", "segments": [ { @@ -2270,13 +2270,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListMonitoredResourceDescriptors", "service": { "shortName": "LoggingServiceV2" - } + }, + "shortName": "ListMonitoredResourceDescriptors" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py", + "file": "logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_async.py", "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_async", "segments": [ { @@ -2312,13 +2312,13 @@ { "clientMethod": { "method": { - "fullName": "ListMonitoredResourceDescriptors", "service": { "shortName": "LoggingServiceV2" - } + }, + "shortName": "ListMonitoredResourceDescriptors" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py", + "file": "logging_generated_logging_v2_logging_service_v2_list_monitored_resource_descriptors_sync.py", "regionTag": "logging_generated_logging_v2_LoggingServiceV2_ListMonitoredResourceDescriptors_sync", "segments": [ { @@ -2355,13 +2355,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "TailLogEntries", "service": { "shortName": "LoggingServiceV2" - } + }, + "shortName": "TailLogEntries" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py", + "file": "logging_generated_logging_v2_logging_service_v2_tail_log_entries_async.py", "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_async", "segments": [ { @@ -2397,13 +2397,13 @@ { "clientMethod": { "method": { - "fullName": "TailLogEntries", "service": { "shortName": "LoggingServiceV2" - } + }, + "shortName": "TailLogEntries" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py", + "file": "logging_generated_logging_v2_logging_service_v2_tail_log_entries_sync.py", "regionTag": "logging_generated_logging_v2_LoggingServiceV2_TailLogEntries_sync", "segments": [ { @@ -2440,13 +2440,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "WriteLogEntries", "service": { "shortName": "LoggingServiceV2" - } + }, + "shortName": "WriteLogEntries" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py", + "file": "logging_generated_logging_v2_logging_service_v2_write_log_entries_async.py", "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_async", "segments": [ { @@ -2484,13 +2484,13 @@ { "clientMethod": { "method": { - "fullName": "WriteLogEntries", "service": { "shortName": "LoggingServiceV2" - } + }, + "shortName": "WriteLogEntries" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py", + "file": "logging_generated_logging_v2_logging_service_v2_write_log_entries_sync.py", "regionTag": "logging_generated_logging_v2_LoggingServiceV2_WriteLogEntries_sync", "segments": [ { @@ -2529,13 +2529,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "CreateLogMetric", "service": { "shortName": "MetricsServiceV2" - } + }, + "shortName": "CreateLogMetric" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py", + "file": "logging_generated_logging_v2_metrics_service_v2_create_log_metric_async.py", "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_async", "segments": [ { @@ -2573,13 +2573,13 @@ { "clientMethod": { "method": { - "fullName": "CreateLogMetric", "service": { "shortName": "MetricsServiceV2" - } + }, + "shortName": "CreateLogMetric" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py", + "file": "logging_generated_logging_v2_metrics_service_v2_create_log_metric_sync.py", "regionTag": "logging_generated_logging_v2_MetricsServiceV2_CreateLogMetric_sync", "segments": [ { @@ -2618,13 +2618,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "DeleteLogMetric", "service": { "shortName": "MetricsServiceV2" - } + }, + "shortName": "DeleteLogMetric" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_async.py", + "file": "logging_generated_logging_v2_metrics_service_v2_delete_log_metric_async.py", "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_async", "segments": [ { @@ -2660,13 +2660,13 @@ { "clientMethod": { "method": { - "fullName": "DeleteLogMetric", "service": { "shortName": "MetricsServiceV2" - } + }, + "shortName": "DeleteLogMetric" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_delete_log_metric_sync.py", + "file": "logging_generated_logging_v2_metrics_service_v2_delete_log_metric_sync.py", "regionTag": "logging_generated_logging_v2_MetricsServiceV2_DeleteLogMetric_sync", "segments": [ { @@ -2703,13 +2703,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "GetLogMetric", "service": { "shortName": "MetricsServiceV2" - } + }, + "shortName": "GetLogMetric" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py", + "file": "logging_generated_logging_v2_metrics_service_v2_get_log_metric_async.py", "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_async", "segments": [ { @@ -2747,13 +2747,13 @@ { "clientMethod": { "method": { - "fullName": "GetLogMetric", "service": { "shortName": "MetricsServiceV2" - } + }, + "shortName": "GetLogMetric" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py", + "file": "logging_generated_logging_v2_metrics_service_v2_get_log_metric_sync.py", "regionTag": "logging_generated_logging_v2_MetricsServiceV2_GetLogMetric_sync", "segments": [ { @@ -2792,13 +2792,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListLogMetrics", "service": { "shortName": "MetricsServiceV2" - } + }, + "shortName": "ListLogMetrics" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py", + "file": "logging_generated_logging_v2_metrics_service_v2_list_log_metrics_async.py", "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_async", "segments": [ { @@ -2834,13 +2834,13 @@ { "clientMethod": { "method": { - "fullName": "ListLogMetrics", "service": { "shortName": "MetricsServiceV2" - } + }, + "shortName": "ListLogMetrics" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py", + "file": "logging_generated_logging_v2_metrics_service_v2_list_log_metrics_sync.py", "regionTag": "logging_generated_logging_v2_MetricsServiceV2_ListLogMetrics_sync", "segments": [ { @@ -2877,13 +2877,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "UpdateLogMetric", "service": { "shortName": "MetricsServiceV2" - } + }, + "shortName": "UpdateLogMetric" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py", + "file": "logging_generated_logging_v2_metrics_service_v2_update_log_metric_async.py", "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_async", "segments": [ { @@ -2921,13 +2921,13 @@ { "clientMethod": { "method": { - "fullName": "UpdateLogMetric", "service": { "shortName": "MetricsServiceV2" - } + }, + "shortName": "UpdateLogMetric" } }, - "file": "samples/generated_samples/logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py", + "file": "logging_generated_logging_v2_metrics_service_v2_update_log_metric_sync.py", "regionTag": "logging_generated_logging_v2_MetricsServiceV2_UpdateLogMetric_sync", "segments": [ { diff --git a/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_redis_v1.json b/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_redis_v1.json index 83036955ca..9237cc8828 100644 --- a/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_redis_v1.json +++ b/tests/integration/goldens/redis/samples/generated_samples/snippet_metadata_redis_v1.json @@ -4,13 +4,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "CreateInstance", "service": { "shortName": "CloudRedis" - } + }, + "shortName": "CreateInstance" } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_async.py", + "file": "redis_generated_redis_v1_cloud_redis_create_instance_async.py", "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_async", "segments": [ { @@ -46,13 +46,13 @@ { "clientMethod": { "method": { - "fullName": "CreateInstance", "service": { "shortName": "CloudRedis" - } + }, + "shortName": "CreateInstance" } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_create_instance_sync.py", + "file": "redis_generated_redis_v1_cloud_redis_create_instance_sync.py", "regionTag": "redis_generated_redis_v1_CloudRedis_CreateInstance_sync", "segments": [ { @@ -89,13 +89,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "DeleteInstance", "service": { "shortName": "CloudRedis" - } + }, + "shortName": "DeleteInstance" } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_async.py", + "file": "redis_generated_redis_v1_cloud_redis_delete_instance_async.py", "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_async", "segments": [ { @@ -131,13 +131,13 @@ { "clientMethod": { "method": { - "fullName": "DeleteInstance", "service": { "shortName": "CloudRedis" - } + }, + "shortName": "DeleteInstance" } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_delete_instance_sync.py", + "file": "redis_generated_redis_v1_cloud_redis_delete_instance_sync.py", "regionTag": "redis_generated_redis_v1_CloudRedis_DeleteInstance_sync", "segments": [ { @@ -174,13 +174,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "ExportInstance", "service": { "shortName": "CloudRedis" - } + }, + "shortName": "ExportInstance" } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_async.py", + "file": "redis_generated_redis_v1_cloud_redis_export_instance_async.py", "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_async", "segments": [ { @@ -216,13 +216,13 @@ { "clientMethod": { "method": { - "fullName": "ExportInstance", "service": { "shortName": "CloudRedis" - } + }, + "shortName": "ExportInstance" } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_export_instance_sync.py", + "file": "redis_generated_redis_v1_cloud_redis_export_instance_sync.py", "regionTag": "redis_generated_redis_v1_CloudRedis_ExportInstance_sync", "segments": [ { @@ -259,13 +259,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "FailoverInstance", "service": { "shortName": "CloudRedis" - } + }, + "shortName": "FailoverInstance" } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_async.py", + "file": "redis_generated_redis_v1_cloud_redis_failover_instance_async.py", "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_async", "segments": [ { @@ -301,13 +301,13 @@ { "clientMethod": { "method": { - "fullName": "FailoverInstance", "service": { "shortName": "CloudRedis" - } + }, + "shortName": "FailoverInstance" } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_failover_instance_sync.py", + "file": "redis_generated_redis_v1_cloud_redis_failover_instance_sync.py", "regionTag": "redis_generated_redis_v1_CloudRedis_FailoverInstance_sync", "segments": [ { @@ -344,13 +344,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "GetInstance", "service": { "shortName": "CloudRedis" - } + }, + "shortName": "GetInstance" } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_async.py", + "file": "redis_generated_redis_v1_cloud_redis_get_instance_async.py", "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_async", "segments": [ { @@ -388,13 +388,13 @@ { "clientMethod": { "method": { - "fullName": "GetInstance", "service": { "shortName": "CloudRedis" - } + }, + "shortName": "GetInstance" } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_get_instance_sync.py", + "file": "redis_generated_redis_v1_cloud_redis_get_instance_sync.py", "regionTag": "redis_generated_redis_v1_CloudRedis_GetInstance_sync", "segments": [ { @@ -433,13 +433,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "ImportInstance", "service": { "shortName": "CloudRedis" - } + }, + "shortName": "ImportInstance" } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_async.py", + "file": "redis_generated_redis_v1_cloud_redis_import_instance_async.py", "regionTag": "redis_generated_redis_v1_CloudRedis_ImportInstance_async", "segments": [ { @@ -475,13 +475,13 @@ { "clientMethod": { "method": { - "fullName": "ImportInstance", "service": { "shortName": "CloudRedis" - } + }, + "shortName": "ImportInstance" } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_import_instance_sync.py", + "file": "redis_generated_redis_v1_cloud_redis_import_instance_sync.py", "regionTag": "redis_generated_redis_v1_CloudRedis_ImportInstance_sync", "segments": [ { @@ -518,13 +518,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "ListInstances", "service": { "shortName": "CloudRedis" - } + }, + "shortName": "ListInstances" } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_async.py", + "file": "redis_generated_redis_v1_cloud_redis_list_instances_async.py", "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_async", "segments": [ { @@ -560,13 +560,13 @@ { "clientMethod": { "method": { - "fullName": "ListInstances", "service": { "shortName": "CloudRedis" - } + }, + "shortName": "ListInstances" } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_list_instances_sync.py", + "file": "redis_generated_redis_v1_cloud_redis_list_instances_sync.py", "regionTag": "redis_generated_redis_v1_CloudRedis_ListInstances_sync", "segments": [ { @@ -603,13 +603,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "UpdateInstance", "service": { "shortName": "CloudRedis" - } + }, + "shortName": "UpdateInstance" } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_async.py", + "file": "redis_generated_redis_v1_cloud_redis_update_instance_async.py", "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_async", "segments": [ { @@ -645,13 +645,13 @@ { "clientMethod": { "method": { - "fullName": "UpdateInstance", "service": { "shortName": "CloudRedis" - } + }, + "shortName": "UpdateInstance" } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_update_instance_sync.py", + "file": "redis_generated_redis_v1_cloud_redis_update_instance_sync.py", "regionTag": "redis_generated_redis_v1_CloudRedis_UpdateInstance_sync", "segments": [ { @@ -688,13 +688,13 @@ "clientMethod": { "async": true, "method": { - "fullName": "UpgradeInstance", "service": { "shortName": "CloudRedis" - } + }, + "shortName": "UpgradeInstance" } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py", + "file": "redis_generated_redis_v1_cloud_redis_upgrade_instance_async.py", "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_async", "segments": [ { @@ -730,13 +730,13 @@ { "clientMethod": { "method": { - "fullName": "UpgradeInstance", "service": { "shortName": "CloudRedis" - } + }, + "shortName": "UpgradeInstance" } }, - "file": "samples/generated_samples/redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py", + "file": "redis_generated_redis_v1_cloud_redis_upgrade_instance_sync.py", "regionTag": "redis_generated_redis_v1_CloudRedis_UpgradeInstance_sync", "segments": [ { From c7a41c5ab985421073ee29332b95413283b7fb2a Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Tue, 18 Jan 2022 17:40:21 +0000 Subject: [PATCH 18/18] chore: fix code-block syntax --- .../%sub/services/%service/async_client.py.j2 | 1 + .../%sub/services/%service/client.py.j2 | 2 + .../services/asset_service/async_client.py | 12 +++ .../asset_v1/services/asset_service/client.py | 45 ++++++++++ .../services/iam_credentials/async_client.py | 4 + .../services/iam_credentials/client.py | 16 ++++ .../config_service_v2/async_client.py | 23 ++++++ .../services/config_service_v2/client.py | 82 +++++++++++++++++++ .../logging_service_v2/async_client.py | 6 ++ .../services/logging_service_v2/client.py | 24 ++++++ .../metrics_service_v2/async_client.py | 5 ++ .../services/metrics_service_v2/client.py | 15 ++++ .../services/cloud_redis/async_client.py | 9 ++ .../redis_v1/services/cloud_redis/client.py | 35 ++++++++ 14 files changed, 279 insertions(+) diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 index 28eab1ce9f..4e22e94625 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 @@ -210,6 +210,7 @@ class {{ service.async_client_name }}: {% with snippet = snippet_index.get_snippet(service.name, method.name, sync=True) %} {% if snippet is not none %} .. code-block:: + {{ snippet.full_snippet|indent(width=12, first=True) }} {% endif %} {% endwith %} diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 index ce8edff456..451ac1afb2 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 @@ -366,6 +366,8 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): {% with snippet = snippet_index.get_snippet(service.name, method.name, sync=True) %} {% if snippet is not none %} + .. code-block:: + {{ snippet.full_snippet|indent(width=12, first=True) }} {% endif %} {% endwith %} diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py index d8889ba5c2..55c4ae53c3 100644 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py @@ -212,6 +212,7 @@ async def export_assets(self, .. code-block:: + from google.cloud import asset_v1 def sample_export_assets(): @@ -306,6 +307,7 @@ async def list_assets(self, .. code-block:: + from google.cloud import asset_v1 def sample_list_assets(): @@ -417,6 +419,7 @@ async def batch_get_assets_history(self, .. code-block:: + from google.cloud import asset_v1 def sample_batch_get_assets_history(): @@ -498,6 +501,7 @@ async def create_feed(self, .. code-block:: + from google.cloud import asset_v1 def sample_create_feed(): @@ -607,6 +611,7 @@ async def get_feed(self, r"""Gets details about an asset feed. .. code-block:: + from google.cloud import asset_v1 def sample_get_feed(): @@ -719,6 +724,7 @@ async def list_feeds(self, .. code-block:: + from google.cloud import asset_v1 def sample_list_feeds(): @@ -820,6 +826,7 @@ async def update_feed(self, r"""Updates an asset feed configuration. .. code-block:: + from google.cloud import asset_v1 def sample_update_feed(): @@ -923,6 +930,7 @@ async def delete_feed(self, r"""Deletes an asset feed. .. code-block:: + from google.cloud import asset_v1 def sample_delete_feed(): @@ -1022,6 +1030,7 @@ async def search_all_resources(self, .. code-block:: + from google.cloud import asset_v1 def sample_search_all_resources(): @@ -1226,6 +1235,7 @@ async def search_all_iam_policies(self, .. code-block:: + from google.cloud import asset_v1 def sample_search_all_iam_policies(): @@ -1406,6 +1416,7 @@ async def analyze_iam_policy(self, .. code-block:: + from google.cloud import asset_v1 def sample_analyze_iam_policy(): @@ -1500,6 +1511,7 @@ async def analyze_iam_policy_longrunning(self, .. code-block:: + from google.cloud import asset_v1 def sample_analyze_iam_policy_longrunning(): diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py index 44b4d15e3c..5ddda9d5fa 100644 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py @@ -397,6 +397,10 @@ def export_assets(self, the export operation result. For regular-size resource parent, the export operation usually finishes within 5 minutes. + + + .. code-block:: + from google.cloud import asset_v1 def sample_export_assets(): @@ -490,6 +494,10 @@ def list_assets(self, r"""Lists assets with time and resource types and returns paged results in response. + + + .. code-block:: + from google.cloud import asset_v1 def sample_list_assets(): @@ -599,6 +607,10 @@ def batch_get_assets_history(self, specified asset does not exist, this API returns an INVALID_ARGUMENT error. + + + .. code-block:: + from google.cloud import asset_v1 def sample_batch_get_assets_history(): @@ -672,6 +684,10 @@ def create_feed(self, project/folder/organization to listen to its asset updates. + + + .. code-block:: + from google.cloud import asset_v1 def sample_create_feed(): @@ -780,6 +796,9 @@ def get_feed(self, ) -> asset_service.Feed: r"""Gets details about an asset feed. + + .. code-block:: + from google.cloud import asset_v1 def sample_get_feed(): @@ -883,6 +902,10 @@ def list_feeds(self, r"""Lists all asset feeds in a parent project/folder/organization. + + + .. code-block:: + from google.cloud import asset_v1 def sample_list_feeds(): @@ -976,6 +999,9 @@ def update_feed(self, ) -> asset_service.Feed: r"""Updates an asset feed configuration. + + .. code-block:: + from google.cloud import asset_v1 def sample_update_feed(): @@ -1078,6 +1104,9 @@ def delete_feed(self, ) -> None: r"""Deletes an asset feed. + + .. code-block:: + from google.cloud import asset_v1 def sample_delete_feed(): @@ -1168,6 +1197,10 @@ def search_all_resources(self, the ``cloudasset.assets.searchAllResources`` permission on the desired scope, otherwise the request will be rejected. + + + .. code-block:: + from google.cloud import asset_v1 def sample_search_all_resources(): @@ -1363,6 +1396,10 @@ def search_all_iam_policies(self, ``cloudasset.assets.searchAllIamPolicies`` permission on the desired scope, otherwise the request will be rejected. + + + .. code-block:: + from google.cloud import asset_v1 def sample_search_all_iam_policies(): @@ -1534,6 +1571,10 @@ def analyze_iam_policy(self, r"""Analyzes IAM policies to answer which identities have what accesses on which resources. + + + .. code-block:: + from google.cloud import asset_v1 def sample_analyze_iam_policy(): @@ -1621,6 +1662,10 @@ def analyze_iam_policy_longrunning(self, to poll the operation result. The metadata contains the request to help callers to map responses to requests. + + + .. code-block:: + from google.cloud import asset_v1 def sample_analyze_iam_policy_longrunning(): diff --git a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py index 54f5fb9fb2..cd7019d14e 100644 --- a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py +++ b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py @@ -210,6 +210,7 @@ async def generate_access_token(self, .. code-block:: + from google.iam import credentials_v1 def sample_generate_access_token(): @@ -367,6 +368,7 @@ async def generate_id_token(self, .. code-block:: + from google.iam import credentials_v1 def sample_generate_id_token(): @@ -517,6 +519,7 @@ async def sign_blob(self, .. code-block:: + from google.iam import credentials_v1 def sample_sign_blob(): @@ -654,6 +657,7 @@ async def sign_jwt(self, .. code-block:: + from google.iam import credentials_v1 def sample_sign_jwt(): diff --git a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py index 7c7b15014b..93876b0369 100644 --- a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py +++ b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py @@ -386,6 +386,10 @@ def generate_access_token(self, r"""Generates an OAuth 2.0 access token for a service account. + + + .. code-block:: + from google.iam import credentials_v1 def sample_generate_access_token(): @@ -534,6 +538,10 @@ def generate_id_token(self, r"""Generates an OpenID Connect ID token for a service account. + + + .. code-block:: + from google.iam import credentials_v1 def sample_generate_id_token(): @@ -675,6 +683,10 @@ def sign_blob(self, r"""Signs a blob using a service account's system-managed private key. + + + .. code-block:: + from google.iam import credentials_v1 def sample_sign_blob(): @@ -803,6 +815,10 @@ def sign_jwt(self, r"""Signs a JWT using a service account's system-managed private key. + + + .. code-block:: + from google.iam import credentials_v1 def sample_sign_jwt(): diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py index 6de72de831..01dd8b6300 100644 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py @@ -204,6 +204,7 @@ async def list_buckets(self, r"""Lists buckets. .. code-block:: + from google.cloud import logging_v2 def sample_list_buckets(): @@ -321,6 +322,7 @@ async def get_bucket(self, r"""Gets a bucket. .. code-block:: + from google.cloud import logging_v2 def sample_get_bucket(): @@ -399,6 +401,7 @@ async def create_bucket(self, .. code-block:: + from google.cloud import logging_v2 def sample_create_bucket(): @@ -486,6 +489,7 @@ async def update_bucket(self, .. code-block:: + from google.cloud import logging_v2 def sample_update_bucket(): @@ -564,6 +568,7 @@ async def delete_bucket(self, .. code-block:: + from google.cloud import logging_v2 def sample_delete_bucket(): @@ -631,6 +636,7 @@ async def undelete_bucket(self, .. code-block:: + from google.cloud import logging_v2 def sample_undelete_bucket(): @@ -697,6 +703,7 @@ async def list_views(self, r"""Lists views on a bucket. .. code-block:: + from google.cloud import logging_v2 def sample_list_views(): @@ -801,6 +808,7 @@ async def get_view(self, r"""Gets a view. .. code-block:: + from google.cloud import logging_v2 def sample_get_view(): @@ -881,6 +889,7 @@ async def create_view(self, .. code-block:: + from google.cloud import logging_v2 def sample_create_view(): @@ -956,6 +965,7 @@ async def update_view(self, .. code-block:: + from google.cloud import logging_v2 def sample_update_view(): @@ -1028,6 +1038,7 @@ async def delete_view(self, r"""Deletes a view from a bucket. .. code-block:: + from google.cloud import logging_v2 def sample_delete_view(): @@ -1095,6 +1106,7 @@ async def list_sinks(self, r"""Lists sinks. .. code-block:: + from google.cloud import logging_v2 def sample_list_sinks(): @@ -1216,6 +1228,7 @@ async def get_sink(self, r"""Gets a sink. .. code-block:: + from google.cloud import logging_v2 def sample_get_sink(): @@ -1341,6 +1354,7 @@ async def create_sink(self, .. code-block:: + from google.cloud import logging_v2 def sample_create_sink(): @@ -1475,6 +1489,7 @@ async def update_sink(self, .. code-block:: + from google.cloud import logging_v2 def sample_update_sink(): @@ -1633,6 +1648,7 @@ async def delete_sink(self, .. code-block:: + from google.cloud import logging_v2 def sample_delete_sink(): @@ -1734,6 +1750,7 @@ async def list_exclusions(self, r"""Lists all the exclusions in a parent resource. .. code-block:: + from google.cloud import logging_v2 def sample_list_exclusions(): @@ -1855,6 +1872,7 @@ async def get_exclusion(self, r"""Gets the description of an exclusion. .. code-block:: + from google.cloud import logging_v2 def sample_get_exclusion(): @@ -1982,6 +2000,7 @@ async def create_exclusion(self, .. code-block:: + from google.cloud import logging_v2 def sample_create_exclusion(): @@ -2116,6 +2135,7 @@ async def update_exclusion(self, .. code-block:: + from google.cloud import logging_v2 def sample_update_exclusion(): @@ -2261,6 +2281,7 @@ async def delete_exclusion(self, r"""Deletes an exclusion. .. code-block:: + from google.cloud import logging_v2 def sample_delete_exclusion(): @@ -2371,6 +2392,7 @@ async def get_cmek_settings(self, .. code-block:: + from google.cloud import logging_v2 def sample_get_cmek_settings(): @@ -2475,6 +2497,7 @@ async def update_cmek_settings(self, .. code-block:: + from google.cloud import logging_v2 def sample_update_cmek_settings(): diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py index c22dfda06c..9637c628dc 100644 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py @@ -417,6 +417,9 @@ def list_buckets(self, ) -> pagers.ListBucketsPager: r"""Lists buckets. + + .. code-block:: + from google.cloud import logging_v2 def sample_list_buckets(): @@ -533,6 +536,9 @@ def get_bucket(self, ) -> logging_config.LogBucket: r"""Gets a bucket. + + .. code-block:: + from google.cloud import logging_v2 def sample_get_bucket(): @@ -610,6 +616,10 @@ def create_bucket(self, entries. Once a bucket has been created, the region cannot be changed. + + + .. code-block:: + from google.cloud import logging_v2 def sample_create_bucket(): @@ -696,6 +706,10 @@ def update_bucket(self, A buckets region may not be modified after it is created. + + + .. code-block:: + from google.cloud import logging_v2 def sample_update_bucket(): @@ -773,6 +787,10 @@ def delete_bucket(self, state. After 7 days, the bucket will be purged and all logs in the bucket will be permanently deleted. + + + .. code-block:: + from google.cloud import logging_v2 def sample_delete_bucket(): @@ -839,6 +857,10 @@ def undelete_bucket(self, r"""Undeletes a bucket. A bucket that has been deleted may be undeleted within the grace period of 7 days. + + + .. code-block:: + from google.cloud import logging_v2 def sample_undelete_bucket(): @@ -905,6 +927,9 @@ def list_views(self, ) -> pagers.ListViewsPager: r"""Lists views on a bucket. + + .. code-block:: + from google.cloud import logging_v2 def sample_list_views(): @@ -1008,6 +1033,9 @@ def get_view(self, ) -> logging_config.LogView: r"""Gets a view. + + .. code-block:: + from google.cloud import logging_v2 def sample_get_view(): @@ -1087,6 +1115,10 @@ def create_view(self, r"""Creates a view over logs in a bucket. A bucket may contain a maximum of 50 views. + + + .. code-block:: + from google.cloud import logging_v2 def sample_create_view(): @@ -1161,6 +1193,10 @@ def update_view(self, r"""Updates a view. This method replaces the following fields in the existing view with values from the new view: ``filter``. + + + .. code-block:: + from google.cloud import logging_v2 def sample_update_view(): @@ -1233,6 +1269,9 @@ def delete_view(self, ) -> None: r"""Deletes a view from a bucket. + + .. code-block:: + from google.cloud import logging_v2 def sample_delete_view(): @@ -1300,6 +1339,9 @@ def list_sinks(self, ) -> pagers.ListSinksPager: r"""Lists sinks. + + .. code-block:: + from google.cloud import logging_v2 def sample_list_sinks(): @@ -1412,6 +1454,9 @@ def get_sink(self, ) -> logging_config.LogSink: r"""Gets a sink. + + .. code-block:: + from google.cloud import logging_v2 def sample_get_sink(): @@ -1527,6 +1572,10 @@ def create_sink(self, permitted to write to the destination. A sink can export log entries only from the resource owning the sink. + + + .. code-block:: + from google.cloud import logging_v2 def sample_create_sink(): @@ -1659,6 +1708,10 @@ def update_sink(self, The updated sink might also have a new ``writer_identity``; see the ``unique_writer_identity`` field. + + + .. code-block:: + from google.cloud import logging_v2 def sample_update_sink(): @@ -1807,6 +1860,10 @@ def delete_sink(self, r"""Deletes a sink. If the sink has a unique ``writer_identity``, then that service account is also deleted. + + + .. code-block:: + from google.cloud import logging_v2 def sample_delete_sink(): @@ -1899,6 +1956,9 @@ def list_exclusions(self, ) -> pagers.ListExclusionsPager: r"""Lists all the exclusions in a parent resource. + + .. code-block:: + from google.cloud import logging_v2 def sample_list_exclusions(): @@ -2011,6 +2071,9 @@ def get_exclusion(self, ) -> logging_config.LogExclusion: r"""Gets the description of an exclusion. + + .. code-block:: + from google.cloud import logging_v2 def sample_get_exclusion(): @@ -2128,6 +2191,10 @@ def create_exclusion(self, can be excluded. You can have up to 10 exclusions in a resource. + + + .. code-block:: + from google.cloud import logging_v2 def sample_create_exclusion(): @@ -2260,6 +2327,10 @@ def update_exclusion(self, r"""Changes one or more properties of an existing exclusion. + + + .. code-block:: + from google.cloud import logging_v2 def sample_update_exclusion(): @@ -2404,6 +2475,9 @@ def delete_exclusion(self, ) -> None: r"""Deletes an exclusion. + + .. code-block:: + from google.cloud import logging_v2 def sample_delete_exclusion(): @@ -2504,6 +2578,10 @@ def get_cmek_settings(self, Router `__ for more information. + + + .. code-block:: + from google.cloud import logging_v2 def sample_get_cmek_settings(): @@ -2607,6 +2685,10 @@ def update_cmek_settings(self, Router `__ for more information. + + + .. code-block:: + from google.cloud import logging_v2 def sample_update_cmek_settings(): diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py index afb5acc68f..bf764a2603 100644 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py @@ -201,6 +201,7 @@ async def delete_log(self, .. code-block:: + from google.cloud import logging_v2 def sample_delete_log(): @@ -315,6 +316,7 @@ async def write_log_entries(self, .. code-block:: + from google.cloud import logging_v2 def sample_write_log_entries(): @@ -502,6 +504,7 @@ async def list_log_entries(self, .. code-block:: + from google.cloud import logging_v2 def sample_list_log_entries(): @@ -656,6 +659,7 @@ async def list_monitored_resource_descriptors(self, .. code-block:: + from google.cloud import logging_v2 def sample_list_monitored_resource_descriptors(): @@ -743,6 +747,7 @@ async def list_logs(self, .. code-block:: + from google.cloud import logging_v2 def sample_list_logs(): @@ -865,6 +870,7 @@ def tail_log_entries(self, .. code-block:: + from google.cloud import logging_v2 def sample_tail_log_entries(): diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py index c107a8a0c8..fc7e8aed39 100644 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py @@ -377,6 +377,10 @@ def delete_log(self, deleted. Entries received after the delete operation with a timestamp before the operation will be deleted. + + + .. code-block:: + from google.cloud import logging_v2 def sample_delete_log(): @@ -481,6 +485,10 @@ def write_log_entries(self, maximum of 1000 different resources (projects, organizations, billing accounts or folders) + + + .. code-block:: + from google.cloud import logging_v2 def sample_write_log_entries(): @@ -657,6 +665,10 @@ def list_log_entries(self, For ways to export log entries, see `Exporting Logs `__. + + + .. code-block:: + from google.cloud import logging_v2 def sample_list_log_entries(): @@ -801,6 +813,10 @@ def list_monitored_resource_descriptors(self, r"""Lists the descriptors for monitored resource types used by Logging. + + + .. code-block:: + from google.cloud import logging_v2 def sample_list_monitored_resource_descriptors(): @@ -879,6 +895,10 @@ def list_logs(self, or billing accounts. Only logs that have entries are listed. + + + .. code-block:: + from google.cloud import logging_v2 def sample_list_logs(): @@ -991,6 +1011,10 @@ def tail_log_entries(self, Until the stream is terminated, it will continue reading logs. + + + .. code-block:: + from google.cloud import logging_v2 def sample_tail_log_entries(): diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py index 09df7eeaa8..bd8825626b 100644 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py @@ -197,6 +197,7 @@ async def list_log_metrics(self, r"""Lists logs-based metrics. .. code-block:: + from google.cloud import logging_v2 def sample_list_log_metrics(): @@ -314,6 +315,7 @@ async def get_log_metric(self, r"""Gets a logs-based metric. .. code-block:: + from google.cloud import logging_v2 def sample_get_log_metric(): @@ -431,6 +433,7 @@ async def create_log_metric(self, r"""Creates a logs-based metric. .. code-block:: + from google.cloud import logging_v2 def sample_create_log_metric(): @@ -558,6 +561,7 @@ async def update_log_metric(self, r"""Creates or updates a logs-based metric. .. code-block:: + from google.cloud import logging_v2 def sample_update_log_metric(): @@ -691,6 +695,7 @@ async def delete_log_metric(self, r"""Deletes a logs-based metric. .. code-block:: + from google.cloud import logging_v2 def sample_delete_log_metric(): diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py index 02f116afe1..c5575d5418 100644 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py @@ -374,6 +374,9 @@ def list_log_metrics(self, ) -> pagers.ListLogMetricsPager: r"""Lists logs-based metrics. + + .. code-block:: + from google.cloud import logging_v2 def sample_list_log_metrics(): @@ -482,6 +485,9 @@ def get_log_metric(self, ) -> logging_metrics.LogMetric: r"""Gets a logs-based metric. + + .. code-block:: + from google.cloud import logging_v2 def sample_get_log_metric(): @@ -590,6 +596,9 @@ def create_log_metric(self, ) -> logging_metrics.LogMetric: r"""Creates a logs-based metric. + + .. code-block:: + from google.cloud import logging_v2 def sample_create_log_metric(): @@ -716,6 +725,9 @@ def update_log_metric(self, ) -> logging_metrics.LogMetric: r"""Creates or updates a logs-based metric. + + .. code-block:: + from google.cloud import logging_v2 def sample_update_log_metric(): @@ -840,6 +852,9 @@ def delete_log_metric(self, ) -> None: r"""Deletes a logs-based metric. + + .. code-block:: + from google.cloud import logging_v2 def sample_delete_log_metric(): diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py index b662388e58..2c17838465 100644 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py @@ -230,6 +230,7 @@ async def list_instances(self, .. code-block:: + from google.cloud import redis_v1 def sample_list_instances(): @@ -340,6 +341,7 @@ async def get_instance(self, r"""Gets the details of a specific Redis instance. .. code-block:: + from google.cloud import redis_v1 def sample_get_instance(): @@ -453,6 +455,7 @@ async def create_instance(self, .. code-block:: + from google.cloud import redis_v1 def sample_create_instance(): @@ -602,6 +605,7 @@ async def update_instance(self, .. code-block:: + from google.cloud import redis_v1 def sample_update_instance(): @@ -732,6 +736,7 @@ async def upgrade_instance(self, .. code-block:: + from google.cloud import redis_v1 def sample_upgrade_instance(): @@ -864,6 +869,7 @@ async def import_instance(self, .. code-block:: + from google.cloud import redis_v1 def sample_import_instance(): @@ -990,6 +996,7 @@ async def export_instance(self, .. code-block:: + from google.cloud import redis_v1 def sample_export_instance(): @@ -1114,6 +1121,7 @@ async def failover_instance(self, .. code-block:: + from google.cloud import redis_v1 def sample_failover_instance(): @@ -1238,6 +1246,7 @@ async def delete_instance(self, .. code-block:: + from google.cloud import redis_v1 def sample_delete_instance(): diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py index 22c6a0ab5a..6f2397c493 100644 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py @@ -406,6 +406,10 @@ def list_instances(self, regions available to the project are queried, and the results are aggregated. + + + .. code-block:: + from google.cloud import redis_v1 def sample_list_instances(): @@ -515,6 +519,9 @@ def get_instance(self, ) -> cloud_redis.Instance: r"""Gets the details of a specific Redis instance. + + .. code-block:: + from google.cloud import redis_v1 def sample_get_instance(): @@ -626,6 +633,10 @@ def create_instance(self, The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. + + + .. code-block:: + from google.cloud import redis_v1 def sample_create_instance(): @@ -773,6 +784,10 @@ def update_instance(self, operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. + + + .. code-block:: + from google.cloud import redis_v1 def sample_update_instance(): @@ -901,6 +916,10 @@ def upgrade_instance(self, r"""Upgrades Redis instance to the newer Redis version specified in the request. + + + .. code-block:: + from google.cloud import redis_v1 def sample_upgrade_instance(): @@ -1031,6 +1050,10 @@ def import_instance(self, The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. + + + .. code-block:: + from google.cloud import redis_v1 def sample_import_instance(): @@ -1155,6 +1178,10 @@ def export_instance(self, The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation. + + + .. code-block:: + from google.cloud import redis_v1 def sample_export_instance(): @@ -1277,6 +1304,10 @@ def failover_instance(self, replica node for a specific STANDARD tier Cloud Memorystore for Redis instance. + + + .. code-block:: + from google.cloud import redis_v1 def sample_failover_instance(): @@ -1399,6 +1430,10 @@ def delete_instance(self, r"""Deletes a specific Redis instance. Instance stops serving and data is deleted. + + + .. code-block:: + from google.cloud import redis_v1 def sample_delete_instance():