Skip to content

Commit 09b846d

Browse files
docs: Mark revision_id in CommitSchemaRevisionRequest as deprecated (#861)
* docs: Mark revision_id in CommitSchemaRevisionRequest deprecated PiperOrigin-RevId: 508076213 Source-Link: googleapis/googleapis@3b9ae88 Source-Link: googleapis/googleapis-gen@d5e2649 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDVlMjY0OTJkZTkxMDBlYjJjZjY4NmVhN2JjY2YyNDk4YjY2MDBkNCJ9 * 🦉 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
1 parent 1265c01 commit 09b846d

File tree

6 files changed

+35
-44
lines changed

6 files changed

+35
-44
lines changed

google/pubsub_v1/services/schema_service/async_client.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,6 @@ async def sample_delete_schema_revision():
931931
# Initialize request argument(s)
932932
request = pubsub_v1.DeleteSchemaRevisionRequest(
933933
name="name_value",
934-
revision_id="revision_id_value",
935934
)
936935
937936
# Make the request
@@ -945,20 +944,18 @@ async def sample_delete_schema_revision():
945944
The request object. Request for the
946945
`DeleteSchemaRevision` method.
947946
name (:class:`str`):
948-
Required. The name of the schema
949-
revision to be deleted, with a revision
950-
ID explicitly included.
951-
Example:
952-
projects/123/schemas/my-schema@c7cfa2a8
947+
Required. The name of the schema revision to be deleted,
948+
with a revision ID explicitly included.
949+
950+
Example: ``projects/123/schemas/my-schema@c7cfa2a8``
953951
954952
This corresponds to the ``name`` field
955953
on the ``request`` instance; if ``request`` is provided, this
956954
should not be set.
957955
revision_id (:class:`str`):
958-
Required. The revision ID to roll
959-
back to. It must be a revision of the
960-
same schema.
961-
Example: c7cfa2a8
956+
Optional. This field is deprecated and should not be
957+
used for specifying the revision ID. The revision ID
958+
should be specified via the ``name`` parameter.
962959
963960
This corresponds to the ``revision_id`` field
964961
on the ``request`` instance; if ``request`` is provided, this

google/pubsub_v1/services/schema_service/client.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,6 @@ def sample_delete_schema_revision():
11631163
# Initialize request argument(s)
11641164
request = pubsub_v1.DeleteSchemaRevisionRequest(
11651165
name="name_value",
1166-
revision_id="revision_id_value",
11671166
)
11681167
11691168
# Make the request
@@ -1177,20 +1176,18 @@ def sample_delete_schema_revision():
11771176
The request object. Request for the
11781177
`DeleteSchemaRevision` method.
11791178
name (str):
1180-
Required. The name of the schema
1181-
revision to be deleted, with a revision
1182-
ID explicitly included.
1183-
Example:
1184-
projects/123/schemas/my-schema@c7cfa2a8
1179+
Required. The name of the schema revision to be deleted,
1180+
with a revision ID explicitly included.
1181+
1182+
Example: ``projects/123/schemas/my-schema@c7cfa2a8``
11851183
11861184
This corresponds to the ``name`` field
11871185
on the ``request`` instance; if ``request`` is provided, this
11881186
should not be set.
11891187
revision_id (str):
1190-
Required. The revision ID to roll
1191-
back to. It must be a revision of the
1192-
same schema.
1193-
Example: c7cfa2a8
1188+
Optional. This field is deprecated and should not be
1189+
used for specifying the revision ID. The revision ID
1190+
should be specified via the ``name`` parameter.
11941191
11951192
This corresponds to the ``revision_id`` field
11961193
on the ``request`` instance; if ``request`` is provided, this

google/pubsub_v1/types/schema.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -385,15 +385,14 @@ class DeleteSchemaRevisionRequest(proto.Message):
385385
386386
Attributes:
387387
name (str):
388-
Required. The name of the schema revision to
389-
be deleted, with a revision ID explicitly
390-
included.
391-
Example: projects/123/schemas/my-schema@c7cfa2a8
392-
revision_id (str):
393-
Required. The revision ID to roll back to.
394-
It must be a revision of the same schema.
388+
Required. The name of the schema revision to be deleted,
389+
with a revision ID explicitly included.
395390
396-
Example: c7cfa2a8
391+
Example: ``projects/123/schemas/my-schema@c7cfa2a8``
392+
revision_id (str):
393+
Optional. This field is deprecated and should not be used
394+
for specifying the revision ID. The revision ID should be
395+
specified via the ``name`` parameter.
397396
"""
398397

399398
name: str = proto.Field(

samples/generated_samples/pubsub_v1_generated_schema_service_delete_schema_revision_async.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ async def sample_delete_schema_revision():
4141
# Initialize request argument(s)
4242
request = pubsub_v1.DeleteSchemaRevisionRequest(
4343
name="name_value",
44-
revision_id="revision_id_value",
4544
)
4645

4746
# Make the request

samples/generated_samples/pubsub_v1_generated_schema_service_delete_schema_revision_sync.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def sample_delete_schema_revision():
4141
# Initialize request argument(s)
4242
request = pubsub_v1.DeleteSchemaRevisionRequest(
4343
name="name_value",
44-
revision_id="revision_id_value",
4544
)
4645

4746
# Make the request

samples/generated_samples/snippet_metadata_google.pubsub.v1.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,12 +1845,12 @@
18451845
"regionTag": "pubsub_v1_generated_SchemaService_DeleteSchemaRevision_async",
18461846
"segments": [
18471847
{
1848-
"end": 52,
1848+
"end": 51,
18491849
"start": 27,
18501850
"type": "FULL"
18511851
},
18521852
{
1853-
"end": 52,
1853+
"end": 51,
18541854
"start": 27,
18551855
"type": "SHORT"
18561856
},
@@ -1860,18 +1860,18 @@
18601860
"type": "CLIENT_INITIALIZATION"
18611861
},
18621862
{
1863-
"end": 46,
1863+
"end": 45,
18641864
"start": 41,
18651865
"type": "REQUEST_INITIALIZATION"
18661866
},
18671867
{
1868-
"end": 49,
1869-
"start": 47,
1868+
"end": 48,
1869+
"start": 46,
18701870
"type": "REQUEST_EXECUTION"
18711871
},
18721872
{
1873-
"end": 53,
1874-
"start": 50,
1873+
"end": 52,
1874+
"start": 49,
18751875
"type": "RESPONSE_HANDLING"
18761876
}
18771877
],
@@ -1929,12 +1929,12 @@
19291929
"regionTag": "pubsub_v1_generated_SchemaService_DeleteSchemaRevision_sync",
19301930
"segments": [
19311931
{
1932-
"end": 52,
1932+
"end": 51,
19331933
"start": 27,
19341934
"type": "FULL"
19351935
},
19361936
{
1937-
"end": 52,
1937+
"end": 51,
19381938
"start": 27,
19391939
"type": "SHORT"
19401940
},
@@ -1944,18 +1944,18 @@
19441944
"type": "CLIENT_INITIALIZATION"
19451945
},
19461946
{
1947-
"end": 46,
1947+
"end": 45,
19481948
"start": 41,
19491949
"type": "REQUEST_INITIALIZATION"
19501950
},
19511951
{
1952-
"end": 49,
1953-
"start": 47,
1952+
"end": 48,
1953+
"start": 46,
19541954
"type": "REQUEST_EXECUTION"
19551955
},
19561956
{
1957-
"end": 53,
1958-
"start": 50,
1957+
"end": 52,
1958+
"start": 49,
19591959
"type": "RESPONSE_HANDLING"
19601960
}
19611961
],

0 commit comments

Comments
 (0)