google-cloud-support-v2 1.3.0 → 1.4.0

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.
@@ -212,7 +212,36 @@ module Google
212
212
  # Service calls
213
213
 
214
214
  ##
215
- # Retrieve the specified case.
215
+ # Retrieve a case.
216
+ #
217
+ # EXAMPLES:
218
+ #
219
+ # cURL:
220
+ #
221
+ # ```shell
222
+ # case="projects/some-project/cases/16033687"
223
+ # curl \
224
+ # --header "Authorization: Bearer $(gcloud auth print-access-token)" \
225
+ # "https://cloudsupport.googleapis.com/v2/$case"
226
+ # ```
227
+ #
228
+ # Python:
229
+ #
230
+ # ```python
231
+ # import googleapiclient.discovery
232
+ #
233
+ # api_version = "v2"
234
+ # supportApiService = googleapiclient.discovery.build(
235
+ # serviceName="cloudsupport",
236
+ # version=api_version,
237
+ # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}",
238
+ # )
239
+ #
240
+ # request = supportApiService.cases().get(
241
+ # name="projects/some-project/cases/43595344",
242
+ # )
243
+ # print(request.execute())
244
+ # ```
216
245
  #
217
246
  # @overload get_case(request, options = nil)
218
247
  # Pass arguments to `get_case` via a request object, either of type
@@ -230,7 +259,7 @@ module Google
230
259
  # the default parameter values, pass an empty Hash as a request object (see above).
231
260
  #
232
261
  # @param name [::String]
233
- # Required. The fully qualified name of a case to be retrieved.
262
+ # Required. The full name of a case to be retrieved.
234
263
  #
235
264
  # @yield [response, operation] Access the result along with the RPC operation
236
265
  # @yieldparam response [::Google::Cloud::Support::V2::Case]
@@ -297,12 +326,39 @@ module Google
297
326
  end
298
327
 
299
328
  ##
300
- # Retrieve all cases under the specified parent.
329
+ # Retrieve all cases under a parent, but not its children.
330
+ #
331
+ # For example, listing cases under an organization only returns the cases
332
+ # that are directly parented by that organization. To retrieve cases
333
+ # under an organization and its projects, use `cases.search`.
334
+ #
335
+ # EXAMPLES:
336
+ #
337
+ # cURL:
301
338
  #
302
- # Note: Listing cases under an Organization returns only the cases directly
303
- # parented by that organization. To retrieve all cases under an organization,
304
- # including cases parented by projects under that organization, use
305
- # `cases.search`.
339
+ # ```shell
340
+ # parent="projects/some-project"
341
+ # curl \
342
+ # --header "Authorization: Bearer $(gcloud auth print-access-token)" \
343
+ # "https://cloudsupport.googleapis.com/v2/$parent/cases"
344
+ # ```
345
+ #
346
+ # Python:
347
+ #
348
+ # ```python
349
+ # import googleapiclient.discovery
350
+ #
351
+ # api_version = "v2"
352
+ # supportApiService = googleapiclient.discovery.build(
353
+ # serviceName="cloudsupport",
354
+ # version=api_version,
355
+ # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}",
356
+ # )
357
+ #
358
+ # request =
359
+ # supportApiService.cases().list(parent="projects/some-project")
360
+ # print(request.execute())
361
+ # ```
306
362
  #
307
363
  # @overload list_cases(request, options = nil)
308
364
  # Pass arguments to `list_cases` via a request object, either of type
@@ -320,21 +376,23 @@ module Google
320
376
  # the default parameter values, pass an empty Hash as a request object (see above).
321
377
  #
322
378
  # @param parent [::String]
323
- # Required. The fully qualified name of parent resource to list cases under.
379
+ # Required. The name of a parent to list cases under.
324
380
  # @param filter [::String]
325
- # An expression written in filter language. If non-empty, the query returns
326
- # the cases that match the filter. Else, the query doesn't filter the cases.
381
+ # An expression used to filter cases.
382
+ #
383
+ # If it's an empty string, then no filtering happens. Otherwise, the endpoint
384
+ # returns the cases that match the filter.
327
385
  #
328
- # Filter expressions use the following fields with the operators equals (`=`)
329
- # and `AND`:
386
+ # Expressions use the following fields separated by `AND` and specified with
387
+ # `=`:
330
388
  #
