google-cloud-dialogflow-v2 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83244380b1485829daa476ae43bb05fb2680d4fdfe94dd2e7ae76b022cf0cafa
4
- data.tar.gz: 491960c461f9d97c2450fa39bcea1531be0ac5e9a2df8487dd56dfdb422e11aa
3
+ metadata.gz: 16982e0d34ab2e7c8c220e4b5c7767ba03c6826d174df1d524468dd0c249d896
4
+ data.tar.gz: 9f84552bd02b904418eadb825a813bd94526b9a79690231f76c4eea89ddb8d3b
5
5
  SHA512:
6
- metadata.gz: e1d0cd386f15f2601cf9c4bc0aaa8475cb1ccd3a27c7d3632b766d44853c9c145039c770d50ec32ef15df5acb2a8f21c40bb520ca0df939da610e2ae6b369ce4
7
- data.tar.gz: a607ac890ee4da27430a72b894b30acaeb1a44c667d0c3f044011c0257b1f43fcb9b3212758af1d87b58b764e94e0a675f91fbf0641ae7ca77f8be2d6b023163
6
+ metadata.gz: 5c1d4aa92c742a29c9ddfd2bd48030487f7d64d38cdd9c7ce8446ec2d6f44ff16c5a4dfe8b4f2cbd41b5750a5bf4bcb2efb9ca489d482ed970c8dc395a56f2b9
7
+ data.tar.gz: a44f049e7a9e74c22f112a7b1d2e629fba8828e12be5bbd0f6c303b9bc7b004048feef6f6993dcf21de5303d4f854c20d5e25148ab61db5e72c16a01db5716dd
@@ -27,20 +27,48 @@ module Google
27
27
  ##
28
28
  # Create a fully-qualified Context resource string.
29
29
  #
30
- # The resource will be in the following format:
30
+ # @overload context_path(project:, session:, context:)
31
+ # The resource will be in the following format:
31
32
  #
32
- # `projects/{project}/agent/sessions/{session}/contexts/{context}`
33
+ # `projects/{project}/agent/sessions/{session}/contexts/{context}`
33
34
  #
34
- # @param project [String]
35
- # @param session [String]
36
- # @param context [String]
35
+ # @param project [String]
36
+ # @param session [String]
37
+ # @param context [String]
38
+ #
39
+ # @overload context_path(project:, environment:, user:, session:, context:)
40
+ # The resource will be in the following format:
41
+ #
42
+ # `projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}`
43
+ #
44
+ # @param project [String]
45
+ # @param environment [String]
46
+ # @param user [String]
47
+ # @param session [String]
48
+ # @param context [String]
37
49
  #
38
50
  # @return [String]
