google-cloud-dialogflow-v2 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +4 -4
  4. data/LICENSE.md +190 -188
  5. data/README.md +2 -2
  6. data/lib/google/cloud/dialogflow/v2/agents/client.rb +32 -2
  7. data/lib/google/cloud/dialogflow/v2/agents/credentials.rb +0 -1
  8. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +0 -1
  9. data/lib/google/cloud/dialogflow/v2/agents/paths.rb +2 -0
  10. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +47 -7
  11. data/lib/google/cloud/dialogflow/v2/contexts/credentials.rb +0 -1
  12. data/lib/google/cloud/dialogflow/v2/contexts/paths.rb +2 -0
  13. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +32 -2
  14. data/lib/google/cloud/dialogflow/v2/entity_types/credentials.rb +0 -1
  15. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +0 -1
  16. data/lib/google/cloud/dialogflow/v2/entity_types/paths.rb +2 -0
  17. data/lib/google/cloud/dialogflow/v2/intents/client.rb +36 -2
  18. data/lib/google/cloud/dialogflow/v2/intents/credentials.rb +0 -1
  19. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +0 -1
  20. data/lib/google/cloud/dialogflow/v2/intents/paths.rb +2 -0
  21. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +42 -9
  22. data/lib/google/cloud/dialogflow/v2/session_entity_types/credentials.rb +0 -1
  23. data/lib/google/cloud/dialogflow/v2/session_entity_types/paths.rb +2 -0
  24. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +16 -6
  25. data/lib/google/cloud/dialogflow/v2/sessions/credentials.rb +0 -1
  26. data/lib/google/cloud/dialogflow/v2/sessions/paths.rb +2 -0
  27. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  28. data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +6 -6
  29. data/proto_docs/google/cloud/dialogflow/v2/context.rb +32 -7
  30. data/proto_docs/google/cloud/dialogflow/v2/intent.rb +1 -0
  31. data/proto_docs/google/cloud/dialogflow/v2/session.rb +16 -8
  32. data/proto_docs/google/cloud/dialogflow/v2/session_entity_type.rb +26 -8
  33. metadata +8 -5
@@ -18,7 +18,6 @@
18
18
 
19
19
  require "googleauth"
20
20
 
21
-
22
21
  module Google
23
22
  module Cloud
24
23
  module Dialogflow
@@ -102,6 +102,8 @@ module Google
102
102
 
103
103
  "projects/#{project}/agent/sessions/#{session}/entityTypes/#{entity_type}"
104
104
  end
105
+
106
+ extend self
105
107
  end
106
108
  end
107
109
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Dialogflow
23
23
  module V2
24
- VERSION = "0.1.0"
24
+ VERSION = "0.2.0"
25
25
  end
26
26
  end
27
27
  end
@@ -100,13 +100,13 @@ module Google
100
100
  # the same session do not necessarily need to specify the same language.
101
101
  # @!attribute [rw] enable_word_info
102
102
  # @return [Boolean]
103
- # Optional. If `true`, Dialogflow returns {Google::Cloud::Dialogflow::V2::SpeechWordInfo SpeechWordInfo} in
103
+ # If `true`, Dialogflow returns {Google::Cloud::Dialogflow::V2::SpeechWordInfo SpeechWordInfo} in
104
104
  # {Google::Cloud::Dialogflow::V2::StreamingRecognitionResult StreamingRecognitionResult} with information about the recognized speech
105
105
  # words, e.g. start and end time offsets. If false or unspecified, Speech
106
106
  # doesn't return any word-level information.
107
107
  # @!attribute [rw] phrase_hints
108
108
  # @return [Array<String>]
109
- # Optional. A list of strings containing words and phrases that the speech
109
+ # A list of strings containing words and phrases that the speech
110
110
  # recognizer should recognize with higher likelihood.
111
111
  #
112
112
  # See [the Cloud Speech
@@ -118,14 +118,14 @@ module Google
118
118
  # treat the [phrase_hints]() as a single additional [SpeechContext]().
119
119
  # @!attribute [rw] speech_contexts
120
120
  # @return [Array<Google::Cloud::Dialogflow::V2::SpeechContext>]
121
- # Optional. Context information to assist speech recognition.
121
+ # Context information to assist speech recognition.
122
122
  #