331
- # - `state`: The accepted values are `OPEN` or `CLOSED`.
332
- # - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You
389
+ # - `state`: Can be `OPEN` or `CLOSED`.
390
+ # - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You
333
391
  # can specify multiple values for priority using the `OR` operator. For
334
392
  # example, `priority=P1 OR priority=P2`.
335
393
  # - `creator.email`: The email address of the case creator.
336
394
  #
337
- # Examples:
395
+ # EXAMPLES:
338
396
  #
339
397
  # - `state=CLOSED`
340
398
  # - `state=OPEN AND creator.email="tester@example.com"`
@@ -416,7 +474,35 @@ module Google
416
474
  end
417
475
 
418
476
  ##
419
- # Search cases using the specified query.
477
+ # Search for cases using a query.
478
+ #
479
+ # EXAMPLES:
480
+ #
481
+ # cURL:
482
+ #
483
+ # ```shell
484
+ # parent="projects/some-project"
485
+ # curl \
486
+ # --header "Authorization: Bearer $(gcloud auth print-access-token)" \
487
+ # "https://cloudsupport.googleapis.com/v2/$parent/cases:search"
488
+ # ```
489
+ #
490
+ # Python:
491
+ #
492
+ # ```python
493
+ # import googleapiclient.discovery
494
+ #
495
+ # api_version = "v2"
496
+ # supportApiService = googleapiclient.discovery.build(
497
+ # serviceName="cloudsupport",
498
+ # version=api_version,
499
+ # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}",
500
+ # )
501
+ # request = supportApiService.cases().search(
502
+ # parent="projects/some-project", query="state=OPEN"
503
+ # )
504
+ # print(request.execute())
505
+ # ```
420
506
  #
421
507
  # @overload search_cases(request, options = nil)
422
508
  # Pass arguments to `search_cases` via a request object, either of type
@@ -434,23 +520,21 @@ module Google
434
520
  # the default parameter values, pass an empty Hash as a request object (see above).
435
521
  #
436
522
  # @param parent [::String]
437
- # The fully qualified name of parent resource to search cases under.
523
+ # The name of the parent resource to search for cases under.
438
524
  # @param query [::String]
439
- # An expression written in filter language.
525
+ # An expression used to filter cases.
440
526
  #
441
- # A query uses the following fields with the operators equals (`=`) and
442
- # `AND`:
527
+ # Expressions use the following fields separated by `AND` and specified with
528
+ # `=`:
443
529
  #
444
530
  # - `organization`: An organization name in the form
445
531
  # `organizations/<organization_id>`.
446
532
  # - `project`: A project name in the form `projects/<project_id>`.
447
- # - `state`: The accepted values are `OPEN` or `CLOSED`.
448
- # - `priority`: The accepted values are `P0`, `P1`, `P2`, `P3`, or `P4`. You
533
+ # - `state`: Can be `OPEN` or `CLOSED`.
534
+ # - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You
449
535
  # can specify multiple values for priority using the `OR` operator. For
450
536
  # example, `priority=P1 OR priority=P2`.
451
537
  # - `creator.email`: The email address of the case creator.
452
- # - `billingAccount`: A billing account in the form
453
- # `billingAccounts/<billing_account_id>`
454
538
  #
455
539
  # You must specify either `organization` or `project`.
456
540
  #
@@ -467,7 +551,6 @@ module Google
467
551
  # - `organization="organizations/123456789"`
468
552
  # - `project="projects/my-project-id"`
469
553
  # - `project="projects/123456789"`
470
- # - `billing_account="billingAccounts/123456-A0B0C0-CUZ789"`
471
554
  # - `organization="organizations/123456789" AND state=CLOSED`
472
555
  # - `project="projects/my-project-id" AND creator.email="tester@example.com"`
473
556
  # - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)`
@@ -549,9 +632,66 @@ module Google
549
632
  end
550
633
 
551
634
  ##
