Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
chore: Update gapic-generator-python to v1.6.1 (#277)
Browse files Browse the repository at this point in the history
* chore: update to gapic-generator-python 1.5.0

feat: add support for `google.cloud.<api>.__version__`
PiperOrigin-RevId: 484665853

Source-Link: googleapis/googleapis@8eb249a

Source-Link: googleapis/googleapis-gen@c8aa327
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* update version in gapic_version.py

* add .release-please-manifest.json with correct version

* set manifest to true in .github/release-please.yml

* add release-please-config.json

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* chore: Update to gapic-generator-python 1.6.0

feat(python): Add typing to proto.Message based class attributes

feat(python): Snippetgen handling of repeated enum field

PiperOrigin-RevId: 487326846

Source-Link: googleapis/googleapis@da380c7

Source-Link: googleapis/googleapis-gen@61ef576
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjFlZjU3NjJlZTY3MzFhMGNiYmZlYTIyZmQwZWVjZWU1MWFiMWM4ZSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: new APIs added to reflect updates to the filestore service

- Add ENTERPRISE Tier
- Add snapshot APIs: RevertInstance, ListSnapshots, CreateSnapshot, DeleteSnapshot, UpdateSnapshot
- Add multi-share APIs: ListShares, GetShare, CreateShare, DeleteShare, UpdateShare
- Add ConnectMode to NetworkConfig (for Private Service Access support)
- New status codes (SUSPENDED/SUSPENDING, REVERTING/RESUMING)
- Add SuspensionReason (for KMS related suspension)
- Add new fields to Instance information: max_capacity_gb, capacity_step_size_gb, max_share_count, capacity_gb, multi_share_enabled

PiperOrigin-RevId: 487492758

Source-Link: googleapis/googleapis@5be5981

Source-Link: googleapis/googleapis-gen@ab0e217
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWIwZTIxN2Y1NjBjYzJjMWFmYzExNDQxYzJlYWI2YjY5NTBlZmQyYiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* update path to snippet metadata json

* chore: Update gapic-generator-python to v1.6.1

PiperOrigin-RevId: 488036204

Source-Link: googleapis/googleapis@08f275f

Source-Link: googleapis/googleapis-gen@555c094
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTU1YzA5NDVlNjA2NDllMzg3MzlhZTY0YmM0NTcxOWNkZjcyMTc4ZiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* use templated owlbot.py and setup.py

* run nox format session

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
3 people committed Nov 26, 2022
1 parent a9e9e06 commit a45bd77
Show file tree
Hide file tree
Showing 43 changed files with 505 additions and 387 deletions.
1 change: 1 addition & 0 deletions .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
releaseType: python
handleGHRelease: true
manifest: true
# NOTE: this section is generated by synthtool.languages.python
# See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py
branches:
Expand Down
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.7.3"
}
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
import shlex
import sys

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down
28 changes: 14 additions & 14 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

.. include:: multiprocessing.rst

API Reference
-------------
This package includes clients for multiple versions of Cloud Trace.
By default, you will get version ``trace_v2``.

The current version of the API is ``v2``:

API Reference
-------------
.. toctree::
:maxdepth: 2
:maxdepth: 2

trace_v2/services
trace_v2/types

Support for the previous API release, ``v1``, is provided for code previously
written against it.
trace_v2/services
trace_v2/types

API Reference
-------------
.. toctree::
:maxdepth: 2
:maxdepth: 2

trace_v1/services
trace_v1/types
trace_v1/services
trace_v1/types


Changelog
Expand All @@ -29,6 +29,6 @@ Changelog
For a list of all ``google-cloud-trace`` releases:

.. toctree::
:maxdepth: 2
:maxdepth: 2

changelog
changelog
1 change: 0 additions & 1 deletion docs/trace_v1/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Trace v1 API

.. automodule:: google.cloud.trace_v1.types
:members:
:undoc-members:
:show-inheritance:
1 change: 0 additions & 1 deletion docs/trace_v2/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Trace v2 API

.. automodule:: google.cloud.trace_v2.types
:members:
:undoc-members:
:show-inheritance:
19 changes: 12 additions & 7 deletions google/cloud/trace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.trace import gapic_version as package_version

__version__ = package_version.__version__


from google.cloud.trace_v2.services.trace_service.client import TraceServiceClient
from google.cloud.trace_v2.services.trace_service.async_client import (
TraceServiceAsyncClient,
)

from google.cloud.trace_v2.types.trace import AttributeValue
from google.cloud.trace_v2.types.trace import Module
from google.cloud.trace_v2.types.trace import Span
from google.cloud.trace_v2.types.trace import StackTrace
from google.cloud.trace_v2.types.trace import TruncatableString
from google.cloud.trace_v2.services.trace_service.client import TraceServiceClient
from google.cloud.trace_v2.types.trace import (
AttributeValue,
Module,
Span,
StackTrace,
TruncatableString,
)
from google.cloud.trace_v2.types.tracing import BatchWriteSpansRequest

