@maxim_mazurok/gapi.client.cloudsupport-v2 0.0.20230723 → 0.0.20230725

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/index.d.ts +57 -16
  2. package/package.json +1 -1
  3. package/readme.md +10 -10
  4. package/tests.ts +57 -17
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://cloudsupport.googleapis.com/$discovery/rest?version=v2
12
- // Revision: 20230723
12
+ // Revision: 20230725
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -462,7 +462,9 @@ declare namespace gapi.client {
462
462
  /**
463
463
  * Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy,
464
464
  * separated by `" > "`. For example `"Technical Issue > Compute > Compute Engine"`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least
465
- * 6 months. If a given classification is deactiveated, it will immediately stop being returned. After 6 months, `case.create` requests using the classification ID will fail.
465
+ * six months. If a given classification is deactivated, it immediately stops being returned. After six months, `case.create` requests using the classification ID will fail. Here is an
466
+ * example of calling this endpoint using cURL: ```shell curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \
467
+ * 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"' ```
466
468
  */
467
469
  search(request?: {
468
470
  /** V1 error format. */
@@ -510,7 +512,10 @@ declare namespace gapi.client {
510
512
  }): Request<SearchCaseClassificationsResponse>;
511
513
  }
512
514
  interface AttachmentsResource {
513
- /** Retrieve all attachments associated with a support case. */
515
+ /**
516
+ * Retrieve all attachments associated with a support case. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/23598314" curl \ --header
517
+ * "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/attachments" ```
518
+ */
514
519
  list(request?: {
515
520
  /** V1 error format. */
516
521
  "$.xgafv"?:
@@ -557,7 +562,11 @@ declare namespace gapi.client {
557
562
  }): Request<ListAttachmentsResponse>;
558
563
  }
559
564
  interface CommentsResource {
560
- /** Add a new comment to the specified Case. The comment object must have the following fields set: body. */
565
+ /**
566
+ * Add a new comment to the specified Case. The comment object must have the following fields set: body. Here is an example of calling this endpoint using cURL: ```shell
567
+ * case="projects/some-project/cases/43591344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header 'Content-Type: application/json' \
568
+ * --data '{ "body": "This is a test comment." }' \ "https://cloudsupport.googleapis.com/v2/$case/comments" ```
569
+ */
561
570
  create(request: {
562
571
  /** V1 error format. */
563
572
  "$.xgafv"?:
@@ -638,7 +647,10 @@ declare namespace gapi.client {
638
647
  string;
639
648
  },
640
649
  body: Comment): Request<Comment>;
641
- /** Retrieve all Comments associated with the Case object. */
650
+ /**
651
+ * Retrieve all comments associated with the Case object. Here is an example of calling this endpoint using cURL: ```shell case="projects/cloud-support-qa-premium/cases/43595344" curl
652
+ * \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/comments" ```
653
+ */
642
654
  list(request?: {
643
655
  /** V1 error format. */
644
656
  "$.xgafv"?:
@@ -685,7 +697,10 @@ declare namespace gapi.client {
685
697
  }): Request<ListCommentsResponse>;
686
698
  }
687
699
  interface CasesResource {
688
- /** Close the specified case. */
700
+ /**
701
+ * Close the specified case. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request POST \ --header
702
+ * "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case:close" ```
703
+ */
689
704
  close(request: {
690
705
  /** V1 error format. */
691
706
  "$.xgafv"?:
@@ -768,7 +783,10 @@ declare namespace gapi.client {
768
783
  body: CloseCaseRequest): Request<Case>;
769
784
  /**
770
785
  * Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and
771
- * `priority`.
786
+ * `priority`. Here is an example of calling this endpoint using cURL: ```shell parent="projects/some-project" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth
787
+ * print-access-token)" \ --header 'Content-Type: application/json' \ --data '{ "display_name": "Test case created by me.", "description": "a random test case, feel free to close",
788
+ * "classification": { "id": "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, "time_zone": "-07:00",
789
+ * "subscriber_email_addresses": [ "foo@domain.com", "bar@domain.com" ], "testCase": true, "priority": "P3" }' \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ```
772
790
  */
773
791
  create(request: {
774
792
  /** V1 error format. */
@@ -851,8 +869,11 @@ declare namespace gapi.client {
851
869
  },
852
870
  body: Case): Request<Case>;
853
871
  /**
854
- * Escalate a case. Escalating a case will initiate the Google Cloud Support escalation management process. This operation is only available to certain Customer Care tiers. Go to
855
- * https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which tiers are able to perform escalations.
872
+ * Escalate a case. Escalating a case initiates the Google Cloud Support escalation management process. This operation is only available to certain Customer Care support services. Go
873
+ * to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which support services let you perform escalations. Here is an
874
+ * example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth
875
+ * print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "escalation": { "reason": "BUSINESS_IMPACT", "justification": "This is a test escalation." } }' \
876
+ * "https://cloudsupport.googleapis.com/v2/$case:escalate" ```
856
877
  */
857
878
  escalate(request: {
858
879
  /** V1 error format. */
@@ -934,7 +955,10 @@ declare namespace gapi.client {
934
955
  string;
935
956
  },
936
957
  body: EscalateCaseRequest): Request<Case>;
937
- /** Retrieve the specified case. */
958
+ /**
959
+ * Retrieve the specified case. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/16033687" curl \ --header "Authorization: Bearer
960
+ * $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case" ```
961
+ */
938
962
  get(request?: {
939
963
  /** V1 error format. */
940
964
  "$.xgafv"?:
@@ -974,8 +998,9 @@ declare namespace gapi.client {
974
998
  string;
975
999
  }): Request<Case>;
976
1000
  /**
977
- * Retrieve all cases under the specified parent. Note: Listing cases under an Organization returns only the cases directly parented by that organization. To retrieve all cases under
978
- * an organization, including cases parented by projects under that organization, use `cases.search`.
1001
+ * Retrieve all cases under the specified parent. Note: Listing cases under an organization returns only the cases directly parented by that organization. To retrieve all cases under
1002
+ * an organization, including cases parented by projects under that organization, use `cases.search`. Here is an example of calling this endpoint using cURL: ```shell
1003
+ * parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ```
979
1004
  */
980
1005
  list(request?: {
981
1006
  /** V1 error format. */
@@ -1029,7 +1054,11 @@ declare namespace gapi.client {
1029
1054
  uploadType?:
1030
1055
  string;
1031
1056
  }): Request<ListCasesResponse>;
1032
- /** Update the specified case. Only a subset of fields can be updated. */
1057
+ /**
1058
+ * Update the specified case. Only a subset of fields can be updated. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/43595344" curl
1059
+ * \ --request PATCH \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "priority": "P1" }' \
1060
+ * "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority" ```
1061
+ */
1033
1062
  patch(request: {
1034
1063
  /** V1 error format. */
1035
1064
  "$.xgafv"?:
@@ -1124,7 +1153,10 @@ declare namespace gapi.client {
1124
1153
  string;
1125
1154
  },
1126
1155
  body: Case): Request<Case>;
1127
- /** Search cases using the specified query. */
1156
+ /**
1157
+ * Search cases using the specified query. Here is an example of calling this endpoint using cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer
1158
+ * $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases:search" ```
1159
+ */
1128
1160
  search(request?: {
1129
1161
  /** V1 error format. */
1130
1162
  "$.xgafv"?:
@@ -1188,7 +1220,11 @@ declare namespace gapi.client {
1188
1220
  CommentsResource;
1189
1221
  }
1190
1222
  interface MediaResource {
1191
- /** Download a file attachment on a case. Note: HTTP requests must append "?alt=media" to the URL. */
1223
+ /**
1224
+ * Download a file attachment on a case. Note: HTTP requests must append "?alt=media" to the URL. Here is an example of calling this endpoint using cURL: ```shell
1225
+ * name="projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \
1226
+ * "https://cloudsupport.googleapis.com/v2/$name:download?alt=media" ```
1227
+ */
1192
1228
  download(request?: {
1193
1229
  /** V1 error format. */
1194
1230
  "$.xgafv"?:
@@ -1227,7 +1263,12 @@ declare namespace gapi.client {
1227
1263
  uploadType?:
1228
1264
  string;
1229
1265
  }): Request<Media>;
1230
- /** Create a file attachment on a case or Cloud resource. The attachment object must have the following fields set: filename. */
1266
+ /**
1267
+ * Create a file attachment on a case or Cloud resource. The attachment object must have the following fields set: filename. Here is an example of calling this endpoint using cURL:
1268
+ * ```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
1269
+ * $(gcloud auth print-access-token)" \ --data-binary @"./example_file.txt" \
1270
+ * "https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?attachment.filename=uploaded_via_curl.txt" ```
1271
+ */
1231
1272
  upload(request: {
1232
1273
  /** V1 error format. */
1233
1274
  "$.xgafv"?:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.cloudsupport-v2",
3
- "version": "0.0.20230723",
3
+ "version": "0.0.20230725",
4
4
  "description": "TypeScript typings for Google Cloud Support API v2",
5
5
  "license": "MIT",
6
6
  "author": {
package/readme.md CHANGED
@@ -67,52 +67,52 @@ After that you can use Google Cloud Support API resources: <!-- TODO: make this
67
67
  ```typescript
68
68
 
69
69
  /*
70
- Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy, separated by `" > "`. For example `"Technical Issue > Compute > Compute Engine"`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least 6 months. If a given classification is deactiveated, it will immediately stop being returned. After 6 months, `case.create` requests using the classification ID will fail.
70
+ Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy, separated by `" > "`. For example `"Technical Issue > Compute > Compute Engine"`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least six months. If a given classification is deactivated, it immediately stops being returned. After six months, `case.create` requests using the classification ID will fail. Here is an example of calling this endpoint using cURL: ```shell curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"' ```
71
71
  */
72
72
  await gapi.client.cloudsupport.caseClassifications.search({ });
73
73
 
74
74
  /*
75
- Close the specified case.
75
+ Close the specified case. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case:close" ```
76
76
  */
77
77
  await gapi.client.cloudsupport.cases.close({ name: "name", });
78
78
 
79
79
  /*
80
- Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`.
80
+ Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`. Here is an example of calling this endpoint using cURL: ```shell parent="projects/some-project" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header 'Content-Type: application/json' \ --data '{ "display_name": "Test case created by me.", "description": "a random test case, feel free to close", "classification": { "id": "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, "time_zone": "-07:00", "subscriber_email_addresses": [ "foo@domain.com", "bar@domain.com" ], "testCase": true, "priority": "P3" }' \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ```
81
81
  */
82
82
  await gapi.client.cloudsupport.cases.create({ parent: "parent", });
83
83
 
84
84
  /*
85
- Escalate a case. Escalating a case will initiate the Google Cloud Support escalation management process. This operation is only available to certain Customer Care tiers. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which tiers are able to perform escalations.
85
+ Escalate a case. Escalating a case initiates the Google Cloud Support escalation management process. This operation is only available to certain Customer Care support services. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which support services let you perform escalations. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "escalation": { "reason": "BUSINESS_IMPACT", "justification": "This is a test escalation." } }' \ "https://cloudsupport.googleapis.com/v2/$case:escalate" ```
86
86
  */
87
87
  await gapi.client.cloudsupport.cases.escalate({ name: "name", });
88
88
 
89
89
  /*
90
- Retrieve the specified case.
90
+ Retrieve the specified case. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/16033687" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case" ```
91
91
  */
92
92
  await gapi.client.cloudsupport.cases.get({ name: "name", });
93
93
 
94
94
  /*
95
- Retrieve all cases under the specified parent. Note: Listing cases under an Organization returns only the cases directly parented by that organization. To retrieve all cases under an organization, including cases parented by projects under that organization, use `cases.search`.
95
+ Retrieve all cases under the specified parent. Note: Listing cases under an organization returns only the cases directly parented by that organization. To retrieve all cases under an organization, including cases parented by projects under that organization, use `cases.search`. Here is an example of calling this endpoint using cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ```
96
96
  */
97
97
  await gapi.client.cloudsupport.cases.list({ parent: "parent", });
98
98
 
99
99
  /*
100
- Update the specified case. Only a subset of fields can be updated.
100
+ Update the specified case. Only a subset of fields can be updated. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request PATCH \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "priority": "P1" }' \ "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority" ```
101
101
  */
102
102
  await gapi.client.cloudsupport.cases.patch({ name: "name", });
103
103
 
104
104
  /*
105
- Search cases using the specified query.
105
+ Search cases using the specified query. Here is an example of calling this endpoint using cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases:search" ```
106
106
  */
107
107
  await gapi.client.cloudsupport.cases.search({ parent: "parent", });
108
108
 
109
109
  /*
110
- Download a file attachment on a case. Note: HTTP requests must append "?alt=media" to the URL.
110
+ Download a file attachment on a case. Note: HTTP requests must append "?alt=media" to the URL. Here is an example of calling this endpoint using 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" ```
111
111
  */
112
112
  await gapi.client.cloudsupport.media.download({ name: "name", });
113
113
 
114
114
  /*
115
- Create a file attachment on a case or Cloud resource. The attachment object must have the following fields set: filename.
115
+ Create a file attachment on a case or Cloud resource. The attachment object must have the following fields set: filename. Here is an example of calling this endpoint using 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/v2beta/$case/attachments?attachment.filename=uploaded_via_curl.txt" ```
116
116
  */
117
117
  await gapi.client.cloudsupport.media.upload({ parent: "parent", });
118
118
  ```
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230723
6
+ // Revision: 20230725
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -31,22 +31,30 @@ gapi.load('client', async () => {
31
31
  async function run() {
32
32
  /**
33
33
  * Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy, separated by
34
- * `" > "`. For example `"Technical Issue > Compute > Compute Engine"`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least 6 months. If a
35
- * given classification is deactiveated, it will immediately stop being returned. After 6 months, `case.create` requests using the classification ID will fail.
34
+ * `" > "`. For example `"Technical Issue > Compute > Compute Engine"`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least six months. If a
35
+ * given classification is deactivated, it immediately stops being returned. After six months, `case.create` requests using the classification ID will fail. Here is an example of calling
36
+ * this endpoint using cURL: ```shell curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \
37
+ * 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"' ```
36
38
  */
37
39
  await gapi.client.cloudsupport.caseClassifications.search({
38
40
  pageSize: 42,
39
41
  pageToken: "Test string",
40
42
  query: "Test string",
41
43
  });
42
- /** Close the specified case. */
44
+ /**
45
+ * Close the specified case. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request POST \ --header "Authorization:
46
+ * Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case:close" ```
47
+ */
43
48
  await gapi.client.cloudsupport.cases.close({
44
49
  name: "Test string",
45
50
  }, {
46
51
  });
47
52
  /**
48
53
  * Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and
49
- * `priority`.
54
+ * `priority`. Here is an example of calling this endpoint using cURL: ```shell parent="projects/some-project" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth
55
+ * print-access-token)" \ --header 'Content-Type: application/json' \ --data '{ "display_name": "Test case created by me.", "description": "a random test case, feel free to close",
56
+ * "classification": { "id": "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, "time_zone": "-07:00",
57
+ * "subscriber_email_addresses": [ "foo@domain.com", "bar@domain.com" ], "testCase": true, "priority": "P3" }' \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ```
50
58
  */
51
59
  await gapi.client.cloudsupport.cases.create({
52
60
  parent: "Test string",
@@ -77,8 +85,11 @@ gapi.load('client', async () => {
77
85
  updateTime: "Test string",
78
86
  });
79
87
  /**
80
- * Escalate a case. Escalating a case will initiate the Google Cloud Support escalation management process. This operation is only available to certain Customer Care tiers. Go to
81
- * https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which tiers are able to perform escalations.
88
+ * Escalate a case. Escalating a case initiates the Google Cloud Support escalation management process. This operation is only available to certain Customer Care support services. Go to
89
+ * https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which support services let you perform escalations. Here is an example of
90
+ * calling this endpoint using cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \
91
+ * --header "Content-Type: application/json" \ --data '{ "escalation": { "reason": "BUSINESS_IMPACT", "justification": "This is a test escalation." } }' \
92
+ * "https://cloudsupport.googleapis.com/v2/$case:escalate" ```
82
93
  */
83
94
  await gapi.client.cloudsupport.cases.escalate({
84
95
  name: "Test string",
@@ -88,13 +99,17 @@ gapi.load('client', async () => {
88
99
  reason: "Test string",
89
100
  },
90
101
  });
91
- /** Retrieve the specified case. */
102
+ /**
103
+ * Retrieve the specified case. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/16033687" curl \ --header "Authorization: Bearer $(gcloud
104
+ * auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case" ```
105
+ */
92
106
  await gapi.client.cloudsupport.cases.get({
93
107
  name: "Test string",
94
108
  });
95
109
  /**
96
- * Retrieve all cases under the specified parent. Note: Listing cases under an Organization returns only the cases directly parented by that organization. To retrieve all cases under an
97
- * organization, including cases parented by projects under that organization, use `cases.search`.
110
+ * Retrieve all cases under the specified parent. Note: Listing cases under an organization returns only the cases directly parented by that organization. To retrieve all cases under an
111
+ * organization, including cases parented by projects under that organization, use `cases.search`. Here is an example of calling this endpoint using cURL: ```shell
112
+ * parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ```
98
113
  */
99
114
  await gapi.client.cloudsupport.cases.list({
100
115
  filter: "Test string",
@@ -102,7 +117,11 @@ gapi.load('client', async () => {
102
117
  pageToken: "Test string",
103
118
  parent: "Test string",
104
119
  });
105
- /** Update the specified case. Only a subset of fields can be updated. */
120
+ /**
121
+ * Update the specified case. Only a subset of fields can be updated. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/43595344" curl \
122
+ * --request PATCH \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "priority": "P1" }' \
123
+ * "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority" ```
124
+ */
106
125
  await gapi.client.cloudsupport.cases.patch({
107
126
  name: "Test string",
108
127
  updateMask: "Test string",
@@ -132,20 +151,30 @@ gapi.load('client', async () => {
132
151
  timeZone: "Test string",
133
152
  updateTime: "Test string",
134
153
  });
135
- /** Search cases using the specified query. */
154
+ /**
155
+ * Search cases using the specified query. Here is an example of calling this endpoint using cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud
156
+ * auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases:search" ```
157
+ */
136
158
  await gapi.client.cloudsupport.cases.search({
137
159
  pageSize: 42,
138
160
  pageToken: "Test string",
139
161
  parent: "Test string",
140
162
  query: "Test string",
141
163
  });
142
- /** Retrieve all attachments associated with a support case. */
164
+ /**
165
+ * Retrieve all attachments associated with a support case. Here is an example of calling this endpoint using cURL: ```shell case="projects/some-project/cases/23598314" curl \ --header
166
+ * "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/attachments" ```
167
+ */
143
168
  await gapi.client.cloudsupport.cases.attachments.list({
144
169
  pageSize: 42,
145
170
  pageToken: "Test string",
146
171
  parent: "Test string",
147
172
  });
148
- /** Add a new comment to the specified Case. The comment object must have the following fields set: body. */
173
+ /**
174
+ * Add a new comment to the specified Case. The comment object must have the following fields set: body. Here is an example of calling this endpoint using cURL: ```shell
175
+ * case="projects/some-project/cases/43591344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header 'Content-Type: application/json' \
176
+ * --data '{ "body": "This is a test comment." }' \ "https://cloudsupport.googleapis.com/v2/$case/comments" ```
177
+ */
149
178
  await gapi.client.cloudsupport.cases.comments.create({
150
179
  parent: "Test string",
151
180
  }, {
@@ -159,17 +188,28 @@ gapi.load('client', async () => {
159
188
  name: "Test string",
160
189
  plainTextBody: "Test string",
161
190
  });
162
- /** Retrieve all Comments associated with the Case object. */
191
+ /**
192
+ * Retrieve all comments associated with the Case object. Here is an example of calling this endpoint using cURL: ```shell case="projects/cloud-support-qa-premium/cases/43595344" curl \
193
+ * --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case/comments" ```
194
+ */
163
195
  await gapi.client.cloudsupport.cases.comments.list({
164
196
  pageSize: 42,
165
197
  pageToken: "Test string",
166
198
  parent: "Test string",
167
199
  });
168
- /** Download a file attachment on a case. Note: HTTP requests must append "?alt=media" to the URL. */
200
+ /**
201
+ * Download a file attachment on a case. Note: HTTP requests must append "?alt=media" to the URL. Here is an example of calling this endpoint using cURL: ```shell
202
+ * name="projects/some-project/cases/43594844/attachments/0674M00000WijAnZAJ" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \
203
+ * "https://cloudsupport.googleapis.com/v2/$name:download?alt=media" ```
204
+ */
169
205
  await gapi.client.cloudsupport.media.download({
170
206
  name: "Test string",
171
207
  });
172
- /** Create a file attachment on a case or Cloud resource. The attachment object must have the following fields set: filename. */
208
+ /**
209
+ * Create a file attachment on a case or Cloud resource. The attachment object must have the following fields set: filename. Here is an example of calling this endpoint using cURL:
210
+ * ```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
211
+ * auth print-access-token)" \ --data-binary @"./example_file.txt" \ "https://cloudsupport.googleapis.com/upload/v2beta/$case/attachments?attachment.filename=uploaded_via_curl.txt" ```
212
+ */
173
213
  await gapi.client.cloudsupport.media.upload({
174
214
  parent: "Test string",
175
215
  }, {