552
- # Create a new case and associate it with the given Google Cloud Resource.
553
- # The case object must have the following fields set: `display_name`,
554
- # `description`, `classification`, and `priority`.
635
+ # Create a new case and associate it with a parent.
636
+ #
637
+ # It must have the following fields set: `display_name`, `description`,
638
+ # `classification`, and `priority`. If you're just testing the API and don't
639
+ # want to route your case to an agent, set `testCase=true`.
640
+ #
641
+ # EXAMPLES:
642
+ #
643
+ # cURL:
644
+ #
645
+ # ```shell
646
+ # parent="projects/some-project"
647
+ # curl \
648
+ # --request POST \
649
+ # --header "Authorization: Bearer $(gcloud auth print-access-token)" \
650
+ # --header 'Content-Type: application/json' \
651
+ # --data '{
652
+ # "display_name": "Test case created by me.",
653
+ # "description": "a random test case, feel free to close",
654
+ # "classification": {
655
+ # "id":
656
+ # "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8"
657
+ # },
658
+ # "time_zone": "-07:00",
659
+ # "subscriber_email_addresses": [
660
+ # "foo@domain.com",
661
+ # "bar@domain.com"
662
+ # ],
663
+ # "testCase": true,
664
+ # "priority": "P3"
665
+ # }' \
666
+ # "https://cloudsupport.googleapis.com/v2/$parent/cases"
667
+ # ```
668
+ #
669
+ # Python:
670
+ #
671
+ # ```python
672
+ # import googleapiclient.discovery
673
+ #
674
+ # api_version = "v2"
675
+ # supportApiService = googleapiclient.discovery.build(
676
+ # serviceName="cloudsupport",
677
+ # version=api_version,
678
+ # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}",
679
+ # )
680
+ # request = supportApiService.cases().create(
681
+ # parent="projects/some-project",
682
+ # body={
683
+ # "displayName": "A Test Case",
684
+ # "description": "This is a test case.",
685
+ # "testCase": True,
686
+ # "priority": "P2",
687
+ # "classification": {
688
+ # "id":
689
+ # "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8"
690
+ # },
691
+ # },
692
+ # )
693
+ # print(request.execute())
694
+ # ```
555
695
  #
556
696
  # @overload create_case(request, options = nil)
557
697
  # Pass arguments to `create_case` via a request object, either of type
@@ -569,8 +709,7 @@ module Google
569
709
  # the default parameter values, pass an empty Hash as a request object (see above).
570
710
  #
571
711
  # @param parent [::String]
572
- # Required. The name of the Google Cloud Resource under which the case should
573
- # be created.
712
+ # Required. The name of the parent under which the case should be created.
574
713
  # @param case [::Google::Cloud::Support::V2::Case, ::Hash]
575
714
  # Required. The case to be created.
576
715
  #
@@ -639,7 +778,44 @@ module Google
639
778
  end
640
779
 
641
780
  ##
642
- # Update the specified case. Only a subset of fields can be updated.
781
+ # Update a case. Only some fields can be updated.
782
+ #
783
+ # EXAMPLES:
784
+ #
785
+ # cURL:
786
+ #
787
+ # ```shell
788
+ # case="projects/some-project/cases/43595344"
789
+ # curl \
790
+ # --request PATCH \
791
+ # --header "Authorization: Bearer $(gcloud auth print-access-token)" \
792
+ # --header "Content-Type: application/json" \
793
+ # --data '{
794
+ # "priority": "P1"
795
+ # }' \
796
+ # "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority"
797
+ # ```
798
+ #
799
+ # Python:
800
+ #
801
+ # ```python
802
+ # import googleapiclient.discovery
803
+ #
804
+ # api_version = "v2"
805
+ # supportApiService = googleapiclient.discovery.build(
806
+ # serviceName="cloudsupport",
807
+ # version=api_version,
808
+ # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}",
809
+ # )
810
+ # request = supportApiService.cases().patch(
811
+ # name="projects/some-project/cases/43112854",
812
+ # body={
813
+ # "displayName": "This is Now a New Title",
814
+ # "priority": "P2",
815
+ # },
816
+ # )
817
+ # print(request.execute())
818
+ # ```
643
819
  #
644
820
  # @overload update_case(request, options = nil)
645
821
  # Pass arguments to `update_case` via a request object, either of type
@@ -657,16 +833,15 @@ module Google
657
833
  # the default parameter values, pass an empty Hash as a request object (see above).
658
834
  #
659
835
  # @param case [::Google::Cloud::Support::V2::Case, ::Hash]
