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 (#340)
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

* exclude generated constraints file

* exclude autogenerated setup.py

* update replacements in owlbot.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 22, 2022
1 parent 42dc02f commit 3d91a44
Show file tree
Hide file tree
Showing 41 changed files with 506 additions and 397 deletions.
1 change: 1 addition & 0 deletions .github/release-please.yml
@@ -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
@@ -0,0 +1,3 @@
{
".": "2.9.3"
}
2 changes: 1 addition & 1 deletion docs/conf.py
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
1 change: 0 additions & 1 deletion docs/containeranalysis_v1/types.rst
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Devtools Containeranalysis v1 API

.. automodule:: google.cloud.devtools.containeranalysis_v1.types
:members:
:undoc-members:
:show-inheritance:
20 changes: 11 additions & 9 deletions docs/index.rst
Expand Up @@ -2,7 +2,8 @@

.. include:: multiprocessing.rst

Api Reference

API Reference
-------------
.. toctree::
:maxdepth: 2
Expand All @@ -11,22 +12,23 @@ Api Reference
containeranalysis_v1/types


Changelog
----------
Migration Guide
---------------

For all previous ``google-cloud-containeranalysis`` releases:
See the guide below for instructions on migrating to the latest version.

.. toctree::
:maxdepth: 2

changelog
 UPGRADING

Migration Guide
---------------

See the guide below for instructions on migrating to the 2.x release of this library.
Changelog
---------

For a list of all ``google-cloud-containeranalysis`` releases:

.. toctree::
:maxdepth: 2

UPGRADING
changelog
13 changes: 7 additions & 6 deletions google/cloud/devtools/containeranalysis/__init__.py
Expand Up @@ -13,18 +13,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.devtools.containeranalysis import gapic_version as package_version

__version__ = package_version.__version__


from google.cloud.devtools.containeranalysis_v1.services.container_analysis.client import (
ContainerAnalysisClient,
)
from google.cloud.devtools.containeranalysis_v1.services.container_analysis.async_client import (
ContainerAnalysisAsyncClient,
)

from google.cloud.devtools.containeranalysis_v1.types.containeranalysis import (
GetVulnerabilityOccurrencesSummaryRequest,
from google.cloud.devtools.containeranalysis_v1.services.container_analysis.client import (
ContainerAnalysisClient,
)
from google.cloud.devtools.containeranalysis_v1.types.containeranalysis import (
GetVulnerabilityOccurrencesSummaryRequest,
VulnerabilityOccurrencesSummary,
)

Expand Down
16 changes: 16 additions & 0 deletions google/cloud/devtools/containeranalysis/gapic_version.py
@@ -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__ = "2.9.3" # {x-release-please-version}
2 changes: 1 addition & 1 deletion google/cloud/devtools/containeranalysis/py.typed
@@ -1,2 +1,2 @@
# Marker file for PEP 561.
# The google-cloud-devtools-containeranalysis package uses inline types.
# The google-cloud-containeranalysis package uses inline types.
15 changes: 11 additions & 4 deletions google/cloud/devtools/containeranalysis_v1/__init__.py
Expand Up @@ -13,12 +13,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.devtools.containeranalysis import gapic_version as package_version

from .services.container_analysis import ContainerAnalysisClient
from .services.container_analysis import ContainerAnalysisAsyncClient
__version__ = package_version.__version__

from .types.containeranalysis import GetVulnerabilityOccurrencesSummaryRequest
from .types.containeranalysis import VulnerabilityOccurrencesSummary

from .services.container_analysis import (
ContainerAnalysisAsyncClient,
ContainerAnalysisClient,
)
from .types.containeranalysis import (
GetVulnerabilityOccurrencesSummaryRequest,
VulnerabilityOccurrencesSummary,
)

__all__ = (
"ContainerAnalysisAsyncClient",
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/devtools/containeranalysis_v1/py.typed
@@ -1,2 +1,2 @@
# Marker file for PEP 561.
# The google-cloud-devtools-containeranalysis package uses inline types.
# The google-cloud-containeranalysis package uses inline types.
Expand Up @@ -13,8 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .client import ContainerAnalysisClient
from .async_client import ContainerAnalysisAsyncClient
from .client import ContainerAnalysisClient

__all__ = (
"ContainerAnalysisClient",
Expand Down
Expand Up @@ -16,32 +16,42 @@
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]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object] # type: ignore

from google.cloud.devtools.containeranalysis_v1.types import containeranalysis
from google.iam.v1 import iam_policy_pb2 # type: ignore
from google.iam.v1 import policy_pb2 # type: ignore
from .transports.base import ContainerAnalysisTransport, DEFAULT_CLIENT_INFO
from .transports.grpc_asyncio import ContainerAnalysisGrpcAsyncIOTransport
from .client import ContainerAnalysisClient


from grafeas import grafeas_v1
from grafeas.grafeas_v1.services.grafeas import transports

from google.cloud.devtools.containeranalysis_v1.types import containeranalysis

from .client import ContainerAnalysisClient
from .transports.base import DEFAULT_CLIENT_INFO, ContainerAnalysisTransport
from .transports.grpc_asyncio import ContainerAnalysisGrpcAsyncIOTransport


class ContainerAnalysisAsyncClient:
"""Retrieves analysis results of Cloud components such as Docker
Expand Down Expand Up @@ -176,9 +186,9 @@ def transport(self) -> ContainerAnalysisTransport:
def __init__(
self,
*,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, ContainerAnalysisTransport] = "grpc_asyncio",
client_options: ClientOptions = None,
client_options: Optional[ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the container analysis client.
Expand Down Expand Up @@ -236,11 +246,11 @@ def get_grafeas_client(self) -> grafeas_v1.GrafeasClient:

async def set_iam_policy(
self,
request: Union[iam_policy_pb2.SetIamPolicyRequest, dict] = None,
request: Optional[Union[iam_policy_pb2.SetIamPolicyRequest, dict]] = None,
*,
resource: str = None,
resource: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> policy_pb2.Policy:
r"""Sets the access control policy on the specified note or
Expand Down Expand Up @@ -281,7 +291,7 @@ async def sample_set_iam_policy():
print(response)
Args:
request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]):
request (Optional[Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]]):
The request object. Request message for `SetIamPolicy`
method.
resource (:class:`str`):
Expand Down Expand Up @@ -410,11 +420,11 @@ async def sample_set_iam_policy():

