Skip to content

Commit f8e2f88

Browse files
feat(cloudsupport): update the API
#### cloudsupport:v2beta The following keys were added: - resources.cases.resources.attachments.methods.get.description - resources.cases.resources.attachments.methods.get.flatPath - resources.cases.resources.attachments.methods.get.httpMethod - resources.cases.resources.attachments.methods.get.id - resources.cases.resources.attachments.methods.get.parameterOrder - resources.cases.resources.attachments.methods.get.parameters.name.description - resources.cases.resources.attachments.methods.get.parameters.name.location - resources.cases.resources.attachments.methods.get.parameters.name.pattern - resources.cases.resources.attachments.methods.get.parameters.name.required - resources.cases.resources.attachments.methods.get.parameters.name.type - resources.cases.resources.attachments.methods.get.path - resources.cases.resources.attachments.methods.get.response.$ref - resources.cases.resources.attachments.methods.get.scopes - resources.cases.resources.comments.methods.get.description - resources.cases.resources.comments.methods.get.flatPath - resources.cases.resources.comments.methods.get.httpMethod - resources.cases.resources.comments.methods.get.id - resources.cases.resources.comments.methods.get.parameterOrder - resources.cases.resources.comments.methods.get.parameters.name.description - resources.cases.resources.comments.methods.get.parameters.name.location - resources.cases.resources.comments.methods.get.parameters.name.pattern - resources.cases.resources.comments.methods.get.parameters.name.required - resources.cases.resources.comments.methods.get.parameters.name.type - resources.cases.resources.comments.methods.get.path - resources.cases.resources.comments.methods.get.response.$ref - resources.cases.resources.comments.methods.get.scopes
1 parent fbe6ee7 commit f8e2f88

File tree

2 files changed

+342
-1
lines changed

2 files changed

+342
-1
lines changed