660
- # Required. The case object to update.
836
+ # Required. The case to update.
661
837
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
662
- # A list of attributes of the case object that should be updated
663
- # as part of this request. Supported values are `priority`, `display_name`,
664
- # and `subscriber_email_addresses`. If no fields are specified, all supported
665
- # fields are updated.
666
- #
667
- # WARNING: If you do not provide a field mask, then you might accidentally
668
- # clear some fields. For example, if you leave the field mask empty and do
669
- # not provide a value for `subscriber_email_addresses`, then
838
+ # A list of attributes of the case that should be updated. Supported values
839
+ # are `priority`, `display_name`, and `subscriber_email_addresses`. If no
840
+ # fields are specified, all supported fields are updated.
841
+ #
842
+ # Be careful - if you do not provide a field mask, then you might
843
+ # accidentally clear some fields. For example, if you leave the field mask
844
+ # empty and do not provide a value for `subscriber_email_addresses`, then
670
845
  # `subscriber_email_addresses` is updated to empty.
671
846
  #
672
847
  # @yield [response, operation] Access the result along with the RPC operation
@@ -734,13 +909,55 @@ module Google
734
909
  end
735
910
 
736
911
  ##
737
- # Escalate a case. Escalating a case will initiate the Google Cloud Support
738
- # escalation management process.
912
+ # Escalate a case, starting the Google Cloud Support escalation management
913
+ # process.
739
914
  #
740
- # This operation is only available to certain Customer Care tiers. Go to
915
+ # This operation is only available for some support services. Go to
741
916
  # https://cloud.google.com/support and look for 'Technical support
742
- # escalations' in the feature list to find out which tiers are able to
743
- # perform escalations.
917
+ # escalations' in the feature list to find out which ones let you
918
+ # do that.
919
+ #
920
+ # EXAMPLES:
921
+ #
922
+ # cURL:
923
+ #
924
+ # ```shell
925
+ # case="projects/some-project/cases/43595344"
926
+ # curl \
927
+ # --request POST \
928
+ # --header "Authorization: Bearer $(gcloud auth print-access-token)" \
929
+ # --header "Content-Type: application/json" \
930
+ # --data '{
931
+ # "escalation": {
932
+ # "reason": "BUSINESS_IMPACT",
933
+ # "justification": "This is a test escalation."
934
+ # }
935
+ # }' \
936
+ # "https://cloudsupport.googleapis.com/v2/$case:escalate"
937
+ # ```
938
+ #
939
+ # Python:
940
+ #
941
+ # ```python
942
+ # import googleapiclient.discovery
943
+ #
944
+ # api_version = "v2"
945
+ # supportApiService = googleapiclient.discovery.build(
946
+ # serviceName="cloudsupport",
947
+ # version=api_version,
948
+ # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}",
949
+ # )
950
+ # request = supportApiService.cases().escalate(
951
+ # name="projects/some-project/cases/43595344",
952
+ # body={
953
+ # "escalation": {
954
+ # "reason": "BUSINESS_IMPACT",
955
+ # "justification": "This is a test escalation.",
956
+ # },
957
+ # },
958
+ # )
959
+ # print(request.execute())
960
+ # ```
744
961
  #
745
962
  # @overload escalate_case(request, options = nil)
746
963
  # Pass arguments to `escalate_case` via a request object, either of type
@@ -758,9 +975,9 @@ module Google
758
975
  # the default parameter values, pass an empty Hash as a request object (see above).
759
976
  #
760
977
  # @param name [::String]
761
- # Required. The fully qualified name of the Case resource to be escalated.
978
+ # Required. The name of the case to be escalated.
762
979
  # @param escalation [::Google::Cloud::Support::V2::Escalation, ::Hash]
763
- # The escalation object to be sent with the escalation request.
980
+ # The escalation information to be sent with the escalation request.
764
981
  #
765
982
  # @yield [response, operation] Access the result along with the RPC operation
766
983
  # @yieldparam response [::Google::Cloud::Support::V2::Case]
@@ -827,7 +1044,36 @@ module Google
827
1044
  end
828
1045
 
829
1046
  ##
