google-cloud-dialogflow-v2 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +24 -0
  6. data/lib/google-cloud-dialogflow-v2.rb +1 -0
  7. data/lib/google/cloud/common_resources_pb.rb +15 -0
  8. data/lib/google/cloud/dialogflow/v2.rb +24 -0
  9. data/lib/google/cloud/dialogflow/v2/agent_pb.rb +122 -0
  10. data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +110 -0
  11. data/lib/google/cloud/dialogflow/v2/agents.rb +21 -0
  12. data/lib/google/cloud/dialogflow/v2/agents/client.rb +1047 -0
  13. data/lib/google/cloud/dialogflow/v2/agents/credentials.rb +53 -0
  14. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +559 -0
  15. data/lib/google/cloud/dialogflow/v2/agents/paths.rb +59 -0
  16. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +97 -0
  17. data/lib/google/cloud/dialogflow/v2/context_pb.rb +64 -0
  18. data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +74 -0
  19. data/lib/google/cloud/dialogflow/v2/contexts.rb +20 -0
  20. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +756 -0
  21. data/lib/google/cloud/dialogflow/v2/contexts/credentials.rb +53 -0
  22. data/lib/google/cloud/dialogflow/v2/contexts/paths.rb +50 -0
  23. data/lib/google/cloud/dialogflow/v2/entity_type_pb.rb +126 -0
  24. data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +104 -0
  25. data/lib/google/cloud/dialogflow/v2/entity_types.rb +21 -0
  26. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +1150 -0
  27. data/lib/google/cloud/dialogflow/v2/entity_types/credentials.rb +53 -0
  28. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +559 -0
  29. data/lib/google/cloud/dialogflow/v2/entity_types/paths.rb +62 -0
  30. data/lib/google/cloud/dialogflow/v2/intent_pb.rb +368 -0
  31. data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +92 -0
  32. data/lib/google/cloud/dialogflow/v2/intents.rb +21 -0
  33. data/lib/google/cloud/dialogflow/v2/intents/client.rb +893 -0
  34. data/lib/google/cloud/dialogflow/v2/intents/credentials.rb +53 -0
  35. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +559 -0
  36. data/lib/google/cloud/dialogflow/v2/intents/paths.rb +81 -0
  37. data/lib/google/cloud/dialogflow/v2/session_entity_type_pb.rb +66 -0
  38. data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +92 -0
  39. data/lib/google/cloud/dialogflow/v2/session_entity_types.rb +20 -0
  40. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +727 -0
  41. data/lib/google/cloud/dialogflow/v2/session_entity_types/credentials.rb +53 -0
  42. data/lib/google/cloud/dialogflow/v2/session_entity_types/paths.rb +69 -0
  43. data/lib/google/cloud/dialogflow/v2/session_pb.rb +142 -0
  44. data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +55 -0
  45. data/lib/google/cloud/dialogflow/v2/sessions.rb +20 -0
  46. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +472 -0
  47. data/lib/google/cloud/dialogflow/v2/sessions/credentials.rb +53 -0
  48. data/lib/google/cloud/dialogflow/v2/sessions/paths.rb +110 -0
  49. data/lib/google/cloud/dialogflow/v2/validation_result_pb.rb +37 -0
  50. data/lib/google/cloud/dialogflow/v2/version.rb +28 -0
  51. data/lib/google/cloud/dialogflow/v2/webhook_pb.rb +47 -0
  52. data/proto_docs/README.md +4 -0
  53. data/proto_docs/google/api/field_behavior.rb +59 -0
  54. data/proto_docs/google/api/resource.rb +247 -0
  55. data/proto_docs/google/cloud/dialogflow/v2/agent.rb +287 -0
  56. data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +363 -0
  57. data/proto_docs/google/cloud/dialogflow/v2/context.rb +144 -0
  58. data/proto_docs/google/cloud/dialogflow/v2/entity_type.rb +354 -0
  59. data/proto_docs/google/cloud/dialogflow/v2/intent.rb +1070 -0
  60. data/proto_docs/google/cloud/dialogflow/v2/session.rb +541 -0
  61. data/proto_docs/google/cloud/dialogflow/v2/session_entity_type.rb +155 -0
  62. data/proto_docs/google/cloud/dialogflow/v2/validation_result.rb +81 -0
  63. data/proto_docs/google/cloud/dialogflow/v2/webhook.rb +153 -0
  64. data/proto_docs/google/longrunning/operations.rb +150 -0
  65. data/proto_docs/google/protobuf/any.rb +137 -0
  66. data/proto_docs/google/protobuf/duration.rb +98 -0
  67. data/proto_docs/google/protobuf/empty.rb +36 -0
  68. data/proto_docs/google/protobuf/field_mask.rb +237 -0
  69. data/proto_docs/google/protobuf/struct.rb +96 -0
  70. data/proto_docs/google/rpc/status.rb +46 -0
  71. data/proto_docs/google/type/latlng.rb +38 -0
  72. metadata +225 -0
