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

Commit

Permalink
chore: Use gapic-generator-python 0.65.0 (#132)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 440970084

Source-Link: googleapis/googleapis@5e0a3d5

Source-Link: googleapis/googleapis-gen@b0c628a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBjNjI4YTNmYWRlNzY4ZjIyNWQ3Njk5Mjc5MWVhMWJhMmE4ODFiZSJ9

docs: fix type in docstring for map fields
  • Loading branch information
gcf-owl-bot[bot] committed Apr 11, 2022
1 parent faa136f commit 3ce7908
Show file tree
Hide file tree
Showing 21 changed files with 240 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core.client_options import ClientOptions
Expand Down Expand Up @@ -225,7 +225,6 @@ async def allocate_quota(
inject these errors to prohibit any hard dependency on the quota
functionality.
.. code-block:: python
from google.cloud import servicecontrol_v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import os
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib
Expand Down Expand Up @@ -429,7 +429,6 @@ def allocate_quota(
inject these errors to prohibit any hard dependency on the quota
functionality.
.. code-block:: python
from google.cloud import servicecontrol_v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def __init__(
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
be used for service account credentials.
"""

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
Expand Down Expand Up @@ -151,5 +152,9 @@ def allocate_quota(
]:
raise NotImplementedError()

@property
def kind(self) -> str:
raise NotImplementedError()


__all__ = ("QuotaControllerTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -272,5 +272,9 @@ def allocate_quota(
def close(self):
self.grpc_channel.close()

@property
def kind(self) -> str:
return "grpc"


__all__ = ("QuotaControllerGrpcTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core.client_options import ClientOptions
Expand Down Expand Up @@ -232,7 +232,6 @@ async def check(
permission on the specified service. For more information, see
`Cloud IAM <https://cloud.google.com/iam>`__.
.. code-block:: python
from google.cloud import servicecontrol_v1
Expand Down Expand Up @@ -279,7 +278,7 @@ def sample_check():
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=5.0,
),
Expand Down Expand Up @@ -325,7 +324,6 @@ async def report(
permission on the specified service. For more information, see
`Google Cloud IAM <https://cloud.google.com/iam>`__.
.. code-block:: python
from google.cloud import servicecontrol_v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import os
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib
Expand Down Expand Up @@ -436,7 +436,6 @@ def check(
permission on the specified service. For more information, see
`Cloud IAM <https://cloud.google.com/iam>`__.
.. code-block:: python
from google.cloud import servicecontrol_v1
Expand Down Expand Up @@ -521,7 +520,6 @@ def report(
permission on the specified service. For more information, see
`Google Cloud IAM <https://cloud.google.com/iam>`__.
.. code-block:: python
from google.cloud import servicecontrol_v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def __init__(
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
be used for service account credentials.
"""

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
Expand Down Expand Up @@ -130,7 +131,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=5.0,
),
Expand Down Expand Up @@ -177,5 +178,9 @@ def report(
]:
raise NotImplementedError()

@property
def kind(self) -> str:
raise NotImplementedError()


__all__ = ("ServiceControllerTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -322,5 +322,9 @@ def report(
def close(self):
self.grpc_channel.close()

@property
def kind(self) -> str:
return "grpc"


__all__ = ("ServiceControllerGrpcTransport",)
16 changes: 12 additions & 4 deletions google/cloud/servicecontrol_v1/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .check_error import CheckError
from .distribution import Distribution
from .http_request import HttpRequest
from .check_error import (
CheckError,
)
from .distribution import (
Distribution,
)
from .http_request import (
HttpRequest,
)
from .log_entry import (
LogEntry,
LogEntryOperation,
Expand All @@ -25,7 +31,9 @@
MetricValue,
MetricValueSet,
)
from .operation import Operation
from .operation import (
Operation,
)
from .quota_controller import (
AllocateQuotaRequest,
AllocateQuotaResponse,
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/servicecontrol_v1/types/log_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class LogEntry(proto.Message):
A unique ID for the log entry used for deduplication. If
omitted, the implementation will generate one based on
operation_id.
labels (Sequence[google.cloud.servicecontrol_v1.types.LogEntry.LabelsEntry]):
labels (Mapping[str, str]):
A set of user-defined (key, value) data that
provides additional information about the log
entry.
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/servicecontrol_v1/types/metric_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class MetricValue(proto.Message):
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
labels (Sequence[google.cloud.servicecontrol_v1.types.MetricValue.LabelsEntry]):
labels (Mapping[str, str]):
The labels describing the metric value. See comments on
[google.api.servicecontrol.v1.Operation.labels][google.api.servicecontrol.v1.Operation.labels]
for the overriding relationship. Note that this map must not
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/servicecontrol_v1/types/operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Operation(proto.Message):
[ServiceController.Report][google.api.servicecontrol.v1.ServiceController.Report],
but optional when the operation is used in
[ServiceController.Check][google.api.servicecontrol.v1.ServiceController.Check].
labels (Sequence[google.cloud.servicecontrol_v1.types.Operation.LabelsEntry]):
labels (Mapping[str, str]):
Labels describing the operation. Only the following labels
are allowed:
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/servicecontrol_v1/types/quota_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class QuotaOperation(proto.Message):
This can be in one of the following formats:
project:<project_id>, project_number:<project_number>,
api_key:<api_key>.
labels (Sequence[google.cloud.servicecontrol_v1.types.QuotaOperation.LabelsEntry]):
labels (Mapping[str, str]):
Labels describing the operation.
quota_metrics (Sequence[google.cloud.servicecontrol_v1.types.MetricValueSet]):
Represents information about this operation. Each
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core.client_options import ClientOptions
Expand Down Expand Up @@ -242,7 +242,6 @@ async def check(
`Service Control API Access
Control <https://cloud.google.com/service-infrastructure/docs/service-control/access-control>`__.
.. code-block:: python
from google.cloud import servicecontrol_v2
Expand Down Expand Up @@ -289,7 +288,7 @@ def sample_check():
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=5.0,
),
Expand Down Expand Up @@ -336,7 +335,6 @@ async def report(
`Service Control API Access
Control <https://cloud.google.com/service-infrastructure/docs/service-control/access-control>`__.
.. code-block:: python
from google.cloud import servicecontrol_v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import os
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib
Expand Down Expand Up @@ -446,7 +446,6 @@ def check(
`Service Control API Access
Control <https://cloud.google.com/service-infrastructure/docs/service-control/access-control>`__.
.. code-block:: python
from google.cloud import servicecontrol_v2
Expand Down Expand Up @@ -532,7 +531,6 @@ def report(
`Service Control API Access
Control <https://cloud.google.com/service-infrastructure/docs/service-control/access-control>`__.
.. code-block:: python
from google.cloud import servicecontrol_v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def __init__(
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
be used for service account credentials.
"""

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
Expand Down Expand Up @@ -130,7 +131,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=10.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
core_exceptions.GoogleAPICallError,
),
deadline=5.0,
),
Expand Down Expand Up @@ -177,5 +178,9 @@ def report(
]:
raise NotImplementedError()

@property
def kind(self) -> str:
raise NotImplementedError()


__all__ = ("ServiceControllerTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -333,5 +333,9 @@ def report(
def close(self):
self.grpc_channel.close()

@property
def kind(self) -> str:
return "grpc"


__all__ = ("ServiceControllerGrpcTransport",)
2 changes: 1 addition & 1 deletion google/cloud/servicecontrol_v2/types/service_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class CheckResponse(proto.Message):
non-'OK' status indicates a denial;
[google.rpc.Status.details][google.rpc.Status.details] would
contain additional details about the denial.
headers (Sequence[google.cloud.servicecontrol_v2.types.CheckResponse.HeadersEntry]):
headers (Mapping[str, str]):
Returns a set of request contexts generated from the
``CheckRequest``.
"""
Expand Down
Loading

0 comments on commit 3ce7908

Please sign in to comment.