830
- # Close the specified case.
1047
+ # Close a case.
1048
+ #
1049
+ # EXAMPLES:
1050
+ #
1051
+ # cURL:
1052
+ #
1053
+ # ```shell
1054
+ # case="projects/some-project/cases/43595344"
1055
+ # curl \
1056
+ # --request POST \
1057
+ # --header "Authorization: Bearer $(gcloud auth print-access-token)" \
1058
+ # "https://cloudsupport.googleapis.com/v2/$case:close"
1059
+ # ```
1060
+ #
1061
+ # Python:
1062
+ #
1063
+ # ```python
1064
+ # import googleapiclient.discovery
1065
+ #
1066
+ # api_version = "v2"
1067
+ # supportApiService = googleapiclient.discovery.build(
1068
+ # serviceName="cloudsupport",
1069
+ # version=api_version,
1070
+ # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=\\{api_version}",
1071
+ # )
1072
+ # request = supportApiService.cases().close(
1073
+ # name="projects/some-project/cases/43595344"
1074
+ # )
1075
+ # print(request.execute())
1076
+ # ```
831
1077
  #
832
1078
  # @overload close_case(request, options = nil)
833
1079
  # Pass arguments to `close_case` via a request object, either of type
@@ -845,7 +1091,7 @@ module Google
845
1091
  # the default parameter values, pass an empty Hash as a request object (see above).
846
1092
  #
847
1093
  # @param name [::String]
848
- # Required. The fully qualified name of the case resource to be closed.
1094
+ # Required. The name of the case to close.
849
1095
  #
850
1096
  # @yield [response, operation] Access the result along with the RPC operation
851
1097
  # @yieldparam response [::Google::Cloud::Support::V2::Case]
@@ -912,10 +1158,42 @@ module Google
912
1158
  end
913
1159
 
914
1160
  ##
915
- # Retrieve valid classifications to be used when creating a support case.
916
- # The classications are hierarchical, with each classification containing
917
- # all levels of the hierarchy, separated by " > ". For example "Technical
918
- # Issue > Compute > Compute Engine".
1161
+ # Retrieve valid classifications to use when creating a support case.
1162
+ #
1163
+ # Classifications are hierarchical. Each classification is a string
1164
+ # containing all levels of the hierarchy separated by `" > "`. For example,
1165
+ # `"Technical Issue > Compute > Compute Engine"`.
1166
+ #
1167
+ # Classification IDs returned by this endpoint are valid for at least six
1168
+ # months. When a classification is deactivated, this endpoint immediately
1169
+ # stops returning it. After six months, `case.create` requests using the
1170
+ # classification will fail.
1171
+ #
1172
+ # EXAMPLES:
1173
+ #
1174
+ # cURL:
1175
+ #
1176
+ # ```shell
1177
+ # curl \
1178
+ # --header "Authorization: Bearer $(gcloud auth print-access-token)" \
1179
+ # 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"'
1180
+ # ```
1181
+ #
1182
+ # Python:
1183
+ #
1184
+ # ```python
1185
+ # import googleapiclient.discovery
1186
+ #
1187
+ # supportApiService = googleapiclient.discovery.build(
1188
+ # serviceName="cloudsupport",
1189
+ # version="v2",
1190
+ # discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=v2",
1191
+ # )
1192
+ # request = supportApiService.caseClassifications().search(
1193
+ # query='display_name:"*Compute Engine*"'
1194
+ # )
1195
+ # print(request.execute())
1196
+ # ```
919
1197
  #
920
1198
  # @overload search_case_classifications(request, options = nil)
921
1199
  # Pass arguments to `search_case_classifications` via a request object, either of type
@@ -933,11 +1211,12 @@ module Google
933
1211
  # the default parameter values, pass an empty Hash as a request object (see above).
934
1212
  #
935
1213
  # @param query [::String]
936
- # An expression written in the Google Cloud filter language. If non-empty,
937
- # then only cases whose fields match the filter are returned. If empty, then
938
- # no messages are filtered out.
1214
+ # An expression used to filter case classifications.
1215
+ #
1216
+ # If it's an empty string, then no filtering happens. Otherwise, case
1217
+ # classifications will be returned that match the filter.
939
1218
  # @param page_size [::Integer]
940
- # The maximum number of cases fetched with each request.
1219
+ # The maximum number of classifications fetched with each request.
941
1220
  # @param page_token [::String]
942
1221
  # A token identifying the page of results to return. If unspecified, the
943
1222
  # first page is retrieved.