Skip to content

Commit

Permalink
chore(python): fix warehouse-package-name for google/monitoring/metri…
Browse files Browse the repository at this point in the history
…csscope/v1 (#105)

* 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

* add owlbot.py to exclude generated gapic_version.py

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

* add release-please-config.json

* 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

* chore(python): fix warehouse-package-name for google/monitoring/metricsscope/v1

PiperOrigin-RevId: 490896705

Source-Link: googleapis/googleapis@a0b7558

Source-Link: googleapis/googleapis-gen@970f5b5
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTcwZjViNTlmNDc2OWNjMWE3NjQ5MmI2YmFiYjQ5MDhjYzFkNzgyMiJ9

* 🦉 Updates from OwlBot post-processor

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

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 56967fc commit d206d76
Show file tree
Hide file tree
Showing 33 changed files with 309 additions and 112 deletions.
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.2.4"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Monitoring Metrics Scope v1 API

.. automodule:: google.cloud.monitoring_metrics_scope_v1.types
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.monitoring_metrics_scope import gapic_version as package_version

__version__ = package_version.__version__


from google.cloud.monitoring_metrics_scope_v1.services.metrics_scopes.async_client import (
MetricsScopesAsyncClient,
Expand Down
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.2.4" # {x-release-please-version}
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Marker file for PEP 561.
# The google-cloud-monitoring-metrics-scope package uses inline types.
# The google-cloud-monitoring-metrics-scopes package uses inline types.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.monitoring_metrics_scope import gapic_version as package_version

__version__ = package_version.__version__


from .services.metrics_scopes import MetricsScopesAsyncClient, MetricsScopesClient
from .types.metrics_scope import MetricsScope, MonitoredProject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Marker file for PEP 561.
# The google-cloud-monitoring-metrics-scope package uses inline types.
# The google-cloud-monitoring-metrics-scopes package uses inline types.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
from typing import (
Dict,
Mapping,
MutableMapping,
MutableSequence,
Optional,
Sequence,
Tuple,
Type,
Union,
)

from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
Expand Down Expand Up @@ -171,9 +181,9 @@ def transport(self) -> MetricsScopesTransport:
def __init__(
self,
*,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, MetricsScopesTransport] = "grpc_asyncio",
client_options: ClientOptions = None,
client_options: Optional[ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the metrics scopes client.
Expand Down Expand Up @@ -217,11 +227,11 @@ def __init__(

async def get_metrics_scope(
self,
request: Union[metrics_scopes.GetMetricsScopeRequest, dict] = None,
request: Optional[Union[metrics_scopes.GetMetricsScopeRequest, dict]] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> metrics_scope.MetricsScope:
r"""Returns a specific ``Metrics Scope``.
Expand Down Expand Up @@ -253,7 +263,7 @@ async def sample_get_metrics_scope():
print(response)
Args:
request (Union[google.cloud.monitoring_metrics_scope_v1.types.GetMetricsScopeRequest, dict]):
request (Optional[Union[google.cloud.monitoring_metrics_scope_v1.types.GetMetricsScopeRequest, dict]]):
The request object. Request for the `GetMetricsScope`
method.
name (:class:`str`):
Expand Down Expand Up @@ -323,12 +333,12 @@ async def sample_get_metrics_scope():

async def list_metrics_scopes_by_monitored_project(
self,
request: Union[
metrics_scopes.ListMetricsScopesByMonitoredProjectRequest, dict
request: Optional[
Union[metrics_scopes.ListMetricsScopesByMonitoredProjectRequest, dict]
] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> metrics_scopes.ListMetricsScopesByMonitoredProjectResponse:
r"""Returns a list of every ``Metrics Scope`` that a specific
Expand Down Expand Up @@ -363,7 +373,7 @@ async def sample_list_metrics_scopes_by_monitored_project():
print(response)
Args:
request (Union[google.cloud.monitoring_metrics_scope_v1.types.ListMetricsScopesByMonitoredProjectRequest, dict]):
request (Optional[Union[google.cloud.monitoring_metrics_scope_v1.types.ListMetricsScopesByMonitoredProjectRequest, dict]]):
The request object. Request for the
`ListMetricsScopesByMonitoredProject` method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -402,12 +412,14 @@ async def sample_list_metrics_scopes_by_monitored_project():

async def create_monitored_project(
self,
request: Union[metrics_scopes.CreateMonitoredProjectRequest, dict] = None,
request: Optional[
Union[metrics_scopes.CreateMonitoredProjectRequest, dict]
] = None,
*,
parent: str = None,
monitored_project: metrics_scope.MonitoredProject = None,
parent: Optional[str] = None,
monitored_project: Optional[metrics_scope.MonitoredProject] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Adds a ``MonitoredProject`` with the given project ID to the
Expand Down Expand Up @@ -444,7 +456,7 @@ async def sample_create_monitored_project():
print(response)
Args:
request (Union[google.cloud.monitoring_metrics_scope_v1.types.CreateMonitoredProjectRequest, dict]):
request (Optional[Union[google.cloud.monitoring_metrics_scope_v1.types.CreateMonitoredProjectRequest, dict]]):
The request object. Request for the
`CreateMonitoredProject` method.
parent (:class:`str`):
Expand Down Expand Up @@ -536,11 +548,13 @@ async def sample_create_monitored_project():

async def delete_monitored_project(
self,
request: Union[metrics_scopes.DeleteMonitoredProjectRequest, dict] = None,
request: Optional[
Union[metrics_scopes.DeleteMonitoredProjectRequest, dict]
] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Deletes a ``MonitoredProject`` from the specified
Expand Down Expand Up @@ -577,7 +591,7 @@ async def sample_delete_monitored_project():
print(response)
Args:
request (Union[google.cloud.monitoring_metrics_scope_v1.types.DeleteMonitoredProjectRequest, dict]):
request (Optional[Union[google.cloud.monitoring_metrics_scope_v1.types.DeleteMonitoredProjectRequest, dict]]):
The request object. Request for the
`DeleteMonitoredProject` method.
name (:class:`str`):
Expand Down Expand Up @@ -675,7 +689,7 @@ async def __aexit__(self, exc_type, exc, tb):
try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution(
"google-cloud-monitoring-metrics-scope",
"google-cloud-monitoring-metrics-scopes",
).version,
)
except pkg_resources.DistributionNotFound:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,18 @@
from collections import OrderedDict
import os
import re
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
from typing import (
Dict,
Mapping,
MutableMapping,
MutableSequence,
Optional,
Sequence,
Tuple,
Type,
Union,
cast,
)

from google.api_core import client_options as client_options_lib
from google.api_core import exceptions as core_exceptions
Expand Down Expand Up @@ -60,7 +71,7 @@ class MetricsScopesClientMeta(type):

def get_transport_class(
cls,
label: str = None,
label: Optional[str] = None,
) -> Type[MetricsScopesTransport]:
"""Returns an appropriate transport class.
Expand Down Expand Up @@ -352,8 +363,8 @@ def __init__(
self,
*,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, MetricsScopesTransport, None] = None,
client_options: Optional[client_options_lib.ClientOptions] = None,
transport: Optional[Union[str, MetricsScopesTransport]] = None,
client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the metrics scopes client.
Expand All @@ -367,7 +378,7 @@ def __init__(
transport (Union[str, MetricsScopesTransport]): The
transport to use. If set to None, a transport is chosen
automatically.
client_options (google.api_core.client_options.ClientOptions): Custom options for the
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the
client. It won't take effect if a ``transport`` instance is provided.
(1) The ``api_endpoint`` property can be used to override the
default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
Expand Down Expand Up @@ -397,6 +408,7 @@ def __init__(
client_options = client_options_lib.from_dict(client_options)
if client_options is None:
client_options = client_options_lib.ClientOptions()
client_options = cast(client_options_lib.ClientOptions, client_options)

api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source(
client_options
Expand Down Expand Up @@ -449,11 +461,11 @@ def __init__(

def get_metrics_scope(
self,
request: Union[metrics_scopes.GetMetricsScopeRequest, dict] = None,
request: Optional[Union[metrics_scopes.GetMetricsScopeRequest, dict]] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> metrics_scope.MetricsScope:
r"""Returns a specific ``Metrics Scope``.
Expand Down Expand Up @@ -555,12 +567,12 @@ def sample_get_metrics_scope():

def list_metrics_scopes_by_monitored_project(
self,
request: Union[
metrics_scopes.ListMetricsScopesByMonitoredProjectRequest, dict
request: Optional[
Union[metrics_scopes.ListMetricsScopesByMonitoredProjectRequest, dict]
] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> metrics_scopes.ListMetricsScopesByMonitoredProjectResponse:
r"""Returns a list of every ``Metrics Scope`` that a specific
Expand Down Expand Up @@ -639,12 +651,14 @@ def sample_list_metrics_scopes_by_monitored_project():

def create_monitored_project(
self,
request: Union[metrics_scopes.CreateMonitoredProjectRequest, dict] = None,
request: Optional[
Union[metrics_scopes.CreateMonitoredProjectRequest, dict]
] = None,
*,
parent: str = None,
monitored_project: metrics_scope.MonitoredProject = None,
parent: Optional[str] = None,
monitored_project: Optional[metrics_scope.MonitoredProject] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Adds a ``MonitoredProject`` with the given project ID to the
Expand Down Expand Up @@ -773,11 +787,13 @@ def sample_create_monitored_project():

def delete_monitored_project(
self,
request: Union[metrics_scopes.DeleteMonitoredProjectRequest, dict] = None,
request: Optional[
Union[metrics_scopes.DeleteMonitoredProjectRequest, dict]
] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Deletes a ``MonitoredProject`` from the specified
Expand Down Expand Up @@ -919,7 +935,7 @@ def __exit__(self, type, value, traceback):
try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution(
"google-cloud-monitoring-metrics-scope",
"google-cloud-monitoring-metrics-scopes",
).version,
)
except pkg_resources.DistributionNotFound:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
try:
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution(
"google-cloud-monitoring-metrics-scope",
"google-cloud-monitoring-metrics-scopes",
).version,
)
except pkg_resources.DistributionNotFound:
Expand All @@ -54,7 +54,7 @@ def __init__(
self,
*,
host: str = DEFAULT_HOST,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
quota_project_id: Optional[str] = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ def __init__(
self,
*,
host: str = "monitoring.googleapis.com",
credentials: ga_credentials.Credentials = None,
credentials_file: str = None,
scopes: Sequence[str] = None,
channel: grpc.Channel = None,
api_mtls_endpoint: str = None,
client_cert_source: Callable[[], Tuple[bytes, bytes]] = None,
ssl_channel_credentials: grpc.ChannelCredentials = None,
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
channel: Optional[grpc.Channel] = None,
api_mtls_endpoint: Optional[str] = None,
client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
always_use_jwt_access: Optional[bool] = False,
Expand Down Expand Up @@ -183,8 +183,8 @@ def __init__(
def create_channel(
cls,
host: str = "monitoring.googleapis.com",
credentials: ga_credentials.Credentials = None,
credentials_file: str = None,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
quota_project_id: Optional[str] = None,
**kwargs,
Expand Down
Loading

0 comments on commit d206d76

Please sign in to comment.