__all__ = (
Expand Down
16 changes: 16 additions & 0 deletions google/cloud/trace/gapic_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Copyright 2022 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.
#
__version__ = "1.7.3" # {x-release-please-version}
22 changes: 13 additions & 9 deletions google/cloud/trace_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.trace import gapic_version as package_version

from .services.trace_service import TraceServiceClient
from .services.trace_service import TraceServiceAsyncClient
__version__ = package_version.__version__

from .types.trace import GetTraceRequest
from .types.trace import ListTracesRequest
from .types.trace import ListTracesResponse
from .types.trace import PatchTracesRequest
from .types.trace import Trace
from .types.trace import Traces
from .types.trace import TraceSpan

from .services.trace_service import TraceServiceAsyncClient, TraceServiceClient
from .types.trace import (
GetTraceRequest,
ListTracesRequest,
ListTracesResponse,
PatchTracesRequest,
Trace,
Traces,
TraceSpan,
)

__all__ = (
"TraceServiceAsyncClient",
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/trace_v1/services/trace_service/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .client import TraceServiceClient
from .async_client import TraceServiceAsyncClient
from .client import TraceServiceClient

__all__ = (
"TraceServiceClient",
Expand Down
53 changes: 32 additions & 21 deletions google/cloud/trace_v1/services/trace_service/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,25 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources
from typing import (
Dict,
Mapping,
MutableMapping,
MutableSequence,
Optional,
Sequence,
Tuple,
Type,
Union,
)

from google.api_core.client_options import ClientOptions
from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
from google.api_core import retry as retries
from google.api_core.client_options import ClientOptions
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore
import pkg_resources

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
Expand All @@ -33,9 +43,10 @@

from google.cloud.trace_v1.services.trace_service import pagers
from google.cloud.trace_v1.types import trace
from .transports.base import TraceServiceTransport, DEFAULT_CLIENT_INFO
from .transports.grpc_asyncio import TraceServiceGrpcAsyncIOTransport

from .client import TraceServiceClient
from .transports.base import DEFAULT_CLIENT_INFO, TraceServiceTransport
from .transports.grpc_asyncio import TraceServiceGrpcAsyncIOTransport


class TraceServiceAsyncClient:
Expand Down Expand Up @@ -158,9 +169,9 @@ def transport(self) -> TraceServiceTransport:
def __init__(
self,
*,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, TraceServiceTransport] = "grpc_asyncio",
client_options: ClientOptions = None,
client_options: Optional[ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the trace service client.
Expand Down Expand Up @@ -204,11 +215,11 @@ def __init__(

async def list_traces(
self,
request: Union[trace.ListTracesRequest, dict] = None,
request: Optional[Union[trace.ListTracesRequest, dict]] = None,
*,
project_id: str = None,
project_id: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListTracesAsyncPager:
r"""Returns of a list of traces that match the specified
Expand Down Expand Up @@ -242,7 +253,7 @@ async def sample_list_traces():
print(response)
Args:
request (Union[google.cloud.trace_v1.types.ListTracesRequest, dict]):
request (Optional[Union[google.cloud.trace_v1.types.ListTracesRequest, dict]]):
The request object. The request message for the
`ListTraces` method. All fields are required unless
specified.
Expand Down Expand Up @@ -332,12 +343,12 @@ async def sample_list_traces():

async def get_trace(
self,
request: Union[trace.GetTraceRequest, dict] = None,
request: Optional[Union[trace.GetTraceRequest, dict]] = None,
*,
project_id: str = None,
trace_id: str = None,
project_id: Optional[str] = None,
trace_id: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> trace.Trace:
r"""Gets a single trace by its ID.
Expand Down Expand Up @@ -370,7 +381,7 @@ async def sample_get_trace():
print(response)
Args:
request (Union[google.cloud.trace_v1.types.GetTraceRequest, dict]):
request (Optional[Union[google.cloud.trace_v1.types.GetTraceRequest, dict]]):
The request object. The request message for the
`GetTrace` method.
project_id (:class:`str`):
Expand Down Expand Up @@ -461,12 +472,12 @@ async def sample_get_trace():

async def patch_traces(
self,
request: Union[trace.PatchTracesRequest, dict] = None,
request: Optional[Union[trace.PatchTracesRequest, dict]] = None,
*,
project_id: str = None,
traces: trace.Traces = None,
project_id: Optional[str] = None,
traces: Optional[trace.Traces] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> None:
r"""Sends new traces to Stackdriver Trace or updates
Expand Down Expand Up @@ -501,7 +512,7 @@ async def sample_patch_traces():
await client.patch_traces(request=request)
Args:
request (Union[google.cloud.trace_v1.types.PatchTracesRequest, dict]):
request (Optional[Union[google.cloud.trace_v1.types.PatchTracesRequest, dict]]):
The request object. The request message for the
`PatchTraces` method.
project_id (:class:`str`):
Expand Down
Loading

0 comments on commit a45bd77

Please sign in to comment.