google-cloud-support-v2beta 0.a → 0.1.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.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +154 -8
- data/lib/google/cloud/support/v2beta/actor_pb.rb +44 -0
- data/lib/google/cloud/support/v2beta/attachment_pb.rb +49 -0
- data/lib/google/cloud/support/v2beta/attachment_service_pb.rb +50 -0
- data/lib/google/cloud/support/v2beta/attachment_service_services_pb.rb +75 -0
- data/lib/google/cloud/support/v2beta/case_attachment_service/client.rb +510 -0
- data/lib/google/cloud/support/v2beta/case_attachment_service/credentials.rb +47 -0
- data/lib/google/cloud/support/v2beta/case_attachment_service/paths.rb +72 -0
- data/lib/google/cloud/support/v2beta/case_attachment_service/rest/client.rb +477 -0
- data/lib/google/cloud/support/v2beta/case_attachment_service/rest/service_stub.rb +149 -0
- data/lib/google/cloud/support/v2beta/case_attachment_service/rest.rb +52 -0
- data/lib/google/cloud/support/v2beta/case_attachment_service.rb +55 -0
- data/lib/google/cloud/support/v2beta/case_pb.rb +54 -0
- data/lib/google/cloud/support/v2beta/case_service/client.rb +1526 -0
- data/lib/google/cloud/support/v2beta/case_service/credentials.rb +47 -0
- data/lib/google/cloud/support/v2beta/case_service/paths.rb +100 -0
- data/lib/google/cloud/support/v2beta/case_service/rest/client.rb +1452 -0
- data/lib/google/cloud/support/v2beta/case_service/rest/service_stub.rb +624 -0
- data/lib/google/cloud/support/v2beta/case_service/rest.rb +52 -0
- data/lib/google/cloud/support/v2beta/case_service.rb +55 -0
- data/lib/google/cloud/support/v2beta/case_service_pb.rb +63 -0
- data/lib/google/cloud/support/v2beta/case_service_services_pb.rb +356 -0
- data/lib/google/cloud/support/v2beta/comment_pb.rb +49 -0
- data/lib/google/cloud/support/v2beta/comment_service/client.rb +639 -0
- data/lib/google/cloud/support/v2beta/comment_service/credentials.rb +47 -0
- data/lib/google/cloud/support/v2beta/comment_service/paths.rb +115 -0
- data/lib/google/cloud/support/v2beta/comment_service/rest/client.rb +599 -0
- data/lib/google/cloud/support/v2beta/comment_service/rest/service_stub.rb +219 -0
- data/lib/google/cloud/support/v2beta/comment_service/rest.rb +52 -0
- data/lib/google/cloud/support/v2beta/comment_service.rb +55 -0
- data/lib/google/cloud/support/v2beta/comment_service_pb.rb +51 -0
- data/lib/google/cloud/support/v2beta/comment_service_services_pb.rb +117 -0
- data/lib/google/cloud/support/v2beta/content_pb.rb +42 -0
- data/lib/google/cloud/support/v2beta/email_message_pb.rb +51 -0
- data/lib/google/cloud/support/v2beta/escalation_pb.rb +45 -0
- data/lib/google/cloud/support/v2beta/feed_item_pb.rb +52 -0
- data/lib/google/cloud/support/v2beta/feed_service/client.rb +482 -0
- data/lib/google/cloud/support/v2beta/feed_service/credentials.rb +47 -0
- data/lib/google/cloud/support/v2beta/feed_service/paths.rb +72 -0
- data/lib/google/cloud/support/v2beta/feed_service/rest/client.rb +449 -0
- data/lib/google/cloud/support/v2beta/feed_service/rest/service_stub.rb +149 -0
- data/lib/google/cloud/support/v2beta/feed_service/rest.rb +52 -0
- data/lib/google/cloud/support/v2beta/feed_service.rb +55 -0
- data/lib/google/cloud/support/v2beta/feed_service_pb.rb +50 -0
- data/lib/google/cloud/support/v2beta/feed_service_services_pb.rb +46 -0
- data/lib/google/cloud/support/v2beta/rest.rb +40 -0
- data/lib/google/cloud/support/v2beta/version.rb +7 -2
- data/lib/google/cloud/support/v2beta.rb +48 -0
- data/lib/google-cloud-support-v2beta.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +473 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +227 -0
- data/proto_docs/google/cloud/support/v2beta/actor.rb +59 -0
- data/proto_docs/google/cloud/support/v2beta/attachment.rb +58 -0
- data/proto_docs/google/cloud/support/v2beta/attachment_service.rb +63 -0
- data/proto_docs/google/cloud/support/v2beta/case.rb +215 -0
- data/proto_docs/google/cloud/support/v2beta/case_service.rb +245 -0
- data/proto_docs/google/cloud/support/v2beta/comment.rb +58 -0
- data/proto_docs/google/cloud/support/v2beta/comment_service.rb +68 -0
- data/proto_docs/google/cloud/support/v2beta/content.rb +35 -0
- data/proto_docs/google/cloud/support/v2beta/email_message.rb +55 -0
- data/proto_docs/google/cloud/support/v2beta/escalation.rb +55 -0
- data/proto_docs/google/cloud/support/v2beta/feed_item.rb +56 -0
- data/proto_docs/google/cloud/support/v2beta/feed_service.rb +65 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- metadata +105 -9
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/support/v2beta/version"
|
24
|
+
|
25
|
+
require "google/cloud/support/v2beta/case_service/credentials"
|
26
|
+
require "google/cloud/support/v2beta/case_service/paths"
|
27
|
+
require "google/cloud/support/v2beta/case_service/client"
|
28
|
+
require "google/cloud/support/v2beta/case_service/rest"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module Support
|
33
|
+
module V2beta
|
34
|
+
##
|
35
|
+
# A service to manage Google Cloud support cases.
|
36
|
+
#
|
37
|
+
# @example Load this service and instantiate a gRPC client
|
38
|
+
#
|
39
|
+
# require "google/cloud/support/v2beta/case_service"
|
40
|
+
# client = ::Google::Cloud::Support::V2beta::CaseService::Client.new
|
41
|
+
#
|
42
|
+
# @example Load this service and instantiate a REST client
|
43
|
+
#
|
44
|
+
# require "google/cloud/support/v2beta/case_service/rest"
|
45
|
+
# client = ::Google::Cloud::Support::V2beta::CaseService::Rest::Client.new
|
46
|
+
#
|
47
|
+
module CaseService
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
helper_path = ::File.join __dir__, "case_service", "helpers.rb"
|
55
|
+
require "google/cloud/support/v2beta/case_service/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: google/cloud/support/v2beta/case_service.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/annotations_pb'
|
8
|
+
require 'google/api/client_pb'
|
9
|
+
require 'google/api/field_behavior_pb'
|
10
|
+
require 'google/api/resource_pb'
|
11
|
+
require 'google/cloud/support/v2beta/case_pb'
|
12
|
+
require 'google/cloud/support/v2beta/escalation_pb'
|
13
|
+
require 'google/protobuf/field_mask_pb'
|
14
|
+
|
15
|
+
|
16
|
+
descriptor_data = "\n.google/cloud/support/v2beta/case_service.proto\x12\x1bgoogle.cloud.support.v2beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/support/v2beta/case.proto\x1a,google/cloud/support/v2beta/escalation.proto\x1a google/protobuf/field_mask.proto\"H\n\x0eGetCaseRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n cloudsupport.googleapis.com/Case\"\x83\x01\n\x11\x43reateCaseRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 cloudsupport.googleapis.com/Case\x12\x34\n\x04\x63\x61se\x18\x02 \x01(\x0b\x32!.google.cloud.support.v2beta.CaseB\x03\xe0\x41\x02\"\xd9\x01\n\x10ListCasesRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 cloudsupport.googleapis.com/Case\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t\x12\x43\n\x0cproduct_line\x18\x08 \x01(\x0e\x32(.google.cloud.support.v2beta.ProductLineH\x00\x88\x01\x01\x42\x0f\n\r_product_line\"^\n\x11ListCasesResponse\x12\x30\n\x05\x63\x61ses\x18\x01 \x03(\x0b\x32!.google.cloud.support.v2beta.Case\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Z\n\x12SearchCasesRequest\x12\x0e\n\x06parent\x18\x04 \x01(\t\x12\r\n\x05query\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"`\n\x13SearchCasesResponse\x12\x30\n\x05\x63\x61ses\x18\x01 \x03(\x0b\x32!.google.cloud.support.v2beta.Case\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8a\x01\n\x13\x45scalateCaseRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n cloudsupport.googleapis.com/Case\x12;\n\nescalation\x18\x02 \x01(\x0b\x32\'.google.cloud.support.v2beta.Escalation\"z\n\x11UpdateCaseRequest\x12\x34\n\x04\x63\x61se\x18\x01 \x01(\x0b\x32!.google.cloud.support.v2beta.CaseB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"J\n\x10\x43loseCaseRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n cloudsupport.googleapis.com/Case\"\x94\x01\n SearchCaseClassificationsRequest\x12\r\n\x05query\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12:\n\x07product\x18\x07 \x01(\x0b\x32$.google.cloud.support.v2beta.ProductB\x03\xe0\x41\x01\"\x8b\x01\n!SearchCaseClassificationsResponse\x12M\n\x14\x63\x61se_classifications\x18\x01 \x03(\x0b\x32/.google.cloud.support.v2beta.CaseClassification\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xcb\r\n\x0b\x43\x61seService\x12\xb5\x01\n\x07GetCase\x12+.google.cloud.support.v2beta.GetCaseRequest\x1a!.google.cloud.support.v2beta.Case\"Z\xda\x41\x04name\x82\xd3\xe4\x93\x02M\x12!/v2beta/{name=projects/*/cases/*}Z(\x12&/v2beta/{name=organizations/*/cases/*}\x12\xc8\x01\n\tListCases\x12-.google.cloud.support.v2beta.ListCasesRequest\x1a..google.cloud.support.v2beta.ListCasesResponse\"\\\xda\x41\x06parent\x82\xd3\xe4\x93\x02M\x12!/v2beta/{parent=projects/*}/casesZ(\x12&/v2beta/{parent=organizations/*}/cases\x12\xd3\x01\n\x0bSearchCases\x12/.google.cloud.support.v2beta.SearchCasesRequest\x1a\x30.google.cloud.support.v2beta.SearchCasesResponse\"a\x82\xd3\xe4\x93\x02[\x12(/v2beta/{parent=projects/*}/cases:searchZ/\x12-/v2beta/{parent=organizations/*}/cases:search\x12\xce\x01\n\nCreateCase\x12..google.cloud.support.v2beta.CreateCaseRequest\x1a!.google.cloud.support.v2beta.Case\"m\xda\x41\x0bparent,case\x82\xd3\xe4\x93\x02Y\"!/v2beta/{parent=projects/*}/cases:\x04\x63\x61seZ.\"&/v2beta/{parent=organizations/*}/cases:\x04\x63\x61se\x12\xdd\x01\n\nUpdateCase\x12..google.cloud.support.v2beta.UpdateCaseRequest\x1a!.google.cloud.support.v2beta.Case\"|\xda\x41\x10\x63\x61se,update_mask\x82\xd3\xe4\x93\x02\x63\x32&/v2beta/{case.name=projects/*/cases/*}:\x04\x63\x61seZ32+/v2beta/{case.name=organizations/*/cases/*}:\x04\x63\x61se\x12\xd0\x01\n\x0c\x45scalateCase\x12\x30.google.cloud.support.v2beta.EscalateCaseRequest\x1a!.google.cloud.support.v2beta.Case\"k\x82\xd3\xe4\x93\x02\x65\"*/v2beta/{name=projects/*/cases/*}:escalate:\x01*Z4\"//v2beta/{name=organizations/*/cases/*}:escalate:\x01*\x12\xc4\x01\n\tCloseCase\x12-.google.cloud.support.v2beta.CloseCaseRequest\x1a!.google.cloud.support.v2beta.Case\"e\x82\xd3\xe4\x93\x02_\"\'/v2beta/{name=projects/*/cases/*}:close:\x01*Z1\",/v2beta/{name=organizations/*/cases/*}:close:\x01*\x12\xc6\x01\n\x19SearchCaseClassifications\x12=.google.cloud.support.v2beta.SearchCaseClassificationsRequest\x1a>.google.cloud.support.v2beta.SearchCaseClassificationsResponse\"*\x82\xd3\xe4\x93\x02$\x12\"/v2beta/caseClassifications:search\x1aO\xca\x41\x1b\x63loudsupport.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xcd\x01\n\x1f\x63om.google.cloud.support.v2betaB\x10\x43\x61seServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xaa\x02\x1bGoogle.Cloud.Support.V2Beta\xca\x02\x1bGoogle\\Cloud\\Support\\V2beta\xea\x02\x1eGoogle::Cloud::Support::V2betab\x06proto3"
|
17
|
+
|
18
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
19
|
+
|
20
|
+
begin
|
21
|
+
pool.add_serialized_file(descriptor_data)
|
22
|
+
rescue TypeError
|
23
|
+
# Compatibility code: will be removed in the next major version.
|
24
|
+
require 'google/protobuf/descriptor_pb'
|
25
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
26
|
+
parsed.clear_dependency
|
27
|
+
serialized = parsed.class.encode(parsed)
|
28
|
+
file = pool.add_serialized_file(serialized)
|
29
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
30
|
+
imports = [
|
31
|
+
["google.cloud.support.v2beta.Case", "google/cloud/support/v2beta/case.proto"],
|
32
|
+
["google.cloud.support.v2beta.Escalation", "google/cloud/support/v2beta/escalation.proto"],
|
33
|
+
["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
|
34
|
+
]
|
35
|
+
imports.each do |type_name, expected_filename|
|
36
|
+
import_file = pool.lookup(type_name).file_descriptor
|
37
|
+
if import_file.name != expected_filename
|
38
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
42
|
+
warn "This will become an error in the next major version."
|
43
|
+
end
|
44
|
+
|
45
|
+
module Google
|
46
|
+
module Cloud
|
47
|
+
module Support
|
48
|
+
module V2beta
|
49
|
+
GetCaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.GetCaseRequest").msgclass
|
50
|
+
CreateCaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.CreateCaseRequest").msgclass
|
51
|
+
ListCasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.ListCasesRequest").msgclass
|
52
|
+
ListCasesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.ListCasesResponse").msgclass
|
53
|
+
SearchCasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.SearchCasesRequest").msgclass
|
54
|
+
SearchCasesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.SearchCasesResponse").msgclass
|
55
|
+
EscalateCaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.EscalateCaseRequest").msgclass
|
56
|
+
UpdateCaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.UpdateCaseRequest").msgclass
|
57
|
+
CloseCaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.CloseCaseRequest").msgclass
|
58
|
+
SearchCaseClassificationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.SearchCaseClassificationsRequest").msgclass
|
59
|
+
SearchCaseClassificationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.SearchCaseClassificationsResponse").msgclass
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,356 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/support/v2beta/case_service.proto for package 'Google.Cloud.Support.V2beta'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2025 Google LLC
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/cloud/support/v2beta/case_service_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Support
|
25
|
+
module V2beta
|
26
|
+
module CaseService
|
27
|
+
# A service to manage Google Cloud support cases.
|
28
|
+
class Service
|
29
|
+
|
30
|
+
include ::GRPC::GenericService
|
31
|
+
|
32
|
+
self.marshal_class_method = :encode
|
33
|
+
self.unmarshal_class_method = :decode
|
34
|
+
self.service_name = 'google.cloud.support.v2beta.CaseService'
|
35
|
+
|
36
|
+
# Retrieve a case.
|
37
|
+
#
|
38
|
+
# EXAMPLES:
|
39
|
+
#
|
40
|
+
# cURL:
|
41
|
+
#
|
42
|
+
# ```shell
|
43
|
+
# case="projects/some-project/cases/16033687"
|
44
|
+
# curl \
|
45
|
+
# --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
46
|
+
# "https://cloudsupport.googleapis.com/v2/$case"
|
47
|
+
# ```
|
48
|
+
#
|
49
|
+
# Python:
|
50
|
+
#
|
51
|
+
# ```python
|
52
|
+
# import googleapiclient.discovery
|
53
|
+
#
|
54
|
+
# api_version = "v2"
|
55
|
+
# supportApiService = googleapiclient.discovery.build(
|
56
|
+
# serviceName="cloudsupport",
|
57
|
+
# version=api_version,
|
58
|
+
# discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
|
59
|
+
# )
|
60
|
+
#
|
61
|
+
# request = supportApiService.cases().get(
|
62
|
+
# name="projects/some-project/cases/43595344",
|
63
|
+
# )
|
64
|
+
# print(request.execute())
|
65
|
+
# ```
|
66
|
+
rpc :GetCase, ::Google::Cloud::Support::V2beta::GetCaseRequest, ::Google::Cloud::Support::V2beta::Case
|
67
|
+
# Retrieve all cases under a parent, but not its children.
|
68
|
+
#
|
69
|
+
# For example, listing cases under an organization only returns the cases
|
70
|
+
# that are directly parented by that organization. To retrieve cases
|
71
|
+
# under an organization and its projects, use `cases.search`.
|
72
|
+
#
|
73
|
+
# EXAMPLES:
|
74
|
+
#
|
75
|
+
# cURL:
|
76
|
+
#
|
77
|
+
# ```shell
|
78
|
+
# parent="projects/some-project"
|
79
|
+
# curl \
|
80
|
+
# --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
81
|
+
# "https://cloudsupport.googleapis.com/v2/$parent/cases"
|
82
|
+
# ```
|
83
|
+
#
|
84
|
+
# Python:
|
85
|
+
#
|
86
|
+
# ```python
|
87
|
+
# import googleapiclient.discovery
|
88
|
+
#
|
89
|
+
# api_version = "v2"
|
90
|
+
# supportApiService = googleapiclient.discovery.build(
|
91
|
+
# serviceName="cloudsupport",
|
92
|
+
# version=api_version,
|
93
|
+
# discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
|
94
|
+
# )
|
95
|
+
#
|
96
|
+
# request =
|
97
|
+
# supportApiService.cases().list(parent="projects/some-project")
|
98
|
+
# print(request.execute())
|
99
|
+
# ```
|
100
|
+
rpc :ListCases, ::Google::Cloud::Support::V2beta::ListCasesRequest, ::Google::Cloud::Support::V2beta::ListCasesResponse
|
101
|
+
# Search for cases using a query.
|
102
|
+
#
|
103
|
+
# EXAMPLES:
|
104
|
+
#
|
105
|
+
# cURL:
|
106
|
+
#
|
107
|
+
# ```shell
|
108
|
+
# parent="projects/some-project"
|
109
|
+
# curl \
|
110
|
+
# --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
111
|
+
# "https://cloudsupport.googleapis.com/v2/$parent/cases:search"
|
112
|
+
# ```
|
113
|
+
#
|
114
|
+
# Python:
|
115
|
+
#
|
116
|
+
# ```python
|
117
|
+
# import googleapiclient.discovery
|
118
|
+
#
|
119
|
+
# api_version = "v2"
|
120
|
+
# supportApiService = googleapiclient.discovery.build(
|
121
|
+
# serviceName="cloudsupport",
|
122
|
+
# version=api_version,
|
123
|
+
# discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
|
124
|
+
# )
|
125
|
+
# request = supportApiService.cases().search(
|
126
|
+
# parent="projects/some-project", query="state=OPEN"
|
127
|
+
# )
|
128
|
+
# print(request.execute())
|
129
|
+
# ```
|
130
|
+
rpc :SearchCases, ::Google::Cloud::Support::V2beta::SearchCasesRequest, ::Google::Cloud::Support::V2beta::SearchCasesResponse
|
131
|
+
# Create a new case and associate it with a parent.
|
132
|
+
#
|
133
|
+
# It must have the following fields set: `display_name`, `description`,
|
134
|
+
# `classification`, and `priority`. If you're just testing the API and don't
|
135
|
+
# want to route your case to an agent, set `testCase=true`.
|
136
|
+
#
|
137
|
+
# EXAMPLES:
|
138
|
+
#
|
139
|
+
# cURL:
|
140
|
+
#
|
141
|
+
# ```shell
|
142
|
+
# parent="projects/some-project"
|
143
|
+
# curl \
|
144
|
+
# --request POST \
|
145
|
+
# --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
146
|
+
# --header 'Content-Type: application/json' \
|
147
|
+
# --data '{
|
148
|
+
# "display_name": "Test case created by me.",
|
149
|
+
# "description": "a random test case, feel free to close",
|
150
|
+
# "classification": {
|
151
|
+
# "id":
|
152
|
+
# "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8"
|
153
|
+
# },
|
154
|
+
# "time_zone": "-07:00",
|
155
|
+
# "subscriber_email_addresses": [
|
156
|
+
# "foo@domain.com",
|
157
|
+
# "bar@domain.com"
|
158
|
+
# ],
|
159
|
+
# "testCase": true,
|
160
|
+
# "priority": "P3"
|
161
|
+
# }' \
|
162
|
+
# "https://cloudsupport.googleapis.com/v2/$parent/cases"
|
163
|
+
# ```
|
164
|
+
#
|
165
|
+
# Python:
|
166
|
+
#
|
167
|
+
# ```python
|
168
|
+
# import googleapiclient.discovery
|
169
|
+
#
|
170
|
+
# api_version = "v2"
|
171
|
+
# supportApiService = googleapiclient.discovery.build(
|
172
|
+
# serviceName="cloudsupport",
|
173
|
+
# version=api_version,
|
174
|
+
# discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
|
175
|
+
# )
|
176
|
+
# request = supportApiService.cases().create(
|
177
|
+
# parent="projects/some-project",
|
178
|
+
# body={
|
179
|
+
# "displayName": "A Test Case",
|
180
|
+
# "description": "This is a test case.",
|
181
|
+
# "testCase": True,
|
182
|
+
# "priority": "P2",
|
183
|
+
# "classification": {
|
184
|
+
# "id":
|
185
|
+
# "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8"
|
186
|
+
# },
|
187
|
+
# },
|
188
|
+
# )
|
189
|
+
# print(request.execute())
|
190
|
+
# ```
|
191
|
+
rpc :CreateCase, ::Google::Cloud::Support::V2beta::CreateCaseRequest, ::Google::Cloud::Support::V2beta::Case
|
192
|
+
# Update a case. Only some fields can be updated.
|
193
|
+
#
|
194
|
+
# EXAMPLES:
|
195
|
+
#
|
196
|
+
# cURL:
|
197
|
+
#
|
198
|
+
# ```shell
|
199
|
+
# case="projects/some-project/cases/43595344"
|
200
|
+
# curl \
|
201
|
+
# --request PATCH \
|
202
|
+
# --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
203
|
+
# --header "Content-Type: application/json" \
|
204
|
+
# --data '{
|
205
|
+
# "priority": "P1"
|
206
|
+
# }' \
|
207
|
+
# "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority"
|
208
|
+
# ```
|
209
|
+
#
|
210
|
+
# Python:
|
211
|
+
#
|
212
|
+
# ```python
|
213
|
+
# import googleapiclient.discovery
|
214
|
+
#
|
215
|
+
# api_version = "v2"
|
216
|
+
# supportApiService = googleapiclient.discovery.build(
|
217
|
+
# serviceName="cloudsupport",
|
218
|
+
# version=api_version,
|
219
|
+
# discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
|
220
|
+
# )
|
221
|
+
# request = supportApiService.cases().patch(
|
222
|
+
# name="projects/some-project/cases/43112854",
|
223
|
+
# body={
|
224
|
+
# "displayName": "This is Now a New Title",
|
225
|
+
# "priority": "P2",
|
226
|
+
# },
|
227
|
+
# )
|
228
|
+
# print(request.execute())
|
229
|
+
# ```
|
230
|
+
rpc :UpdateCase, ::Google::Cloud::Support::V2beta::UpdateCaseRequest, ::Google::Cloud::Support::V2beta::Case
|
231
|
+
# Escalate a case, starting the Google Cloud Support escalation management
|
232
|
+
# process.
|
233
|
+
#
|
234
|
+
# This operation is only available for some support services. Go to
|
235
|
+
# https://cloud.google.com/support and look for 'Technical support
|
236
|
+
# escalations' in the feature list to find out which ones let you
|
237
|
+
# do that.
|
238
|
+
#
|
239
|
+
# EXAMPLES:
|
240
|
+
#
|
241
|
+
# cURL:
|
242
|
+
#
|
243
|
+
# ```shell
|
244
|
+
# case="projects/some-project/cases/43595344"
|
245
|
+
# curl \
|
246
|
+
# --request POST \
|
247
|
+
# --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
248
|
+
# --header "Content-Type: application/json" \
|
249
|
+
# --data '{
|
250
|
+
# "escalation": {
|
251
|
+
# "reason": "BUSINESS_IMPACT",
|
252
|
+
# "justification": "This is a test escalation."
|
253
|
+
# }
|
254
|
+
# }' \
|
255
|
+
# "https://cloudsupport.googleapis.com/v2/$case:escalate"
|
256
|
+
# ```
|
257
|
+
#
|
258
|
+
# Python:
|
259
|
+
#
|
260
|
+
# ```python
|
261
|
+
# import googleapiclient.discovery
|
262
|
+
#
|
263
|
+
# api_version = "v2"
|
264
|
+
# supportApiService = googleapiclient.discovery.build(
|
265
|
+
# serviceName="cloudsupport",
|
266
|
+
# version=api_version,
|
267
|
+
# discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
|
268
|
+
# )
|
269
|
+
# request = supportApiService.cases().escalate(
|
270
|
+
# name="projects/some-project/cases/43595344",
|
271
|
+
# body={
|
272
|
+
# "escalation": {
|
273
|
+
# "reason": "BUSINESS_IMPACT",
|
274
|
+
# "justification": "This is a test escalation.",
|
275
|
+
# },
|
276
|
+
# },
|
277
|
+
# )
|
278
|
+
# print(request.execute())
|
279
|
+
# ```
|
280
|
+
rpc :EscalateCase, ::Google::Cloud::Support::V2beta::EscalateCaseRequest, ::Google::Cloud::Support::V2beta::Case
|
281
|
+
# Close a case.
|
282
|
+
#
|
283
|
+
# EXAMPLES:
|
284
|
+
#
|
285
|
+
# cURL:
|
286
|
+
#
|
287
|
+
# ```shell
|
288
|
+
# case="projects/some-project/cases/43595344"
|
289
|
+
# curl \
|
290
|
+
# --request POST \
|
291
|
+
# --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
292
|
+
# "https://cloudsupport.googleapis.com/v2/$case:close"
|
293
|
+
# ```
|
294
|
+
#
|
295
|
+
# Python:
|
296
|
+
#
|
297
|
+
# ```python
|
298
|
+
# import googleapiclient.discovery
|
299
|
+
#
|
300
|
+
# api_version = "v2"
|
301
|
+
# supportApiService = googleapiclient.discovery.build(
|
302
|
+
# serviceName="cloudsupport",
|
303
|
+
# version=api_version,
|
304
|
+
# discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
|
305
|
+
# )
|
306
|
+
# request = supportApiService.cases().close(
|
307
|
+
# name="projects/some-project/cases/43595344"
|
308
|
+
# )
|
309
|
+
# print(request.execute())
|
310
|
+
# ```
|
311
|
+
rpc :CloseCase, ::Google::Cloud::Support::V2beta::CloseCaseRequest, ::Google::Cloud::Support::V2beta::Case
|
312
|
+
# Retrieve valid classifications to use when creating a support case.
|
313
|
+
#
|
314
|
+
# Classifications are hierarchical. Each classification is a string
|
315
|
+
# containing all levels of the hierarchy separated by `" > "`. For example,
|
316
|
+
# `"Technical Issue > Compute > Compute Engine"`.
|
317
|
+
#
|
318
|
+
# Classification IDs returned by this endpoint are valid for at least six
|
319
|
+
# months. When a classification is deactivated, this endpoint immediately
|
320
|
+
# stops returning it. After six months, `case.create` requests using the
|
321
|
+
# classification will fail.
|
322
|
+
#
|
323
|
+
# EXAMPLES:
|
324
|
+
#
|
325
|
+
# cURL:
|
326
|
+
#
|
327
|
+
# ```shell
|
328
|
+
# curl \
|
329
|
+
# --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
330
|
+
# 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:"*Compute%20Engine*"'
|
331
|
+
# ```
|
332
|
+
#
|
333
|
+
# Python:
|
334
|
+
#
|
335
|
+
# ```python
|
336
|
+
# import googleapiclient.discovery
|
337
|
+
#
|
338
|
+
# supportApiService = googleapiclient.discovery.build(
|
339
|
+
# serviceName="cloudsupport",
|
340
|
+
# version="v2",
|
341
|
+
# discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version=v2",
|
342
|
+
# )
|
343
|
+
# request = supportApiService.caseClassifications().search(
|
344
|
+
# query='display_name:"*Compute Engine*"'
|
345
|
+
# )
|
346
|
+
# print(request.execute())
|
347
|
+
# ```
|
348
|
+
rpc :SearchCaseClassifications, ::Google::Cloud::Support::V2beta::SearchCaseClassificationsRequest, ::Google::Cloud::Support::V2beta::SearchCaseClassificationsResponse
|
349
|
+
end
|
350
|
+
|
351
|
+
Stub = Service.rpc_stub_class
|
352
|
+
end
|
353
|
+
end
|
354
|
+
end
|
355
|
+
end
|
356
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: google/cloud/support/v2beta/comment.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/field_behavior_pb'
|
8
|
+
require 'google/api/resource_pb'
|
9
|
+
require 'google/cloud/support/v2beta/actor_pb'
|
10
|
+
require 'google/protobuf/timestamp_pb'
|
11
|
+
|
12
|
+
|
13
|
+
descriptor_data = "\n)google/cloud/support/v2beta/comment.proto\x12\x1bgoogle.cloud.support.v2beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/support/v2beta/actor.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdb\x02\n\x07\x43omment\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x38\n\x07\x63reator\x18\x03 \x01(\x0b\x32\".google.cloud.support.v2beta.ActorB\x03\xe0\x41\x03\x12\x0c\n\x04\x62ody\x18\x04 \x01(\t\x12\x1e\n\x0fplain_text_body\x18\x05 \x01(\tB\x05\x18\x01\xe0\x41\x03:\x9b\x01\xea\x41\x97\x01\n#cloudsupport.googleapis.com/Comment\x12<organizations/{organization}/cases/{case}/comments/{comment}\x12\x32projects/{project}/cases/{case}/comments/{comment}B\xc9\x01\n\x1f\x63om.google.cloud.support.v2betaB\x0c\x43ommentProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xaa\x02\x1bGoogle.Cloud.Support.V2Beta\xca\x02\x1bGoogle\\Cloud\\Support\\V2beta\xea\x02\x1eGoogle::Cloud::Support::V2betab\x06proto3"
|
14
|
+
|
15
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
16
|
+
|
17
|
+
begin
|
18
|
+
pool.add_serialized_file(descriptor_data)
|
19
|
+
rescue TypeError
|
20
|
+
# Compatibility code: will be removed in the next major version.
|
21
|
+
require 'google/protobuf/descriptor_pb'
|
22
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
23
|
+
parsed.clear_dependency
|
24
|
+
serialized = parsed.class.encode(parsed)
|
25
|
+
file = pool.add_serialized_file(serialized)
|
26
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
27
|
+
imports = [
|
28
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
29
|
+
["google.cloud.support.v2beta.Actor", "google/cloud/support/v2beta/actor.proto"],
|
30
|
+
]
|
31
|
+
imports.each do |type_name, expected_filename|
|
32
|
+
import_file = pool.lookup(type_name).file_descriptor
|
33
|
+
if import_file.name != expected_filename
|
34
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
38
|
+
warn "This will become an error in the next major version."
|
39
|
+
end
|
40
|
+
|
41
|
+
module Google
|
42
|
+
module Cloud
|
43
|
+
module Support
|
44
|
+
module V2beta
|
45
|
+
Comment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.Comment").msgclass
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|