39
- def context_path project:, session:, context:
40
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
41
- raise ArgumentError, "session cannot contain /" if session.to_s.include? "/"
51
+ def context_path **args
52
+ resources = {
53
+ "context:project:session" => (proc do |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
+ "context:environment:project:session:user" => (proc do |project:, environment:, user:, session:, context:|
60
+ raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
61
+ raise ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
62
+ raise ArgumentError, "user cannot contain /" if user.to_s.include? "/"
63
+ raise ArgumentError, "session cannot contain /" if session.to_s.include? "/"
64
+
65
+ "projects/#{project}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/contexts/#{context}"
66
+ end)
67
+ }
42
68
 
43
- "projects/#{project}/agent/sessions/#{session}/contexts/#{context}"
69
+ resource = resources[args.keys.sort.join(":")]
70
+ raise ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
71
+ resource.call(**args)
44
72
  end
45
73
 
46
74
  extend self
@@ -246,12 +246,11 @@ module Google
246
246
  # Required. The agent to list all entity types from.
247
247
  # Format: `projects/<Project ID>/agent`.
248
248
  # @param language_code [String]
249
- # Optional. The language to list entity synonyms for. If not specified,
250
- # the agent's default language is used.
251
- # [Many
252
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
253
- # are supported. Note: languages must be enabled in the agent before they can
254
- # be used.
249
+ # Optional. The language used to access language-specific data.
250
+ # If not specified, the agent's default language is used.
251
+ # For more information, see
252
+ # [Multilingual intent and entity
253
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
255
254
  # @param page_size [Integer]
256
255
  # Optional. The maximum number of items to return in a single page. By
257
256
  # default 100 and at most 1000.
@@ -319,12 +318,11 @@ module Google
319
318
  # Required. The name of the entity type.
320
319
  # Format: `projects/<Project ID>/agent/entityTypes/<EntityType ID>`.
321
320
  # @param language_code [String]
322
- # Optional. The language to retrieve entity synonyms for. If not specified,
323
- # the agent's default language is used.
324
- # [Many
325
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
326
- # are supported. Note: languages must be enabled in the agent before they can
327
- # be used.
321
+ # Optional. The language used to access language-specific data.
322
+ # If not specified, the agent's default language is used.
323
+ # For more information, see
324
+ # [Multilingual intent and entity
325
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
328
326
  #
329
327
  #
330
328
  # @yield [response, operation] Access the result along with the RPC operation
@@ -388,12 +386,11 @@ module Google
388
386
  # @param entity_type [Google::Cloud::Dialogflow::V2::EntityType | Hash]
389
387
  # Required. The entity type to create.
390
388
  # @param language_code [String]
391
- # Optional. The language of entity synonyms defined in `entity_type`. If not
392
- # specified, the agent's default language is used.
393
- # [Many
394
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
395
- # are supported. Note: languages must be enabled in the agent before they can
396
- # be used.
389
+ # Optional. The language used to access language-specific data.
390
+ # If not specified, the agent's default language is used.
391
+ # For more information, see
392
+ # [Multilingual intent and entity
393
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
397
394
  #
398
395
  #
399
396
  # @yield [response, operation] Access the result along with the RPC operation
@@ -454,12 +451,11 @@ module Google
454
451
  # @param entity_type [Google::Cloud::Dialogflow::V2::EntityType | Hash]
455
452
  # Required. The entity type to update.
456
453
  # @param language_code [String]
457
- # Optional. The language of entity synonyms defined in `entity_type`. If not
458
- # specified, the agent's default language is used.
459
- # [Many
460
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
461
- # are supported. Note: languages must be enabled in the agent before they can
462
- # be used.
454
+ # Optional. The language used to access language-specific data.
455
+ # If not specified, the agent's default language is used.
456
+ # For more information, see
457
+ # [Multilingual intent and entity
458
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
463
459
  # @param update_mask [Google::Protobuf::FieldMask | Hash]
464
460
  # Optional. The mask to control which fields get updated.
465
461
  #
@@ -594,12 +590,11 @@ module Google
594
590
  # @param entity_type_batch_inline [Google::Cloud::Dialogflow::V2::EntityTypeBatch | Hash]
595
591
  # The collection of entity types to update or create.
596
592
  # @param language_code [String]
597
- # Optional. The language of entity synonyms defined in `entity_types`. If not
598
- # specified, the agent's default language is used.
599
- # [Many
600
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
601
- # are supported. Note: languages must be enabled in the agent before they can
602
- # be used.
593
+ # Optional. The language used to access language-specific data.
594
+ # If not specified, the agent's default language is used.
595
+ # For more information, see
596
+ # [Multilingual intent and entity
597
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
603
598
  # @param update_mask [Google::Protobuf::FieldMask | Hash]
604
599
  # Optional. The mask to control which fields get updated.
605
600
  #
@@ -738,12 +733,11 @@ module Google
738
733
  # @param entities [Array<Google::Cloud::Dialogflow::V2::EntityType::Entity | Hash>]
739
734
  # Required. The entities to create.
740
735
  # @param language_code [String]
741
- # Optional. The language of entity synonyms defined in `entities`. If not
742
- # specified, the agent's default language is used.
743
- # [Many
744
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
745
- # are supported. Note: languages must be enabled in the agent before they can
746
- # be used.
736
+ # Optional. The language used to access language-specific data.
737
+ # If not specified, the agent's default language is used.
738
+ # For more information, see
739
+ # [Multilingual intent and entity
740
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
747
741
  #
748
742
  #
749
743
  # @yield [response, operation] Access the result along with the RPC operation
@@ -818,12 +812,11 @@ module Google
818
812
  # @param entities [Array<Google::Cloud::Dialogflow::V2::EntityType::Entity | Hash>]
819
813
  # Required. The entities to update or create.
820
814
  # @param language_code [String]
821
- # Optional. The language of entity synonyms defined in `entities`. If not
822
- # specified, the agent's default language is used.
823
- # [Many
824
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
825
- # are supported. Note: languages must be enabled in the agent before they can
826
- # be used.
815
+ # Optional. The language used to access language-specific data.
816
+ # If not specified, the agent's default language is used.
817
+ # For more information, see
818
+ # [Multilingual intent and entity
819
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
827
820
  # @param update_mask [Google::Protobuf::FieldMask | Hash]
828
821
  # Optional. The mask to control which fields get updated.
829
822
  #
@@ -898,12 +891,11 @@ module Google
898
891
  # these are not fully-qualified names, i.e. they don't start with
899
892
  # `projects/<Project ID>`.
900
893
  # @param language_code [String]
901
- # Optional. The language of entity synonyms defined in `entities`. If not
902
- # specified, the agent's default language is used.
903
- # [Many
904
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
905
- # are supported. Note: languages must be enabled in the agent before they can
906
- # be used.
894
+ # Optional. The language used to access language-specific data.
895
+ # If not specified, the agent's default language is used.
896
+ # For more information, see
897
+ # [Multilingual intent and entity
898
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
907
899
  #
908
900
  #
909
901
  # @yield [response, operation] Access the result along with the RPC operation
@@ -24,20 +24,6 @@ module Google
24
24
  module EntityTypes
25
25
  # Path helper methods for the EntityTypes API.
26
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
27
  ##
42
28
  # Create a fully-qualified EntityType resource string.
43
29
  #
@@ -238,12 +238,11 @@ module Google
238
238
  # Required. The agent to list all intents from.
239
239
  # Format: `projects/<Project ID>/agent`.
240
240
  # @param language_code [String]
241
- # Optional. The language to list training phrases, parameters and rich
242
- # messages for. If not specified, the agent's default language is used.
243
- # [Many
244
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
245
- # are supported. Note: languages must be enabled in the agent before they can
246
- # be used.
241
+ # Optional. The language used to access language-specific data.
242
+ # If not specified, the agent's default language is used.
243
+ # For more information, see
244
+ # [Multilingual intent and entity
245
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
247
246
  # @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
248
247
  # Optional. The resource view to apply to the returned intent.
249
248
  # @param page_size [Integer]
@@ -313,12 +312,11 @@ module Google
313
312
  # Required. The name of the intent.
314
313
  # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
315
314
  # @param language_code [String]
316
- # Optional. The language to retrieve training phrases, parameters and rich
317
- # messages for. If not specified, the agent's default language is used.
318
- # [Many
319
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
320
- # are supported. Note: languages must be enabled in the agent before they can
321
- # be used.
315
+ # Optional. The language used to access language-specific data.
316
+ # If not specified, the agent's default language is used.
317
+ # For more information, see
318
+ # [Multilingual intent and entity
319
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
322
320
  # @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
323
321
  # Optional. The resource view to apply to the returned intent.
324
322
  #
@@ -384,12 +382,11 @@ module Google
384
382
  # @param intent [Google::Cloud::Dialogflow::V2::Intent | Hash]
385
383
  # Required. The intent to create.
386
384
  # @param language_code [String]
387
- # Optional. The language of training phrases, parameters and rich messages
388
- # defined in `intent`. If not specified, the agent's default language is
389
- # used. [Many
390
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
391
- # are supported. Note: languages must be enabled in the agent before they can
392
- # be used.
385
+ # Optional. The language used to access language-specific data.
386
+ # If not specified, the agent's default language is used.
387
+ # For more information, see
388
+ # [Multilingual intent and entity
389
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
393
390
  # @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
394
391
  # Optional. The resource view to apply to the returned intent.
395
392
  #
@@ -452,12 +449,11 @@ module Google
452
449
  # @param intent [Google::Cloud::Dialogflow::V2::Intent | Hash]
453
450
  # Required. The intent to update.
454
451
  # @param language_code [String]
455
- # Optional. The language of training phrases, parameters and rich messages
456
- # defined in `intent`. If not specified, the agent's default language is
457
- # used. [Many
458
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
459
- # are supported. Note: languages must be enabled in the agent before they can
460
- # be used.
452
+ # Optional. The language used to access language-specific data.
453
+ # If not specified, the agent's default language is used.
454
+ # For more information, see
455
+ # [Multilingual intent and entity
456
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
461
457
  # @param update_mask [Google::Protobuf::FieldMask | Hash]
462
458
  # Optional. The mask to control which fields get updated.
463
459
  # @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
@@ -594,12 +590,11 @@ module Google
594
590
  # @param intent_batch_inline [Google::Cloud::Dialogflow::V2::IntentBatch | Hash]
595
591
  # The collection of intents to update or create.
596
592
  # @param language_code [String]
597
- # Optional. The language of training phrases, parameters and rich messages
598
- # defined in `intents`. If not specified, the agent's default language is
599
- # used. [Many
600
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
601
- # are supported. Note: languages must be enabled in the agent before they can
602
- # be used.
593
+ # Optional. The language used to access language-specific data.
594
+ # If not specified, the agent's default language is used.
595
+ # For more information, see
596
+ # [Multilingual intent and entity
597
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
603
598
  # @param update_mask [Google::Protobuf::FieldMask | Hash]
604
599
  # Optional. The mask to control which fields get updated.
605
600
  # @param intent_view [Google::Cloud::Dialogflow::V2::IntentView]
@@ -25,36 +25,50 @@ module Google
25
25
  # Path helper methods for the Intents API.
26
26
  module Paths
27
27
  ##
28
- # Create a fully-qualified Agent resource string.
29
- #
30
- # The resource will be in the following format:
28
+ # Create a fully-qualified Context resource string.
31
29
  #
32
- # `projects/{project}/agent`
30
+ # @overload context_path(project:, session:, context:)
31
+ # The resource will be in the following format:
33
32
  #
34
- # @param project [String]
33
+ # `projects/{project}/agent/sessions/{session}/contexts/{context}`
35
34
  #
36
- # @return [String]
37
- def agent_path project:
38
- "projects/#{project}/agent"
39
- end
40
-
41
- ##
42
- # Create a fully-qualified Context resource string.
35
+ # @param project [String]
36
+ # @param session [String]
37
+ # @param context [String]
43
38
  #
44
- # The resource will be in the following format:
39
+ # @overload context_path(project:, environment:, user:, session:, context:)
40
+ # The resource will be in the following format:
45
41
  #
46
- # `projects/{project}/agent/sessions/{session}/contexts/{context}`
42
+ # `projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}`
47
43
  #
48
- # @param project [String]
49
- # @param session [String]
50
- # @param context [String]
44
+ # @param project [String]
45
+ # @param environment [String]
46
+ # @param user [String]
47
+ # @param session [String]
48
+ # @param context [String]
51
49
  #
52
50
  # @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? "/"
51
+ def context_path **args
52
+ resources = {
53
+ "context:project:session" => (proc do |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
+ "context:environment:project:session:user" => (proc do |project:, environment:, user:, session:, context:|
60
+ raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
61
+ raise ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
62
+ raise ArgumentError, "user cannot contain /" if user.to_s.include? "/"
63
+ raise ArgumentError, "session cannot contain /" if session.to_s.include? "/"
64
+
65
+ "projects/#{project}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/contexts/#{context}"
66
+ end)
67
+ }
56
68
 
57
- "projects/#{project}/agent/sessions/#{session}/contexts/#{context}"
69
+ resource = resources[args.keys.sort.join(":")]
70
+ raise ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
71
+ resource.call(**args)
58
72
  end
59
73
 
60
74
  ##
@@ -25,41 +25,50 @@ module Google
25
25
  # Path helper methods for the SessionEntityTypes API.
26
26
  module Paths
27
27
  ##
28
- # Create a fully-qualified Context resource string.
29
- #
30
- # The resource will be in the following format:
28
+ # Create a fully-qualified SessionEntityType resource string.
31
29
  #
32
- # `projects/{project}/agent/sessions/{session}/contexts/{context}`
30
+ # @overload session_entity_type_path(project:, session:, entity_type:)
31
+ # The resource will be in the following format:
33
32
  #
34
- # @param project [String]
35
- # @param session [String]
36
- # @param context [String]
33
+ # `projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}`
37
34
  #
38
- # @return [String]
39
- def context_path project:, session:, context:
40
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
41
- raise ArgumentError, "session cannot contain /" if session.to_s.include? "/"
42
-
43
- "projects/#{project}/agent/sessions/#{session}/contexts/#{context}"
44
- end
45
-
46
- ##
47
- # Create a fully-qualified SessionEntityType resource string.
35
+ # @param project [String]
36
+ # @param session [String]
37
+ # @param entity_type [String]
48
38
  #
49
- # The resource will be in the following format:
39
+ # @overload session_entity_type_path(project:, environment:, user:, session:, entity_type:)
40
+ # The resource will be in the following format:
50
41
  #
51
- # `projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}`
42
+ # `projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}`
52
43
  #
53
- # @param project [String]
54
- # @param session [String]
55
- # @param entity_type [String]
44
+ # @param project [String]
45
+ # @param environment [String]
46
+ # @param user [String]
47
+ # @param session [String]
48
+ # @param entity_type [String]
56
49
  #
57
50
  # @return [String]
58
- def session_entity_type_path project:, session:, entity_type:
59
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
60
- raise ArgumentError, "session cannot contain /" if session.to_s.include? "/"
51
+ def session_entity_type_path **args
52
+ resources = {
53
+ "entity_type:project:session" => (proc do |project:, session:, entity_type:|
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}/entityTypes/#{entity_type}"
58
+ end),
59
+ "entity_type:environment:project:session:user" => (proc do |project:, environment:, user:, session:, entity_type:|
60
+ raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
61
+ raise ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
62
+ raise ArgumentError, "user cannot contain /" if user.to_s.include? "/"
63
+ raise ArgumentError, "session cannot contain /" if session.to_s.include? "/"
64
+
65
+ "projects/#{project}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/entityTypes/#{entity_type}"
66
+ end)
67
+ }
61
68
 
62
- "projects/#{project}/agent/sessions/#{session}/entityTypes/#{entity_type}"
69
+ resource = resources[args.keys.sort.join(":")]
70
+ raise ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
71
+ resource.call(**args)
63
72
  end
64
73
 
65
74
  extend self
@@ -27,55 +27,85 @@ module Google
27
27
  ##
28
28
  # Create a fully-qualified Context resource string.
29
29
  #
30
- # The resource will be in the following format:
30
+ # @overload context_path(project:, session:, context:)
31
+ # The resource will be in the following format:
32
+ #
33
+ # `projects/{project}/agent/sessions/{session}/contexts/{context}`
34
+ #
35
+ # @param project [String]
36
+ # @param session [String]
37
+ # @param context [String]
38
+ #
39
+ # @overload context_path(project:, environment:, user:, session:, context:)
40
+ # The resource will be in the following format:
31
41
  #
32
- # `projects/{project}/agent/sessions/{session}/contexts/{context}`
42
+ # `projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}`
33
43
  #
34
- # @param project [String]
35
- # @param session [String]
36
- # @param context [String]
44
+ # @param project [String]
45
+ # @param environment [String]
46
+ # @param user [String]
47
+ # @param session [String]
48
+ # @param context [String]
37
49
  #
38
50
  # @return [String]
39
- def context_path project:, session:, context:
40
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
41
- raise ArgumentError, "session cannot contain /" if session.to_s.include? "/"
51
+ def context_path **args
52
+ resources = {
53
+ "context:project:session" => (proc do |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? "/"
42
56
 
43
- "projects/#{project}/agent/sessions/#{session}/contexts/#{context}"
57
+ "projects/#{project}/agent/sessions/#{session}/contexts/#{context}"
58
+ end),
59
+ "context:environment:project:session:user" => (proc do |project:, environment:, user:, session:, context:|
60
+ raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
61
+ raise ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
62
+ raise ArgumentError, "user cannot contain /" if user.to_s.include? "/"
63
+ raise ArgumentError, "session cannot contain /" if session.to_s.include? "/"
64
+
65
+ "projects/#{project}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/contexts/#{context}"
66
+ end)
67
+ }
68
+
69
+ resource = resources[args.keys.sort.join(":")]
70
+ raise ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
71
+ resource.call(**args)
44
72
  end
45
73
 
46
74
  ##
47
75
  # Create a fully-qualified Session resource string.
48
76
  #
49
- # @overload session_path(project:, location:, session:)
77
+ # @overload session_path(project:, session:)
50
78
  # The resource will be in the following format:
51
79
  #
52
- # `projects/{project}/locations/{location}/agent/sessions/{session}`
80
+ # `projects/{project}/agent/sessions/{session}`
53
81
  #
54
82
  # @param project [String]
55
- # @param location [String]
56
83
  # @param session [String]
57
84
  #
58
- # @overload session_path(project:, session:)
85
+ # @overload session_path(project:, environment:, user:, session:)
59
86
  # The resource will be in the following format:
60
87
  #
61
- # `projects/{project}/agent/sessions/{session}`
88
+ # `projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}`
62
89
  #
63
90
  # @param project [String]
91
+ # @param environment [String]
92
+ # @param user [String]
64
93
  # @param session [String]
65
94
  #
66
95
  # @return [String]
67
96
  def session_path **args
68
97
  resources = {
69
- "location:project:session" => (proc do |project:, location:, session:|
98
+ "project:session" => (proc do |project:, session:|
70
99
  raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
71
- raise ArgumentError, "location cannot contain /" if location.to_s.include? "/"
72
100
 
73
- "projects/#{project}/locations/#{location}/agent/sessions/#{session}"
101
+ "projects/#{project}/agent/sessions/#{session}"
74
102
  end),
75
- "project:session" => (proc do |project:, session:|
103
+ "environment:project:session:user" => (proc do |project:, environment:, user:, session:|
76
104
  raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
105
+ raise ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
106
+ raise ArgumentError, "user cannot contain /" if user.to_s.include? "/"
77
107
 
78
- "projects/#{project}/agent/sessions/#{session}"
108
+ "projects/#{project}/agent/environments/#{environment}/users/#{user}/sessions/#{session}"
79
109
  end)
80
110
  }
81
111
 
@@ -87,20 +117,48 @@ module Google
87
117
  ##
88
118
  # Create a fully-qualified SessionEntityType resource string.
89
119
  #
90
- # The resource will be in the following format:
120
+ # @overload session_entity_type_path(project:, session:, entity_type:)
121
+ # The resource will be in the following format:
122
+ #
123
+ # `projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}`
124
+ #
125
+ # @param project [String]
126
+ # @param session [String]
127
+ # @param entity_type [String]
128
+ #
129
+ # @overload session_entity_type_path(project:, environment:, user:, session:, entity_type:)
130
+ # The resource will be in the following format:
91
131
  #
92
- # `projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}`
132
+ # `projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}`
93
133
  #
94
- # @param project [String]
95
- # @param session [String]
96
- # @param entity_type [String]
134
+ # @param project [String]
135
+ # @param environment [String]
136
+ # @param user [String]
137
+ # @param session [String]
138
+ # @param entity_type [String]
97
139
  #
98
140
  # @return [String]
99
- def session_entity_type_path project:, session:, entity_type:
100
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
101
- raise ArgumentError, "session cannot contain /" if session.to_s.include? "/"
141
+ def session_entity_type_path **args
142
+ resources = {
143
+ "entity_type:project:session" => (proc do |project:, session:, entity_type:|
144
+ raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
145
+ raise ArgumentError, "session cannot contain /" if session.to_s.include? "/"
146
+
147
+ "projects/#{project}/agent/sessions/#{session}/entityTypes/#{entity_type}"
148
+ end),
149
+ "entity_type:environment:project:session:user" => (proc do |project:, environment:, user:, session:, entity_type:|
150
+ raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
151
+ raise ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
152
+ raise ArgumentError, "user cannot contain /" if user.to_s.include? "/"
153
+ raise ArgumentError, "session cannot contain /" if session.to_s.include? "/"
102
154
 
103
- "projects/#{project}/agent/sessions/#{session}/entityTypes/#{entity_type}"
155
+ "projects/#{project}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/entityTypes/#{entity_type}"
156
+ end)
157
+ }
158
+
159
+ resource = resources[args.keys.sort.join(":")]
160
+ raise ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
161
+ resource.call(**args)
104
162
  end
105
163
 
106
164
  extend self
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Dialogflow
23
23
  module V2
24
- VERSION = "0.2.2"
24
+ VERSION = "0.3.0"
25
25
  end
26
26
  end
27
27
  end
@@ -161,6 +161,8 @@ module Google
161
161
  extend Google::Protobuf::MessageExts::ClassMethods
162
162
  end
163
163
 
164
+ # ============================================================================
165
+ # Requests and responses for custom methods.
164
166
  # The request message for {Google::Cloud::Dialogflow::V2::Agents::Client#search_agents Agents.SearchAgents}.
165
167
  # @!attribute [rw] parent
166
168
  # @return [String]
@@ -44,15 +44,26 @@ module Google
44
44
  # @!attribute [rw] lifespan_count
45
45
  # @return [Integer]
46
46
  # Optional. The number of conversational query requests after which the
47
- # context expires. If set to `0` (the default) the context expires
47
+ # context expires. The default is `0`. If set to `0`, the context expires
48
48
  # immediately. Contexts expire automatically after 20 minutes if there
49
49
  # are no matching queries.
50
50
  # @!attribute [rw] parameters
51
51
  # @return [Google::Protobuf::Struct]
52
52
  # Optional. The collection of parameters associated with this context.
53
- # Refer to [this
54
- # doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
55
- # for syntax.
53
+ #
54
+ # Depending on your protocol or client library language, this is a
55
+ # map, associative array, symbol table, dictionary, or JSON object
56
+ # composed of a collection of (MapKey, MapValue) pairs:
57
+ #
58
+ # - MapKey type: string
59
+ # - MapKey value: parameter name
60
+ # - MapValue type:
61
+ # - If parameter's entity type is a composite entity: map
62
+ # - Else: string
63
+ # - MapValue value:
64
+ # - If parameter's entity type is a composite entity:
65
+ # map from composite entity property names to property values
66
+ # - Else: parameter value
56
67
  class Context
57
68
  include Google::Protobuf::MessageExts
58
69
  extend Google::Protobuf::MessageExts::ClassMethods
@@ -118,12 +118,11 @@ module Google
118
118
  # Format: `projects/<Project ID>/agent`.
119
119
  # @!attribute [rw] language_code
120
120
  # @return [String]
121
- # Optional. The language to list entity synonyms for. If not specified,
122
- # the agent's default language is used.
123
- # [Many
124
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
125
- # are supported. Note: languages must be enabled in the agent before they can
126
- # be used.
121
+ # Optional. The language used to access language-specific data.
122
+ # If not specified, the agent's default language is used.
123
+ # For more information, see
124
+ # [Multilingual intent and entity
125
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
127
126
  # @!attribute [rw] page_size
128
127
  # @return [Integer]
129
128
  # Optional. The maximum number of items to return in a single page. By
@@ -157,12 +156,11 @@ module Google
157
156
  # Format: `projects/<Project ID>/agent/entityTypes/<EntityType ID>`.
158
157
  # @!attribute [rw] language_code
159
158
  # @return [String]
160
- # Optional. The language to retrieve entity synonyms for. If not specified,
161
- # the agent's default language is used.
162
- # [Many
163
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
164
- # are supported. Note: languages must be enabled in the agent before they can
165
- # be used.
159
+ # Optional. The language used to access language-specific data.
160
+ # If not specified, the agent's default language is used.
161
+ # For more information, see
162
+ # [Multilingual intent and entity
163
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
166
164
  class GetEntityTypeRequest
167
165
  include Google::Protobuf::MessageExts
168
166
  extend Google::Protobuf::MessageExts::ClassMethods
@@ -178,12 +176,11 @@ module Google
178
176
  # Required. The entity type to create.
179
177
  # @!attribute [rw] language_code
180
178
  # @return [String]
181
- # Optional. The language of entity synonyms defined in `entity_type`. If not
182
- # specified, the agent's default language is used.
183
- # [Many
184
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
185
- # are supported. Note: languages must be enabled in the agent before they can
186
- # be used.
179
+ # Optional. The language used to access language-specific data.
180
+ # If not specified, the agent's default language is used.
181
+ # For more information, see
182
+ # [Multilingual intent and entity
183
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
187
184
  class CreateEntityTypeRequest
188
185
  include Google::Protobuf::MessageExts
189
186
  extend Google::Protobuf::MessageExts::ClassMethods
@@ -195,12 +192,11 @@ module Google
195
192
  # Required. The entity type to update.
196
193
  # @!attribute [rw] language_code
197
194
  # @return [String]
198
- # Optional. The language of entity synonyms defined in `entity_type`. If not
199
- # specified, the agent's default language is used.
200
- # [Many
201
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
202
- # are supported. Note: languages must be enabled in the agent before they can
203
- # be used.
195
+ # Optional. The language used to access language-specific data.
196
+ # If not specified, the agent's default language is used.
197
+ # For more information, see
198
+ # [Multilingual intent and entity
199
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
204
200
  # @!attribute [rw] update_mask
205
201
  # @return [Google::Protobuf::FieldMask]
206
202
  # Optional. The mask to control which fields get updated.
@@ -235,12 +231,11 @@ module Google
235
231
  # The collection of entity types to update or create.
236
232
  # @!attribute [rw] language_code
237
233
  # @return [String]
238
- # Optional. The language of entity synonyms defined in `entity_types`. If not
239
- # specified, the agent's default language is used.
240
- # [Many
241
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
242
- # are supported. Note: languages must be enabled in the agent before they can
243
- # be used.
234
+ # Optional. The language used to access language-specific data.
235
+ # If not specified, the agent's default language is used.
236
+ # For more information, see
237
+ # [Multilingual intent and entity
238
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
244
239
  # @!attribute [rw] update_mask
245
240
  # @return [Google::Protobuf::FieldMask]
246
241
  # Optional. The mask to control which fields get updated.
@@ -282,12 +277,11 @@ module Google
282
277
  # Required. The entities to create.
283
278
  # @!attribute [rw] language_code
284
279
  # @return [String]
285
- # Optional. The language of entity synonyms defined in `entities`. If not
286
- # specified, the agent's default language is used.
287
- # [Many
288
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
289
- # are supported. Note: languages must be enabled in the agent before they can
290
- # be used.
280
+ # Optional. The language used to access language-specific data.
281
+ # If not specified, the agent's default language is used.
282
+ # For more information, see
283
+ # [Multilingual intent and entity
284
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
291
285
  class BatchCreateEntitiesRequest
292
286
  include Google::Protobuf::MessageExts
293
287
  extend Google::Protobuf::MessageExts::ClassMethods
@@ -303,12 +297,11 @@ module Google
303
297
  # Required. The entities to update or create.
304
298
  # @!attribute [rw] language_code
305
299
  # @return [String]
306
- # Optional. The language of entity synonyms defined in `entities`. If not
307
- # specified, the agent's default language is used.
308
- # [Many
309
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
310
- # are supported. Note: languages must be enabled in the agent before they can
311
- # be used.
300
+ # Optional. The language used to access language-specific data.
301
+ # If not specified, the agent's default language is used.
302
+ # For more information, see
303
+ # [Multilingual intent and entity
304
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
312
305
  # @!attribute [rw] update_mask
313
306
  # @return [Google::Protobuf::FieldMask]
314
307
  # Optional. The mask to control which fields get updated.
@@ -329,12 +322,11 @@ module Google
329
322
  # `projects/<Project ID>`.
330
323
  # @!attribute [rw] language_code
331
324
  # @return [String]
332
- # Optional. The language of entity synonyms defined in `entities`. If not
333
- # specified, the agent's default language is used.
334
- # [Many
335
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
336
- # are supported. Note: languages must be enabled in the agent before they can
337
- # be used.
325
+ # Optional. The language used to access language-specific data.
326
+ # If not specified, the agent's default language is used.
327
+ # For more information, see
328
+ # [Multilingual intent and entity
329
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
338
330
  class BatchDeleteEntitiesRequest
339
331
  include Google::Protobuf::MessageExts
340
332
  extend Google::Protobuf::MessageExts::ClassMethods
@@ -26,7 +26,7 @@ module Google
26
26
  # action is an extraction of a user command or sentence semantics.
27
27
  # @!attribute [rw] name
28
28
  # @return [String]
29
- # The unique identifier of this intent.
29
+ # Optional. The unique identifier of this intent.
30
30
  # Required for {Google::Cloud::Dialogflow::V2::Intents::Client#update_intent Intents.UpdateIntent} and {Google::Cloud::Dialogflow::V2::Intents::Client#batch_update_intents Intents.BatchUpdateIntents}
31
31
  # methods.
32
32
  # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
@@ -244,7 +244,11 @@ module Google
244
244
  extend Google::Protobuf::MessageExts::ClassMethods
245
245
  end
246
246
 
247
- # Corresponds to the `Response` field in the Dialogflow console.
247
+ # A rich response message.
248
+ # Corresponds to the intent `Response` field in the Dialogflow console.
249
+ # For more information, see
250
+ # [Rich response
251
+ # messages](https://cloud.google.com/dialogflow/docs/intents-rich-messages).
248
252
  # @!attribute [rw] text
249
253
  # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text]
250
254
  # The text response.
@@ -259,9 +263,7 @@ module Google
259
263
  # The card response.
260
264
  # @!attribute [rw] payload
261
265
  # @return [Google::Protobuf::Struct]
262
- # Returns a response containing a custom, platform-specific payload.
263
- # See the Intent.Message.Platform type for a description of the
264
- # structure that may be required for your platform.
266
+ # A custom platform-specific response.
265
267
  # @!attribute [rw] simple_responses
266
268
  # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses]
267
269
  # The voice and text-only responses for Actions on Google.
@@ -748,9 +750,10 @@ module Google
748
750
  extend Google::Protobuf::MessageExts::ClassMethods
749
751
  end
750
752
 
751
- # Represents different platforms that a rich message can be intended for.
753
+ # The rich response message integration platform. See
754
+ # [Integrations](https://cloud.google.com/dialogflow/docs/integrations).
752
755
  module Platform
753
- # Not specified.
756
+ # Default platform.
754
757
  PLATFORM_UNSPECIFIED = 0
755
758
 
756
759
  # Facebook.
@@ -774,67 +777,9 @@ module Google
774
777
  # Viber.
775
778
  VIBER = 7
776
779
 
777
- # Actions on Google.
778
- # When using Actions on Google, you can choose one of the specific
779
- # Intent.Message types that mention support for Actions on Google,
780
- # or you can use the advanced Intent.Message.payload field.
781
- # The payload field provides access to AoG features not available in the
782
- # specific message types.
783
- # If using the Intent.Message.payload field, it should have a structure
784
- # similar to the JSON message shown here. For more information, see
785
- # [Actions on Google Webhook
786
- # Format](https://developers.google.com/actions/dialogflow/webhook)
787
- # <pre>{
788
- # "expectUserResponse": true,
789
- # "isSsml": false,
790
- # "noInputPrompts": [],
791
- # "richResponse": {
792
- # "items": [
793
- # {
794
- # "simpleResponse": {
795
- # "displayText": "hi",
796
- # "textToSpeech": "hello"
797
- # }
798
- # }
799
- # ],
800
- # "suggestions": [
801
- # {
802
- # "title": "Say this"
803
- # },
804
- # {
805
- # "title": "or this"
806
- # }
807
- # ]
808
- # },
809
- # "systemIntent": {
810
- # "data": {
811
- # "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
812
- # "listSelect": {
813
- # "items": [
814
- # {
815
- # "optionInfo": {
816
- # "key": "key1",
817
- # "synonyms": [
818
- # "key one"
819
- # ]
820
- # },
821
- # "title": "must not be empty, but unique"
822
- # },
823
- # {
824
- # "optionInfo": {
825
- # "key": "key2",
826
- # "synonyms": [
827
- # "key two"
828
- # ]
829
- # },
830
- # "title": "must not be empty, but unique"
831
- # }
832
- # ]
833
- # }
834
- # },
835
- # "intent": "actions.intent.OPTION"
836
- # }
837
- # }</pre>
780
+ # Google Assistant
781
+ # See [Dialogflow webhook
782
+ # format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
838
783
  ACTIONS_ON_GOOGLE = 8
839
784
 
840
785
  # Google Hangouts.
@@ -877,12 +822,11 @@ module Google
877
822
  # Format: `projects/<Project ID>/agent`.
878
823
  # @!attribute [rw] language_code
879
824
  # @return [String]
880
- # Optional. The language to list training phrases, parameters and rich
881
- # messages for. If not specified, the agent's default language is used.
882
- # [Many
883
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
884
- # are supported. Note: languages must be enabled in the agent before they can
885
- # be used.
825
+ # Optional. The language used to access language-specific data.
826
+ # If not specified, the agent's default language is used.
827
+ # For more information, see
828
+ # [Multilingual intent and entity
829
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
886
830
  # @!attribute [rw] intent_view
887
831
  # @return [Google::Cloud::Dialogflow::V2::IntentView]
888
832
  # Optional. The resource view to apply to the returned intent.
@@ -919,12 +863,11 @@ module Google
919
863
  # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
920
864
  # @!attribute [rw] language_code
921
865
  # @return [String]
922
- # Optional. The language to retrieve training phrases, parameters and rich
923
- # messages for. If not specified, the agent's default language is used.
924
- # [Many
925
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
926
- # are supported. Note: languages must be enabled in the agent before they can
927
- # be used.
866
+ # Optional. The language used to access language-specific data.
867
+ # If not specified, the agent's default language is used.
868
+ # For more information, see
869
+ # [Multilingual intent and entity
870
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
928
871
  # @!attribute [rw] intent_view
929
872
  # @return [Google::Cloud::Dialogflow::V2::IntentView]
930
873
  # Optional. The resource view to apply to the returned intent.
@@ -943,12 +886,11 @@ module Google
943
886
  # Required. The intent to create.
944
887
  # @!attribute [rw] language_code
945
888
  # @return [String]
946
- # Optional. The language of training phrases, parameters and rich messages
947
- # defined in `intent`. If not specified, the agent's default language is
948
- # used. [Many
949
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
950
- # are supported. Note: languages must be enabled in the agent before they can
951
- # be used.
889
+ # Optional. The language used to access language-specific data.
890
+ # If not specified, the agent's default language is used.
891
+ # For more information, see
892
+ # [Multilingual intent and entity
893
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
952
894
  # @!attribute [rw] intent_view
953
895
  # @return [Google::Cloud::Dialogflow::V2::IntentView]
954
896
  # Optional. The resource view to apply to the returned intent.
@@ -963,12 +905,11 @@ module Google
963
905
  # Required. The intent to update.
964
906
  # @!attribute [rw] language_code
965
907
  # @return [String]
966
- # Optional. The language of training phrases, parameters and rich messages
967
- # defined in `intent`. If not specified, the agent's default language is
968
- # used. [Many
969
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
970
- # are supported. Note: languages must be enabled in the agent before they can
971
- # be used.
908
+ # Optional. The language used to access language-specific data.
909
+ # If not specified, the agent's default language is used.
910
+ # For more information, see
911
+ # [Multilingual intent and entity
912
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
972
913
  # @!attribute [rw] update_mask
973
914
  # @return [Google::Protobuf::FieldMask]
974
915
  # Optional. The mask to control which fields get updated.
@@ -991,7 +932,6 @@ module Google
991
932
  extend Google::Protobuf::MessageExts::ClassMethods
992
933
  end
993
934
 
994
- # The request message for {Google::Cloud::Dialogflow::V2::Intents::Client#batch_update_intents Intents.BatchUpdateIntents}.
995
935
  # @!attribute [rw] parent
996
936
  # @return [String]
997
937
  # Required. The name of the agent to update or create intents in.
@@ -1006,12 +946,11 @@ module Google
1006
946
  # The collection of intents to update or create.
1007
947
  # @!attribute [rw] language_code
1008
948
  # @return [String]
1009
- # Optional. The language of training phrases, parameters and rich messages
1010
- # defined in `intents`. If not specified, the agent's default language is
1011
- # used. [Many
1012
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
1013
- # are supported. Note: languages must be enabled in the agent before they can
1014
- # be used.
949
+ # Optional. The language used to access language-specific data.
950
+ # If not specified, the agent's default language is used.
951
+ # For more information, see
952
+ # [Multilingual intent and entity
953
+ # data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
1015
954
  # @!attribute [rw] update_mask
1016
955
  # @return [Google::Protobuf::FieldMask]
1017
956
  # Optional. The mask to control which fields get updated.
@@ -21,7 +21,6 @@ module Google
21
21
  module Cloud
22
22
  module Dialogflow
23
23
  module V2
24
- # ============================================================================
25
24
  # Requests and responses for custom methods.
26
25
  # The request to detect user's intent.
27
26
  # @!attribute [rw] session
@@ -124,8 +123,11 @@ module Google
124
123
  # for the session of this query.
125
124
  # @!attribute [rw] payload
126
125
  # @return [Google::Protobuf::Struct]
127
- # This field can be used to pass custom data into the webhook
128
- # associated with the agent. Arbitrary JSON objects are supported.
126
+ # This field can be used to pass custom data to your webhook.
127
+ # Arbitrary JSON objects are supported.
128
+ # If supplied, the value is used to populate the
129
+ # `WebhookRequest.original_detect_intent_request.payload`
130
+ # field sent to your webhook.
129
131
  # @!attribute [rw] sentiment_analysis_request_config
130
132
  # @return [Google::Cloud::Dialogflow::V2::SentimentAnalysisRequestConfig]
131
133
  # Configures the type of sentiment analysis to perform. If not
@@ -73,29 +73,16 @@ module Google
73
73
  # Optional. This value is passed directly to `QueryResult.webhook_source`.
74
74
  # @!attribute [rw] payload
75
75
  # @return [Google::Protobuf::Struct]
76
- # Optional. This value is passed directly to `QueryResult.webhook_payload`.
77
- # See the related `fulfillment_messages[i].payload field`, which may be used
78
- # as an alternative to this field.
79
- #
80
- # This field can be used for Actions on Google responses.
81
- # It should have a structure similar to the JSON message shown here. For more
82
- # information, see
83
- # [Actions on Google Webhook
84
- # Format](https://developers.google.com/actions/dialogflow/webhook)
85
- # <pre>{
86
- # "google": {
87
- # "expectUserResponse": true,
88
- # "richResponse": {
89
- # "items": [
90
- # {
91
- # "simpleResponse": {
92
- # "textToSpeech": "this is a simple response"
93
- # }
94
- # }
95
- # ]
96
- # }
97
- # }
98
- # }</pre>
76
+ # Optional. This field can be used to pass custom data from your webhook to the API
77
+ # caller. Arbitrary JSON objects are supported.
78
+ # When provided, Dialogflow uses this field to populate
79
+ # `QueryResult.webhook_payload` sent to the API caller.
80
+ # This field is also used by the
81
+ # [Google Assistant
82
+ # integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
83
+ # for rich response messages.
84
+ # See the format definition at [Google Assistant Dialogflow webhook
85
+ # format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
99
86
  # @!attribute [rw] output_contexts
100
87
  # @return [Array<Google::Cloud::Dialogflow::V2::Context>]
101
88
  # Optional. The collection of output contexts. This value is passed directly
@@ -134,7 +121,8 @@ module Google
134
121
  # field passed in the request. Some integrations that query a Dialogflow
135
122
  # agent may provide additional information in the payload.
136
123
  #
137
- # In particular for the Telephony Gateway this field has the form:
124
+ # In particular, for the Dialogflow Phone Gateway integration, this field has
125
+ # the form:
138
126
  # <pre>{
139
127
  # "telephony": {
140
128
  # "caller_id": "+18558363987"
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.2.2
4
+ version: 0.3.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-04-01 00:00:00.000000000 Z
11
+ date: 2020-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common