Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Mark revision_id in CommitSchemaRevisionRequest as deprecated #861

Merged
merged 2 commits into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions google/pubsub_v1/services/schema_service/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,6 @@ async def sample_delete_schema_revision():
# Initialize request argument(s)
request = pubsub_v1.DeleteSchemaRevisionRequest(
name="name_value",
revision_id="revision_id_value",
)

# Make the request
Expand All @@ -945,20 +944,18 @@ async def sample_delete_schema_revision():
The request object. Request for the
`DeleteSchemaRevision` method.
name (:class:`str`):
Required. The name of the schema
revision to be deleted, with a revision
ID explicitly included.
Example:
projects/123/schemas/my-schema@c7cfa2a8
Required. The name of the schema revision to be deleted,
with a revision ID explicitly included.

Example: ``projects/123/schemas/my-schema@c7cfa2a8``

This corresponds to the ``name`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
revision_id (:class:`str`):
Required. The revision ID to roll
back to. It must be a revision of the
same schema.
Example: c7cfa2a8
Optional. This field is deprecated and should not be
used for specifying the revision ID. The revision ID
should be specified via the ``name`` parameter.

This corresponds to the ``revision_id`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
17 changes: 7 additions & 10 deletions google/pubsub_v1/services/schema_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,6 @@ def sample_delete_schema_revision():
# Initialize request argument(s)
request = pubsub_v1.DeleteSchemaRevisionRequest(
name="name_value",
revision_id="revision_id_value",
)

# Make the request
Expand All @@ -1177,20 +1176,18 @@ def sample_delete_schema_revision():
The request object. Request for the
`DeleteSchemaRevision` method.
name (str):
Required. The name of the schema
revision to be deleted, with a revision
ID explicitly included.
Example:
projects/123/schemas/my-schema@c7cfa2a8
Required. The name of the schema revision to be deleted,
with a revision ID explicitly included.

Example: ``projects/123/schemas/my-schema@c7cfa2a8``

This corresponds to the ``name`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
revision_id (str):
Required. The revision ID to roll
back to. It must be a revision of the
same schema.
Example: c7cfa2a8
Optional. This field is deprecated and should not be
used for specifying the revision ID. The revision ID
should be specified via the ``name`` parameter.

This corresponds to the ``revision_id`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down
15 changes: 7 additions & 8 deletions google/pubsub_v1/types/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,15 +385,14 @@ class DeleteSchemaRevisionRequest(proto.Message):

Attributes:
name (str):
Required. The name of the schema revision to
be deleted, with a revision ID explicitly
included.
Example: projects/123/schemas/my-schema@c7cfa2a8
revision_id (str):
Required. The revision ID to roll back to.
It must be a revision of the same schema.
Required. The name of the schema revision to be deleted,
with a revision ID explicitly included.

Example: c7cfa2a8
Example: ``projects/123/schemas/my-schema@c7cfa2a8``
revision_id (str):
Optional. This field is deprecated and should not be used
for specifying the revision ID. The revision ID should be
specified via the ``name`` parameter.
"""

name: str = proto.Field(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ async def sample_delete_schema_revision():
# Initialize request argument(s)
request = pubsub_v1.DeleteSchemaRevisionRequest(
name="name_value",
revision_id="revision_id_value",
)

# Make the request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def sample_delete_schema_revision():
# Initialize request argument(s)
request = pubsub_v1.DeleteSchemaRevisionRequest(
name="name_value",
revision_id="revision_id_value",
)

# Make the request
Expand Down
28 changes: 14 additions & 14 deletions samples/generated_samples/snippet_metadata_google.pubsub.v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1845,12 +1845,12 @@
"regionTag": "pubsub_v1_generated_SchemaService_DeleteSchemaRevision_async",
"segments": [
{
"end": 52,
"end": 51,
"start": 27,
"type": "FULL"
},
{
"end": 52,
"end": 51,
"start": 27,
"type": "SHORT"
},
Expand All @@ -1860,18 +1860,18 @@
"type": "CLIENT_INITIALIZATION"
},
{
"end": 46,
"end": 45,
"start": 41,
"type": "REQUEST_INITIALIZATION"
},
{
"end": 49,
"start": 47,
"end": 48,
"start": 46,
"type": "REQUEST_EXECUTION"
},
{
"end": 53,
"start": 50,
"end": 52,
"start": 49,
"type": "RESPONSE_HANDLING"
}
],
Expand Down Expand Up @@ -1929,12 +1929,12 @@
"regionTag": "pubsub_v1_generated_SchemaService_DeleteSchemaRevision_sync",
"segments": [
{
"end": 52,
"end": 51,
"start": 27,
"type": "FULL"
},
{
"end": 52,
"end": 51,
"start": 27,
"type": "SHORT"
},
Expand All @@ -1944,18 +1944,18 @@
"type": "CLIENT_INITIALIZATION"
},
{
"end": 46,
"end": 45,
"start": 41,
"type": "REQUEST_INITIALIZATION"
},
{
"end": 49,
"start": 47,
"end": 48,
"start": 46,
"type": "REQUEST_EXECUTION"
},
{
"end": 53,
"start": 50,
"end": 52,
"start": 49,
"type": "RESPONSE_HANDLING"
}
],
Expand Down