@@ -2363,6 +2363,145 @@ export namespace cloudsupport_v2beta {
2363
2363
this . context = context ;
2364
2364
}
2365
2365
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
+
2366
2505
/**
2367
2506
* 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()) ```
2368
2507
* @example
@@ -2508,6 +2647,13 @@ export namespace cloudsupport_v2beta {
2508
2647
}
2509
2648
}
2510
2649
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
+ }
2511
2657
export interface Params$Resource$Cases$Attachments$List
2512
2658
extends StandardParameters {
2513
2659
/**
@@ -2683,6 +2829,144 @@ export namespace cloudsupport_v2beta {
2683
2829
}
2684
2830
}
2685
2831
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
+
2686
2970
/**
2687
2971
* 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()) ```
2688
2972
* @example
@@ -2840,6 +3124,13 @@ export namespace cloudsupport_v2beta {
2840
3124
*/
2841
3125
requestBody ?: Schema$Comment ;
2842
3126
}
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
+ }
2843
3134
export interface Params$Resource$Cases$Comments$List
2844
3135
extends StandardParameters {
2845
3136
/**
0 commit comments