@@ -30,13 +30,43 @@ option java_package = "com.google.cloud.support.v2";
3030option php_namespace = "Google\\Cloud\\Support\\V2" ;
3131option ruby_package = "Google::Cloud::Support::V2" ;
3232
33- // A service to manage file attachment for Google Cloud support cases.
33+ // A service to manage file attachments for Google Cloud support cases.
3434service CaseAttachmentService {
3535 option (google.api.default_host ) = "cloudsupport.googleapis.com" ;
3636 option (google.api.oauth_scopes ) =
3737 "https://www.googleapis.com/auth/cloud-platform" ;
3838
39- // Retrieve all attachments associated with a support case.
39+ // List all the attachments associated with a support case.
40+ //
41+ // EXAMPLES:
42+ //
43+ // cURL:
44+ //
45+ // ```shell
46+ // case="projects/some-project/cases/23598314"
47+ // curl \
48+ // --header "Authorization: Bearer $(gcloud auth print-access-token)" \
49+ // "https://cloudsupport.googleapis.com/v2/$case/attachments"
50+ // ```
51+ //
52+ // Python:
53+ //
54+ // ```python
55+ // import googleapiclient.discovery
56+ //
57+ // api_version = "v2"
58+ // supportApiService = googleapiclient.discovery.build(
59+ // serviceName="cloudsupport",
60+ // version=api_version,
61+ // discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
62+ // )
63+ // request = (
64+ // supportApiService.cases()
65+ // .attachments()
66+ // .list(parent="projects/some-project/cases/43595344")
67+ // )
68+ // print(request.execute())
69+ // ```
4070 rpc ListAttachments (ListAttachmentsRequest )
4171 returns (ListAttachmentsResponse ) {
4272 option (google.api.http ) = {
@@ -51,18 +81,22 @@ service CaseAttachmentService {
5181
5282// The request message for the ListAttachments endpoint.
5383message ListAttachmentsRequest {
54- // Required. The resource name of Case object for which attachments should be
55- // listed.
84+ // Required. The name of the case for which attachments should be listed.
5685 string parent = 1 [
5786 (google.api.field_behavior ) = REQUIRED ,
5887 (google.api.resource_reference ) = {
5988 type : "cloudsupport.googleapis.com/Case"
6089 }
6190 ];
6291
63- // The maximum number of attachments fetched with each request. If not
64- // provided, the default is 10. The maximum page size that will be returned is
65- // 100.
92+ // The maximum number of attachments fetched with each request.
93+ //
94+ // If not provided, the default is 10. The maximum page size that will be
95+ // returned is 100.
96+ //
97+ // The size of each page can be smaller than the requested page size and can
98+ // include zero. For example, you could request 100 attachments on one page,
99+ // receive 0, and then on the next page, receive 90.
66100 int32 page_size = 2 ;
67101
68102 // A token identifying the page of results to return. If unspecified, the
@@ -72,11 +106,11 @@ message ListAttachmentsRequest {
72106
73107// The response message for the ListAttachments endpoint.
74108message ListAttachmentsResponse {
75- // The list of attachments associated with the given case.
109+ // The list of attachments associated with a case.
76110 repeated Attachment attachments = 1 ;
77111
78- // A token to retrieve the next page of results. This should be set in the
79- // `page_token` field of subsequent `cases.attachments.list` requests. If
80- // unspecified, there are no more results to retrieve.
112+ // A token to retrieve the next page of results. Set this in the `page_token`
113+ // field of subsequent `cases.attachments.list` requests. If unspecified,
114+ // there are no more results to retrieve.
81115 string next_page_token = 2 ;
82116}
0 commit comments