@maxim_mazurok/gapi.client.cloudsupport-v2 0.0.20230919 → 0.0.20230923
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.
- package/index.d.ts +82 -70
- package/package.json +1 -1
- package/readme.md +8 -8
- package/tests.ts +46 -29
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:
|
|
12
|
+
// Revision: 20230923
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -277,7 +277,7 @@ declare namespace gapi.client {
|
|
|
277
277
|
boolean;
|
|
278
278
|
}
|
|
279
279
|
interface EscalateCaseRequest {
|
|
280
|
-
/** The escalation
|
|
280
|
+
/** The escalation information to be sent with the escalation request. */
|
|
281
281
|
escalation?:
|
|
282
282
|
Escalation;
|
|
283
283
|
}
|
|
@@ -301,13 +301,10 @@ declare namespace gapi.client {
|
|
|
301
301
|
string;
|
|
302
302
|
}
|
|
303
303
|
interface ListCasesResponse {
|
|
304
|
-
/** The list of cases associated with the
|
|
304
|
+
/** The list of cases associated with the parent after any filters have been applied. */
|
|
305
305
|
cases?:
|
|
306
306
|
Case[];
|
|
307
|
-
/**
|
|
308
|
-
* A token to retrieve the next page of results. This should be set in the `page_token` field of the subsequent `ListCasesRequest` message that is issued. If unspecified, there are no
|
|
309
|
-
* more results to retrieve.
|
|
310
|
-
*/
|
|
307
|
+
/** A token to retrieve the next page of results. Set this in the `page_token` field of subsequent `cases.list` requests. If unspecified, there are no more results to retrieve. */
|
|
311
308
|
nextPageToken?:
|
|
312
309
|
string;
|
|
313
310
|
}
|
|
@@ -427,20 +424,17 @@ declare namespace gapi.client {
|
|
|
427
424
|
caseClassifications?:
|
|
428
425
|
CaseClassification[];
|
|
429
426
|
/**
|
|
430
|
-
* A token to retrieve the next page of results.
|
|
431
|
-
*
|
|
427
|
+
* A token to retrieve the next page of results. Set this in the `page_token` field of subsequent `caseClassifications.list` requests. If unspecified, there are no more results to
|
|
428
|
+
* retrieve.
|
|
432
429
|
*/
|
|
433
430
|
nextPageToken?:
|
|
434
431
|
string;
|
|
435
432
|
}
|
|
436
433
|
interface SearchCasesResponse {
|
|
437
|
-
/** The list of cases associated with the
|
|
434
|
+
/** The list of cases associated with the parent after any filters have been applied. */
|
|
438
435
|
cases?:
|
|
439
436
|
Case[];
|
|
440
|
-
/**
|
|
441
|
-
* A token to retrieve the next page of results. This should be set in the `page_token` field of subsequent `SearchCaseRequest` message that is issued. If unspecified, there are no
|
|
442
|
-
* more results to retrieve.
|
|
443
|
-
*/
|
|
437
|
+
/** A token to retrieve the next page of results. Set this in the `page_token` field of subsequent `cases.search` requests. If unspecified, there are no more results to retrieve. */
|
|
444
438
|
nextPageToken?:
|
|
445
439
|
string;
|
|
446
440
|
}
|
|
@@ -457,11 +451,13 @@ declare namespace gapi.client {
|
|
|
457
451
|
}
|
|
458
452
|
interface CaseClassificationsResource {
|
|
459
453
|
/**
|
|
460
|
-
* Retrieve valid classifications to
|
|
461
|
-
* separated by `" > "`. For example `"Technical Issue > Compute > Compute Engine"`. Classification IDs returned by
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
* 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"' ```
|
|
454
|
+
* Retrieve valid classifications to use when creating a support case. Classifications are hierarchical. Each classification is a string containing all levels of the hierarchy
|
|
455
|
+
* separated by `" > "`. For example, `"Technical Issue > Compute > Compute Engine"`. Classification IDs returned by this endpoint are valid for at least six months. When a
|
|
456
|
+
* classification is deactivated, this endpoint immediately stops returning it. After six months, `case.create` requests using the classification will fail. EXAMPLES: cURL: ```shell
|
|
457
|
+
* curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
|
458
|
+
* 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"' ``` Python: ```python import googleapiclient.discovery supportApiService
|
|
459
|
+
* = googleapiclient.discovery.build( serviceName="cloudsupport", version="v2", discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=v2", ) request =
|
|
460
|
+
* supportApiService.caseClassifications().search( query='display_name:"*Compute Engine*"' ) print(request.execute()) ```
|
|
465
461
|
*/
|
|
466
462
|
search(request?: {
|
|
467
463
|
/** V1 error format. */
|
|
@@ -485,7 +481,7 @@ declare namespace gapi.client {
|
|
|
485
481
|
/** OAuth 2.0 token for the current user. */
|
|
486
482
|
oauth_token?:
|
|
487
483
|
string;
|
|
488
|
-
/** The maximum number of
|
|
484
|
+
/** The maximum number of classifications fetched with each request. */
|
|
489
485
|
pageSize?:
|
|
490
486
|
number;
|
|
491
487
|
/** A token identifying the page of results to return. If unspecified, the first page is retrieved. */
|
|
@@ -494,7 +490,7 @@ declare namespace gapi.client {
|
|
|
494
490
|
/** Returns response with indentations and line breaks. */
|
|
495
491
|
prettyPrint?:
|
|
496
492
|
boolean;
|
|
497
|
-
/** An expression
|
|
493
|
+
/** An expression used to filter case classifications. If it's an empty string, then no filtering happens. Otherwise, case classifications will be returned that match the filter. */
|
|
498
494
|
query?:
|
|
499
495
|
string;
|
|
500
496
|
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
@@ -701,8 +697,10 @@ declare namespace gapi.client {
|
|
|
701
697
|
}
|
|
702
698
|
interface CasesResource {
|
|
703
699
|
/**
|
|
704
|
-
* Close
|
|
705
|
-
* "
|
|
700
|
+
* Close a case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
|
701
|
+
* "https://cloudsupport.googleapis.com/v2/$case:close" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build(
|
|
702
|
+
* serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request =
|
|
703
|
+
* supportApiService.cases().close( name="projects/some-project/cases/43595344" ) print(request.execute()) ```
|
|
706
704
|
*/
|
|
707
705
|
close(request: {
|
|
708
706
|
/** V1 error format. */
|
|
@@ -723,7 +721,7 @@ declare namespace gapi.client {
|
|
|
723
721
|
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
724
722
|
key?:
|
|
725
723
|
string;
|
|
726
|
-
/** Required. The
|
|
724
|
+
/** Required. The name of the case to close. */
|
|
727
725
|
name:
|
|
728
726
|
string;
|
|
729
727
|
/** OAuth 2.0 token for the current user. */
|
|
@@ -764,7 +762,7 @@ declare namespace gapi.client {
|
|
|
764
762
|
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
765
763
|
key?:
|
|
766
764
|
string;
|
|
767
|
-
/** Required. The
|
|
765
|
+
/** Required. The name of the case to close. */
|
|
768
766
|
name:
|
|
769
767
|
string;
|
|
770
768
|
/** OAuth 2.0 token for the current user. */
|
|
@@ -785,12 +783,16 @@ declare namespace gapi.client {
|
|
|
785
783
|
},
|
|
786
784
|
body: CloseCaseRequest): Request<Case>;
|
|
787
785
|
/**
|
|
788
|
-
* Create a new case and associate it with a
|
|
789
|
-
*
|
|
790
|
-
*
|
|
791
|
-
*
|
|
792
|
-
* "
|
|
793
|
-
* "
|
|
786
|
+
* Create a new case and associate it with a parent. It must have the following fields set: `display_name`, `description`, `classification`, and `priority`. If you're just testing the
|
|
787
|
+
* API and don't want to route your case to an agent, set `testCase=true`. EXAMPLES: cURL: ```shell parent="projects/some-project" curl \ --request POST \ --header "Authorization:
|
|
788
|
+
* Bearer $(gcloud auth print-access-token)" \ --header 'Content-Type: application/json' \ --data '{ "display_name": "Test case created by me.", "description": "a random test case,
|
|
789
|
+
* feel free to close", "classification": { "id": "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" },
|
|
790
|
+
* "time_zone": "-07:00", "subscriber_email_addresses": [ "foo@domain.com", "bar@domain.com" ], "testCase": true, "priority": "P3" }' \
|
|
791
|
+
* "https://cloudsupport.googleapis.com/v2/$parent/cases" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build(
|
|
792
|
+
* serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request =
|
|
793
|
+
* supportApiService.cases().create( parent="projects/some-project", body={ "displayName": "A Test Case", "description": "This is a test case.", "testCase": True, "priority": "P2",
|
|
794
|
+
* "classification": { "id": "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, }, ) print(request.execute())
|
|
795
|
+
* ```
|
|
794
796
|
*/
|
|
795
797
|
create(request: {
|
|
796
798
|
/** V1 error format. */
|
|
@@ -814,7 +816,7 @@ declare namespace gapi.client {
|
|
|
814
816
|
/** OAuth 2.0 token for the current user. */
|
|
815
817
|
oauth_token?:
|
|
816
818
|
string;
|
|
817
|
-
/** Required. The name of the
|
|
819
|
+
/** Required. The name of the parent under which the case should be created. */
|
|
818
820
|
parent:
|
|
819
821
|
string;
|
|
820
822
|
/** Returns response with indentations and line breaks. */
|
|
@@ -855,7 +857,7 @@ declare namespace gapi.client {
|
|
|
855
857
|
/** OAuth 2.0 token for the current user. */
|
|
856
858
|
oauth_token?:
|
|
857
859
|
string;
|
|
858
|
-
/** Required. The name of the
|
|
860
|
+
/** Required. The name of the parent under which the case should be created. */
|
|
859
861
|
parent:
|
|
860
862
|
string;
|
|
861
863
|
/** Returns response with indentations and line breaks. */
|
|
@@ -873,11 +875,13 @@ declare namespace gapi.client {
|
|
|
873
875
|
},
|
|
874
876
|
body: Case): Request<Case>;
|
|
875
877
|
/**
|
|
876
|
-
* Escalate a case
|
|
877
|
-
*
|
|
878
|
-
*
|
|
879
|
-
*
|
|
880
|
-
* "
|
|
878
|
+
* Escalate a case, starting the Google Cloud Support escalation management process. This operation is only available for some support services. Go to https://cloud.google.com/support
|
|
879
|
+
* and look for 'Technical support escalations' in the feature list to find out which ones let you do that. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \
|
|
880
|
+
* --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "escalation": { "reason":
|
|
881
|
+
* "BUSINESS_IMPACT", "justification": "This is a test escalation." } }' \ "https://cloudsupport.googleapis.com/v2/$case:escalate" ``` Python: ```python import
|
|
882
|
+
* googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version,
|
|
883
|
+
* discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().escalate(
|
|
884
|
+
* name="projects/some-project/cases/43595344", body={ "escalation": { "reason": "BUSINESS_IMPACT", "justification": "This is a test escalation.", }, }, ) print(request.execute()) ```
|
|
881
885
|
*/
|
|
882
886
|
escalate(request: {
|
|
883
887
|
/** V1 error format. */
|
|
@@ -898,7 +902,7 @@ declare namespace gapi.client {
|
|
|
898
902
|
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
899
903
|
key?:
|
|
900
904
|
string;
|
|
901
|
-
/** Required. The
|
|
905
|
+
/** Required. The name of the case to be escalated. */
|
|
902
906
|
name:
|
|
903
907
|
string;
|
|
904
908
|
/** OAuth 2.0 token for the current user. */
|
|
@@ -939,7 +943,7 @@ declare namespace gapi.client {
|
|
|
939
943
|
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
940
944
|
key?:
|
|
941
945
|
string;
|
|
942
|
-
/** Required. The
|
|
946
|
+
/** Required. The name of the case to be escalated. */
|
|
943
947
|
name:
|
|
944
948
|
string;
|
|
945
949
|
/** OAuth 2.0 token for the current user. */
|
|
@@ -960,8 +964,10 @@ declare namespace gapi.client {
|
|
|
960
964
|
},
|
|
961
965
|
body: EscalateCaseRequest): Request<Case>;
|
|
962
966
|
/**
|
|
963
|
-
* Retrieve
|
|
964
|
-
*
|
|
967
|
+
* Retrieve a case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/16033687" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
|
968
|
+
* "https://cloudsupport.googleapis.com/v2/$case" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build(
|
|
969
|
+
* serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request =
|
|
970
|
+
* supportApiService.cases().get( name="projects/some-project/cases/43595344", ) print(request.execute()) ```
|
|
965
971
|
*/
|
|
966
972
|
get(request?: {
|
|
967
973
|
/** V1 error format. */
|
|
@@ -982,7 +988,7 @@ declare namespace gapi.client {
|
|
|
982
988
|
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
983
989
|
key?:
|
|
984
990
|
string;
|
|
985
|
-
/** Required. The
|
|
991
|
+
/** Required. The full name of a case to be retrieved. */
|
|
986
992
|
name:
|
|
987
993
|
string;
|
|
988
994
|
/** OAuth 2.0 token for the current user. */
|
|
@@ -1002,9 +1008,11 @@ declare namespace gapi.client {
|
|
|
1002
1008
|
string;
|
|
1003
1009
|
}): Request<Case>;
|
|
1004
1010
|
/**
|
|
1005
|
-
* Retrieve all cases under
|
|
1006
|
-
*
|
|
1007
|
-
*
|
|
1011
|
+
* Retrieve all cases under a parent, but not its children. For example, listing cases under an organization only returns the cases that are directly parented by that organization. To
|
|
1012
|
+
* retrieve cases under an organization and its projects, use `cases.search`. EXAMPLES: cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud
|
|
1013
|
+
* auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService =
|
|
1014
|
+
* googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", )
|
|
1015
|
+
* request = supportApiService.cases().list(parent="projects/some-project") print(request.execute()) ```
|
|
1008
1016
|
*/
|
|
1009
1017
|
list(request?: {
|
|
1010
1018
|
/** V1 error format. */
|
|
@@ -1023,10 +1031,10 @@ declare namespace gapi.client {
|
|
|
1023
1031
|
fields?:
|
|
1024
1032
|
string;
|
|
1025
1033
|
/**
|
|
1026
|
-
* An expression
|
|
1027
|
-
* following fields
|
|
1028
|
-
*
|
|
1029
|
-
*
|
|
1034
|
+
* An expression used to filter cases. If it's an empty string, then no filtering happens. Otherwise, the endpoint returns the cases that match the filter. Expressions use the
|
|
1035
|
+
* following fields separated by `AND` and specified with `=`: - `state`: Can be `OPEN` or `CLOSED`. - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You can specify multiple
|
|
1036
|
+
* values for priority using the `OR` operator. For example, `priority=P1 OR priority=P2`. - `creator.email`: The email address of the case creator. EXAMPLES: - `state=CLOSED` -
|
|
1037
|
+
* `state=OPEN AND creator.email="tester@example.com"` - `state=OPEN AND (priority=P0 OR priority=P1)`
|
|
1030
1038
|
*/
|
|
1031
1039
|
filter?:
|
|
1032
1040
|
string;
|
|
@@ -1042,7 +1050,7 @@ declare namespace gapi.client {
|
|
|
1042
1050
|
/** A token identifying the page of results to return. If unspecified, the first page is retrieved. */
|
|
1043
1051
|
pageToken?:
|
|
1044
1052
|
string;
|
|
1045
|
-
/** Required. The
|
|
1053
|
+
/** Required. The name of a parent to list cases under. */
|
|
1046
1054
|
parent:
|
|
1047
1055
|
string;
|
|
1048
1056
|
/** Returns response with indentations and line breaks. */
|
|
@@ -1059,9 +1067,11 @@ declare namespace gapi.client {
|
|
|
1059
1067
|
string;
|
|
1060
1068
|
}): Request<ListCasesResponse>;
|
|
1061
1069
|
/**
|
|
1062
|
-
* Update
|
|
1063
|
-
*
|
|
1064
|
-
* "
|
|
1070
|
+
* Update a case. Only some fields can be updated. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request PATCH \ --header "Authorization: Bearer
|
|
1071
|
+
* $(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "priority": "P1" }' \ "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority"
|
|
1072
|
+
* ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version,
|
|
1073
|
+
* discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().patch(
|
|
1074
|
+
* name="projects/some-project/cases/43112854", body={ "displayName": "This is Now a New Title", "priority": "P2", }, ) print(request.execute()) ```
|
|
1065
1075
|
*/
|
|
1066
1076
|
patch(request: {
|
|
1067
1077
|
/** V1 error format. */
|
|
@@ -1095,9 +1105,9 @@ declare namespace gapi.client {
|
|
|
1095
1105
|
quotaUser?:
|
|
1096
1106
|
string;
|
|
1097
1107
|
/**
|
|
1098
|
-
* A list of attributes of the case
|
|
1099
|
-
*
|
|
1100
|
-
*
|
|
1108
|
+
* A list of attributes of the case that should be updated. Supported values are `priority`, `display_name`, and `subscriber_email_addresses`. If no fields are specified, all
|
|
1109
|
+
* supported fields are updated. Be careful - if you do not provide a field mask, then you might accidentally clear some fields. For example, if you leave the field mask empty and
|
|
1110
|
+
* do not provide a value for `subscriber_email_addresses`, then `subscriber_email_addresses` is updated to empty.
|
|
1101
1111
|
*/
|
|
1102
1112
|
updateMask?:
|
|
1103
1113
|
string;
|
|
@@ -1143,9 +1153,9 @@ declare namespace gapi.client {
|
|
|
1143
1153
|
quotaUser?:
|
|
1144
1154
|
string;
|
|
1145
1155
|
/**
|
|
1146
|
-
* A list of attributes of the case
|
|
1147
|
-
*
|
|
1148
|
-
*
|
|
1156
|
+
* A list of attributes of the case that should be updated. Supported values are `priority`, `display_name`, and `subscriber_email_addresses`. If no fields are specified, all
|
|
1157
|
+
* supported fields are updated. Be careful - if you do not provide a field mask, then you might accidentally clear some fields. For example, if you leave the field mask empty and
|
|
1158
|
+
* do not provide a value for `subscriber_email_addresses`, then `subscriber_email_addresses` is updated to empty.
|
|
1149
1159
|
*/
|
|
1150
1160
|
updateMask?:
|
|
1151
1161
|
string;
|
|
@@ -1158,8 +1168,10 @@ declare namespace gapi.client {
|
|
|
1158
1168
|
},
|
|
1159
1169
|
body: Case): Request<Case>;
|
|
1160
1170
|
/**
|
|
1161
|
-
* Search cases using
|
|
1162
|
-
*
|
|
1171
|
+
* Search for cases using a query. EXAMPLES: cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
|
1172
|
+
* "https://cloudsupport.googleapis.com/v2/$parent/cases:search" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService =
|
|
1173
|
+
* googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", )
|
|
1174
|
+
* request = supportApiService.cases().search( parent="projects/some-project", query="state=OPEN" ) print(request.execute()) ```
|
|
1163
1175
|
*/
|
|
1164
1176
|
search(request?: {
|
|
1165
1177
|
/** V1 error format. */
|
|
@@ -1189,20 +1201,20 @@ declare namespace gapi.client {
|
|
|
1189
1201
|
/** A token identifying the page of results to return. If unspecified, the first page is retrieved. */
|
|
1190
1202
|
pageToken?:
|
|
1191
1203
|
string;
|
|
1192
|
-
/** The
|
|
1204
|
+
/** The name of the parent resource to search for cases under. */
|
|
1193
1205
|
parent:
|
|
1194
1206
|
string;
|
|
1195
1207
|
/** Returns response with indentations and line breaks. */
|
|
1196
1208
|
prettyPrint?:
|
|
1197
1209
|
boolean;
|
|
1198
1210
|
/**
|
|
1199
|
-
* An expression
|
|
1200
|
-
* `organizations/`. - `project`: A project name in the form `projects/`. - `state`:
|
|
1201
|
-
*
|
|
1202
|
-
*
|
|
1203
|
-
*
|
|
1204
|
-
*
|
|
1205
|
-
*
|
|
1211
|
+
* An expression used to filter cases. Expressions use the following fields separated by `AND` and specified with `=`: - `organization`: An organization name in the form
|
|
1212
|
+
* `organizations/`. - `project`: A project name in the form `projects/`. - `state`: Can be `OPEN` or `CLOSED`. - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You can
|
|
1213
|
+
* specify multiple values for priority using the `OR` operator. For example, `priority=P1 OR priority=P2`. - `creator.email`: The email address of the case creator. -
|
|
1214
|
+
* `billingAccount`: A billing account in the form `billingAccounts/` You must specify either `organization` or `project`. To search across `displayName`, `description`, and
|
|
1215
|
+
* comments, use a global restriction with no keyword or operator. For example, `"my search"`. To search only cases updated after a certain date, use `update_time` restricted with
|
|
1216
|
+
* that particular date, time, and timezone in ISO datetime format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. `update_time` only supports the greater than operator
|
|
1217
|
+
* (`>`). Examples: - `organization="organizations/123456789"` - `project="projects/my-project-id"` - `project="projects/123456789"` -
|
|
1206
1218
|
* `billing_account="billingAccounts/123456-A0B0C0-CUZ789"` - `organization="organizations/123456789" AND state=CLOSED` - `project="projects/my-project-id" AND
|
|
1207
1219
|
* creator.email="tester@example.com"` - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)`
|
|
1208
1220
|
*/
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -67,42 +67,42 @@ 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
|
|
70
|
+
Retrieve valid classifications to use when creating a support case. Classifications are hierarchical. Each classification is a string containing all levels of the hierarchy separated by `" > "`. For example, `"Technical Issue > Compute > Compute Engine"`. Classification IDs returned by this endpoint are valid for at least six months. When a classification is deactivated, this endpoint immediately stops returning it. After six months, `case.create` requests using the classification will fail. EXAMPLES: cURL: ```shell curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"' ``` Python: ```python import googleapiclient.discovery supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version="v2", discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=v2", ) request = supportApiService.caseClassifications().search( query='display_name:"*Compute Engine*"' ) print(request.execute()) ```
|
|
71
71
|
*/
|
|
72
72
|
await gapi.client.cloudsupport.caseClassifications.search({ });
|
|
73
73
|
|
|
74
74
|
/*
|
|
75
|
-
Close
|
|
75
|
+
Close a case. EXAMPLES: 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" ``` 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().close( name="projects/some-project/cases/43595344" ) print(request.execute()) ```
|
|
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 a
|
|
80
|
+
Create a new case and associate it with a parent. It must have the following fields set: `display_name`, `description`, `classification`, and `priority`. If you're just testing the API and don't want to route your case to an agent, set `testCase=true`. EXAMPLES: 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" ``` 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().create( parent="projects/some-project", body={ "displayName": "A Test Case", "description": "This is a test case.", "testCase": True, "priority": "P2", "classification": { "id": "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, }, ) print(request.execute()) ```
|
|
81
81
|
*/
|
|
82
82
|
await gapi.client.cloudsupport.cases.create({ parent: "parent", });
|
|
83
83
|
|
|
84
84
|
/*
|
|
85
|
-
Escalate a case
|
|
85
|
+
Escalate a case, starting the Google Cloud Support escalation management process. This operation is only available for some support services. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which ones let you do that. EXAMPLES: 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" ``` 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().escalate( name="projects/some-project/cases/43595344", body={ "escalation": { "reason": "BUSINESS_IMPACT", "justification": "This is a test escalation.", }, }, ) print(request.execute()) ```
|
|
86
86
|
*/
|
|
87
87
|
await gapi.client.cloudsupport.cases.escalate({ name: "name", });
|
|
88
88
|
|
|
89
89
|
/*
|
|
90
|
-
Retrieve
|
|
90
|
+
Retrieve a case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/16033687" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$case" ``` 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().get( name="projects/some-project/cases/43595344", ) print(request.execute()) ```
|
|
91
91
|
*/
|
|
92
92
|
await gapi.client.cloudsupport.cases.get({ name: "name", });
|
|
93
93
|
|
|
94
94
|
/*
|
|
95
|
-
Retrieve all cases under
|
|
95
|
+
Retrieve all cases under a parent, but not its children. For example, listing cases under an organization only returns the cases that are directly parented by that organization. To retrieve cases under an organization and its projects, use `cases.search`. EXAMPLES: cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ``` 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().list(parent="projects/some-project") print(request.execute()) ```
|
|
96
96
|
*/
|
|
97
97
|
await gapi.client.cloudsupport.cases.list({ parent: "parent", });
|
|
98
98
|
|
|
99
99
|
/*
|
|
100
|
-
Update
|
|
100
|
+
Update a case. Only some fields can be updated. EXAMPLES: 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" ``` 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().patch( name="projects/some-project/cases/43112854", body={ "displayName": "This is Now a New Title", "priority": "P2", }, ) print(request.execute()) ```
|
|
101
101
|
*/
|
|
102
102
|
await gapi.client.cloudsupport.cases.patch({ name: "name", });
|
|
103
103
|
|
|
104
104
|
/*
|
|
105
|
-
Search cases using
|
|
105
|
+
Search for cases using a query. EXAMPLES: cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases:search" ``` 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().search( parent="projects/some-project", query="state=OPEN" ) print(request.execute()) ```
|
|
106
106
|
*/
|
|
107
107
|
await gapi.client.cloudsupport.cases.search({ parent: "parent", });
|
|
108
108
|
|
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:
|
|
6
|
+
// Revision: 20230923
|
|
7
7
|
|
|
8
8
|
gapi.load('client', async () => {
|
|
9
9
|
/** now we can use gapi.client */
|
|
@@ -30,11 +30,13 @@ gapi.load('client', async () => {
|
|
|
30
30
|
|
|
31
31
|
async function run() {
|
|
32
32
|
/**
|
|
33
|
-
* Retrieve valid classifications to
|
|
34
|
-
* `" > "`. For example `"Technical Issue > Compute > Compute Engine"`. Classification IDs returned by
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
33
|
+
* Retrieve valid classifications to use when creating a support case. Classifications are hierarchical. Each classification is a string containing all levels of the hierarchy separated by
|
|
34
|
+
* `" > "`. For example, `"Technical Issue > Compute > Compute Engine"`. Classification IDs returned by this endpoint are valid for at least six months. When a classification is
|
|
35
|
+
* deactivated, this endpoint immediately stops returning it. After six months, `case.create` requests using the classification will fail. EXAMPLES: cURL: ```shell curl \ --header
|
|
36
|
+
* "Authorization: Bearer $(gcloud auth print-access-token)" \ 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"' ``` Python:
|
|
37
|
+
* ```python import googleapiclient.discovery supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version="v2",
|
|
38
|
+
* discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=v2", ) request = supportApiService.caseClassifications().search( query='display_name:"*Compute
|
|
39
|
+
* Engine*"' ) print(request.execute()) ```
|
|
38
40
|
*/
|
|
39
41
|
await gapi.client.cloudsupport.caseClassifications.search({
|
|
40
42
|
pageSize: 42,
|
|
@@ -42,20 +44,25 @@ gapi.load('client', async () => {
|
|
|
42
44
|
query: "Test string",
|
|
43
45
|
});
|
|
44
46
|
/**
|
|
45
|
-
* Close
|
|
46
|
-
*
|
|
47
|
+
* Close a case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
|
48
|
+
* "https://cloudsupport.googleapis.com/v2/$case:close" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build(
|
|
49
|
+
* serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request =
|
|
50
|
+
* supportApiService.cases().close( name="projects/some-project/cases/43595344" ) print(request.execute()) ```
|
|
47
51
|
*/
|
|
48
52
|
await gapi.client.cloudsupport.cases.close({
|
|
49
53
|
name: "Test string",
|
|
50
54
|
}, {
|
|
51
55
|
});
|
|
52
56
|
/**
|
|
53
|
-
* Create a new case and associate it with a
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* "
|
|
57
|
-
* "
|
|
58
|
-
*
|
|
57
|
+
* Create a new case and associate it with a parent. It must have the following fields set: `display_name`, `description`, `classification`, and `priority`. If you're just testing the API
|
|
58
|
+
* and don't want to route your case to an agent, set `testCase=true`. EXAMPLES: cURL: ```shell parent="projects/some-project" curl \ --request POST \ --header "Authorization: Bearer
|
|
59
|
+
* $(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
|
|
60
|
+
* close", "classification": { "id": "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, "time_zone": "-07:00",
|
|
61
|
+
* "subscriber_email_addresses": [ "foo@domain.com", "bar@domain.com" ], "testCase": true, "priority": "P3" }' \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ``` Python:
|
|
62
|
+
* ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version,
|
|
63
|
+
* discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().create( parent="projects/some-project", body={
|
|
64
|
+
* "displayName": "A Test Case", "description": "This is a test case.", "testCase": True, "priority": "P2", "classification": { "id":
|
|
65
|
+
* "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, }, ) print(request.execute()) ```
|
|
59
66
|
*/
|
|
60
67
|
await gapi.client.cloudsupport.cases.create({
|
|
61
68
|
parent: "Test string",
|
|
@@ -86,11 +93,13 @@ gapi.load('client', async () => {
|
|
|
86
93
|
updateTime: "Test string",
|
|
87
94
|
});
|
|
88
95
|
/**
|
|
89
|
-
* Escalate a case
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
96
|
+
* Escalate a case, starting the Google Cloud Support escalation management process. This operation is only available for some support services. Go to https://cloud.google.com/support and
|
|
97
|
+
* look for 'Technical support escalations' in the feature list to find out which ones let you do that. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \
|
|
98
|
+
* --request POST \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "escalation": { "reason": "BUSINESS_IMPACT",
|
|
99
|
+
* "justification": "This is a test escalation." } }' \ "https://cloudsupport.googleapis.com/v2/$case:escalate" ``` Python: ```python import googleapiclient.discovery api_version = "v2"
|
|
100
|
+
* supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version,
|
|
101
|
+
* discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().escalate(
|
|
102
|
+
* name="projects/some-project/cases/43595344", body={ "escalation": { "reason": "BUSINESS_IMPACT", "justification": "This is a test escalation.", }, }, ) print(request.execute()) ```
|
|
94
103
|
*/
|
|
95
104
|
await gapi.client.cloudsupport.cases.escalate({
|
|
96
105
|
name: "Test string",
|
|
@@ -101,16 +110,20 @@ gapi.load('client', async () => {
|
|
|
101
110
|
},
|
|
102
111
|
});
|
|
103
112
|
/**
|
|
104
|
-
* Retrieve
|
|
105
|
-
*
|
|
113
|
+
* Retrieve a case. EXAMPLES: cURL: ```shell case="projects/some-project/cases/16033687" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
|
114
|
+
* "https://cloudsupport.googleapis.com/v2/$case" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build(
|
|
115
|
+
* serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request =
|
|
116
|
+
* supportApiService.cases().get( name="projects/some-project/cases/43595344", ) print(request.execute()) ```
|
|
106
117
|
*/
|
|
107
118
|
await gapi.client.cloudsupport.cases.get({
|
|
108
119
|
name: "Test string",
|
|
109
120
|
});
|
|
110
121
|
/**
|
|
111
|
-
* Retrieve all cases under
|
|
112
|
-
*
|
|
113
|
-
*
|
|
122
|
+
* Retrieve all cases under a parent, but not its children. For example, listing cases under an organization only returns the cases that are directly parented by that organization. To
|
|
123
|
+
* retrieve cases under an organization and its projects, use `cases.search`. EXAMPLES: cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth
|
|
124
|
+
* print-access-token)" \ "https://cloudsupport.googleapis.com/v2/$parent/cases" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService =
|
|
125
|
+
* googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", )
|
|
126
|
+
* request = supportApiService.cases().list(parent="projects/some-project") print(request.execute()) ```
|
|
114
127
|
*/
|
|
115
128
|
await gapi.client.cloudsupport.cases.list({
|
|
116
129
|
filter: "Test string",
|
|
@@ -119,9 +132,11 @@ gapi.load('client', async () => {
|
|
|
119
132
|
parent: "Test string",
|
|
120
133
|
});
|
|
121
134
|
/**
|
|
122
|
-
* Update
|
|
123
|
-
*
|
|
124
|
-
* "
|
|
135
|
+
* Update a case. Only some fields can be updated. EXAMPLES: cURL: ```shell case="projects/some-project/cases/43595344" curl \ --request PATCH \ --header "Authorization: Bearer $(gcloud
|
|
136
|
+
* auth print-access-token)" \ --header "Content-Type: application/json" \ --data '{ "priority": "P1" }' \ "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority" ``` Python:
|
|
137
|
+
* ```python import googleapiclient.discovery api_version = "v2" supportApiService = googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version,
|
|
138
|
+
* discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", ) request = supportApiService.cases().patch(
|
|
139
|
+
* name="projects/some-project/cases/43112854", body={ "displayName": "This is Now a New Title", "priority": "P2", }, ) print(request.execute()) ```
|
|
125
140
|
*/
|
|
126
141
|
await gapi.client.cloudsupport.cases.patch({
|
|
127
142
|
name: "Test string",
|
|
@@ -153,8 +168,10 @@ gapi.load('client', async () => {
|
|
|
153
168
|
updateTime: "Test string",
|
|
154
169
|
});
|
|
155
170
|
/**
|
|
156
|
-
* Search cases using
|
|
157
|
-
*
|
|
171
|
+
* Search for cases using a query. EXAMPLES: cURL: ```shell parent="projects/some-project" curl \ --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
|
172
|
+
* "https://cloudsupport.googleapis.com/v2/$parent/cases:search" ``` Python: ```python import googleapiclient.discovery api_version = "v2" supportApiService =
|
|
173
|
+
* googleapiclient.discovery.build( serviceName="cloudsupport", version=api_version, discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", )
|
|
174
|
+
* request = supportApiService.cases().search( parent="projects/some-project", query="state=OPEN" ) print(request.execute()) ```
|
|
158
175
|
*/
|
|
159
176
|
await gapi.client.cloudsupport.cases.search({
|
|
160
177
|
pageSize: 42,
|