Debian Codegraph @

docs/dyn/cloudsupport_v2.media.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="cloudsupport_v2.html">Google Cloud Support API</a> . <a href="cloudsupport_v2.media.html">media</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#close">close()</a></code></p>
79 <p class="firstline">Close httplib2 connections.</p>
80 <p class="toc_element">
81 <code><a href="#download">download(name, x__xgafv=None)</a></code></p>
82 <p class="firstline">Download a file attached to a case. When this endpoint is called, no "response body" will be returned. Instead, the attachment's blob will be returned. Note: HTTP requests must append "?alt=media" to the URL. EXAMPLES: cURL: ```shell name="projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$name:download?alt=media" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.media().download( name="projects/some-project/cases/43595344/attachments/0684M00000Pw6pHQAR" ) request.uri = request.uri.split("?")[0] + "?alt=media" print(request.execute()) ```</p>
83 <p class="toc_element">
84 <code><a href="#download_media">download_media(name, x__xgafv=None)</a></code></p>
85 <p class="firstline">Download a file attached to a case. When this endpoint is called, no "response body" will be returned. Instead, the attachment's blob will be returned. Note: HTTP requests must append "?alt=media" to the URL. EXAMPLES: cURL: ```shell name="projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$name:download?alt=media" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.media().download( name="projects/some-project/cases/43595344/attachments/0684M00000Pw6pHQAR" ) request.uri = request.uri.split("?")[0] + "?alt=media" print(request.execute()) ```</p>
86 <p class="toc_element">
87 <code><a href="#upload">upload(parent, body=None, media_body=None, media_mime_type=None, x__xgafv=None)</a></code></p>
88 <p class="firstline">Create a file attachment on a case or Cloud resource. The attachment must have the following fields set: `filename`. EXAMPLES: cURL: ```shell echo "This text is in a file I'm uploading using CSAPI." \ > "./example_file.txt" case="projects/some-project/cases/43594844" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --data-binary @"./example_file.txt" \ "https://cloudsupport.googleapis.com/upload/v2/$case/attachments?attachment.filename=uploaded_via_curl.txt" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) file_path = "./example_file.txt" with open(file_path, "w") as file: file.write( "This text is inside a file I'm going to upload using the Cloud Support API.", ) request = supportApiService.media().upload( parent="projects/some-project/cases/43595344", media_body=file_path ) request.uri = request.uri.split("?")[0] + "?attachment.filename=uploaded_via_python.txt" print(request.execute()) ```</p>
89 <h3>Method Details</h3>
90 <div class="method">
91 <code class="details" id="close">close()</code>
92 <pre>Close httplib2 connections.</pre>
93 </div>
94
95 <div class="method">
96 <code class="details" id="download">download(name, x__xgafv=None)</code>
97 <pre>Download a file attached to a case. When this endpoint is called, no &quot;response body&quot; will be returned. Instead, the attachment&#x27;s blob will be returned. Note: HTTP requests must append &quot;?alt=media&quot; to the URL. EXAMPLES: cURL: ```shell name=&quot;projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ&quot; curl \ --header &quot;Authorization: Bearer $(gcloud auth print-access-token)&quot; \ &quot;https://cloudsupport.googleapis.com/v2/$name:download?alt=media&quot; ``` Python: ```python import googleapiclient.discovery api_version = &quot;v2&quot; supportApiService = googleapiclient.discovery.build( serviceName=&quot;cloudsupport&quot;, version=api_version, discoveryServiceUrl=f&quot;https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}&quot;, ) request = supportApiService.media().download( name=&quot;projects/some-project/cases/43595344/attachments/0684M00000Pw6pHQAR&quot; ) request.uri = request.uri.split(&quot;?&quot;)[0] + &quot;?alt=media&quot; print(request.execute()) ```
98
99 Args:
100 name: string, The name of the file attachment to download. (required)
101 x__xgafv: string, V1 error format.
102 Allowed values
103 1 - v1 error format
104 2 - v2 error format
105
106 Returns:
107 An object of the form:
108
109 { # # gdata.* are outside protos with mising documentation
110 &quot;algorithm&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
111 &quot;bigstoreObjectRef&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
112 &quot;blobRef&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
113 &quot;blobstore2Info&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
114 &quot;blobGeneration&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
115 &quot;blobId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
116 &quot;downloadExternalReadToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
117 &quot;downloadReadHandle&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
118 &quot;readToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
119 &quot;uploadFragmentListCreationInfo&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
120 &quot;uploadMetadataContainer&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
121 },
122 &quot;compositeMedia&quot;: [ # # gdata.* are outside protos with mising documentation
123 { # # gdata.* are outside protos with mising documentation
124 &quot;blobRef&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
125 &quot;blobstore2Info&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
126 &quot;blobGeneration&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
127 &quot;blobId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
128 &quot;downloadExternalReadToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
129 &quot;downloadReadHandle&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
130 &quot;readToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
131 &quot;uploadFragmentListCreationInfo&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
132 &quot;uploadMetadataContainer&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
133 },
134 &quot;cosmoBinaryReference&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
135 &quot;crc32cHash&quot;: 42, # # gdata.* are outside protos with mising documentation
136 &quot;inline&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
137 &quot;length&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
138 &quot;md5Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
139 &quot;objectId&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
140 &quot;bucketName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
141 &quot;generation&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
142 &quot;objectName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
143 },
144 &quot;path&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
145 &quot;referenceType&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
146 &quot;sha1Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
147 },
148 ],
149 &quot;contentType&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
150 &quot;contentTypeInfo&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
151 &quot;bestGuess&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
152 &quot;fromBytes&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
153 &quot;fromFileName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
154 &quot;fromFusionId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
155 &quot;fromHeader&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
156 &quot;fromUrlPath&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
157 &quot;fusionIdDetectionMetadata&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
158 },
159 &quot;cosmoBinaryReference&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
160 &quot;crc32cHash&quot;: 42, # # gdata.* are outside protos with mising documentation
161 &quot;diffChecksumsResponse&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
162 &quot;checksumsLocation&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
163 &quot;blobRef&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
164 &quot;blobstore2Info&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
165 &quot;blobGeneration&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
166 &quot;blobId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
167 &quot;downloadExternalReadToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
168 &quot;downloadReadHandle&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
169 &quot;readToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
170 &quot;uploadFragmentListCreationInfo&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
171 &quot;uploadMetadataContainer&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
172 },
173 &quot;cosmoBinaryReference&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
174 &quot;crc32cHash&quot;: 42, # # gdata.* are outside protos with mising documentation
175 &quot;inline&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
176 &quot;length&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
177 &quot;md5Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
178 &quot;objectId&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
179 &quot;bucketName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
180 &quot;generation&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
181 &quot;objectName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
182 },
183 &quot;path&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
184 &quot;referenceType&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
185 &quot;sha1Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
186 },
187 &quot;chunkSizeBytes&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
188 &quot;objectLocation&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
189 &quot;blobRef&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
190 &quot;blobstore2Info&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
191 &quot;blobGeneration&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
192 &quot;blobId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
193 &quot;downloadExternalReadToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
194 &quot;downloadReadHandle&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
195 &quot;readToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
196 &quot;uploadFragmentListCreationInfo&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
197 &quot;uploadMetadataContainer&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
198 },
199 &quot;cosmoBinaryReference&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
200 &quot;crc32cHash&quot;: 42, # # gdata.* are outside protos with mising documentation
201 &quot;inline&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
202 &quot;length&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
203 &quot;md5Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
204 &quot;objectId&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
205 &quot;bucketName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
206 &quot;generation&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
207 &quot;objectName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
208 },
209 &quot;path&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
210 &quot;referenceType&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
211 &quot;sha1Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
212 },
213 &quot;objectSizeBytes&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
214 &quot;objectVersion&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
215 },
216 &quot;diffDownloadResponse&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
217 &quot;objectLocation&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
218 &quot;blobRef&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
219 &quot;blobstore2Info&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
220 &quot;blobGeneration&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
221 &quot;blobId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
222 &quot;downloadExternalReadToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
223 &quot;downloadReadHandle&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
224 &quot;readToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
225 &quot;uploadFragmentListCreationInfo&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
226 &quot;uploadMetadataContainer&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
227 },
228 &quot;cosmoBinaryReference&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
229 &quot;crc32cHash&quot;: 42, # # gdata.* are outside protos with mising documentation
230 &quot;inline&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
231 &quot;length&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
232 &quot;md5Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
233 &quot;objectId&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
234 &quot;bucketName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
235 &quot;generation&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
236 &quot;objectName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
237 },
238 &quot;path&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
239 &quot;referenceType&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
240 &quot;sha1Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
241 },
242 },
243 &quot;diffUploadRequest&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
244 &quot;checksumsInfo&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
245 &quot;blobRef&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
246 &quot;blobstore2Info&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
247 &quot;blobGeneration&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
248 &quot;blobId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
249 &quot;downloadExternalReadToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
250 &quot;downloadReadHandle&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
251 &quot;readToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
252 &quot;uploadFragmentListCreationInfo&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
253 &quot;uploadMetadataContainer&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
254 },
255 &quot;cosmoBinaryReference&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
256 &quot;crc32cHash&quot;: 42, # # gdata.* are outside protos with mising documentation
257 &quot;inline&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
258 &quot;length&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
259 &quot;md5Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
260 &quot;objectId&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
261 &quot;bucketName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
262 &quot;generation&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
263 &quot;objectName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
264 },
265 &quot;path&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
266 &quot;referenceType&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
267 &quot;sha1Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
268 },
269 &quot;objectInfo&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
270 &quot;blobRef&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
271 &quot;blobstore2Info&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
272 &quot;blobGeneration&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
273 &quot;blobId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
274 &quot;downloadExternalReadToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
275 &quot;downloadReadHandle&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
276 &quot;readToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
277 &quot;uploadFragmentListCreationInfo&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
278 &quot;uploadMetadataContainer&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
279 },
280 &quot;cosmoBinaryReference&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
281 &quot;crc32cHash&quot;: 42, # # gdata.* are outside protos with mising documentation
282 &quot;inline&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
283 &quot;length&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
284 &quot;md5Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
285 &quot;objectId&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
286 &quot;bucketName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
287 &quot;generation&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
288 &quot;objectName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
289 },
290 &quot;path&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
291 &quot;referenceType&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
292 &quot;sha1Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
293 },
294 &quot;objectVersion&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
295 },
296 &quot;diffUploadResponse&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
297 &quot;objectVersion&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
298 &quot;originalObject&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
299 &quot;blobRef&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
300 &quot;blobstore2Info&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
301 &quot;blobGeneration&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
302 &quot;blobId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
303 &quot;downloadExternalReadToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
304 &quot;downloadReadHandle&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
305 &quot;readToken&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
306 &quot;uploadFragmentListCreationInfo&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
307 &quot;uploadMetadataContainer&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
308 },
309 &quot;cosmoBinaryReference&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
310 &quot;crc32cHash&quot;: 42, # # gdata.* are outside protos with mising documentation
311 &quot;inline&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
312 &quot;length&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
313 &quot;md5Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
314 &quot;objectId&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
315 &quot;bucketName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
316 &quot;generation&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
317 &quot;objectName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
318 },
319 &quot;path&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
320 &quot;referenceType&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
321 &quot;sha1Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
322 },
323 },
324 &quot;diffVersionResponse&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
325 &quot;objectSizeBytes&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
326 &quot;objectVersion&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
327 },
328 &quot;downloadParameters&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
329 &quot;allowGzipCompression&quot;: True or False, # # gdata.* are outside protos with mising documentation
330 &quot;ignoreRange&quot;: True or False, # # gdata.* are outside protos with mising documentation
331 },
332 &quot;filename&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
333 &quot;hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
334 &quot;hashVerified&quot;: True or False, # # gdata.* are outside protos with mising documentation
335 &quot;inline&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
336 &quot;isPotentialRetry&quot;: True or False, # # gdata.* are outside protos with mising documentation
337 &quot;length&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
338 &quot;md5Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
339 &quot;mediaId&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
340 &quot;objectId&quot;: { # # gdata.* are outside protos with mising documentation # # gdata.* are outside protos with mising documentation
341 &quot;bucketName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
342 &quot;generation&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
343 &quot;objectName&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
344 },
345 &quot;path&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
346 &quot;referenceType&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
347 &quot;sha1Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
348 &quot;sha256Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
349 &quot;sha512Hash&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
350 &quot;timestamp&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
351 &quot;token&quot;: &quot;A String&quot;, # # gdata.* are outside protos with mising documentation
352 }</pre>
353 </div>
354
355 <div class="method">
356 <code class="details" id="download_media">download_media(name, x__xgafv=None)</code>
357 <pre>Download a file attached to a case. When this endpoint is called, no &quot;response body&quot; will be returned. Instead, the attachment&#x27;s blob will be returned. Note: HTTP requests must append &quot;?alt=media&quot; to the URL. EXAMPLES: cURL: ```shell name=&quot;projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ&quot; curl \ --header &quot;Authorization: Bearer $(gcloud auth print-access-token)&quot; \ &quot;https://cloudsupport.googleapis.com/v2/$name:download?alt=media&quot; ``` Python: ```python import googleapiclient.discovery api_version = &quot;v2&quot; supportApiService = googleapiclient.discovery.build( serviceName=&quot;cloudsupport&quot;, version=api_version, discoveryServiceUrl=f&quot;https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}&quot;, ) request = supportApiService.media().download( name=&quot;projects/some-project/cases/43595344/attachments/0684M00000Pw6pHQAR&quot; ) request.uri = request.uri.split(&quot;?&quot;)[0] + &quot;?alt=media&quot; print(request.execute()) ```
358
359 Args:
360 name: string, The name of the file attachment to download. (required)
361 x__xgafv: string, V1 error format.
362 Allowed values
363 1 - v1 error format
364 2 - v2 error format
365
366 Returns:
367 The media object as a string.
368
369 </pre>
370 </div>
371
372 <div class="method">
373 <code class="details" id="upload">upload(parent, body=None, media_body=None, media_mime_type=None, x__xgafv=None)</code>
374 <pre>Create a file attachment on a case or Cloud resource. The attachment must have the following fields set: `filename`. EXAMPLES: cURL: ```shell echo &quot;This text is in a file I&#x27;m uploading using CSAPI.&quot; \ &gt; &quot;./example_file.txt&quot; case=&quot;projects/some-project/cases/43594844&quot; curl \ --header &quot;Authorization: Bearer $(gcloud auth print-access-token)&quot; \ --data-binary @&quot;./example_file.txt&quot; \ &quot;https://cloudsupport.googleapis.com/upload/v2/$case/attachments?attachment.filename=uploaded_via_curl.txt&quot; ``` Python: ```python import googleapiclient.discovery api_version = &quot;v2&quot; supportApiService = googleapiclient.discovery.build( serviceName=&quot;cloudsupport&quot;, version=api_version, discoveryServiceUrl=f&quot;https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}&quot;, ) file_path = &quot;./example_file.txt&quot; with open(file_path, &quot;w&quot;) as file: file.write( &quot;This text is inside a file I&#x27;m going to upload using the Cloud Support API.&quot;, ) request = supportApiService.media().upload( parent=&quot;projects/some-project/cases/43595344&quot;, media_body=file_path ) request.uri = request.uri.split(&quot;?&quot;)[0] + &quot;?attachment.filename=uploaded_via_python.txt&quot; print(request.execute()) ```
375
376 Args:
377 parent: string, Required. The name of the case or Cloud resource to which the attachment should be attached. (required)
378 body: object, The request body.
379 The object takes the form of:
380
381 { # The request message for the CreateAttachment endpoint.
382 &quot;attachment&quot;: { # An Attachment contains metadata about a file that was uploaded to a case - it is NOT a file itself. That being said, the name of an Attachment object can be used to download its accompanying file through the `media.download` endpoint. While attachments can be uploaded in the console at the same time as a comment, they&#x27;re associated on a &quot;case&quot; level, not a &quot;comment&quot; level. # Required. The attachment to be created.
383 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the attachment was created.
384 &quot;creator&quot;: { # An Actor represents an entity that performed an action. For example, an actor could be a user who posted a comment on a support case, a user who uploaded an attachment, or a service account that created a support case. # Output only. The user who uploaded the attachment. Note, the name and email will be obfuscated if the attachment was uploaded by Google support.
385 &quot;displayName&quot;: &quot;A String&quot;, # The name to display for the actor. If not provided, it is inferred from credentials supplied during case creation. When an email is provided, a display name must also be provided. This will be obfuscated if the user is a Google Support agent.
386 &quot;email&quot;: &quot;A String&quot;, # The email address of the actor. If not provided, it is inferred from the credentials supplied during case creation. When a name is provided, an email must also be provided. If the user is a Google Support agent, this is obfuscated. This field is deprecated. Use `username` instead.
387 &quot;googleSupport&quot;: True or False, # Output only. Whether the actor is a Google support actor.
388 &quot;username&quot;: &quot;A String&quot;, # Output only. The username of the actor. It may look like an email or other format provided by the identity provider. If not provided, it is inferred from the credentials supplied. When a name is provided, a username must also be provided. If the user is a Google Support agent, this will not be set.
389 },
390 &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment (e.g. `&quot;graph.jpg&quot;`).
391 &quot;mimeType&quot;: &quot;A String&quot;, # Output only. The MIME type of the attachment (e.g. text/plain).
392 &quot;name&quot;: &quot;A String&quot;, # Output only. Identifier. The resource name of the attachment.
393 &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. The size of the attachment in bytes.
394 },
395 }
396
397 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
398 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
399 x__xgafv: string, V1 error format.
400 Allowed values
401 1 - v1 error format
402 2 - v2 error format
403
404 Returns:
405 An object of the form:
406
407 { # An Attachment contains metadata about a file that was uploaded to a case - it is NOT a file itself. That being said, the name of an Attachment object can be used to download its accompanying file through the `media.download` endpoint. While attachments can be uploaded in the console at the same time as a comment, they&#x27;re associated on a &quot;case&quot; level, not a &quot;comment&quot; level.
408 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the attachment was created.
409 &quot;creator&quot;: { # An Actor represents an entity that performed an action. For example, an actor could be a user who posted a comment on a support case, a user who uploaded an attachment, or a service account that created a support case. # Output only. The user who uploaded the attachment. Note, the name and email will be obfuscated if the attachment was uploaded by Google support.
410 &quot;displayName&quot;: &quot;A String&quot;, # The name to display for the actor. If not provided, it is inferred from credentials supplied during case creation. When an email is provided, a display name must also be provided. This will be obfuscated if the user is a Google Support agent.
411 &quot;email&quot;: &quot;A String&quot;, # The email address of the actor. If not provided, it is inferred from the credentials supplied during case creation. When a name is provided, an email must also be provided. If the user is a Google Support agent, this is obfuscated. This field is deprecated. Use `username` instead.
412 &quot;googleSupport&quot;: True or False, # Output only. Whether the actor is a Google support actor.
413 &quot;username&quot;: &quot;A String&quot;, # Output only. The username of the actor. It may look like an email or other format provided by the identity provider. If not provided, it is inferred from the credentials supplied. When a name is provided, a username must also be provided. If the user is a Google Support agent, this will not be set.
414 },
415 &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment (e.g. `&quot;graph.jpg&quot;`).
416 &quot;mimeType&quot;: &quot;A String&quot;, # Output only. The MIME type of the attachment (e.g. text/plain).
417 &quot;name&quot;: &quot;A String&quot;, # Output only. Identifier. The resource name of the attachment.
418 &quot;sizeBytes&quot;: &quot;A String&quot;, # Output only. The size of the attachment in bytes.
419 }</pre>
420 </div>
421
422 </body></html>