async def get_iam_policy(
self,
request: Union[iam_policy_pb2.GetIamPolicyRequest, dict] = None,
request: Optional[Union[iam_policy_pb2.GetIamPolicyRequest, dict]] = None,
*,
resource: str = None,
resource: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> policy_pb2.Policy:
r"""Gets the access control policy for a note or an occurrence
Expand Down Expand Up @@ -455,7 +465,7 @@ async def sample_get_iam_policy():
print(response)
Args:
request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]):
request (Optional[Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]]):
The request object. Request message for `GetIamPolicy`
method.
resource (:class:`str`):
Expand Down Expand Up @@ -584,12 +594,12 @@ async def sample_get_iam_policy():

async def test_iam_permissions(
self,
request: Union[iam_policy_pb2.TestIamPermissionsRequest, dict] = None,
request: Optional[Union[iam_policy_pb2.TestIamPermissionsRequest, dict]] = None,
*,
resource: str = None,
permissions: Sequence[str] = None,
resource: Optional[str] = None,
permissions: Optional[MutableSequence[str]] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> iam_policy_pb2.TestIamPermissionsResponse:
r"""Returns the permissions that a caller has on the specified note
Expand Down Expand Up @@ -630,7 +640,7 @@ async def sample_test_iam_permissions():
print(response)
Args:
request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]):
request (Optional[Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]]):
The request object. Request message for
`TestIamPermissions` method.
resource (:class:`str`):
Expand All @@ -642,7 +652,7 @@ async def sample_test_iam_permissions():
This corresponds to the ``resource`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
permissions (:class:`Sequence[str]`):
permissions (:class:`MutableSequence[str]`):
The set of permissions to check for the ``resource``.
Permissions with wildcards (such as '*' or 'storage.*')
are not allowed. For more information see `IAM
Expand Down Expand Up @@ -708,14 +718,14 @@ async def sample_test_iam_permissions():

async def get_vulnerability_occurrences_summary(
self,
request: Union[
containeranalysis.GetVulnerabilityOccurrencesSummaryRequest, dict
request: Optional[
Union[containeranalysis.GetVulnerabilityOccurrencesSummaryRequest, dict]
] = None,
*,
parent: str = None,
filter: str = None,
parent: Optional[str] = None,
filter: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> containeranalysis.VulnerabilityOccurrencesSummary:
r"""Gets a summary of the number and severity of
Expand Down Expand Up @@ -748,7 +758,7 @@ async def sample_get_vulnerability_occurrences_summary():
print(response)
Args:
request (Union[google.cloud.devtools.containeranalysis_v1.types.GetVulnerabilityOccurrencesSummaryRequest, dict]):
request (Optional[Union[google.cloud.devtools.containeranalysis_v1.types.GetVulnerabilityOccurrencesSummaryRequest, dict]]):
The request object. Request to get a vulnerability
summary for some set of occurrences.
parent (:class:`str`):
Expand Down

0 comments on commit 3d91a44

Please sign in to comment.