@@ -0,0 +1,81 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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
+
20
+ module Google
21
+ module Cloud
22
+ module Dialogflow
23
+ module V2
24
+ module Intents
25
+ # Path helper methods for the Intents API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Agent resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/agent`
33
+ #
34
+ # @param project [String]
35
+ #
36
+ # @return [String]
37
+ def agent_path project:
38
+ "projects/#{project}/agent"
39
+ end
40
+
41
+ ##
42
+ # Create a fully-qualified Context resource string.
43
+ #
44
+ # The resource will be in the following format:
45
+ #
46
+ # `projects/{project}/agent/sessions/{session}/contexts/{context}`
47
+ #
48
+ # @param project [String]
49
+ # @param session [String]
50
+ # @param context [String]
51
+ #
52
+ # @return [String]
53
+ def context_path project:, session:, context:
54
+ raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
55
+ raise ArgumentError, "session cannot contain /" if session.to_s.include? "/"
56
+
57
+ "projects/#{project}/agent/sessions/#{session}/contexts/#{context}"
58
+ end
59
+
60
+ ##
61
+ # Create a fully-qualified Intent resource string.
62
+ #
63
+ # The resource will be in the following format:
64
+ #
65
+ # `projects/{project}/agent/intents/{intent}`
66
+ #
67
+ # @param project [String]
68
+ # @param intent [String]
69
+ #
70
+ # @return [String]
71
+ def intent_path project:, intent:
72
+ raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
73
+
74
+ "projects/#{project}/agent/intents/#{intent}"
75
+ end
76
+ end
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end
@@ -0,0 +1,66 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/dialogflow/v2/session_entity_type.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
7
+ require 'google/api/client_pb'
8
+ require 'google/api/field_behavior_pb'
9
+ require 'google/api/resource_pb'
10
+ require 'google/cloud/dialogflow/v2/entity_type_pb'
11
+ require 'google/protobuf/empty_pb'
12
+ require 'google/protobuf/field_mask_pb'
13
+ Google::Protobuf::DescriptorPool.generated_pool.build do
14
+ add_file("google/cloud/dialogflow/v2/session_entity_type.proto", :syntax => :proto3) do
15
+ add_message "google.cloud.dialogflow.v2.SessionEntityType" do
16
+ optional :name, :string, 1
17
+ optional :entity_override_mode, :enum, 2, "google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode"
18
+ repeated :entities, :message, 3, "google.cloud.dialogflow.v2.EntityType.Entity"
19
+ end
20
+ add_enum "google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode" do
21
+ value :ENTITY_OVERRIDE_MODE_UNSPECIFIED, 0
22
+ value :ENTITY_OVERRIDE_MODE_OVERRIDE, 1
23
+ value :ENTITY_OVERRIDE_MODE_SUPPLEMENT, 2
24
+ end
25
+ add_message "google.cloud.dialogflow.v2.ListSessionEntityTypesRequest" do
26
+ optional :parent, :string, 1
27
+ optional :page_size, :int32, 2
28
+ optional :page_token, :string, 3
29
+ end
30
+ add_message "google.cloud.dialogflow.v2.ListSessionEntityTypesResponse" do
31
+ repeated :session_entity_types, :message, 1, "google.cloud.dialogflow.v2.SessionEntityType"
32
+ optional :next_page_token, :string, 2
33
+ end
34
+ add_message "google.cloud.dialogflow.v2.GetSessionEntityTypeRequest" do
35
+ optional :name, :string, 1
36
+ end
37
+ add_message "google.cloud.dialogflow.v2.CreateSessionEntityTypeRequest" do
38
+ optional :parent, :string, 1
39
+ optional :session_entity_type, :message, 2, "google.cloud.dialogflow.v2.SessionEntityType"
40
+ end
41
+ add_message "google.cloud.dialogflow.v2.UpdateSessionEntityTypeRequest" do
42
+ optional :session_entity_type, :message, 1, "google.cloud.dialogflow.v2.SessionEntityType"
43
+ optional :update_mask, :message, 2, "google.protobuf.FieldMask"
44
+ end
45
+ add_message "google.cloud.dialogflow.v2.DeleteSessionEntityTypeRequest" do
46
+ optional :name, :string, 1
47
+ end
48
+ end
49
+ end
50
+
51
+ module Google
52
+ module Cloud
53
+ module Dialogflow
54
+ module V2
55
+ SessionEntityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SessionEntityType").msgclass
56
+ SessionEntityType::EntityOverrideMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode").enummodule
57
+ ListSessionEntityTypesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ListSessionEntityTypesRequest").msgclass
58
+ ListSessionEntityTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ListSessionEntityTypesResponse").msgclass
59
+ GetSessionEntityTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.GetSessionEntityTypeRequest").msgclass
60
+ CreateSessionEntityTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.CreateSessionEntityTypeRequest").msgclass
61
+ UpdateSessionEntityTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.UpdateSessionEntityTypeRequest").msgclass
62
+ DeleteSessionEntityTypeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.DeleteSessionEntityTypeRequest").msgclass
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,92 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/dialogflow/v2/session_entity_type.proto for package 'google.cloud.dialogflow.v2'
3
+ # Original file comments:
4
+ # Copyright 2020 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/session_entity_type_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module Dialogflow
25
+ module V2
26
+ module SessionEntityTypes
27
+ # Entities are extracted from user input and represent parameters that are
28
+ # meaningful to your application. For example, a date range, a proper name
29
+ # such as a geographic location or landmark, and so on. Entities represent
30
+ # actionable data for your application.
31
+ #
32
+ # Session entity types are referred to as **User** entity types and are
33
+ # entities that are built for an individual user such as
34
+ # favorites, preferences, playlists, and so on. You can redefine a session
35
+ # entity type at the session level.
36
+ #
37
+ # Session entity methods do not work with Google Assistant integration.
38
+ # Contact Dialogflow support if you need to use session entities
39
+ # with Google Assistant integration.
40
+ #
41
+ # For more information about entity types, see the
42
+ # [Dialogflow
43
+ # documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
44
+ class Service
45
+
46
+ include GRPC::GenericService
47
+
48
+ self.marshal_class_method = :encode
49
+ self.unmarshal_class_method = :decode
50
+ self.service_name = 'google.cloud.dialogflow.v2.SessionEntityTypes'
51
+
52
+ # Returns the list of all session entity types in the specified session.
53
+ #
54
+ # This method doesn't work with Google Assistant integration.
55
+ # Contact Dialogflow support if you need to use session entities
56
+ # with Google Assistant integration.
57
+ rpc :ListSessionEntityTypes, ListSessionEntityTypesRequest, ListSessionEntityTypesResponse
58
+ # Retrieves the specified session entity type.
59
+ #
60
+ # This method doesn't work with Google Assistant integration.
61
+ # Contact Dialogflow support if you need to use session entities
62
+ # with Google Assistant integration.
63
+ rpc :GetSessionEntityType, GetSessionEntityTypeRequest, SessionEntityType
64
+ # Creates a session entity type.
65
+ #
66
+ # If the specified session entity type already exists, overrides the session
67
+ # entity type.
68
+ #
69
+ # This method doesn't work with Google Assistant integration.
70
+ # Contact Dialogflow support if you need to use session entities
71
+ # with Google Assistant integration.
72
+ rpc :CreateSessionEntityType, CreateSessionEntityTypeRequest, SessionEntityType
73
+ # Updates the specified session entity type.
74
+ #
75
+ # This method doesn't work with Google Assistant integration.
76
+ # Contact Dialogflow support if you need to use session entities
77
+ # with Google Assistant integration.
78
+ rpc :UpdateSessionEntityType, UpdateSessionEntityTypeRequest, SessionEntityType
79
+ # Deletes the specified session entity type.
80
+ #
81
+ # This method doesn't work with Google Assistant integration.
82
+ # Contact Dialogflow support if you need to use session entities
83
+ # with Google Assistant integration.
84
+ rpc :DeleteSessionEntityType, DeleteSessionEntityTypeRequest, Google::Protobuf::Empty
85
+ end
86
+
87
+ Stub = Service.rpc_stub_class
88
+ end
89
+ end
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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/session_entity_types/client"
20
+ require "google/cloud/dialogflow/v2/session_entity_types/credentials"
@@ -0,0 +1,727 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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/errors"
24
+ require "google/cloud/dialogflow/v2/version"
25
+ require "google/cloud/dialogflow/v2/session_entity_type_pb"
26
+ require "google/cloud/dialogflow/v2/session_entity_types/credentials"
27
+ require "google/cloud/dialogflow/v2/session_entity_types/paths"
28
+
29
+
30
+ module Google
31
+ module Cloud
32
+ module Dialogflow
33
+ module V2
34
+ module SessionEntityTypes
35
+ # Service that implements SessionEntityTypes API.
36
+ class Client
37
+ include Paths
38
+
39
+ # @private
40
+ attr_reader :session_entity_types_stub
41
+
42
+ ##
43
+ # Configure the SessionEntityTypes Client class.
44
+ #
45
+ # See {Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client::Configuration}
46
+ # for a description of the configuration fields.
47
+ #
48
+ # ## Example
49
+ #
50
+ # To modify the configuration for all SessionEntityTypes clients:
51
+ #
52
+ # Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.configure do |config|
53
+ # config.timeout = 10_000
54
+ # end
55
+ #
56
+ # @yield [config] Configure the Client client.
57
+ # @yieldparam config [Client::Configuration]
58
+ #
59
+ # @return [Client::Configuration]
60
+ #
61
+ def self.configure
62
+ @configure ||= begin
63
+ namespace = ["Google", "Cloud", "Dialogflow", "V2"]
64
+ parent_config = while namespace.any?
65
+ parent_name = namespace.join "::"
66
+ parent_const = const_get parent_name
67
+ break parent_const.configure if parent_const&.respond_to? :configure
68
+ namespace.pop
69
+ end
70
+ default_config = Client::Configuration.new parent_config
71
+
72
+ default_config.rpcs.list_session_entity_types.timeout = 60.0
73
+ default_config.rpcs.list_session_entity_types.retry_policy = {
74
+ initial_delay: 0.1,
75
+ max_delay: 60.0,
76
+ multiplier: 1.3,
77
+ retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
78
+ }
79
+
80
+ default_config.rpcs.get_session_entity_type.timeout = 60.0
81
+ default_config.rpcs.get_session_entity_type.retry_policy = {
82
+ initial_delay: 0.1,
83
+ max_delay: 60.0,
84
+ multiplier: 1.3,
85
+ retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
86
+ }
87
+
88
+ default_config.rpcs.create_session_entity_type.timeout = 60.0
89
+
90
+ default_config.rpcs.update_session_entity_type.timeout = 60.0
91
+
92
+ default_config.rpcs.delete_session_entity_type.timeout = 60.0
93
+ default_config.rpcs.delete_session_entity_type.retry_policy = {
94
+ initial_delay: 0.1,
95
+ max_delay: 60.0,
96
+ multiplier: 1.3,
97
+ retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
98
+ }
99
+
100
+ default_config
101
+ end
102
+ yield @configure if block_given?
103
+ @configure
104
+ end
105
+
106
+ ##
107
+ # Configure the SessionEntityTypes Client instance.
108
+ #
109
+ # The configuration is set to the derived mode, meaning that values can be changed,
110
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
111
+ # should be made on {Client.configure}.
112
+ #
113
+ # See {Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client::Configuration}
114
+ # for a description of the configuration fields.
115
+ #
116
+ # @yield [config] Configure the Client client.
117
+ # @yieldparam config [Client::Configuration]
118
+ #
119
+ # @return [Client::Configuration]
120
+ #
121
+ def configure
122
+ yield @config if block_given?
123
+ @config
124
+ end
125
+
126
+ ##
127
+ # Create a new SessionEntityTypes client object.
128
+ #
129
+ # ## Examples
130
+ #
131
+ # To create a new SessionEntityTypes client with the default
132
+ # configuration:
133
+ #
134
+ # client = Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new
135
+ #
136
+ # To create a new SessionEntityTypes client with a custom
137
+ # configuration:
138
+ #
139
+ # client = Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new do |config|
140
+ # config.timeout = 10_000
141
+ # end
142
+ #
143
+ # @yield [config] Configure the SessionEntityTypes client.
144
+ # @yieldparam config [Client::Configuration]
145
+ #
146
+ def initialize
147
+ # These require statements are intentionally placed here to initialize
148
+ # the gRPC module only when it's required.
149
+ # See https://github.com/googleapis/toolkit/issues/446
150
+ require "gapic/grpc"
151
+ require "google/cloud/dialogflow/v2/session_entity_type_services_pb"
152
+
153
+ # Create the configuration object
154
+ @config = Configuration.new Client.configure
155
+
156
+ # Yield the configuration if needed
157
+ yield @config if block_given?
158
+
159
+ # Create credentials
160
+ credentials = @config.credentials
161
+ credentials ||= Credentials.default scope: @config.scope
162
+ if credentials.is_a?(String) || credentials.is_a?(Hash)
163
+ credentials = Credentials.new credentials, scope: @config.scope
164
+ end
165
+ @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
166
+
167
+ @session_entity_types_stub = Gapic::ServiceStub.new(
168
+ Google::Cloud::Dialogflow::V2::SessionEntityTypes::Stub,
169
+ credentials: credentials,
170
+ endpoint: @config.endpoint,
171
+ channel_args: @config.channel_args,
172
+ interceptors: @config.interceptors
173
+ )
174
+ end
175
+
176
+ # Service calls
177
+
178
+ ##
179
+ # Returns the list of all session entity types in the specified session.
180
+ #
181
+ # This method doesn't work with Google Assistant integration.
182
+ # Contact Dialogflow support if you need to use session entities
183
+ # with Google Assistant integration.
184
+ #
185
+ # @overload list_session_entity_types(request, options = nil)
186
+ # @param request [Google::Cloud::Dialogflow::V2::ListSessionEntityTypesRequest | Hash]
187
+ # Returns the list of all session entity types in the specified session.
188
+ #
189
+ # This method doesn't work with Google Assistant integration.
190
+ # Contact Dialogflow support if you need to use session entities
191
+ # with Google Assistant integration.
192
+ # @param options [Gapic::CallOptions, Hash]
193
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
194
+ #
195
+ # @overload list_session_entity_types(parent: nil, page_size: nil, page_token: nil)
196
+ # @param parent [String]
197
+ # Required. The session to list all session entity types from.
198
+ # Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
199
+ # @param page_size [Integer]
200
+ # Optional. The maximum number of items to return in a single page. By
201
+ # default 100 and at most 1000.
202
+ # @param page_token [String]
203
+ # Optional. The next_page_token value returned from a previous list request.
204
+ #
205
+ #
206
+ # @yield [response, operation] Access the result along with the RPC operation
207
+ # @yieldparam response [Gapic::PagedEnumerable<Google::Cloud::Dialogflow::V2::SessionEntityType>]
208
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
209
+ #
210
+ # @return [Gapic::PagedEnumerable<Google::Cloud::Dialogflow::V2::SessionEntityType>]
211
+ #
212
+ # @raise [Google::Cloud::Error] if the RPC is aborted.
213
+ #
214
+ def list_session_entity_types request, options = nil
215
+ raise ArgumentError, "request must be provided" if request.nil?
216
+
217
+ request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::ListSessionEntityTypesRequest
218
+
219
+ # Converts hash and nil to an options object
220
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
221
+
222
+ # Customize the options with defaults
223
+ metadata = @config.rpcs.list_session_entity_types.metadata.to_h
224
+
225
+ # Set x-goog-api-client and x-goog-user-project headers
226
+ metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
227
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
228
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
229
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
230
+
231
+ header_params = {
232
+ "parent" => request.parent
233
+ }
234
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
235
+ metadata[:"x-goog-request-params"] ||= request_params_header
236
+
237
+ options.apply_defaults timeout: @config.rpcs.list_session_entity_types.timeout,
238
+ metadata: metadata,
239
+ retry_policy: @config.rpcs.list_session_entity_types.retry_policy
240
+ options.apply_defaults metadata: @config.metadata,
241
+ retry_policy: @config.retry_policy
242
+
243
+ @session_entity_types_stub.call_rpc :list_session_entity_types, request, options: options do |response, operation|
244
+ response = Gapic::PagedEnumerable.new @session_entity_types_stub, :list_session_entity_types, request, response, operation, options
245
+ yield response, operation if block_given?
246
+ return response
247
+ end
248
+ rescue GRPC::BadStatus => e
249
+ raise Google::Cloud::Error.from_error(e)
250
+ end
251
+
252
+ ##
253
+ # Retrieves the specified session entity type.
254
+ #
255
+ # This method doesn't work with Google Assistant integration.
256
+ # Contact Dialogflow support if you need to use session entities
257
+ # with Google Assistant integration.
258
+ #
259
+ # @overload get_session_entity_type(request, options = nil)
260
+ # @param request [Google::Cloud::Dialogflow::V2::GetSessionEntityTypeRequest | Hash]
261
+ # Retrieves the specified session entity type.
262
+ #
263
+ # This method doesn't work with Google Assistant integration.
264
+ # Contact Dialogflow support if you need to use session entities
265
+ # with Google Assistant integration.
266
+ # @param options [Gapic::CallOptions, Hash]
267
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
268
+ #
269
+ # @overload get_session_entity_type(name: nil)
270
+ # @param name [String]
271
+ # Required. The name of the session entity type. Format:
272
+ # `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
273
+ # Display Name>`.
274
+ #
275
+ #
276
+ # @yield [response, operation] Access the result along with the RPC operation
277
+ # @yieldparam response [Google::Cloud::Dialogflow::V2::SessionEntityType]
278
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
279
+ #
280
+ # @return [Google::Cloud::Dialogflow::V2::SessionEntityType]
281
+ #
282
+ # @raise [Google::Cloud::Error] if the RPC is aborted.
283
+ #
284
+ def get_session_entity_type request, options = nil
285
+ raise ArgumentError, "request must be provided" if request.nil?
286
+
287
+ request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::GetSessionEntityTypeRequest
288
+
289
+ # Converts hash and nil to an options object
290
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
291
+
292
+ # Customize the options with defaults
293
+ metadata = @config.rpcs.get_session_entity_type.metadata.to_h
294
+
295
+ # Set x-goog-api-client and x-goog-user-project headers
296
+ metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
297
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
298
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
299
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
300
+
301
+ header_params = {
302
+ "name" => request.name
303
+ }
304
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
305
+ metadata[:"x-goog-request-params"] ||= request_params_header
306
+
307
+ options.apply_defaults timeout: @config.rpcs.get_session_entity_type.timeout,
308
+ metadata: metadata,
309
+ retry_policy: @config.rpcs.get_session_entity_type.retry_policy
310
+ options.apply_defaults metadata: @config.metadata,
311
+ retry_policy: @config.retry_policy
312
+
313
+ @session_entity_types_stub.call_rpc :get_session_entity_type, request, options: options do |response, operation|
314
+ yield response, operation if block_given?
315
+ return response
316
+ end
317
+ rescue GRPC::BadStatus => e
318
+ raise Google::Cloud::Error.from_error(e)
319
+ end
320
+
321
+ ##
322
+ # Creates a session entity type.
323
+ #
324
+ # If the specified session entity type already exists, overrides the session
325
+ # entity type.
326
+ #
327
+ # This method doesn't work with Google Assistant integration.
328
+ # Contact Dialogflow support if you need to use session entities
329
+ # with Google Assistant integration.
330
+ #
331
+ # @overload create_session_entity_type(request, options = nil)
332
+ # @param request [Google::Cloud::Dialogflow::V2::CreateSessionEntityTypeRequest | Hash]
333
+ # Creates a session entity type.
334
+ #
335
+ # If the specified session entity type already exists, overrides the session
336
+ # entity type.
337
+ #
338
+ # This method doesn't work with Google Assistant integration.
339
+ # Contact Dialogflow support if you need to use session entities
340
+ # with Google Assistant integration.
341
+ # @param options [Gapic::CallOptions, Hash]
342
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
343
+ #
344
+ # @overload create_session_entity_type(parent: nil, session_entity_type: nil)
345
+ # @param parent [String]
346
+ # Required. The session to create a session entity type for.
347
+ # Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
348
+ # @param session_entity_type [Google::Cloud::Dialogflow::V2::SessionEntityType | Hash]
349
+ # Required. The session entity type to create.
350
+ #
351
+ #
352
+ # @yield [response, operation] Access the result along with the RPC operation
353
+ # @yieldparam response [Google::Cloud::Dialogflow::V2::SessionEntityType]
354
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
355
+ #
356
+ # @return [Google::Cloud::Dialogflow::V2::SessionEntityType]
357
+ #
358
+ # @raise [Google::Cloud::Error] if the RPC is aborted.
359
+ #
360
+ def create_session_entity_type request, options = nil
361
+ raise ArgumentError, "request must be provided" if request.nil?
362
+
363
+ request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::CreateSessionEntityTypeRequest
364
+
365
+ # Converts hash and nil to an options object
366
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
367
+
368
+ # Customize the options with defaults
369
+ metadata = @config.rpcs.create_session_entity_type.metadata.to_h
370
+
371
+ # Set x-goog-api-client and x-goog-user-project headers
372
+ metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
373
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
374
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
375
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
376
+
377
+ header_params = {
378
+ "parent" => request.parent
379
+ }
380
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
381
+ metadata[:"x-goog-request-params"] ||= request_params_header
382
+
383
+ options.apply_defaults timeout: @config.rpcs.create_session_entity_type.timeout,
384
+ metadata: metadata,
385
+ retry_policy: @config.rpcs.create_session_entity_type.retry_policy
386
+ options.apply_defaults metadata: @config.metadata,
387
+ retry_policy: @config.retry_policy
388
+
389
+ @session_entity_types_stub.call_rpc :create_session_entity_type, request, options: options do |response, operation|
390
+ yield response, operation if block_given?
391
+ return response
392
+ end
393
+ rescue GRPC::BadStatus => e
394
+ raise Google::Cloud::Error.from_error(e)
395
+ end
396
+
397
+ ##
398
+ # Updates the specified session entity type.
399
+ #
400
+ # This method doesn't work with Google Assistant integration.
401
+ # Contact Dialogflow support if you need to use session entities
402
+ # with Google Assistant integration.
403
+ #
404
+ # @overload update_session_entity_type(request, options = nil)
405
+ # @param request [Google::Cloud::Dialogflow::V2::UpdateSessionEntityTypeRequest | Hash]
406
+ # Updates the specified session entity type.
407
+ #
408
+ # This method doesn't work with Google Assistant integration.
409
+ # Contact Dialogflow support if you need to use session entities
410
+ # with Google Assistant integration.
411
+ # @param options [Gapic::CallOptions, Hash]
412
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
413
+ #
414
+ # @overload update_session_entity_type(session_entity_type: nil, update_mask: nil)
415
+ # @param session_entity_type [Google::Cloud::Dialogflow::V2::SessionEntityType | Hash]
416
+ # Required. The entity type to update. Format:
417
+ # `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
418
+ # Display Name>`.
419
+ # @param update_mask [Google::Protobuf::FieldMask | Hash]
420
+ # Optional. The mask to control which fields get updated.
421
+ #
422
+ #
423
+ # @yield [response, operation] Access the result along with the RPC operation
424
+ # @yieldparam response [Google::Cloud::Dialogflow::V2::SessionEntityType]
425
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
426
+ #
427
+ # @return [Google::Cloud::Dialogflow::V2::SessionEntityType]
428
+ #
429
+ # @raise [Google::Cloud::Error] if the RPC is aborted.
430
+ #
431
+ def update_session_entity_type request, options = nil
432
+ raise ArgumentError, "request must be provided" if request.nil?
433
+
434
+ request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::UpdateSessionEntityTypeRequest
435
+
436
+ # Converts hash and nil to an options object
437
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
438
+
439
+ # Customize the options with defaults
440
+ metadata = @config.rpcs.update_session_entity_type.metadata.to_h
441
+
442
+ # Set x-goog-api-client and x-goog-user-project headers
443
+ metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
444
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
445
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
446
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
447
+
448
+ header_params = {
449
+ "session_entity_type.name" => request.session_entity_type.name
450
+ }
451
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
452
+ metadata[:"x-goog-request-params"] ||= request_params_header
453
+
454
+ options.apply_defaults timeout: @config.rpcs.update_session_entity_type.timeout,
455
+ metadata: metadata,
456
+ retry_policy: @config.rpcs.update_session_entity_type.retry_policy
457
+ options.apply_defaults metadata: @config.metadata,
458
+ retry_policy: @config.retry_policy
459
+
460
+ @session_entity_types_stub.call_rpc :update_session_entity_type, request, options: options do |response, operation|
461
+ yield response, operation if block_given?
462
+ return response
463
+ end
464
+ rescue GRPC::BadStatus => e
465
+ raise Google::Cloud::Error.from_error(e)
466
+ end
467
+
468
+ ##
469
+ # Deletes the specified session entity type.
470
+ #
471
+ # This method doesn't work with Google Assistant integration.
472
+ # Contact Dialogflow support if you need to use session entities
473
+ # with Google Assistant integration.
474
+ #
475
+ # @overload delete_session_entity_type(request, options = nil)
476
+ # @param request [Google::Cloud::Dialogflow::V2::DeleteSessionEntityTypeRequest | Hash]
477
+ # Deletes the specified session entity type.
478
+ #
479
+ # This method doesn't work with Google Assistant integration.
480
+ # Contact Dialogflow support if you need to use session entities
481
+ # with Google Assistant integration.
482
+ # @param options [Gapic::CallOptions, Hash]
483
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
484
+ #
485
+ # @overload delete_session_entity_type(name: nil)
486
+ # @param name [String]
487
+ # Required. The name of the entity type to delete. Format:
488
+ # `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
489
+ # Display Name>`.
490
+ #
491
+ #
492
+ # @yield [response, operation] Access the result along with the RPC operation
493
+ # @yieldparam response [Google::Protobuf::Empty]
494
+ # @yieldparam operation [GRPC::ActiveCall::Operation]
495
+ #
496
+ # @return [Google::Protobuf::Empty]
497
+ #
498
+ # @raise [Google::Cloud::Error] if the RPC is aborted.
499
+ #
500
+ def delete_session_entity_type request, options = nil
501
+ raise ArgumentError, "request must be provided" if request.nil?
502
+
503
+ request = Gapic::Protobuf.coerce request, to: Google::Cloud::Dialogflow::V2::DeleteSessionEntityTypeRequest
504
+
505
+ # Converts hash and nil to an options object
506
+ options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
507
+
508
+ # Customize the options with defaults
509
+ metadata = @config.rpcs.delete_session_entity_type.metadata.to_h
510
+
511
+ # Set x-goog-api-client and x-goog-user-project headers
512
+ metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
513
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
514
+ gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION
515
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
516
+
517
+ header_params = {
518
+ "name" => request.name
519
+ }
520
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
521
+ metadata[:"x-goog-request-params"] ||= request_params_header
522
+
523
+ options.apply_defaults timeout: @config.rpcs.delete_session_entity_type.timeout,
524
+ metadata: metadata,
525
+ retry_policy: @config.rpcs.delete_session_entity_type.retry_policy
526
+ options.apply_defaults metadata: @config.metadata,
527
+ retry_policy: @config.retry_policy
528
+
529
+ @session_entity_types_stub.call_rpc :delete_session_entity_type, request, options: options do |response, operation|
530
+ yield response, operation if block_given?
531
+ return response
532
+ end
533
+ rescue GRPC::BadStatus => e
534
+ raise Google::Cloud::Error.from_error(e)
535
+ end
536
+
537
+ ##
538
+ # Configuration class for the SessionEntityTypes API.
539
+ #
540
+ # This class represents the configuration for SessionEntityTypes,
541
+ # providing control over timeouts, retry behavior, logging, transport
542
+ # parameters, and other low-level controls. Certain parameters can also be
543
+ # applied individually to specific RPCs. See
544
+ # {Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client::Configuration::Rpcs}
545
+ # for a list of RPCs that can be configured independently.
546
+ #
547
+ # Configuration can be applied globally to all clients, or to a single client
548
+ # on construction.
549
+ #
550
+ # # Examples
551
+ #
552
+ # To modify the global config, setting the timeout for list_session_entity_types
553
+ # to 20 seconds, and all remaining timeouts to 10 seconds:
554
+ #
555
+ # Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.configure do |config|
556
+ # config.timeout = 10_000
557
+ # config.rpcs.list_session_entity_types.timeout = 20_000
558
+ # end
559
+ #
560
+ # To apply the above configuration only to a new client:
561
+ #
562
+ # client = Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client.new do |config|
563
+ # config.timeout = 10_000
564
+ # config.rpcs.list_session_entity_types.timeout = 20_000
565
+ # end
566
+ #
567
+ # @!attribute [rw] endpoint
568
+ # The hostname or hostname:port of the service endpoint.
569
+ # Defaults to `"dialogflow.googleapis.com"`.
570
+ # @return [String]
571
+ # @!attribute [rw] credentials
572
+ # Credentials to send with calls. You may provide any of the following types:
573
+ # * (`String`) The path to a service account key file in JSON format
574
+ # * (`Hash`) A service account key as a Hash
575
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
576
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
577
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
578
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
579
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
580
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
581
+ # * (`nil`) indicating no credentials
582
+ # @return [Object]
583
+ # @!attribute [rw] scope
584
+ # The OAuth scopes
585
+ # @return [Array<String>]
586
+ # @!attribute [rw] lib_name
587
+ # The library name as recorded in instrumentation and logging
588
+ # @return [String]
589
+ # @!attribute [rw] lib_version
590
+ # The library version as recorded in instrumentation and logging
591
+ # @return [String]
592
+ # @!attribute [rw] channel_args
593
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
594
+ # `GRPC::Core::Channel` object is provided as the credential.
595
+ # @return [Hash]
596
+ # @!attribute [rw] interceptors
597
+ # An array of interceptors that are run before calls are executed.
598
+ # @return [Array<GRPC::ClientInterceptor>]
599
+ # @!attribute [rw] timeout
600
+ # The call timeout in milliseconds.
601
+ # @return [Numeric]
602
+ # @!attribute [rw] metadata
603
+ # Additional gRPC headers to be sent with the call.
604
+ # @return [Hash{Symbol=>String}]
605
+ # @!attribute [rw] retry_policy
606
+ # The retry policy. The value is a hash with the following keys:
607
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
608
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
609
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
610
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
611
+ # trigger a retry.
612
+ # @return [Hash]
613
+ #
614
+ class Configuration
615
+ extend Gapic::Config
616
+
617
+ config_attr :endpoint, "dialogflow.googleapis.com", String
618
+ config_attr :credentials, nil do |value|
619
+ allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
620
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
621
+ allowed.any? { |klass| klass === value }
622
+ end
623
+ config_attr :scope, nil, String, Array, nil
624
+ config_attr :lib_name, nil, String, nil
625
+ config_attr :lib_version, nil, String, nil
626
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
627
+ config_attr :interceptors, nil, Array, nil
628
+ config_attr :timeout, nil, Numeric, nil
629
+ config_attr :metadata, nil, Hash, nil
630
+ config_attr :retry_policy, nil, Hash, Proc, nil
631
+
632
+ # @private
633
+ def initialize parent_config = nil
634
+ @parent_config = parent_config unless parent_config.nil?
635
+
636
+ yield self if block_given?
637
+ end
638
+
639
+ ##
640
+ # Configurations for individual RPCs
641
+ # @return [Rpcs]
642
+ #
643
+ def rpcs
644
+ @rpcs ||= begin
645
+ parent_rpcs = nil
646
+ parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
647
+ Rpcs.new parent_rpcs
648
+ end
649
+ end
650
+
651
+ ##
652
+ # Configuration RPC class for the SessionEntityTypes API.
653
+ #
654
+ # Includes fields providing the configuration for each RPC in this service.
655
+ # Each configuration object is of type `Gapic::Config::Method` and includes
656
+ # the following configuration fields:
657
+ #
658
+ # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
659
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
660
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
661
+ # include the following keys:
662
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
663
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
664
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
665
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
666
+ # trigger a retry.
667
+ #
668
+ class Rpcs
669
+ ##
670
+ # RPC-specific configuration for `list_session_entity_types`
671
+ # @return [Gapic::Config::Method]
672
+ #
673
+ attr_reader :list_session_entity_types
674
+ ##
675
+ # RPC-specific configuration for `get_session_entity_type`
676
+ # @return [Gapic::Config::Method]
677
+ #
678
+ attr_reader :get_session_entity_type
679
+ ##
680
+ # RPC-specific configuration for `create_session_entity_type`
681
+ # @return [Gapic::Config::Method]
682
+ #
683
+ attr_reader :create_session_entity_type
684
+ ##
685
+ # RPC-specific configuration for `update_session_entity_type`
686
+ # @return [Gapic::Config::Method]
687
+ #
688
+ attr_reader :update_session_entity_type
689
+ ##
690
+ # RPC-specific configuration for `delete_session_entity_type`
691
+ # @return [Gapic::Config::Method]
692
+ #
693
+ attr_reader :delete_session_entity_type
694
+
695
+ # @private
696
+ def initialize parent_rpcs = nil
697
+ list_session_entity_types_config = parent_rpcs&.list_session_entity_types if parent_rpcs&.respond_to? :list_session_entity_types
698
+ @list_session_entity_types = Gapic::Config::Method.new list_session_entity_types_config
699
+ get_session_entity_type_config = parent_rpcs&.get_session_entity_type if parent_rpcs&.respond_to? :get_session_entity_type
700
+ @get_session_entity_type = Gapic::Config::Method.new get_session_entity_type_config
701
+ create_session_entity_type_config = parent_rpcs&.create_session_entity_type if parent_rpcs&.respond_to? :create_session_entity_type
702
+ @create_session_entity_type = Gapic::Config::Method.new create_session_entity_type_config
703
+ update_session_entity_type_config = parent_rpcs&.update_session_entity_type if parent_rpcs&.respond_to? :update_session_entity_type
704
+ @update_session_entity_type = Gapic::Config::Method.new update_session_entity_type_config
705
+ delete_session_entity_type_config = parent_rpcs&.delete_session_entity_type if parent_rpcs&.respond_to? :delete_session_entity_type
706
+ @delete_session_entity_type = Gapic::Config::Method.new delete_session_entity_type_config
707
+
708
+ yield self if block_given?
709
+ end
710
+ end
711
+ end
712
+ end
713
+ end
714
+ end
715
+ end
716
+ end
717
+ end
718
+
719
+ # rubocop:disable Lint/HandleExceptions
720
+
721
+ # Once client is loaded, load helpers.rb if it exists.
722
+ begin
723
+ require "google/cloud/dialogflow/v2/session_entity_types/helpers"
724
+ rescue LoadError
725
+ end
726
+
727
+ # rubocop:enable Lint/HandleExceptions