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,219 @@
|
|
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 "google/cloud/support/v2beta/comment_service_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Support
|
24
|
+
module V2beta
|
25
|
+
module CommentService
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the CommentService service.
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
|
+
#
|
32
|
+
class ServiceStub
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
35
|
+
# These require statements are intentionally placed here to initialize
|
36
|
+
# the REST modules only when it's required.
|
37
|
+
require "gapic/rest"
|
38
|
+
|
39
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
40
|
+
endpoint_template: endpoint_template,
|
41
|
+
universe_domain: universe_domain,
|
42
|
+
credentials: credentials,
|
43
|
+
numeric_enums: true,
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
47
|
+
end
|
48
|
+
|
49
|
+
##
|
50
|
+
# The effective universe domain
|
51
|
+
#
|
52
|
+
# @return [String]
|
53
|
+
#
|
54
|
+
def universe_domain
|
55
|
+
@client_stub.universe_domain
|
56
|
+
end
|
57
|
+
|
58
|
+
##
|
59
|
+
# The effective endpoint
|
60
|
+
#
|
61
|
+
# @return [String]
|
62
|
+
#
|
63
|
+
def endpoint
|
64
|
+
@client_stub.endpoint
|
65
|
+
end
|
66
|
+
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
76
|
+
##
|
77
|
+
# Baseline implementation for the list_comments REST call
|
78
|
+
#
|
79
|
+
# @param request_pb [::Google::Cloud::Support::V2beta::ListCommentsRequest]
|
80
|
+
# A request object representing the call parameters. Required.
|
81
|
+
# @param options [::Gapic::CallOptions]
|
82
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
83
|
+
#
|
84
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
85
|
+
# @yieldparam result [::Google::Cloud::Support::V2beta::ListCommentsResponse]
|
86
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
87
|
+
#
|
88
|
+
# @return [::Google::Cloud::Support::V2beta::ListCommentsResponse]
|
89
|
+
# A result object deserialized from the server's reply
|
90
|
+
def list_comments request_pb, options = nil
|
91
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
92
|
+
|
93
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_comments_request request_pb
|
94
|
+
query_string_params = if query_string_params.any?
|
95
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
96
|
+
else
|
97
|
+
{}
|
98
|
+
end
|
99
|
+
|
100
|
+
response = @client_stub.make_http_request(
|
101
|
+
verb,
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "list_comments",
|
106
|
+
options: options
|
107
|
+
)
|
108
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
109
|
+
result = ::Google::Cloud::Support::V2beta::ListCommentsResponse.decode_json response.body, ignore_unknown_fields: true
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
##
|
117
|
+
# Baseline implementation for the create_comment REST call
|
118
|
+
#
|
119
|
+
# @param request_pb [::Google::Cloud::Support::V2beta::CreateCommentRequest]
|
120
|
+
# A request object representing the call parameters. Required.
|
121
|
+
# @param options [::Gapic::CallOptions]
|
122
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
123
|
+
#
|
124
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
125
|
+
# @yieldparam result [::Google::Cloud::Support::V2beta::Comment]
|
126
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
127
|
+
#
|
128
|
+
# @return [::Google::Cloud::Support::V2beta::Comment]
|
129
|
+
# A result object deserialized from the server's reply
|
130
|
+
def create_comment request_pb, options = nil
|
131
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
132
|
+
|
133
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_comment_request request_pb
|
134
|
+
query_string_params = if query_string_params.any?
|
135
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
136
|
+
else
|
137
|
+
{}
|
138
|
+
end
|
139
|
+
|
140
|
+
response = @client_stub.make_http_request(
|
141
|
+
verb,
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "create_comment",
|
146
|
+
options: options
|
147
|
+
)
|
148
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
149
|
+
result = ::Google::Cloud::Support::V2beta::Comment.decode_json response.body, ignore_unknown_fields: true
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
##
|
157
|
+
# @private
|
158
|
+
#
|
159
|
+
# GRPC transcoding helper method for the list_comments REST call
|
160
|
+
#
|
161
|
+
# @param request_pb [::Google::Cloud::Support::V2beta::ListCommentsRequest]
|
162
|
+
# A request object representing the call parameters. Required.
|
163
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
164
|
+
# Uri, Body, Query string parameters
|
165
|
+
def self.transcode_list_comments_request request_pb
|
166
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
167
|
+
.with_bindings(
|
168
|
+
uri_method: :get,
|
169
|
+
uri_template: "/v2beta/{parent}/comments",
|
170
|
+
matches: [
|
171
|
+
["parent", %r{^projects/[^/]+/cases/[^/]+/?$}, false]
|
172
|
+
]
|
173
|
+
)
|
174
|
+
.with_bindings(
|
175
|
+
uri_method: :get,
|
176
|
+
uri_template: "/v2beta/{parent}/comments",
|
177
|
+
matches: [
|
178
|
+
["parent", %r{^organizations/[^/]+/cases/[^/]+/?$}, false]
|
179
|
+
]
|
180
|
+
)
|
181
|
+
transcoder.transcode request_pb
|
182
|
+
end
|
183
|
+
|
184
|
+
##
|
185
|
+
# @private
|
186
|
+
#
|
187
|
+
# GRPC transcoding helper method for the create_comment REST call
|
188
|
+
#
|
189
|
+
# @param request_pb [::Google::Cloud::Support::V2beta::CreateCommentRequest]
|
190
|
+
# A request object representing the call parameters. Required.
|
191
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
192
|
+
# Uri, Body, Query string parameters
|
193
|
+
def self.transcode_create_comment_request request_pb
|
194
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
195
|
+
.with_bindings(
|
196
|
+
uri_method: :post,
|
197
|
+
uri_template: "/v2beta/{parent}/comments",
|
198
|
+
body: "comment",
|
199
|
+
matches: [
|
200
|
+
["parent", %r{^projects/[^/]+/cases/[^/]+/?$}, false]
|
201
|
+
]
|
202
|
+
)
|
203
|
+
.with_bindings(
|
204
|
+
uri_method: :post,
|
205
|
+
uri_template: "/v2beta/{parent}/comments",
|
206
|
+
body: "comment",
|
207
|
+
matches: [
|
208
|
+
["parent", %r{^organizations/[^/]+/cases/[^/]+/?$}, false]
|
209
|
+
]
|
210
|
+
)
|
211
|
+
transcoder.transcode request_pb
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|
@@ -0,0 +1,52 @@
|
|
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/rest"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/support/v2beta/version"
|
24
|
+
|
25
|
+
require "google/cloud/support/v2beta/comment_service/credentials"
|
26
|
+
require "google/cloud/support/v2beta/comment_service/paths"
|
27
|
+
require "google/cloud/support/v2beta/comment_service/rest/client"
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Cloud
|
31
|
+
module Support
|
32
|
+
module V2beta
|
33
|
+
##
|
34
|
+
# A service to manage comments on cases.
|
35
|
+
#
|
36
|
+
# To load this service and instantiate a REST client:
|
37
|
+
#
|
38
|
+
# require "google/cloud/support/v2beta/comment_service/rest"
|
39
|
+
# client = ::Google::Cloud::Support::V2beta::CommentService::Rest::Client.new
|
40
|
+
#
|
41
|
+
module CommentService
|
42
|
+
# Client for the REST transport
|
43
|
+
module Rest
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
52
|
+
require "google/cloud/support/v2beta/comment_service/rest/helpers" if ::File.file? helper_path
|
@@ -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/comment_service/credentials"
|
26
|
+
require "google/cloud/support/v2beta/comment_service/paths"
|
27
|
+
require "google/cloud/support/v2beta/comment_service/client"
|
28
|
+
require "google/cloud/support/v2beta/comment_service/rest"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module Support
|
33
|
+
module V2beta
|
34
|
+
##
|
35
|
+
# A service to manage comments on cases.
|
36
|
+
#
|
37
|
+
# @example Load this service and instantiate a gRPC client
|
38
|
+
#
|
39
|
+
# require "google/cloud/support/v2beta/comment_service"
|
40
|
+
# client = ::Google::Cloud::Support::V2beta::CommentService::Client.new
|
41
|
+
#
|
42
|
+
# @example Load this service and instantiate a REST client
|
43
|
+
#
|
44
|
+
# require "google/cloud/support/v2beta/comment_service/rest"
|
45
|
+
# client = ::Google::Cloud::Support::V2beta::CommentService::Rest::Client.new
|
46
|
+
#
|
47
|
+
module CommentService
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
helper_path = ::File.join __dir__, "comment_service", "helpers.rb"
|
55
|
+
require "google/cloud/support/v2beta/comment_service/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: google/cloud/support/v2beta/comment_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/comment_pb'
|
12
|
+
|
13
|
+
|
14
|
+
descriptor_data = "\n1google/cloud/support/v2beta/comment_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/comment.proto\"v\n\x13ListCommentsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n cloudsupport.googleapis.com/Case\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12\x12\n\npage_token\x18\x05 \x01(\t\"g\n\x14ListCommentsResponse\x12\x36\n\x08\x63omments\x18\x01 \x03(\x0b\x32$.google.cloud.support.v2beta.Comment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8c\x01\n\x14\x43reateCommentRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n cloudsupport.googleapis.com/Case\x12:\n\x07\x63omment\x18\x02 \x01(\x0b\x32$.google.cloud.support.v2beta.CommentB\x03\xe0\x41\x02\x32\xc5\x04\n\x0e\x43ommentService\x12\xe7\x01\n\x0cListComments\x12\x30.google.cloud.support.v2beta.ListCommentsRequest\x1a\x31.google.cloud.support.v2beta.ListCommentsResponse\"r\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x63\x12,/v2beta/{parent=projects/*/cases/*}/commentsZ3\x12\x31/v2beta/{parent=organizations/*/cases/*}/comments\x12\xf7\x01\n\rCreateComment\x12\x31.google.cloud.support.v2beta.CreateCommentRequest\x1a$.google.cloud.support.v2beta.Comment\"\x8c\x01\xda\x41\x0eparent,comment\x82\xd3\xe4\x93\x02u\",/v2beta/{parent=projects/*/cases/*}/comments:\x07\x63ommentZ<\"1/v2beta/{parent=organizations/*/cases/*}/comments:\x07\x63omment\x1aO\xca\x41\x1b\x63loudsupport.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd0\x01\n\x1f\x63om.google.cloud.support.v2betaB\x13\x43ommentServiceProtoP\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"
|
15
|
+
|
16
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
17
|
+
|
18
|
+
begin
|
19
|
+
pool.add_serialized_file(descriptor_data)
|
20
|
+
rescue TypeError
|
21
|
+
# Compatibility code: will be removed in the next major version.
|
22
|
+
require 'google/protobuf/descriptor_pb'
|
23
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
24
|
+
parsed.clear_dependency
|
25
|
+
serialized = parsed.class.encode(parsed)
|
26
|
+
file = pool.add_serialized_file(serialized)
|
27
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
28
|
+
imports = [
|
29
|
+
["google.cloud.support.v2beta.Comment", "google/cloud/support/v2beta/comment.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
|
+
ListCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.ListCommentsRequest").msgclass
|
46
|
+
ListCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.ListCommentsResponse").msgclass
|
47
|
+
CreateCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.CreateCommentRequest").msgclass
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,117 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/support/v2beta/comment_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/comment_service_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Support
|
25
|
+
module V2beta
|
26
|
+
module CommentService
|
27
|
+
# A service to manage comments on 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.CommentService'
|
35
|
+
|
36
|
+
# List all the comments associated with a case.
|
37
|
+
#
|
38
|
+
# EXAMPLES:
|
39
|
+
#
|
40
|
+
# cURL:
|
41
|
+
#
|
42
|
+
# ```shell
|
43
|
+
# case="projects/some-project/cases/43595344"
|
44
|
+
# curl \
|
45
|
+
# --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
46
|
+
# "https://cloudsupport.googleapis.com/v2/$case/comments"
|
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
|
+
# request = (
|
61
|
+
# supportApiService.cases()
|
62
|
+
# .comments()
|
63
|
+
# .list(parent="projects/some-project/cases/43595344")
|
64
|
+
# )
|
65
|
+
# print(request.execute())
|
66
|
+
# ```
|
67
|
+
rpc :ListComments, ::Google::Cloud::Support::V2beta::ListCommentsRequest, ::Google::Cloud::Support::V2beta::ListCommentsResponse
|
68
|
+
# Add a new comment to a case.
|
69
|
+
#
|
70
|
+
# The comment must have the following fields set: `body`.
|
71
|
+
#
|
72
|
+
# EXAMPLES:
|
73
|
+
#
|
74
|
+
# cURL:
|
75
|
+
#
|
76
|
+
# ```shell
|
77
|
+
# case="projects/some-project/cases/43591344"
|
78
|
+
# curl \
|
79
|
+
# --request POST \
|
80
|
+
# --header "Authorization: Bearer $(gcloud auth print-access-token)" \
|
81
|
+
# --header 'Content-Type: application/json' \
|
82
|
+
# --data '{
|
83
|
+
# "body": "This is a test comment."
|
84
|
+
# }' \
|
85
|
+
# "https://cloudsupport.googleapis.com/v2/$case/comments"
|
86
|
+
# ```
|
87
|
+
#
|
88
|
+
# Python:
|
89
|
+
#
|
90
|
+
# ```python
|
91
|
+
# import googleapiclient.discovery
|
92
|
+
#
|
93
|
+
# api_version = "v2"
|
94
|
+
# supportApiService = googleapiclient.discovery.build(
|
95
|
+
# serviceName="cloudsupport",
|
96
|
+
# version=api_version,
|
97
|
+
# discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}",
|
98
|
+
# )
|
99
|
+
# request = (
|
100
|
+
# supportApiService.cases()
|
101
|
+
# .comments()
|
102
|
+
# .create(
|
103
|
+
# parent="projects/some-project/cases/43595344",
|
104
|
+
# body={"body": "This is a test comment."},
|
105
|
+
# )
|
106
|
+
# )
|
107
|
+
# print(request.execute())
|
108
|
+
# ```
|
109
|
+
rpc :CreateComment, ::Google::Cloud::Support::V2beta::CreateCommentRequest, ::Google::Cloud::Support::V2beta::Comment
|
110
|
+
end
|
111
|
+
|
112
|
+
Stub = Service.rpc_stub_class
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: google/cloud/support/v2beta/content.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
|
8
|
+
descriptor_data = "\n)google/cloud/support/v2beta/content.proto\x12\x1bgoogle.cloud.support.v2beta\"!\n\x0bTextContent\x12\x12\n\nplain_text\x18\x01 \x01(\tB\xc9\x01\n\x1f\x63om.google.cloud.support.v2betaB\x0c\x43ontentProtoP\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"
|
9
|
+
|
10
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
|
+
|
12
|
+
begin
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
14
|
+
rescue TypeError
|
15
|
+
# Compatibility code: will be removed in the next major version.
|
16
|
+
require 'google/protobuf/descriptor_pb'
|
17
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
18
|
+
parsed.clear_dependency
|
19
|
+
serialized = parsed.class.encode(parsed)
|
20
|
+
file = pool.add_serialized_file(serialized)
|
21
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
22
|
+
imports = [
|
23
|
+
]
|
24
|
+
imports.each do |type_name, expected_filename|
|
25
|
+
import_file = pool.lookup(type_name).file_descriptor
|
26
|
+
if import_file.name != expected_filename
|
27
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
31
|
+
warn "This will become an error in the next major version."
|
32
|
+
end
|
33
|
+
|
34
|
+
module Google
|
35
|
+
module Cloud
|
36
|
+
module Support
|
37
|
+
module V2beta
|
38
|
+
TextContent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.TextContent").msgclass
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: google/cloud/support/v2beta/email_message.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/cloud/support/v2beta/content_pb'
|
11
|
+
require 'google/protobuf/timestamp_pb'
|
12
|
+
|
13
|
+
|
14
|
+
descriptor_data = "\n/google/cloud/support/v2beta/email_message.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)google/cloud/support/v2beta/content.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x89\x04\n\x0c\x45mailMessage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\x05\x61\x63tor\x18\x03 \x01(\x0b\x32\".google.cloud.support.v2beta.ActorB\x03\xe0\x41\x03\x12\x14\n\x07subject\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12&\n\x19recipient_email_addresses\x18\x05 \x03(\tB\x03\xe0\x41\x03\x12\x1f\n\x12\x63\x63_email_addresses\x18\x06 \x03(\tB\x03\xe0\x41\x03\x12\x43\n\x0c\x62ody_content\x18\x08 \x01(\x0b\x32(.google.cloud.support.v2beta.TextContentB\x03\xe0\x41\x03:\xd3\x01\xea\x41\xcf\x01\n(cloudsupport.googleapis.com/EmailMessage\x12=projects/{project}/cases/{case}/emailMessages/{email_message}\x12Gorganizations/{organization}/cases/{case}/emailMessages/{email_message}*\remailMessages2\x0c\x65mailMessageB\xce\x01\n\x1f\x63om.google.cloud.support.v2betaB\x11\x45mailMessageProtoP\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"
|
15
|
+
|
16
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
17
|
+
|
18
|
+
begin
|
19
|
+
pool.add_serialized_file(descriptor_data)
|
20
|
+
rescue TypeError
|
21
|
+
# Compatibility code: will be removed in the next major version.
|
22
|
+
require 'google/protobuf/descriptor_pb'
|
23
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
24
|
+
parsed.clear_dependency
|
25
|
+
serialized = parsed.class.encode(parsed)
|
26
|
+
file = pool.add_serialized_file(serialized)
|
27
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
28
|
+
imports = [
|
29
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
30
|
+
["google.cloud.support.v2beta.Actor", "google/cloud/support/v2beta/actor.proto"],
|
31
|
+
["google.cloud.support.v2beta.TextContent", "google/cloud/support/v2beta/content.proto"],
|
32
|
+
]
|
33
|
+
imports.each do |type_name, expected_filename|
|
34
|
+
import_file = pool.lookup(type_name).file_descriptor
|
35
|
+
if import_file.name != expected_filename
|
36
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
40
|
+
warn "This will become an error in the next major version."
|
41
|
+
end
|
42
|
+
|
43
|
+
module Google
|
44
|
+
module Cloud
|
45
|
+
module Support
|
46
|
+
module V2beta
|
47
|
+
EmailMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.EmailMessage").msgclass
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: google/cloud/support/v2beta/escalation.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/field_behavior_pb'
|
8
|
+
|
9
|
+
|
10
|
+
descriptor_data = "\n,google/cloud/support/v2beta/escalation.proto\x12\x1bgoogle.cloud.support.v2beta\x1a\x1fgoogle/api/field_behavior.proto\"\xd2\x01\n\nEscalation\x12\x43\n\x06reason\x18\x04 \x01(\x0e\x32..google.cloud.support.v2beta.Escalation.ReasonB\x03\xe0\x41\x02\x12\x1a\n\rjustification\x18\x05 \x01(\tB\x03\xe0\x41\x02\"c\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x13\n\x0fRESOLUTION_TIME\x10\x01\x12\x17\n\x13TECHNICAL_EXPERTISE\x10\x02\x12\x13\n\x0f\x42USINESS_IMPACT\x10\x03\x42\xcc\x01\n\x1f\x63om.google.cloud.support.v2betaB\x0f\x45scalationProtoP\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"
|
11
|
+
|
12
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
13
|
+
|
14
|
+
begin
|
15
|
+
pool.add_serialized_file(descriptor_data)
|
16
|
+
rescue TypeError
|
17
|
+
# Compatibility code: will be removed in the next major version.
|
18
|
+
require 'google/protobuf/descriptor_pb'
|
19
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
20
|
+
parsed.clear_dependency
|
21
|
+
serialized = parsed.class.encode(parsed)
|
22
|
+
file = pool.add_serialized_file(serialized)
|
23
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
24
|
+
imports = [
|
25
|
+
]
|
26
|
+
imports.each do |type_name, expected_filename|
|
27
|
+
import_file = pool.lookup(type_name).file_descriptor
|
28
|
+
if import_file.name != expected_filename
|
29
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
33
|
+
warn "This will become an error in the next major version."
|
34
|
+
end
|
35
|
+
|
36
|
+
module Google
|
37
|
+
module Cloud
|
38
|
+
module Support
|
39
|
+
module V2beta
|
40
|
+
Escalation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.Escalation").msgclass
|
41
|
+
Escalation::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.support.v2beta.Escalation.Reason").enummodule
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|