123
123
  # See [the Cloud Speech
124
124
  # documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
125
125
  # for more details.
126
126
  # @!attribute [rw] model
127
127
  # @return [String]
128
- # Optional. Which Speech model to select for the given request. Select the
128
+ # Which Speech model to select for the given request. Select the
129
129
  # model best suited to your domain to get best results. If a model is not
130
130
  # explicitly specified, then we auto-select a model based on the parameters
131
131
  # in the InputAudioConfig.
@@ -138,10 +138,10 @@ module Google
138
138
  # for more details.
139
139
  # @!attribute [rw] model_variant
140
140
  # @return [Google::Cloud::Dialogflow::V2::SpeechModelVariant]
141
- # Optional. Which variant of the [Speech model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use.
141
+ # Which variant of the [Speech model][google.cloud.dialogflow.v2.InputAudioConfig.model] to use.
142
142
  # @!attribute [rw] single_utterance
143
143
  # @return [Boolean]
144
- # Optional. If `false` (default), recognition does not cease until the
144
+ # If `false` (default), recognition does not cease until the
145
145
  # client closes the stream.
146
146
  # If `true`, the recognizer will detect a single spoken utterance in input
147
147
  # audio. Recognition ceases when it detects the audio's voice has
@@ -25,10 +25,15 @@ module Google
25
25
  # @!attribute [rw] name
26
26
  # @return [String]
27
27
  # Required. The unique identifier of the context. Format:
28
- # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
28
+ # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`,
29
+ # or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
30
+ # ID>/sessions/<Session ID>/contexts/<Context ID>`.
29
31
  #
30
32
  # The `Context ID` is always converted to lowercase, may only contain
31
- # characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long.
33
+ # characters in a-zA-Z0-9_-% and may be at most 250 bytes long.
34
+ #
35
+ # If `Environment ID` is not specified, we assume default 'draft'
36
+ # environment. If `User ID` is not specified, we assume default '-' user.
32
37
  #
33
38
  # The following context names are reserved for internal use by Dialogflow.
34
39
  # You should not use these contexts or create contexts with these names:
@@ -57,7 +62,11 @@ module Google
57
62
  # @!attribute [rw] parent
58
63
  # @return [String]
59
64
  # Required. The session to list all contexts from.
60
- # Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
65
+ # Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
66
+ # `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
67
+ # ID>/sessions/<Session ID>`.
68
+ # If `Environment ID` is not specified, we assume default 'draft'
69
+ # environment. If `User ID` is not specified, we assume default '-' user.
61
70
  # @!attribute [rw] page_size
62
71
  # @return [Integer]
63
72
  # Optional. The maximum number of items to return in a single page. By
@@ -88,7 +97,11 @@ module Google
88
97
  # @!attribute [rw] name
89
98
  # @return [String]
90
99
  # Required. The name of the context. Format:
91
- # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
100
+ # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`
101
+ # or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
102
+ # ID>/sessions/<Session ID>/contexts/<Context ID>`.
103
+ # If `Environment ID` is not specified, we assume default 'draft'
104
+ # environment. If `User ID` is not specified, we assume default '-' user.
92
105
  class GetContextRequest
93
106
  include Google::Protobuf::MessageExts
94
107
  extend Google::Protobuf::MessageExts::ClassMethods
@@ -98,7 +111,11 @@ module Google
98
111
  # @!attribute [rw] parent
99
112
  # @return [String]
100
113
  # Required. The session to create a context for.
101
- # Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
114
+ # Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
115
+ # `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
116
+ # ID>/sessions/<Session ID>`.
117
+ # If `Environment ID` is not specified, we assume default 'draft'
118
+ # environment. If `User ID` is not specified, we assume default '-' user.
102
119
  # @!attribute [rw] context
103
120
  # @return [Google::Cloud::Dialogflow::V2::Context]
104
121
  # Required. The context to create.
@@ -123,7 +140,11 @@ module Google
123
140
  # @!attribute [rw] name
124
141
  # @return [String]
125
142
  # Required. The name of the context to delete. Format:
126
- # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
143
+ # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`
144
+ # or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
145
+ # ID>/sessions/<Session ID>/contexts/<Context ID>`.
146
+ # If `Environment ID` is not specified, we assume default 'draft'
147
+ # environment. If `User ID` is not specified, we assume default '-' user.
127
148
  class DeleteContextRequest
