@@ -30,13 +30,43 @@ option java_package = "com.google.cloud.support.v2";
30
30
option php_namespace = "Google\\Cloud\\Support\\V2" ;
31
31
option ruby_package = "Google::Cloud::Support::V2" ;
32
32
33
- // A service to manage file attachment for Google Cloud support cases.
33
+ // A service to manage file attachments for Google Cloud support cases.
34
34
service CaseAttachmentService {
35
35
option (google.api.default_host ) = "cloudsupport.googleapis.com" ;
36
36
option (google.api.oauth_scopes ) =
37
37
"https://www.googleapis.com/auth/cloud-platform" ;
38
38
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
+ // ```
40
70
rpc ListAttachments (ListAttachmentsRequest )
41
71
returns (ListAttachmentsResponse ) {
42
72
option (google.api.http ) = {
@@ -51,18 +81,22 @@ service CaseAttachmentService {
51
81
52
82
// The request message for the ListAttachments endpoint.
53
83
message 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.
56
85
string parent = 1 [
57
86
(google.api.field_behavior ) = REQUIRED ,
58
87
(google.api.resource_reference ) = {
59
88
type : "cloudsupport.googleapis.com/Case"
60
89
}
61
90
];
62
91
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.
66
100
int32 page_size = 2 ;
67
101
68
102
// A token identifying the page of results to return. If unspecified, the
@@ -72,11 +106,11 @@ message ListAttachmentsRequest {
72
106
73
107
// The response message for the ListAttachments endpoint.
74
108
message ListAttachmentsResponse {
75
- // The list of attachments associated with the given case.
109
+ // The list of attachments associated with a case.
76
110
repeated Attachment attachments = 1 ;
77
111
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.
81
115
string next_page_token = 2 ;
82
116
}
0 commit comments