google-cloud-dialogflow-v2 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/dialogflow/v2/answer_record_pb.rb +2 -1
- data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +5 -1
- data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +19 -0
- data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +3 -0
- data/lib/google/cloud/dialogflow/v2/conversations/client.rb +121 -23
- data/lib/google/cloud/dialogflow/v2/conversations/paths.rb +19 -0
- data/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb +114 -23
- data/lib/google/cloud/dialogflow/v2/conversations/rest/service_stub.rb +60 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_pb.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/client.rb +567 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/operations.rb +809 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/paths.rb +50 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/client.rb +535 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/operations.rb +922 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/service_stub.rb +188 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest.rb +54 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service.rb +56 -0
- data/lib/google/cloud/dialogflow/v2/encryption_spec_services_pb.rb +51 -0
- data/lib/google/cloud/dialogflow/v2/generator_pb.rb +71 -0
- data/lib/google/cloud/dialogflow/v2/generator_services_pb.rb +57 -0
- data/lib/google/cloud/dialogflow/v2/generators/client.rb +851 -0
- data/lib/google/cloud/dialogflow/v2/generators/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/generators/paths.rb +66 -0
- data/lib/google/cloud/dialogflow/v2/generators/rest/client.rb +798 -0
- data/lib/google/cloud/dialogflow/v2/generators/rest/service_stub.rb +381 -0
- data/lib/google/cloud/dialogflow/v2/generators/rest.rb +57 -0
- data/lib/google/cloud/dialogflow/v2/generators.rb +59 -0
- data/lib/google/cloud/dialogflow/v2/participant_pb.rb +9 -1
- data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +2 -0
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +110 -0
- data/lib/google/cloud/dialogflow/v2/participants/rest/client.rb +103 -0
- data/lib/google/cloud/dialogflow/v2/participants/rest/service_stub.rb +68 -0
- data/lib/google/cloud/dialogflow/v2/rest.rb +2 -0
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/lib/google/cloud/dialogflow/v2.rb +2 -0
- data/proto_docs/google/api/client.rb +14 -10
- data/proto_docs/google/api/resource.rb +7 -2
- data/proto_docs/google/cloud/dialogflow/v2/answer_record.rb +22 -0
- data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +24 -0
- data/proto_docs/google/cloud/dialogflow/v2/conversation.rb +54 -26
- data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +27 -2
- data/proto_docs/google/cloud/dialogflow/v2/encryption_spec.rb +81 -0
- data/proto_docs/google/cloud/dialogflow/v2/generator.rb +382 -0
- data/proto_docs/google/cloud/dialogflow/v2/participant.rb +133 -0
- metadata +24 -2
@@ -0,0 +1,188 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 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/dialogflow/v2/encryption_spec_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Dialogflow
|
24
|
+
module V2
|
25
|
+
module EncryptionSpecService
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the EncryptionSpecService service.
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
|
+
#
|
32
|
+
class ServiceStub
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
34
|
+
# These require statements are intentionally placed here to initialize
|
35
|
+
# the REST modules only when it's required.
|
36
|
+
require "gapic/rest"
|
37
|
+
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
39
|
+
endpoint_template: endpoint_template,
|
40
|
+
universe_domain: universe_domain,
|
41
|
+
credentials: credentials,
|
42
|
+
numeric_enums: true,
|
43
|
+
raise_faraday_errors: false
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# The effective universe domain
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
def universe_domain
|
52
|
+
@client_stub.universe_domain
|
53
|
+
end
|
54
|
+
|
55
|
+
##
|
56
|
+
# The effective endpoint
|
57
|
+
#
|
58
|
+
# @return [String]
|
59
|
+
#
|
60
|
+
def endpoint
|
61
|
+
@client_stub.endpoint
|
62
|
+
end
|
63
|
+
|
64
|
+
##
|
65
|
+
# Baseline implementation for the get_encryption_spec REST call
|
66
|
+
#
|
67
|
+
# @param request_pb [::Google::Cloud::Dialogflow::V2::GetEncryptionSpecRequest]
|
68
|
+
# A request object representing the call parameters. Required.
|
69
|
+
# @param options [::Gapic::CallOptions]
|
70
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
71
|
+
#
|
72
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
73
|
+
# @yieldparam result [::Google::Cloud::Dialogflow::V2::EncryptionSpec]
|
74
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
75
|
+
#
|
76
|
+
# @return [::Google::Cloud::Dialogflow::V2::EncryptionSpec]
|
77
|
+
# A result object deserialized from the server's reply
|
78
|
+
def get_encryption_spec request_pb, options = nil
|
79
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
80
|
+
|
81
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_encryption_spec_request request_pb
|
82
|
+
query_string_params = if query_string_params.any?
|
83
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
84
|
+
else
|
85
|
+
{}
|
86
|
+
end
|
87
|
+
|
88
|
+
response = @client_stub.make_http_request(
|
89
|
+
verb,
|
90
|
+
uri: uri,
|
91
|
+
body: body || "",
|
92
|
+
params: query_string_params,
|
93
|
+
options: options
|
94
|
+
)
|
95
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
96
|
+
result = ::Google::Cloud::Dialogflow::V2::EncryptionSpec.decode_json response.body, ignore_unknown_fields: true
|
97
|
+
|
98
|
+
yield result, operation if block_given?
|
99
|
+
result
|
100
|
+
end
|
101
|
+
|
102
|
+
##
|
103
|
+
# Baseline implementation for the initialize_encryption_spec REST call
|
104
|
+
#
|
105
|
+
# @param request_pb [::Google::Cloud::Dialogflow::V2::InitializeEncryptionSpecRequest]
|
106
|
+
# A request object representing the call parameters. Required.
|
107
|
+
# @param options [::Gapic::CallOptions]
|
108
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
109
|
+
#
|
110
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
111
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
112
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
113
|
+
#
|
114
|
+
# @return [::Google::Longrunning::Operation]
|
115
|
+
# A result object deserialized from the server's reply
|
116
|
+
def initialize_encryption_spec request_pb, options = nil
|
117
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
118
|
+
|
119
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_initialize_encryption_spec_request request_pb
|
120
|
+
query_string_params = if query_string_params.any?
|
121
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
122
|
+
else
|
123
|
+
{}
|
124
|
+
end
|
125
|
+
|
126
|
+
response = @client_stub.make_http_request(
|
127
|
+
verb,
|
128
|
+
uri: uri,
|
129
|
+
body: body || "",
|
130
|
+
params: query_string_params,
|
131
|
+
options: options
|
132
|
+
)
|
133
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
134
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
135
|
+
|
136
|
+
yield result, operation if block_given?
|
137
|
+
result
|
138
|
+
end
|
139
|
+
|
140
|
+
##
|
141
|
+
# @private
|
142
|
+
#
|
143
|
+
# GRPC transcoding helper method for the get_encryption_spec REST call
|
144
|
+
#
|
145
|
+
# @param request_pb [::Google::Cloud::Dialogflow::V2::GetEncryptionSpecRequest]
|
146
|
+
# A request object representing the call parameters. Required.
|
147
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
148
|
+
# Uri, Body, Query string parameters
|
149
|
+
def self.transcode_get_encryption_spec_request request_pb
|
150
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
151
|
+
.with_bindings(
|
152
|
+
uri_method: :get,
|
153
|
+
uri_template: "/v2/{name}",
|
154
|
+
matches: [
|
155
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/encryptionSpec/?$}, false]
|
156
|
+
]
|
157
|
+
)
|
158
|
+
transcoder.transcode request_pb
|
159
|
+
end
|
160
|
+
|
161
|
+
##
|
162
|
+
# @private
|
163
|
+
#
|
164
|
+
# GRPC transcoding helper method for the initialize_encryption_spec REST call
|
165
|
+
#
|
166
|
+
# @param request_pb [::Google::Cloud::Dialogflow::V2::InitializeEncryptionSpecRequest]
|
167
|
+
# A request object representing the call parameters. Required.
|
168
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
169
|
+
# Uri, Body, Query string parameters
|
170
|
+
def self.transcode_initialize_encryption_spec_request request_pb
|
171
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
172
|
+
.with_bindings(
|
173
|
+
uri_method: :post,
|
174
|
+
uri_template: "/v2/{encryption_spec.name}:initialize",
|
175
|
+
body: "*",
|
176
|
+
matches: [
|
177
|
+
["encryption_spec.name", %r{^projects/[^/]+/locations/[^/]+/encryptionSpec/?$}, false]
|
178
|
+
]
|
179
|
+
)
|
180
|
+
transcoder.transcode request_pb
|
181
|
+
end
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 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/dialogflow/v2/version"
|
24
|
+
require "google/cloud/dialogflow/v2/bindings_override"
|
25
|
+
|
26
|
+
require "google/cloud/dialogflow/v2/encryption_spec_service/credentials"
|
27
|
+
require "google/cloud/dialogflow/v2/encryption_spec_service/paths"
|
28
|
+
require "google/cloud/dialogflow/v2/encryption_spec_service/rest/operations"
|
29
|
+
require "google/cloud/dialogflow/v2/encryption_spec_service/rest/client"
|
30
|
+
|
31
|
+
module Google
|
32
|
+
module Cloud
|
33
|
+
module Dialogflow
|
34
|
+
module V2
|
35
|
+
##
|
36
|
+
# Manages encryption spec settings for Dialogflow and Agent Assist.
|
37
|
+
#
|
38
|
+
# To load this service and instantiate a REST client:
|
39
|
+
#
|
40
|
+
# require "google/cloud/dialogflow/v2/encryption_spec_service/rest"
|
41
|
+
# client = ::Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Client.new
|
42
|
+
#
|
43
|
+
module EncryptionSpecService
|
44
|
+
# Client for the REST transport
|
45
|
+
module Rest
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
54
|
+
require "google/cloud/dialogflow/v2/encryption_spec_service/rest/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 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/dialogflow/v2/version"
|
24
|
+
|
25
|
+
require "google/cloud/dialogflow/v2/encryption_spec_service/credentials"
|
26
|
+
require "google/cloud/dialogflow/v2/encryption_spec_service/paths"
|
27
|
+
require "google/cloud/dialogflow/v2/encryption_spec_service/operations"
|
28
|
+
require "google/cloud/dialogflow/v2/encryption_spec_service/client"
|
29
|
+
require "google/cloud/dialogflow/v2/encryption_spec_service/rest"
|
30
|
+
|
31
|
+
module Google
|
32
|
+
module Cloud
|
33
|
+
module Dialogflow
|
34
|
+
module V2
|
35
|
+
##
|
36
|
+
# Manages encryption spec settings for Dialogflow and Agent Assist.
|
37
|
+
#
|
38
|
+
# @example Load this service and instantiate a gRPC client
|
39
|
+
#
|
40
|
+
# require "google/cloud/dialogflow/v2/encryption_spec_service"
|
41
|
+
# client = ::Google::Cloud::Dialogflow::V2::EncryptionSpecService::Client.new
|
42
|
+
#
|
43
|
+
# @example Load this service and instantiate a REST client
|
44
|
+
#
|
45
|
+
# require "google/cloud/dialogflow/v2/encryption_spec_service/rest"
|
46
|
+
# client = ::Google::Cloud::Dialogflow::V2::EncryptionSpecService::Rest::Client.new
|
47
|
+
#
|
48
|
+
module EncryptionSpecService
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
helper_path = ::File.join __dir__, "encryption_spec_service", "helpers.rb"
|
56
|
+
require "google/cloud/dialogflow/v2/encryption_spec_service/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/dialogflow/v2/encryption_spec.proto for package 'google.cloud.dialogflow.v2'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2024 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/dialogflow/v2/encryption_spec_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Dialogflow
|
25
|
+
module V2
|
26
|
+
module EncryptionSpecService
|
27
|
+
# Manages encryption spec settings for Dialogflow and Agent Assist.
|
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.dialogflow.v2.EncryptionSpecService'
|
35
|
+
|
36
|
+
# Gets location-level encryption key specification.
|
37
|
+
rpc :GetEncryptionSpec, ::Google::Cloud::Dialogflow::V2::GetEncryptionSpecRequest, ::Google::Cloud::Dialogflow::V2::EncryptionSpec
|
38
|
+
# Initializes a location-level encryption key specification. An error will
|
39
|
+
# be thrown if the location has resources already created before the
|
40
|
+
# initialization. Once the encryption specification is initialized at a
|
41
|
+
# location, it is immutable and all newly created resources under the
|
42
|
+
# location will be encrypted with the existing specification.
|
43
|
+
rpc :InitializeEncryptionSpec, ::Google::Cloud::Dialogflow::V2::InitializeEncryptionSpecRequest, ::Google::Longrunning::Operation
|
44
|
+
end
|
45
|
+
|
46
|
+
Stub = Service.rpc_stub_class
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: google/cloud/dialogflow/v2/generator.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/protobuf/empty_pb'
|
12
|
+
require 'google/protobuf/field_mask_pb'
|
13
|
+
require 'google/protobuf/timestamp_pb'
|
14
|
+
|
15
|
+
|
16
|
+
descriptor_data = "\n*google/cloud/dialogflow/v2/generator.proto\x12\x1agoogle.cloud.dialogflow.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb7\x01\n\x16\x43reateGeneratorRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12=\n\tgenerator\x18\x02 \x01(\x0b\x32%.google.cloud.dialogflow.v2.GeneratorB\x03\xe0\x41\x02\x12\x19\n\x0cgenerator_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"P\n\x13GetGeneratorRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dialogflow.googleapis.com/Generator\"\x8d\x01\n\x15ListGeneratorsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"l\n\x16ListGeneratorsResponse\x12\x39\n\ngenerators\x18\x01 \x03(\x0b\x32%.google.cloud.dialogflow.v2.Generator\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"S\n\x16\x44\x65leteGeneratorRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dialogflow.googleapis.com/Generator\"\x8d\x01\n\x16UpdateGeneratorRequest\x12=\n\tgenerator\x18\x01 \x01(\x0b\x32%.google.cloud.dialogflow.v2.GeneratorB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x87\x02\n\x0cMessageEntry\x12@\n\x04role\x18\x01 \x01(\x0e\x32-.google.cloud.dialogflow.v2.MessageEntry.RoleB\x03\xe0\x41\x01\x12\x11\n\x04text\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\"P\n\x04Role\x12\x14\n\x10ROLE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bHUMAN_AGENT\x10\x01\x12\x13\n\x0f\x41UTOMATED_AGENT\x10\x02\x12\x0c\n\x08\x45ND_USER\x10\x03\"]\n\x13\x43onversationContext\x12\x46\n\x0fmessage_entries\x18\x01 \x03(\x0b\x32(.google.cloud.dialogflow.v2.MessageEntryB\x03\xe0\x41\x01\"q\n\x18SummarizationSectionList\x12U\n\x16summarization_sections\x18\x01 \x03(\x0b\x32\x30.google.cloud.dialogflow.v2.SummarizationSectionB\x03\xe0\x41\x01\"\xa0\x03\n\x0e\x46\x65wShotExample\x12R\n\x14\x63onversation_context\x18\x03 \x01(\x0b\x32/.google.cloud.dialogflow.v2.ConversationContextB\x03\xe0\x41\x01\x12R\n\nextra_info\x18\x04 \x03(\x0b\x32\x39.google.cloud.dialogflow.v2.FewShotExample.ExtraInfoEntryB\x03\xe0\x41\x01\x12Z\n\x1asummarization_section_list\x18\x06 \x01(\x0b\x32\x34.google.cloud.dialogflow.v2.SummarizationSectionListH\x00\x12\x44\n\x06output\x18\x07 \x01(\x0b\x32/.google.cloud.dialogflow.v2.GeneratorSuggestionB\x03\xe0\x41\x02\x1a\x30\n\x0e\x45xtraInfoEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x12\n\x10instruction_list\"\xc4\x01\n\x12InferenceParameter\x12#\n\x11max_output_tokens\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1d\n\x0btemperature\x18\x02 \x01(\x01\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x17\n\x05top_k\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x17\n\x05top_p\x18\x04 \x01(\x01\x42\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\x14\n\x12_max_output_tokensB\x0e\n\x0c_temperatureB\x08\n\x06_top_kB\x08\n\x06_top_p\"\xb1\x02\n\x14SummarizationSection\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\ndefinition\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12H\n\x04type\x18\x03 \x01(\x0e\x32\x35.google.cloud.dialogflow.v2.SummarizationSection.TypeB\x03\xe0\x41\x01\"\xa3\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tSITUATION\x10\x01\x12\n\n\x06\x41\x43TION\x10\x02\x12\x0e\n\nRESOLUTION\x10\x03\x12\x1b\n\x17REASON_FOR_CANCELLATION\x10\x04\x12\x19\n\x15\x43USTOMER_SATISFACTION\x10\x05\x12\x0c\n\x08\x45NTITIES\x10\x06\x12\x14\n\x10\x43USTOMER_DEFINED\x10\x07\"\xf2\x01\n\x14SummarizationContext\x12U\n\x16summarization_sections\x18\x01 \x03(\x0b\x32\x30.google.cloud.dialogflow.v2.SummarizationSectionB\x03\xe0\x41\x01\x12J\n\x11\x66\x65w_shot_examples\x18\x02 \x03(\x0b\x32*.google.cloud.dialogflow.v2.FewShotExampleB\x03\xe0\x41\x01\x12\x14\n\x07version\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14output_language_code\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\x9e\x04\n\tGenerator\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12Q\n\x15summarization_context\x18\r \x01(\x0b\x32\x30.google.cloud.dialogflow.v2.SummarizationContextH\x00\x12P\n\x13inference_parameter\x18\x04 \x01(\x0b\x32..google.cloud.dialogflow.v2.InferenceParameterB\x03\xe0\x41\x01\x12\x44\n\rtrigger_event\x18\x05 \x01(\x0e\x32(.google.cloud.dialogflow.v2.TriggerEventB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x7f\xea\x41|\n#dialogflow.googleapis.com/Generator\x12>projects/{project}/locations/{location}/generators/{generator}*\ngenerators2\tgeneratorB\t\n\x07\x63ontext\"\xae\x01\n\x11SummarySuggestion\x12[\n\x10summary_sections\x18\x01 \x03(\x0b\x32<.google.cloud.dialogflow.v2.SummarySuggestion.SummarySectionB\x03\xe0\x41\x02\x1a<\n\x0eSummarySection\x12\x14\n\x07section\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07summary\x18\x02 \x01(\tB\x03\xe0\x41\x02\"u\n\x13GeneratorSuggestion\x12P\n\x12summary_suggestion\x18\x02 \x01(\x0b\x32-.google.cloud.dialogflow.v2.SummarySuggestionB\x03\xe0\x41\x01H\x00\x42\x0c\n\nsuggestion*T\n\x0cTriggerEvent\x12\x1d\n\x19TRIGGER_EVENT_UNSPECIFIED\x10\x00\x12\x14\n\x10\x45ND_OF_UTTERANCE\x10\x01\x12\x0f\n\x0bMANUAL_CALL\x10\x02\x32\x86\t\n\nGenerators\x12\x81\x02\n\x0f\x43reateGenerator\x12\x32.google.cloud.dialogflow.v2.CreateGeneratorRequest\x1a%.google.cloud.dialogflow.v2.Generator\"\x92\x01\xda\x41\x1dparent,generator,generator_id\x82\xd3\xe4\x93\x02l\"./v2/{parent=projects/*/locations/*}/generators:\tgeneratorZ/\"\"/v2/{parent=projects/*}/generators:\tgenerator\x12\xa5\x01\n\x0cGetGenerator\x12/.google.cloud.dialogflow.v2.GetGeneratorRequest\x1a%.google.cloud.dialogflow.v2.Generator\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v2/{name=projects/*/locations/*/generators/*}\x12\xde\x01\n\x0eListGenerators\x12\x31.google.cloud.dialogflow.v2.ListGeneratorsRequest\x1a\x32.google.cloud.dialogflow.v2.ListGeneratorsResponse\"e\xda\x41\x06parent\x82\xd3\xe4\x93\x02V\x12./v2/{parent=projects/*/locations/*}/generatorsZ$\x12\"/v2/{parent=projects/*}/generators\x12\x9c\x01\n\x0f\x44\x65leteGenerator\x12\x32.google.cloud.dialogflow.v2.DeleteGeneratorRequest\x1a\x16.google.protobuf.Empty\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v2/{name=projects/*/locations/*/generators/*}\x12\xd1\x01\n\x0fUpdateGenerator\x12\x32.google.cloud.dialogflow.v2.UpdateGeneratorRequest\x1a%.google.cloud.dialogflow.v2.Generator\"c\xda\x41\x15generator,update_mask\x82\xd3\xe4\x93\x02\x45\x32\x38/v2/{generator.name=projects/*/locations/*/generators/*}:\tgenerator\x1ax\xca\x41\x19\x64ialogflow.googleapis.com\xd2\x41Yhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/dialogflowB\x97\x01\n\x1e\x63om.google.cloud.dialogflow.v2B\x0eGeneratorProtoP\x01Z>cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpb\xf8\x01\x01\xa2\x02\x02\x44\x46\xaa\x02\x1aGoogle.Cloud.Dialogflow.V2b\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.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
|
32
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
33
|
+
]
|
34
|
+
imports.each do |type_name, expected_filename|
|
35
|
+
import_file = pool.lookup(type_name).file_descriptor
|
36
|
+
if import_file.name != expected_filename
|
37
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
41
|
+
warn "This will become an error in the next major version."
|
42
|
+
end
|
43
|
+
|
44
|
+
module Google
|
45
|
+
module Cloud
|
46
|
+
module Dialogflow
|
47
|
+
module V2
|
48
|
+
CreateGeneratorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.CreateGeneratorRequest").msgclass
|
49
|
+
GetGeneratorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.GetGeneratorRequest").msgclass
|
50
|
+
ListGeneratorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ListGeneratorsRequest").msgclass
|
51
|
+
ListGeneratorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ListGeneratorsResponse").msgclass
|
52
|
+
DeleteGeneratorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.DeleteGeneratorRequest").msgclass
|
53
|
+
UpdateGeneratorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.UpdateGeneratorRequest").msgclass
|
54
|
+
MessageEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.MessageEntry").msgclass
|
55
|
+
MessageEntry::Role = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.MessageEntry.Role").enummodule
|
56
|
+
ConversationContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ConversationContext").msgclass
|
57
|
+
SummarizationSectionList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SummarizationSectionList").msgclass
|
58
|
+
FewShotExample = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.FewShotExample").msgclass
|
59
|
+
InferenceParameter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.InferenceParameter").msgclass
|
60
|
+
SummarizationSection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SummarizationSection").msgclass
|
61
|
+
SummarizationSection::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SummarizationSection.Type").enummodule
|
62
|
+
SummarizationContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SummarizationContext").msgclass
|
63
|
+
Generator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.Generator").msgclass
|
64
|
+
SummarySuggestion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SummarySuggestion").msgclass
|
65
|
+
SummarySuggestion::SummarySection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SummarySuggestion.SummarySection").msgclass
|
66
|
+
GeneratorSuggestion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.GeneratorSuggestion").msgclass
|
67
|
+
TriggerEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.TriggerEvent").enummodule
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/dialogflow/v2/generator.proto for package 'google.cloud.dialogflow.v2'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2024 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/dialogflow/v2/generator_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Dialogflow
|
25
|
+
module V2
|
26
|
+
module Generators
|
27
|
+
# Generator Service for LLM powered Agent Assist. This service manages the
|
28
|
+
# configurations of user owned Generators, such as description, context and
|
29
|
+
# instruction, input/output format, etc. The generator resources will be used
|
30
|
+
# inside a conversation and will be triggered by TriggerEvent to query LLM for
|
31
|
+
# answers.
|
32
|
+
class Service
|
33
|
+
|
34
|
+
include ::GRPC::GenericService
|
35
|
+
|
36
|
+
self.marshal_class_method = :encode
|
37
|
+
self.unmarshal_class_method = :decode
|
38
|
+
self.service_name = 'google.cloud.dialogflow.v2.Generators'
|
39
|
+
|
40
|
+
# Creates a generator.
|
41
|
+
rpc :CreateGenerator, ::Google::Cloud::Dialogflow::V2::CreateGeneratorRequest, ::Google::Cloud::Dialogflow::V2::Generator
|
42
|
+
# Retrieves a generator.
|
43
|
+
rpc :GetGenerator, ::Google::Cloud::Dialogflow::V2::GetGeneratorRequest, ::Google::Cloud::Dialogflow::V2::Generator
|
44
|
+
# Lists generators.
|
45
|
+
rpc :ListGenerators, ::Google::Cloud::Dialogflow::V2::ListGeneratorsRequest, ::Google::Cloud::Dialogflow::V2::ListGeneratorsResponse
|
46
|
+
# Deletes a generator.
|
47
|
+
rpc :DeleteGenerator, ::Google::Cloud::Dialogflow::V2::DeleteGeneratorRequest, ::Google::Protobuf::Empty
|
48
|
+
# Updates a generator.
|
49
|
+
rpc :UpdateGenerator, ::Google::Cloud::Dialogflow::V2::UpdateGeneratorRequest, ::Google::Cloud::Dialogflow::V2::Generator
|
50
|
+
end
|
51
|
+
|
52
|
+
Stub = Service.rpc_stub_class
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|