128
149
  include Google::Protobuf::MessageExts
129
150
  extend Google::Protobuf::MessageExts::ClassMethods
@@ -133,7 +154,11 @@ module Google
133
154
  # @!attribute [rw] parent
134
155
  # @return [String]
135
156
  # Required. The name of the session to delete all contexts from. Format:
136
- # `projects/<Project ID>/agent/sessions/<Session ID>`.
157
+ # `projects/<Project ID>/agent/sessions/<Session ID>` or `projects/<Project
158
+ # ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session
159
+ # ID>`.
160
+ # If `Environment ID` is not specified we assume default 'draft' environment.
161
+ # If `User ID` is not specified, we assume default '-' user.
137
162
  class DeleteAllContextsRequest
138
163
  include Google::Protobuf::MessageExts
139
164
  extend Google::Protobuf::MessageExts::ClassMethods
@@ -65,6 +65,7 @@ module Google
65
65
  # Optional. The collection of event names that trigger the intent.
66
66
  # If the collection of input contexts is not empty, all of the contexts must
67
67
  # be present in the active user session for an event to trigger this intent.
68
+ # Event names are limited to 150 characters.
68
69
  # @!attribute [rw] training_phrases
69
70
  # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase>]
70
71
  # Optional. The collection of examples that the agent is
@@ -27,10 +27,14 @@ module Google
27
27
  # @!attribute [rw] session
28
28
  # @return [String]
29
29
  # Required. The name of the session this query is sent to. Format:
30
- # `projects/<Project ID>/agent/sessions/<Session ID>`. It's up to the API
31
- # caller to choose an appropriate session ID. It can be a random number or
32
- # some type of user identifier (preferably hashed). The length of the session
33
- # ID must not exceed 36 bytes.
30
+ # `projects/<Project ID>/agent/sessions/<Session ID>`, or
31
+ # `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
32
+ # ID>/sessions/<Session ID>`. If `Environment ID` is not specified, we assume
33
+ # default 'draft' environment. If `User ID` is not specified, we are using
34
+ # "-". It's up to the API caller to choose an appropriate `Session ID` and
35
+ # `User Id`. They can be a random number or some type of user and session
36
+ # identifiers (preferably hashed). The length of the `Session ID` and
37
+ # `User ID` must not exceed 36 characters.
34
38
  # @!attribute [rw] query_params
35
39
  # @return [Google::Cloud::Dialogflow::V2::QueryParameters]
36
40
  # The parameters of this query.
@@ -284,10 +288,14 @@ module Google
284
288
  # @return [String]
285
289
  # Required. The name of the session the query is sent to.
286
290
  # Format of the session name:
287
- # `projects/<Project ID>/agent/sessions/<Session ID>`. It's up to the API
288
- # caller to choose an appropriate `Session ID`. It can be a random number or
289
- # some type of user identifier (preferably hashed). The length of the session
290
- # ID must not exceed 36 characters.
291
+ # `projects/<Project ID>/agent/sessions/<Session ID>`, or
292
+ # `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
293
+ # ID>/sessions/<Session ID>`. If `Environment ID` is not specified, we assume
294
+ # default 'draft' environment. If `User ID` is not specified, we are using
295
+ # "-". It's up to the API caller to choose an appropriate `Session ID` and
296
+ # `User Id`. They can be a random number or some type of user and session
297
+ # identifiers (preferably hashed). The length of the `Session ID` and
298
+ # `User ID` must not exceed 36 characters.
291
299
  # @!attribute [rw] query_params
292
300
  # @return [Google::Cloud::Dialogflow::V2::QueryParameters]
293
301
  # The parameters of this query.
@@ -32,7 +32,11 @@ module Google
32
32
  # @return [String]
33
33
  # Required. The unique identifier of this session entity type. Format:
34
34
  # `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
35
- # Display Name>`.
35
+ # Display Name>`, or `projects/<Project ID>/agent/environments/<Environment
36
+ # ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
37
+ # Name>`.
38
+ # If `Environment ID` is not specified, we assume default 'draft'
39
+ # environment. If `User ID` is not specified, we assume default '-' user.
36
40
  #
