Skip to content

Commit 85418b0

Browse files
feat: [google-cloud-support] publish client libraries for CSAPI v2beta (googleapis#13909)
BEGIN_COMMIT_OVERRIDE feat: publish client libraries for CSAPI v2beta docs: Bring comments and metadata up to date feat: Deprecate the `Actor.email` field and add `username` to replace it feat: Annotate `Comment.plain_text_body` as deprecated (it was already deprecated, but now we're adding the annotation for it) END_COMMIT_OVERRIDE - [ ] Regenerate this pull request now. PiperOrigin-RevId: 758765891 Source-Link: googleapis/googleapis@c7a80cb Source-Link: https://github.com/googleapis/googleapis-gen/commit/b1c5c7b24bc3c9f5defbb3309225626439407e70 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXN1cHBvcnQvLk93bEJvdC55YW1sIiwiaCI6ImIxYzVjN2IyNGJjM2M5ZjVkZWZiYjMzMDkyMjU2MjY0Mzk0MDdlNzAifQ== BEGIN_NESTED_COMMIT docs: [google-cloud-support] Bring comments and metadata up to date feat: Deprecate the `Actor.email` field and add `username` to replace it feat: Annotate `Comment.plain_text_body` as deprecated (it was already deprecated, but now we're adding the annotation for it) PiperOrigin-RevId: 758717798 Source-Link: googleapis/googleapis@84f0429 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7df9c322dd0b1d9a4f323a1df5c36b0317282378 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXN1cHBvcnQvLk93bEJvdC55YW1sIiwiaCI6IjdkZjljMzIyZGQwYjFkOWE0ZjMyM2ExZGY1YzM2YjAzMTcyODIzNzgifQ== END_NESTED_COMMIT --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 2e7f0b8 commit 85418b0

File tree

124 files changed

+44445
-335
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+44445
-335
lines changed

packages/google-cloud-support/docs/index.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
.. include:: multiprocessing.rst
44

5+
This package includes clients for multiple versions of Google Cloud Support API.
6+
By default, you will get version ``support_v2``.
7+
58

69
API Reference
710
-------------
@@ -11,6 +14,14 @@ API Reference
1114
support_v2/services_
1215
support_v2/types_
1316

17+
API Reference
18+
-------------
19+
.. toctree::
20+
:maxdepth: 2
21+
22+
support_v2beta/services_
23+
support_v2beta/types_
24+
1425

1526
Changelog
1627
---------
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CaseAttachmentService
2+
---------------------------------------
3+
4+
.. automodule:: google.cloud.support_v2beta.services.case_attachment_service
5+
:members:
6+
:inherited-members:
7+
8+
.. automodule:: google.cloud.support_v2beta.services.case_attachment_service.pagers
9+
:members:
10+
:inherited-members:
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CaseService
2+
-----------------------------
3+
4+
.. automodule:: google.cloud.support_v2beta.services.case_service
5+
:members:
6+
:inherited-members:
7+
8+
.. automodule:: google.cloud.support_v2beta.services.case_service.pagers
9+
:members:
10+
:inherited-members:
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CommentService
2+
--------------------------------
3+
4+
.. automodule:: google.cloud.support_v2beta.services.comment_service
5+
:members:
6+
:inherited-members:
7+
8+
.. automodule:: google.cloud.support_v2beta.services.comment_service.pagers
9+
:members:
10+
:inherited-members:
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FeedService
2+
-----------------------------
3+
4+
.. automodule:: google.cloud.support_v2beta.services.feed_service
5+
:members:
6+
:inherited-members:
7+
8+
.. automodule:: google.cloud.support_v2beta.services.feed_service.pagers
9+
:members:
10+
:inherited-members:
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Services for Google Cloud Support v2beta API
2+
============================================
3+
.. toctree::
4+
:maxdepth: 2
5+
6+
case_attachment_service
7+
case_service
8+
comment_service
9+
feed_service
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Types for Google Cloud Support v2beta API
2+
=========================================
3+
4+
.. automodule:: google.cloud.support_v2beta.types
5+
:members:
6+
:show-inheritance:

packages/google-cloud-support/google/cloud/support_v2/services/case_attachment_service/async_client.py

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262

6363

6464
class CaseAttachmentServiceAsyncClient:
65-
"""A service to manage file attachment for Google Cloud support
65+
"""A service to manage file attachments for Google Cloud support
6666
cases.
6767
"""
6868

@@ -310,8 +310,37 @@ async def list_attachments(
310310
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
311311
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
312312
) -> pagers.ListAttachmentsAsyncPager:
313-
r"""Retrieve all attachments associated with a support
314-
case.
313+
r"""List all the attachments associated with a support case.
314+
315+
EXAMPLES:
316+
317+
cURL:
318+
319+
.. code:: shell
320+
321+
case="projects/some-project/cases/23598314"
322+
curl \
323+
--header "Authorization: Bearer $(gcloud auth print-access-token)" \
324+
"https://cloudsupport.googleapis.com/v2/$case/attachments"
325+
326+
Python:
327+
328+
.. code:: python
329+
330+
import googleapiclient.discovery
331+
332+
api_version = "v2"
333+
supportApiService = googleapiclient.discovery.build(
334+
serviceName="cloudsupport",
335+
version=api_version,
336+
discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
337+
)
338+
request = (
339+
supportApiService.cases()
340+
.attachments()
341+
.list(parent="projects/some-project/cases/43595344")
342+
)
343+
print(request.execute())
315344
316345
.. code-block:: python
317346
@@ -345,9 +374,8 @@ async def sample_list_attachments():
345374
The request object. The request message for the
346375
ListAttachments endpoint.
347376
parent (:class:`str`):
348-
Required. The resource name of Case
349-
object for which attachments should be
350-
listed.
377+
Required. The name of the case for
378+
which attachments should be listed.
351379
352380
This corresponds to the ``parent`` field
353381
on the ``request`` instance; if ``request`` is provided, this

packages/google-cloud-support/google/cloud/support_v2/services/case_attachment_service/client.py

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def get_transport_class(
108108

109109

110110
class CaseAttachmentServiceClient(metaclass=CaseAttachmentServiceClientMeta):
111-
"""A service to manage file attachment for Google Cloud support
111+
"""A service to manage file attachments for Google Cloud support
112112
cases.
113113
"""
114114

@@ -747,8 +747,37 @@ def list_attachments(
747747
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
748748
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
749749
) -> pagers.ListAttachmentsPager:
750-
r"""Retrieve all attachments associated with a support
751-
case.
750+
r"""List all the attachments associated with a support case.
751+
752+
EXAMPLES:
753+
754+
cURL:
755+
756+
.. code:: shell
757+
758+
case="projects/some-project/cases/23598314"
759+
curl \
760+
--header "Authorization: Bearer $(gcloud auth print-access-token)" \
761+
"https://cloudsupport.googleapis.com/v2/$case/attachments"
762+
763+
Python:
764+
765+
.. code:: python
766+
767+
import googleapiclient.discovery
768+
769+
api_version = "v2"
770+
supportApiService = googleapiclient.discovery.build(
771+
serviceName="cloudsupport",
772+
version=api_version,
773+
discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
774+
)
775+
request = (
776+
supportApiService.cases()
777+
.attachments()
778+
.list(parent="projects/some-project/cases/43595344")
779+
)
780+
print(request.execute())
752781
753782
.. code-block:: python
754783
@@ -782,9 +811,8 @@ def sample_list_attachments():
782811
The request object. The request message for the
783812
ListAttachments endpoint.
784813
parent (str):
785-
Required. The resource name of Case
786-
object for which attachments should be
787-
listed.
814+
Required. The name of the case for
815+
which attachments should be listed.
788816
789817
This corresponds to the ``parent`` field
790818
on the ``request`` instance; if ``request`` is provided, this

packages/google-cloud-support/google/cloud/support_v2/services/case_attachment_service/transports/grpc.py

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def intercept_unary_unary(self, continuation, client_call_details, request):
110110
class CaseAttachmentServiceGrpcTransport(CaseAttachmentServiceTransport):
111111
"""gRPC backend transport for CaseAttachmentService.
112112
113-
A service to manage file attachment for Google Cloud support
113+
A service to manage file attachments for Google Cloud support
114114
cases.
115115
116116
This class defines the same methods as the primary client, so the
@@ -329,8 +329,37 @@ def list_attachments(
329329
]:
330330
r"""Return a callable for the list attachments method over gRPC.
331331
332-
Retrieve all attachments associated with a support
333-
case.
332+
List all the attachments associated with a support case.
333+
334+
EXAMPLES:
335+
336+
cURL:
337+
338+
.. code:: shell
339+
340+
case="projects/some-project/cases/23598314"
341+
curl \
342+
--header "Authorization: Bearer $(gcloud auth print-access-token)" \
343+
"https://cloudsupport.googleapis.com/v2/$case/attachments"
344+
345+
Python:
346+
347+
.. code:: python
348+
349+
import googleapiclient.discovery
350+
351+
api_version = "v2"
352+
supportApiService = googleapiclient.discovery.build(
353+
serviceName="cloudsupport",
354+
version=api_version,
355+
discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
356+
)
357+
request = (
358+
supportApiService.cases()
359+
.attachments()
360+
.list(parent="projects/some-project/cases/43595344")
361+
)
362+
print(request.execute())
334363
335364
Returns:
336365
Callable[[~.ListAttachmentsRequest],

0 commit comments

Comments
 (0)