Skip to content

Commit

Permalink
feat: add cloud storage subscription fields (#918)
Browse files Browse the repository at this point in the history
* feat: add cloud storage subscription fields

PiperOrigin-RevId: 531202368

Source-Link: googleapis/googleapis@8a4cc94

Source-Link: googleapis/googleapis-gen@ec60ad7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWM2MGFkNzYzNTZkODhlOTlmYTQ4NDRmYmQ5MGZkY2NhNzI4ZjVjYiJ9

* 🦉 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed May 12, 2023
1 parent 4ec597c commit 6e262da
Show file tree
Hide file tree
Showing 11 changed files with 410 additions and 77 deletions.
2 changes: 2 additions & 0 deletions google/pubsub/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

from google.pubsub_v1.types.pubsub import AcknowledgeRequest
from google.pubsub_v1.types.pubsub import BigQueryConfig
from google.pubsub_v1.types.pubsub import CloudStorageConfig
from google.pubsub_v1.types.pubsub import CreateSnapshotRequest
from google.pubsub_v1.types.pubsub import DeadLetterPolicy
from google.pubsub_v1.types.pubsub import DeleteSnapshotRequest
Expand Down Expand Up @@ -99,6 +100,7 @@
"SubscriberAsyncClient",
"AcknowledgeRequest",
"BigQueryConfig",
"CloudStorageConfig",
"CreateSnapshotRequest",
"DeadLetterPolicy",
"DeleteSnapshotRequest",
Expand Down
2 changes: 2 additions & 0 deletions google/pubsub_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

from .types.pubsub import AcknowledgeRequest
from .types.pubsub import BigQueryConfig
from .types.pubsub import CloudStorageConfig
from .types.pubsub import CreateSnapshotRequest
from .types.pubsub import DeadLetterPolicy
from .types.pubsub import DeleteSnapshotRequest
Expand Down Expand Up @@ -94,6 +95,7 @@
"SubscriberAsyncClient",
"AcknowledgeRequest",
"BigQueryConfig",
"CloudStorageConfig",
"CommitSchemaRequest",
"CreateSchemaRequest",
"CreateSnapshotRequest",
Expand Down
110 changes: 100 additions & 10 deletions google/pubsub_v1/services/schema_service/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,16 @@ async def sample_create_schema():
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.create_schema,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down Expand Up @@ -425,7 +434,16 @@ async def sample_get_schema():
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.get_schema,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down Expand Up @@ -529,7 +547,16 @@ async def sample_list_schemas():
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.list_schemas,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down Expand Up @@ -642,7 +669,16 @@ async def sample_list_schema_revisions():
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.list_schema_revisions,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down Expand Up @@ -764,7 +800,16 @@ async def sample_commit_schema():
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.commit_schema,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down Expand Up @@ -877,7 +922,16 @@ async def sample_rollback_schema():
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.rollback_schema,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down Expand Up @@ -989,7 +1043,16 @@ async def sample_delete_schema_revision():
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.delete_schema_revision,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down Expand Up @@ -1081,7 +1144,16 @@ async def sample_delete_schema():
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.delete_schema,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down Expand Up @@ -1193,7 +1265,16 @@ async def sample_validate_schema():
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.validate_schema,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down Expand Up @@ -1273,7 +1354,16 @@ async def sample_validate_message():
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.validate_message,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=DEFAULT_CLIENT_INFO,
)

Expand Down
110 changes: 100 additions & 10 deletions google/pubsub_v1/services/schema_service/transports/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,52 +132,142 @@ def _prep_wrapped_messages(self, client_info):
self._wrapped_methods = {
self.create_schema: gapic_v1.method.wrap_method(
self.create_schema,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=client_info,
),
self.get_schema: gapic_v1.method.wrap_method(
self.get_schema,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=client_info,
),
self.list_schemas: gapic_v1.method.wrap_method(
self.list_schemas,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=client_info,
),
self.list_schema_revisions: gapic_v1.method.wrap_method(
self.list_schema_revisions,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=client_info,
),
self.commit_schema: gapic_v1.method.wrap_method(
self.commit_schema,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=client_info,
),
self.rollback_schema: gapic_v1.method.wrap_method(
self.rollback_schema,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=client_info,
),
self.delete_schema_revision: gapic_v1.method.wrap_method(
self.delete_schema_revision,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=client_info,
),
self.delete_schema: gapic_v1.method.wrap_method(
self.delete_schema,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=client_info,
),
self.validate_schema: gapic_v1.method.wrap_method(
self.validate_schema,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=client_info,
),
self.validate_message: gapic_v1.method.wrap_method(
self.validate_message,
default_timeout=None,
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ServiceUnavailable,
),
deadline=60.0,
),
default_timeout=60.0,
client_info=client_info,
),
}
Expand Down
Loading

0 comments on commit 6e262da

Please sign in to comment.