37
41
  # `<Entity Type Display Name>` must be the display name of an existing entity
38
42
  # type in the same agent that will be overridden or supplemented.
@@ -74,7 +78,11 @@ module Google
74
78
  # @!attribute [rw] parent
75
79
  # @return [String]
76
80
  # Required. The session to list all session entity types from.
77
- # Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
81
+ # Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
82
+ # `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/
83
+ # sessions/<Session ID>`.
84
+ # If `Environment ID` is not specified, we assume default 'draft'
85
+ # environment. If `User ID` is not specified, we assume default '-' user.
78
86
  # @!attribute [rw] page_size
79
87
  # @return [Integer]
80
88
  # Optional. The maximum number of items to return in a single page. By
@@ -106,7 +114,11 @@ module Google
106
114
  # @return [String]
107
115
  # Required. The name of the session entity type. Format:
108
116
  # `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
109
- # Display Name>`.
117
+ # Display Name>` or `projects/<Project ID>/agent/environments/<Environment
118
+ # ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
119
+ # Name>`.
120
+ # If `Environment ID` is not specified, we assume default 'draft'
121
+ # environment. If `User ID` is not specified, we assume default '-' user.
110
122
  class GetSessionEntityTypeRequest
111
123
  include Google::Protobuf::MessageExts
112
124
  extend Google::Protobuf::MessageExts::ClassMethods
@@ -116,7 +128,11 @@ module Google
116
128
  # @!attribute [rw] parent
117
129
  # @return [String]
118
130
  # Required. The session to create a session entity type for.
119
- # Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
131
+ # Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
132
+ # `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/
133
+ # sessions/<Session ID>`.
134
+ # If `Environment ID` is not specified, we assume default 'draft'
135
+ # environment. If `User ID` is not specified, we assume default '-' user.
120
136
  # @!attribute [rw] session_entity_type
121
137
  # @return [Google::Cloud::Dialogflow::V2::SessionEntityType]
122
138
  # Required. The session entity type to create.
@@ -128,9 +144,7 @@ module Google
128
144
  # The request message for {Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client#update_session_entity_type SessionEntityTypes.UpdateSessionEntityType}.
129
145
  # @!attribute [rw] session_entity_type
130
146
  # @return [Google::Cloud::Dialogflow::V2::SessionEntityType]
131
- # Required. The entity type to update. Format:
132
- # `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
133
- # Display Name>`.
147
+ # Required. The session entity type to update.
134
148
  # @!attribute [rw] update_mask
135
149
  # @return [Google::Protobuf::FieldMask]
136
150
  # Optional. The mask to control which fields get updated.
@@ -144,7 +158,11 @@ module Google
144
158
  # @return [String]
145
159
  # Required. The name of the entity type to delete. Format:
146
160
  # `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
147
- # Display Name>`.
161
+ # Display Name>` or `projects/<Project ID>/agent/environments/<Environment
162
+ # ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
163
+ # Name>`.
164
+ # If `Environment ID` is not specified, we assume default 'draft'
165
+ # environment. If `User ID` is not specified, we assume default '-' user.
148
166
  class DeleteSessionEntityTypeRequest
149
167
  include Google::Protobuf::MessageExts
150
168
  extend Google::Protobuf::MessageExts::ClassMethods
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-dialogflow-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-18 00:00:00.000000000 Z
11
+ date: 2020-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -122,8 +122,11 @@ dependencies:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0.9'
125
- description: google-cloud-dialogflow-v2 is the official library for Dialogflow V2
126
- API.
125
+ description: Dialogflow is an end-to-end, build-once deploy-everywhere development
126
+ suite for creating conversational interfaces for websites, mobile applications,
127
+ popular messaging platforms, and IoT devices. You can use it to build interfaces
128
+ (such as chatbots and conversational IVR) that enable natural and rich interactions
129
+ between your users and your business.
127
130
  email: googleapis-packages@google.com
128
131
  executables: []
129
132
  extensions: []
@@ -221,5 +224,5 @@ requirements: []
221
224
  rubygems_version: 3.0.6
222
225
  signing_key:
223
226
  specification_version: 4
224
- summary: Creates conversational experiences across devices and platforms.
227
+ summary: API Client library for the Dialogflow V2 API
225
228
  test_files: []