discovery/cloudsupport-v2beta.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,31 @@
439439
"resources": {
440440
"attachments": {
441441
"methods": {
442+
"get": {
443+
"description": "Retrieve an attachment associated with a support case. EXAMPLES: cURL: ```shell attachment=\"projects/some-project/cases/23598314/attachments/0684M00000P3h1fQAB\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$attachment\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2beta\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) request = ( supportApiService.cases() .attachments() .get(name=\"projects/some-project/cases/43595344/attachments/0684M00000P3h1fQAB\") ) print(request.execute()) ```",
444+
"flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}/attachments/{attachmentsId}",
445+
"httpMethod": "GET",
446+
"id": "cloudsupport.cases.attachments.get",
447+
"parameterOrder": [
448+
"name"
449+
],
450+
"parameters": {
451+
"name": {
452+
"description": "Required. The name of the attachment to get.",
453+
"location": "path",
454+
"pattern": "^[^/]+/[^/]+/cases/[^/]+/attachments/[^/]+$",
455+
"required": true,
456+
"type": "string"
457+
}
458+
},
459+
"path": "v2beta/{+name}",
460+
"response": {
461+
"$ref": "Attachment"
462+
},
463+
"scopes": [
464+
"https://www.googleapis.com/auth/cloud-platform"
465+
]
466+
},
442467
"list": {
443468
"description": "List all the attachments associated with a support case. EXAMPLES: cURL: ```shell case=\"projects/some-project/cases/23598314\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case/attachments\" ``` 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.cases() .attachments() .list(parent=\"projects/some-project/cases/43595344\") ) print(request.execute()) ```",
444469
"flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}/attachments",
@@ -507,6 +532,31 @@
507532
"https://www.googleapis.com/auth/cloud-platform"
508533
]
509534
},
535+
"get": {
536+
"description": "Retrieve a comment. EXAMPLES: cURL: ```shell comment=\"projects/some-project/cases/43595344/comments/234567890\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$comment\" ``` Python: ```python import googleapiclient.discovery api_version = \"v2beta\" supportApiService = googleapiclient.discovery.build( serviceName=\"cloudsupport\", version=api_version, discoveryServiceUrl=f\"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}\", ) request = supportApiService.cases().comments().get( name=\"projects/some-project/cases/43595344/comments/234567890\", ) print(request.execute()) ```",
537+
"flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}/comments/{commentsId}",
538+
"httpMethod": "GET",
539+
"id": "cloudsupport.cases.comments.get",
540+
"parameterOrder": [
541+
"name"
542+
],
543+
"parameters": {
544+
"name": {
545+
"description": "Required. The name of the comment to retrieve.",
546+
"location": "path",
547+
"pattern": "^[^/]+/[^/]+/cases/[^/]+/comments/[^/]+$",
548+
"required": true,
549+
"type": "string"
550+
}
551+
},
552+
"path": "v2beta/{+name}",
553+
"response": {
554+
"$ref": "Comment"
555+
},
556+
"scopes": [
557+
"https://www.googleapis.com/auth/cloud-platform"
558+
]
559+
},
510560
"list": {
511561
"description": "List all the comments associated with a case. EXAMPLES: cURL: ```shell case=\"projects/some-project/cases/43595344\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case/comments\" ``` 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.cases() .comments() .list(parent=\"projects/some-project/cases/43595344\") ) print(request.execute()) ```",
512562
"flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}/comments",
@@ -619,7 +669,7 @@
619669
}
620670
}
621671
},
622-
"revision": "20250609",
672+
"revision": "20250806",
623673
"rootUrl": "https://cloudsupport.googleapis.com/",
624674
"schemas": {
625675
"Actor": {

src/apis/cloudsupport/v2beta.ts

Lines changed: 291 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2363,6 +2363,145 @@ export namespace cloudsupport_v2beta {
23632363
this.context = context;
23642364
}
23652365

2366+
/**
2367+
* Retrieve an attachment associated with a support case. EXAMPLES: cURL: ```shell attachment="projects/some-project/cases/23598314/attachments/0684M00000P3h1fQAB" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$attachment" ``` Python: ```python import googleapiclient.discovery api_version = "v2beta" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version\}", ) request = ( supportApiService.cases() .attachments() .get(name="projects/some-project/cases/43595344/attachments/0684M00000P3h1fQAB") ) print(request.execute()) ```
2368+
* @example
2369+
* ```js
2370+
* // Before running the sample:
2371+
* // - Enable the API at:
2372+
* // https://console.developers.google.com/apis/api/cloudsupport.googleapis.com
2373+
* // - Login into gcloud by running:
2374+
* // ```sh
2375+
* // $ gcloud auth application-default login
2376+
* // ```
2377+
* // - Install the npm module by running:
2378+
* // ```sh
2379+
* // $ npm install googleapis
2380+
* // ```
2381+
*
2382+
* const {google} = require('googleapis');
2383+
* const cloudsupport = google.cloudsupport('v2beta');
2384+
*
2385+
* async function main() {
2386+
* const auth = new google.auth.GoogleAuth({
2387+
* // Scopes can be specified either as an array or as a single, space-delimited string.
2388+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2389+
* });
2390+
*
2391+
* // Acquire an auth client, and bind it to all future calls
2392+
* const authClient = await auth.getClient();
2393+
* google.options({auth: authClient});
2394+
*
2395+
* // Do the magic
2396+
* const res = await cloudsupport.cases.attachments.get({
2397+
* // Required. The name of the attachment to get.
2398+
* name: '[^/]+/[^/]+/cases/my-case/attachments/my-attachment',
2399+
* });
2400+
* console.log(res.data);
2401+
*
2402+
* // Example response
2403+
* // {
2404+
* // "createTime": "my_createTime",
2405+
* // "creator": {},
2406+
* // "filename": "my_filename",
2407+
* // "mimeType": "my_mimeType",
2408+
* // "name": "my_name",
2409+
* // "sizeBytes": "my_sizeBytes"
2410+
* // }
2411+
* }
2412+
*
2413+
* main().catch(e => {
2414+
* console.error(e);
2415+
* throw e;
2416+
* });
2417+
*
2418+
* ```
2419+
*
2420+
* @param params - Parameters for request
2421+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2422+
* @param callback - Optional callback that handles the response.
2423+
* @returns A promise if used with async/await, or void if used with a callback.
2424+
*/
2425+
get(
2426+
params: Params$Resource$Cases$Attachments$Get,
2427+
options: StreamMethodOptions
2428+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
2429+
get(
2430+
params?: Params$Resource$Cases$Attachments$Get,
2431+
options?: MethodOptions
2432+
): Promise<GaxiosResponseWithHTTP2<Schema$Attachment>>;
2433+
get(
2434+
params: Params$Resource$Cases$Attachments$Get,
2435+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
2436+
callback: BodyResponseCallback<Readable>
2437+
): void;
2438+
get(
2439+
params: Params$Resource$Cases$Attachments$Get,
2440+
options: MethodOptions | BodyResponseCallback<Schema$Attachment>,
2441+
callback: BodyResponseCallback<Schema$Attachment>
2442+
): void;
2443+
get(
2444+
params: Params$Resource$Cases$Attachments$Get,
2445+
callback: BodyResponseCallback<Schema$Attachment>
2446+
): void;
2447+
get(callback: BodyResponseCallback<Schema$Attachment>): void;
2448+
get(
2449+
paramsOrCallback?:
2450+
| Params$Resource$Cases$Attachments$Get
2451+
| BodyResponseCallback<Schema$Attachment>
2452+
| BodyResponseCallback<Readable>,
2453+
optionsOrCallback?:
2454+
| MethodOptions
2455+
| StreamMethodOptions
2456+
| BodyResponseCallback<Schema$Attachment>
2457+
| BodyResponseCallback<Readable>,
2458+
callback?:
2459+
| BodyResponseCallback<Schema$Attachment>
2460+
| BodyResponseCallback<Readable>
2461+
):
2462+
| void
2463+
| Promise<GaxiosResponseWithHTTP2<Schema$Attachment>>
2464+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
2465+
let params = (paramsOrCallback ||
2466+
{}) as Params$Resource$Cases$Attachments$Get;
2467+
let options = (optionsOrCallback || {}) as MethodOptions;
2468+
2469+
if (typeof paramsOrCallback === 'function') {
2470+
callback = paramsOrCallback;
2471+
params = {} as Params$Resource$Cases$Attachments$Get;
2472+
options = {};
2473+
}
2474+
2475+
if (typeof optionsOrCallback === 'function') {
2476+
callback = optionsOrCallback;
2477+
options = {};
2478+
}
2479+
2480+
const rootUrl = options.rootUrl || 'https://cloudsupport.googleapis.com/';
2481+
const parameters = {
2482+
options: Object.assign(
2483+
{
2484+
url: (rootUrl + '/v2beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
2485+
method: 'GET',
2486+
apiVersion: '',
2487+
},
2488+
options
2489+
),
2490+
params,
2491+
requiredParams: ['name'],
2492+
pathParams: ['name'],
2493+
context: this.context,
2494+
};
2495+
if (callback) {
2496+
createAPIRequest<Schema$Attachment>(
2497+
parameters,
2498+
callback as BodyResponseCallback<unknown>
2499+
);
2500+
} else {
2501+
return createAPIRequest<Schema$Attachment>(parameters);
2502+
}
2503+
}
2504+
23662505
/**
23672506
* List all the attachments associated with a support case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/23598314" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/attachments" ``` 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.cases() .attachments() .list(parent="projects/some-project/cases/43595344") ) print(request.execute()) ```
23682507
* @example
@@ -2508,6 +2647,13 @@ export namespace cloudsupport_v2beta {
25082647
}
25092648
}
25102649

2650+
export interface Params$Resource$Cases$Attachments$Get
2651+
extends StandardParameters {
2652+
/**
2653+
* Required. The name of the attachment to get.
2654+
*/
2655+
name?: string;
2656+
}
25112657
export interface Params$Resource$Cases$Attachments$List
25122658
extends StandardParameters {
25132659
/**
@@ -2683,6 +2829,144 @@ export namespace cloudsupport_v2beta {
26832829
}
26842830
}
26852831

2832+
/**
2833+
* Retrieve a comment. EXAMPLES: cURL: ```shell comment="projects/some-project/cases/43595344/comments/234567890" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$comment" ``` Python: ```python import googleapiclient.discovery api_version = "v2beta" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version\}", ) request = supportApiService.cases().comments().get( name="projects/some-project/cases/43595344/comments/234567890", ) print(request.execute()) ```
2834+
* @example
2835+
* ```js
2836+
* // Before running the sample:
2837+
* // - Enable the API at:
2838+
* // https://console.developers.google.com/apis/api/cloudsupport.googleapis.com
2839+
* // - Login into gcloud by running:
2840+
* // ```sh
2841+
* // $ gcloud auth application-default login
2842+
* // ```
2843+
* // - Install the npm module by running:
2844+
* // ```sh
2845+
* // $ npm install googleapis
2846+
* // ```
2847+
*
2848+
* const {google} = require('googleapis');
2849+
* const cloudsupport = google.cloudsupport('v2beta');
2850+
*
2851+
* async function main() {
2852+
* const auth = new google.auth.GoogleAuth({
2853+
* // Scopes can be specified either as an array or as a single, space-delimited string.
2854+
* scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2855+
* });
2856+
*
2857+
* // Acquire an auth client, and bind it to all future calls
2858+
* const authClient = await auth.getClient();
2859+
* google.options({auth: authClient});
2860+
*
2861+
* // Do the magic
2862+
* const res = await cloudsupport.cases.comments.get({
2863+
* // Required. The name of the comment to retrieve.
2864+
* name: '[^/]+/[^/]+/cases/my-case/comments/my-comment',
2865+
* });
2866+
* console.log(res.data);
2867+
*
2868+
* // Example response
2869+
* // {
2870+
* // "body": "my_body",
2871+
* // "createTime": "my_createTime",
2872+
* // "creator": {},
2873+
* // "name": "my_name",
2874+
* // "plainTextBody": "my_plainTextBody"
2875+
* // }
2876+
* }
2877+
*
2878+
* main().catch(e => {
2879+
* console.error(e);
2880+
* throw e;
2881+
* });
2882+
*
2883+
* ```
2884+
*
2885+
* @param params - Parameters for request
2886+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
2887+
* @param callback - Optional callback that handles the response.
2888+
* @returns A promise if used with async/await, or void if used with a callback.
2889+
*/
2890+
get(
2891+
params: Params$Resource$Cases$Comments$Get,
2892+
options: StreamMethodOptions
2893+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
2894+
get(
2895+
params?: Params$Resource$Cases$Comments$Get,
2896+
options?: MethodOptions
2897+
): Promise<GaxiosResponseWithHTTP2<Schema$Comment>>;
2898+
get(
2899+
params: Params$Resource$Cases$Comments$Get,
2900+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
2901+
callback: BodyResponseCallback<Readable>
2902+
): void;
2903+
get(
2904+
params: Params$Resource$Cases$Comments$Get,
2905+
options: MethodOptions | BodyResponseCallback<Schema$Comment>,
2906+
callback: BodyResponseCallback<Schema$Comment>
2907+
): void;
2908+
get(
2909+
params: Params$Resource$Cases$Comments$Get,
2910+
callback: BodyResponseCallback<Schema$Comment>
2911+
): void;
2912+
get(callback: BodyResponseCallback<Schema$Comment>): void;
2913+
get(
2914+
paramsOrCallback?:
2915+
| Params$Resource$Cases$Comments$Get
2916+
| BodyResponseCallback<Schema$Comment>
2917+
| BodyResponseCallback<Readable>,
2918+
optionsOrCallback?:
2919+
| MethodOptions
2920+
| StreamMethodOptions
2921+
| BodyResponseCallback<Schema$Comment>
2922+
| BodyResponseCallback<Readable>,
2923+
callback?:
2924+
| BodyResponseCallback<Schema$Comment>
2925+
| BodyResponseCallback<Readable>
2926+
):
2927+
| void
2928+
| Promise<GaxiosResponseWithHTTP2<Schema$Comment>>
2929+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
2930+
let params = (paramsOrCallback ||
2931+
{}) as Params$Resource$Cases$Comments$Get;
2932+
let options = (optionsOrCallback || {}) as MethodOptions;
2933+
2934+
if (typeof paramsOrCallback === 'function') {
2935+
callback = paramsOrCallback;
2936+
params = {} as Params$Resource$Cases$Comments$Get;
2937+
options = {};
2938+
}
2939+
2940+
if (typeof optionsOrCallback === 'function') {
2941+
callback = optionsOrCallback;
2942+
options = {};
2943+
}
2944+
2945+
const rootUrl = options.rootUrl || 'https://cloudsupport.googleapis.com/';
2946+
const parameters = {
2947+
options: Object.assign(
2948+
{
2949+
url: (rootUrl + '/v2beta/{+name}').replace(/([^:]\/)\/+/g, '$1'),
2950+
method: 'GET',
2951+
apiVersion: '',
2952+
},
2953+
options
2954+
),
2955+
params,
2956+
requiredParams: ['name'],
2957+
pathParams: ['name'],
2958+
context: this.context,
2959+
};
2960+
if (callback) {
2961+
createAPIRequest<Schema$Comment>(
2962+
parameters,
2963+
callback as BodyResponseCallback<unknown>
2964+
);
2965+
} else {
2966+
return createAPIRequest<Schema$Comment>(parameters);
2967+
}
2968+
}
2969+
26862970
/**
26872971
* List all the comments associated with a case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/comments" ``` 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.cases() .comments() .list(parent="projects/some-project/cases/43595344") ) print(request.execute()) ```
26882972
* @example
@@ -2840,6 +3124,13 @@ export namespace cloudsupport_v2beta {
28403124
*/
28413125
requestBody?: Schema$Comment;
28423126
}
3127+
export interface Params$Resource$Cases$Comments$Get
3128+
extends StandardParameters {
3129+
/**
3130+
* Required. The name of the comment to retrieve.
3131+
*/
3132+
name?: string;
3133+
}
28433134
export interface Params$Resource$Cases$Comments$List
28443135
extends StandardParameters {
28453136
/**

0 commit comments

Comments
 (0)