google-cloud-dialogflow-v2 0.7.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/dialogflow/v2.rb +2 -0
- data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +16 -5
- data/lib/google/cloud/dialogflow/v2/agents/client.rb +18 -10
- data/lib/google/cloud/dialogflow/v2/agents/operations.rb +4 -4
- data/lib/google/cloud/dialogflow/v2/agents/paths.rb +42 -3
- data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +1 -2
- data/lib/google/cloud/dialogflow/v2/answer_records.rb +1 -2
- data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +3 -7
- data/lib/google/cloud/dialogflow/v2/contexts/client.rb +2 -5
- data/lib/google/cloud/dialogflow/v2/contexts/paths.rb +72 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +2 -5
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +44 -3
- data/lib/google/cloud/dialogflow/v2/conversations/client.rb +2 -5
- data/lib/google/cloud/dialogflow/v2/documents/client.rb +2 -5
- data/lib/google/cloud/dialogflow/v2/documents/operations.rb +4 -4
- data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +28 -7
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +30 -12
- data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +4 -4
- data/lib/google/cloud/dialogflow/v2/entity_types/paths.rb +58 -12
- data/lib/google/cloud/dialogflow/v2/environment_pb.rb +50 -1
- data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +21 -0
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +413 -6
- data/lib/google/cloud/dialogflow/v2/environments/paths.rb +145 -5
- data/lib/google/cloud/dialogflow/v2/fulfillment_pb.rb +59 -0
- data/lib/google/cloud/dialogflow/v2/fulfillment_services_pb.rb +47 -0
- data/lib/google/cloud/dialogflow/v2/fulfillments.rb +49 -0
- data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +457 -0
- data/lib/google/cloud/dialogflow/v2/fulfillments/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/fulfillments/paths.rb +69 -0
- data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +20 -2
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +31 -8
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +4 -4
- data/lib/google/cloud/dialogflow/v2/intents/paths.rb +96 -12
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +2 -5
- data/lib/google/cloud/dialogflow/v2/participant_pb.rb +9 -0
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +3 -9
- data/lib/google/cloud/dialogflow/v2/participants/paths.rb +76 -0
- data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +2 -5
- data/lib/google/cloud/dialogflow/v2/session_entity_types/paths.rb +72 -0
- data/lib/google/cloud/dialogflow/v2/session_pb.rb +1 -0
- data/lib/google/cloud/dialogflow/v2/sessions/client.rb +3 -9
- data/lib/google/cloud/dialogflow/v2/sessions/paths.rb +110 -0
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/version_pb.rb +69 -0
- data/lib/google/cloud/dialogflow/v2/version_services_pb.rb +59 -0
- data/lib/google/cloud/dialogflow/v2/versions.rb +49 -0
- data/lib/google/cloud/dialogflow/v2/versions/client.rb +706 -0
- data/lib/google/cloud/dialogflow/v2/versions/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/versions/paths.rb +110 -0
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/cloud/dialogflow/v2/answer_record.rb +9 -16
- data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +14 -2
- data/proto_docs/google/cloud/dialogflow/v2/environment.rb +170 -5
- data/proto_docs/google/cloud/dialogflow/v2/fulfillment.rb +144 -0
- data/proto_docs/google/cloud/dialogflow/v2/intent.rb +9 -1
- data/proto_docs/google/cloud/dialogflow/v2/participant.rb +22 -0
- data/proto_docs/google/cloud/dialogflow/v2/session.rb +4 -0
- data/proto_docs/google/cloud/dialogflow/v2/version.rb +176 -0
- metadata +27 -7
@@ -67,10 +67,7 @@ module Google
|
|
67
67
|
|
68
68
|
default_config.timeout = 60.0
|
69
69
|
default_config.retry_policy = {
|
70
|
-
initial_delay: 0.1,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 1.3,
|
73
|
-
retry_codes: [14]
|
70
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
74
71
|
}
|
75
72
|
|
76
73
|
default_config
|
@@ -141,7 +138,7 @@ module Google
|
|
141
138
|
!@config.endpoint.split(".").first.include?("-")
|
142
139
|
credentials ||= Credentials.default scope: @config.scope,
|
143
140
|
enable_self_signed_jwt: enable_self_signed_jwt
|
144
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
141
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
145
142
|
credentials = Credentials.new credentials, scope: @config.scope
|
146
143
|
end
|
147
144
|
@quota_project_id = @config.quota_project
|
@@ -27,15 +27,56 @@ module Google
|
|
27
27
|
##
|
28
28
|
# Create a fully-qualified Agent resource string.
|
29
29
|
#
|
30
|
+
# @overload agent_path(project:)
|
31
|
+
# The resource will be in the following format:
|
32
|
+
#
|
33
|
+
# `projects/{project}/agent`
|
34
|
+
#
|
35
|
+
# @param project [String]
|
36
|
+
#
|
37
|
+
# @overload agent_path(project:, location:)
|
38
|
+
# The resource will be in the following format:
|
39
|
+
#
|
40
|
+
# `projects/{project}/locations/{location}/agent`
|
41
|
+
#
|
42
|
+
# @param project [String]
|
43
|
+
# @param location [String]
|
44
|
+
#
|
45
|
+
# @return [::String]
|
46
|
+
def agent_path **args
|
47
|
+
resources = {
|
48
|
+
"project" => (proc do |project:|
|
49
|
+
"projects/#{project}/agent"
|
50
|
+
end),
|
51
|
+
"location:project" => (proc do |project:, location:|
|
52
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
53
|
+
|
54
|
+
"projects/#{project}/locations/#{location}/agent"
|
55
|
+
end)
|
56
|
+
}
|
57
|
+
|
58
|
+
resource = resources[args.keys.sort.join(":")]
|
59
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
60
|
+
resource.call(**args)
|
61
|
+
end
|
62
|
+
|
63
|
+
##
|
64
|
+
# Create a fully-qualified ConversationModel resource string.
|
65
|
+
#
|
30
66
|
# The resource will be in the following format:
|
31
67
|
#
|
32
|
-
# `projects/{project}/
|
68
|
+
# `projects/{project}/locations/{location}/conversationModels/{conversation_model}`
|
33
69
|
#
|
34
70
|
# @param project [String]
|
71
|
+
# @param location [String]
|
72
|
+
# @param conversation_model [String]
|
35
73
|
#
|
36
74
|
# @return [::String]
|
37
|
-
def
|
38
|
-
"
|
75
|
+
def conversation_model_path project:, location:, conversation_model:
|
76
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
77
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
78
|
+
|
79
|
+
"projects/#{project}/locations/#{location}/conversationModels/#{conversation_model}"
|
39
80
|
end
|
40
81
|
|
41
82
|
##
|
@@ -67,10 +67,7 @@ module Google
|
|
67
67
|
|
68
68
|
default_config.timeout = 60.0
|
69
69
|
default_config.retry_policy = {
|
70
|
-
initial_delay: 0.1,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 1.3,
|
73
|
-
retry_codes: [14]
|
70
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
74
71
|
}
|
75
72
|
|
76
73
|
default_config
|
@@ -141,7 +138,7 @@ module Google
|
|
141
138
|
!@config.endpoint.split(".").first.include?("-")
|
142
139
|
credentials ||= Credentials.default scope: @config.scope,
|
143
140
|
enable_self_signed_jwt: enable_self_signed_jwt
|
144
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
141
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
145
142
|
credentials = Credentials.new credentials, scope: @config.scope
|
146
143
|
end
|
147
144
|
@quota_project_id = @config.quota_project
|
@@ -67,10 +67,7 @@ module Google
|
|
67
67
|
|
68
68
|
default_config.timeout = 60.0
|
69
69
|
default_config.retry_policy = {
|
70
|
-
initial_delay: 0.1,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 1.3,
|
73
|
-
retry_codes: [14]
|
70
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
74
71
|
}
|
75
72
|
|
76
73
|
default_config
|
@@ -141,7 +138,7 @@ module Google
|
|
141
138
|
!@config.endpoint.split(".").first.include?("-")
|
142
139
|
credentials ||= Credentials.default scope: @config.scope,
|
143
140
|
enable_self_signed_jwt: enable_self_signed_jwt
|
144
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
141
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
145
142
|
credentials = Credentials.new credentials, scope: @config.scope
|
146
143
|
end
|
147
144
|
@quota_project_id = @config.quota_project
|
@@ -82,7 +82,7 @@ module Google
|
|
82
82
|
# Create credentials
|
83
83
|
credentials = @config.credentials
|
84
84
|
credentials ||= Credentials.default scope: @config.scope
|
85
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
85
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
88
|
@quota_project_id = @config.quota_project
|
@@ -396,9 +396,9 @@ module Google
|
|
396
396
|
end
|
397
397
|
|
398
398
|
##
|
399
|
-
# Waits
|
400
|
-
#
|
401
|
-
#
|
399
|
+
# Waits until the specified long-running operation is done or reaches at most
|
400
|
+
# a specified timeout, returning the latest state. If the operation is
|
401
|
+
# already done, the latest state is immediately returned. If the timeout
|
402
402
|
# specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
403
403
|
# timeout is used. If the server does not support this method, it returns
|
404
404
|
# `google.rpc.Code.UNIMPLEMENTED`.
|
@@ -38,34 +38,55 @@ module Google
|
|
38
38
|
# Retrieves the specified entity type.
|
39
39
|
rpc :GetEntityType, ::Google::Cloud::Dialogflow::V2::GetEntityTypeRequest, ::Google::Cloud::Dialogflow::V2::EntityType
|
40
40
|
# Creates an entity type in the specified agent.
|
41
|
+
#
|
42
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
43
|
+
# [training
|
44
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
41
45
|
rpc :CreateEntityType, ::Google::Cloud::Dialogflow::V2::CreateEntityTypeRequest, ::Google::Cloud::Dialogflow::V2::EntityType
|
42
46
|
# Updates the specified entity type.
|
47
|
+
#
|
48
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
49
|
+
# [training
|
50
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
43
51
|
rpc :UpdateEntityType, ::Google::Cloud::Dialogflow::V2::UpdateEntityTypeRequest, ::Google::Cloud::Dialogflow::V2::EntityType
|
44
52
|
# Deletes the specified entity type.
|
53
|
+
#
|
54
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
55
|
+
# [training
|
56
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
45
57
|
rpc :DeleteEntityType, ::Google::Cloud::Dialogflow::V2::DeleteEntityTypeRequest, ::Google::Protobuf::Empty
|
46
58
|
# Updates/Creates multiple entity types in the specified agent.
|
47
59
|
#
|
48
|
-
#
|
60
|
+
#
|
61
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
62
|
+
# [training
|
63
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
49
64
|
rpc :BatchUpdateEntityTypes, ::Google::Cloud::Dialogflow::V2::BatchUpdateEntityTypesRequest, ::Google::Longrunning::Operation
|
50
65
|
# Deletes entity types in the specified agent.
|
51
66
|
#
|
52
|
-
#
|
67
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
68
|
+
# [training
|
69
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
53
70
|
rpc :BatchDeleteEntityTypes, ::Google::Cloud::Dialogflow::V2::BatchDeleteEntityTypesRequest, ::Google::Longrunning::Operation
|
54
71
|
# Creates multiple new entities in the specified entity type.
|
55
72
|
#
|
56
|
-
#
|
73
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
74
|
+
# [training
|
75
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
57
76
|
rpc :BatchCreateEntities, ::Google::Cloud::Dialogflow::V2::BatchCreateEntitiesRequest, ::Google::Longrunning::Operation
|
58
77
|
# Updates or creates multiple entities in the specified entity type. This
|
59
78
|
# method does not affect entities in the entity type that aren't explicitly
|
60
79
|
# specified in the request.
|
61
80
|
#
|
62
|
-
#
|
63
|
-
#
|
81
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
82
|
+
# [training
|
83
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
64
84
|
rpc :BatchUpdateEntities, ::Google::Cloud::Dialogflow::V2::BatchUpdateEntitiesRequest, ::Google::Longrunning::Operation
|
65
85
|
# Deletes entities in the specified entity type.
|
66
86
|
#
|
67
|
-
#
|
68
|
-
#
|
87
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
88
|
+
# [training
|
89
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
69
90
|
rpc :BatchDeleteEntities, ::Google::Cloud::Dialogflow::V2::BatchDeleteEntitiesRequest, ::Google::Longrunning::Operation
|
70
91
|
end
|
71
92
|
|
@@ -67,10 +67,7 @@ module Google
|
|
67
67
|
|
68
68
|
default_config.timeout = 60.0
|
69
69
|
default_config.retry_policy = {
|
70
|
-
initial_delay: 0.1,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 1.3,
|
73
|
-
retry_codes: [14]
|
70
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
74
71
|
}
|
75
72
|
|
76
73
|
default_config
|
@@ -141,7 +138,7 @@ module Google
|
|
141
138
|
!@config.endpoint.split(".").first.include?("-")
|
142
139
|
credentials ||= Credentials.default scope: @config.scope,
|
143
140
|
enable_self_signed_jwt: enable_self_signed_jwt
|
144
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
141
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
145
142
|
credentials = Credentials.new credentials, scope: @config.scope
|
146
143
|
end
|
147
144
|
@quota_project_id = @config.quota_project
|
@@ -325,6 +322,10 @@ module Google
|
|
325
322
|
##
|
326
323
|
# Creates an entity type in the specified agent.
|
327
324
|
#
|
325
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
326
|
+
# [training
|
327
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
328
|
+
#
|
328
329
|
# @overload create_entity_type(request, options = nil)
|
329
330
|
# Pass arguments to `create_entity_type` via a request object, either of type
|
330
331
|
# {::Google::Cloud::Dialogflow::V2::CreateEntityTypeRequest} or an equivalent Hash.
|
@@ -400,6 +401,10 @@ module Google
|
|
400
401
|
##
|
401
402
|
# Updates the specified entity type.
|
402
403
|
#
|
404
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
405
|
+
# [training
|
406
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
407
|
+
#
|
403
408
|
# @overload update_entity_type(request, options = nil)
|
404
409
|
# Pass arguments to `update_entity_type` via a request object, either of type
|
405
410
|
# {::Google::Cloud::Dialogflow::V2::UpdateEntityTypeRequest} or an equivalent Hash.
|
@@ -474,6 +479,10 @@ module Google
|
|
474
479
|
##
|
475
480
|
# Deletes the specified entity type.
|
476
481
|
#
|
482
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
483
|
+
# [training
|
484
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
485
|
+
#
|
477
486
|
# @overload delete_entity_type(request, options = nil)
|
478
487
|
# Pass arguments to `delete_entity_type` via a request object, either of type
|
479
488
|
# {::Google::Cloud::Dialogflow::V2::DeleteEntityTypeRequest} or an equivalent Hash.
|
@@ -541,7 +550,10 @@ module Google
|
|
541
550
|
##
|
542
551
|
# Updates/Creates multiple entity types in the specified agent.
|
543
552
|
#
|
544
|
-
#
|
553
|
+
#
|
554
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
555
|
+
# [training
|
556
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
545
557
|
#
|
546
558
|
# @overload batch_update_entity_types(request, options = nil)
|
547
559
|
# Pass arguments to `batch_update_entity_types` via a request object, either of type
|
@@ -626,7 +638,9 @@ module Google
|
|
626
638
|
##
|
627
639
|
# Deletes entity types in the specified agent.
|
628
640
|
#
|
629
|
-
#
|
641
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
642
|
+
# [training
|
643
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
630
644
|
#
|
631
645
|
# @overload batch_delete_entity_types(request, options = nil)
|
632
646
|
# Pass arguments to `batch_delete_entity_types` via a request object, either of type
|
@@ -699,7 +713,9 @@ module Google
|
|
699
713
|
##
|
700
714
|
# Creates multiple new entities in the specified entity type.
|
701
715
|
#
|
702
|
-
#
|
716
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
717
|
+
# [training
|
718
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
703
719
|
#
|
704
720
|
# @overload batch_create_entities(request, options = nil)
|
705
721
|
# Pass arguments to `batch_create_entities` via a request object, either of type
|
@@ -779,8 +795,9 @@ module Google
|
|
779
795
|
# method does not affect entities in the entity type that aren't explicitly
|
780
796
|
# specified in the request.
|
781
797
|
#
|
782
|
-
#
|
783
|
-
#
|
798
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
799
|
+
# [training
|
800
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
784
801
|
#
|
785
802
|
# @overload batch_update_entities(request, options = nil)
|
786
803
|
# Pass arguments to `batch_update_entities` via a request object, either of type
|
@@ -860,8 +877,9 @@ module Google
|
|
860
877
|
##
|
861
878
|
# Deletes entities in the specified entity type.
|
862
879
|
#
|
863
|
-
#
|
864
|
-
#
|
880
|
+
# Note: You should always train an agent prior to sending it queries. See the
|
881
|
+
# [training
|
882
|
+
# documentation](https://cloud.google.com/dialogflow/es/docs/training).
|
865
883
|
#
|
866
884
|
# @overload batch_delete_entities(request, options = nil)
|
867
885
|
# Pass arguments to `batch_delete_entities` via a request object, either of type
|
@@ -82,7 +82,7 @@ module Google
|
|
82
82
|
# Create credentials
|
83
83
|
credentials = @config.credentials
|
84
84
|
credentials ||= Credentials.default scope: @config.scope
|
85
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
85
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
88
|
@quota_project_id = @config.quota_project
|
@@ -396,9 +396,9 @@ module Google
|
|
396
396
|
end
|
397
397
|
|
398
398
|
##
|
399
|
-
# Waits
|
400
|
-
#
|
401
|
-
#
|
399
|
+
# Waits until the specified long-running operation is done or reaches at most
|
400
|
+
# a specified timeout, returning the latest state. If the operation is
|
401
|
+
# already done, the latest state is immediately returned. If the timeout
|
402
402
|
# specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
403
403
|
# timeout is used. If the server does not support this method, it returns
|
404
404
|
# `google.rpc.Code.UNIMPLEMENTED`.
|
@@ -27,32 +27,78 @@ module Google
|
|
27
27
|
##
|
28
28
|
# Create a fully-qualified Agent resource string.
|
29
29
|
#
|
30
|
-
#
|
30
|
+
# @overload agent_path(project:)
|
31
|
+
# The resource will be in the following format:
|
31
32
|
#
|
32
|
-
#
|
33
|
+
# `projects/{project}/agent`
|
33
34
|
#
|
34
|
-
#
|
35
|
+
# @param project [String]
|
36
|
+
#
|
37
|
+
# @overload agent_path(project:, location:)
|
38
|
+
# The resource will be in the following format:
|
39
|
+
#
|
40
|
+
# `projects/{project}/locations/{location}/agent`
|
41
|
+
#
|
42
|
+
# @param project [String]
|
43
|
+
# @param location [String]
|
35
44
|
#
|
36
45
|
# @return [::String]
|
37
|
-
def agent_path
|
38
|
-
|
46
|
+
def agent_path **args
|
47
|
+
resources = {
|
48
|
+
"project" => (proc do |project:|
|
49
|
+
"projects/#{project}/agent"
|
50
|
+
end),
|
51
|
+
"location:project" => (proc do |project:, location:|
|
52
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
53
|
+
|
54
|
+
"projects/#{project}/locations/#{location}/agent"
|
55
|
+
end)
|
56
|
+
}
|
57
|
+
|
58
|
+
resource = resources[args.keys.sort.join(":")]
|
59
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
60
|
+
resource.call(**args)
|
39
61
|
end
|
40
62
|
|
41
63
|
##
|
42
64
|
# Create a fully-qualified EntityType resource string.
|
43
65
|
#
|
44
|
-
#
|
66
|
+
# @overload entity_type_path(project:, entity_type:)
|
67
|
+
# The resource will be in the following format:
|
45
68
|
#
|
46
|
-
#
|
69
|
+
# `projects/{project}/agent/entityTypes/{entity_type}`
|
47
70
|
#
|
48
|
-
#
|
49
|
-
#
|
71
|
+
# @param project [String]
|
72
|
+
# @param entity_type [String]
|
73
|
+
#
|
74
|
+
# @overload entity_type_path(project:, location:, entity_type:)
|
75
|
+
# The resource will be in the following format:
|
76
|
+
#
|
77
|
+
# `projects/{project}/locations/{location}/agent/entityTypes/{entity_type}`
|
78
|
+
#
|
79
|
+
# @param project [String]
|
80
|
+
# @param location [String]
|
81
|
+
# @param entity_type [String]
|
50
82
|
#
|
51
83
|
# @return [::String]
|
52
|
-
def entity_type_path
|
53
|
-
|
84
|
+
def entity_type_path **args
|
85
|
+
resources = {
|
86
|
+
"entity_type:project" => (proc do |project:, entity_type:|
|
87
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
88
|
+
|
89
|
+
"projects/#{project}/agent/entityTypes/#{entity_type}"
|
90
|
+
end),
|
91
|
+
"entity_type:location:project" => (proc do |project:, location:, entity_type:|
|
92
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
93
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
94
|
+
|
95
|
+
"projects/#{project}/locations/#{location}/agent/entityTypes/#{entity_type}"
|
96
|
+
end)
|
97
|
+
}
|
54
98
|
|
55
|
-
"
|
99
|
+
resource = resources[args.keys.sort.join(":")]
|
100
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
101
|
+
resource.call(**args)
|
56
102
|
end
|
57
103
|
|
58
104
|
extend self
|
@@ -4,12 +4,14 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
require 'google/api/annotations_pb'
|
7
|
+
require 'google/api/client_pb'
|
7
8
|
require 'google/api/field_behavior_pb'
|
8
9
|
require 'google/api/resource_pb'
|
10
|
+
require 'google/cloud/dialogflow/v2/audio_config_pb'
|
11
|
+
require 'google/cloud/dialogflow/v2/fulfillment_pb'
|
9
12
|
require 'google/protobuf/empty_pb'
|
10
13
|
require 'google/protobuf/field_mask_pb'
|
11
14
|
require 'google/protobuf/timestamp_pb'
|
12
|
-
require 'google/api/client_pb'
|
13
15
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
16
|
add_file("google/cloud/dialogflow/v2/environment.proto", :syntax => :proto3) do
|
15
17
|
add_message "google.cloud.dialogflow.v2.Environment" do
|
@@ -18,6 +20,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
18
20
|
optional :agent_version, :string, 3
|
19
21
|
optional :state, :enum, 4, "google.cloud.dialogflow.v2.Environment.State"
|
20
22
|
optional :update_time, :message, 5, "google.protobuf.Timestamp"
|
23
|
+
optional :text_to_speech_settings, :message, 7, "google.cloud.dialogflow.v2.TextToSpeechSettings"
|
24
|
+
optional :fulfillment, :message, 8, "google.cloud.dialogflow.v2.Fulfillment"
|
21
25
|
end
|
22
26
|
add_enum "google.cloud.dialogflow.v2.Environment.State" do
|
23
27
|
value :STATE_UNSPECIFIED, 0
|
@@ -25,6 +29,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
25
29
|
value :LOADING, 2
|
26
30
|
value :RUNNING, 3
|
27
31
|
end
|
32
|
+
add_message "google.cloud.dialogflow.v2.TextToSpeechSettings" do
|
33
|
+
optional :enable_text_to_speech, :bool, 1
|
34
|
+
optional :output_audio_encoding, :enum, 2, "google.cloud.dialogflow.v2.OutputAudioEncoding"
|
35
|
+
optional :sample_rate_hertz, :int32, 3
|
36
|
+
map :synthesize_speech_configs, :string, :message, 4, "google.cloud.dialogflow.v2.SynthesizeSpeechConfig"
|
37
|
+
end
|
28
38
|
add_message "google.cloud.dialogflow.v2.ListEnvironmentsRequest" do
|
29
39
|
optional :parent, :string, 1
|
30
40
|
optional :page_size, :int32, 2
|
@@ -34,6 +44,37 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
34
44
|
repeated :environments, :message, 1, "google.cloud.dialogflow.v2.Environment"
|
35
45
|
optional :next_page_token, :string, 2
|
36
46
|
end
|
47
|
+
add_message "google.cloud.dialogflow.v2.GetEnvironmentRequest" do
|
48
|
+
optional :name, :string, 1
|
49
|
+
end
|
50
|
+
add_message "google.cloud.dialogflow.v2.CreateEnvironmentRequest" do
|
51
|
+
optional :parent, :string, 1
|
52
|
+
optional :environment, :message, 2, "google.cloud.dialogflow.v2.Environment"
|
53
|
+
optional :environment_id, :string, 3
|
54
|
+
end
|
55
|
+
add_message "google.cloud.dialogflow.v2.UpdateEnvironmentRequest" do
|
56
|
+
optional :environment, :message, 1, "google.cloud.dialogflow.v2.Environment"
|
57
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
58
|
+
optional :allow_load_to_draft_and_discard_changes, :bool, 3
|
59
|
+
end
|
60
|
+
add_message "google.cloud.dialogflow.v2.DeleteEnvironmentRequest" do
|
61
|
+
optional :name, :string, 1
|
62
|
+
end
|
63
|
+
add_message "google.cloud.dialogflow.v2.GetEnvironmentHistoryRequest" do
|
64
|
+
optional :parent, :string, 1
|
65
|
+
optional :page_size, :int32, 2
|
66
|
+
optional :page_token, :string, 3
|
67
|
+
end
|
68
|
+
add_message "google.cloud.dialogflow.v2.EnvironmentHistory" do
|
69
|
+
optional :parent, :string, 1
|
70
|
+
repeated :entries, :message, 2, "google.cloud.dialogflow.v2.EnvironmentHistory.Entry"
|
71
|
+
optional :next_page_token, :string, 3
|
72
|
+
end
|
73
|
+
add_message "google.cloud.dialogflow.v2.EnvironmentHistory.Entry" do
|
74
|
+
optional :agent_version, :string, 1
|
75
|
+
optional :description, :string, 2
|
76
|
+
optional :create_time, :message, 3, "google.protobuf.Timestamp"
|
77
|
+
end
|
37
78
|
end
|
38
79
|
end
|
39
80
|
|
@@ -43,8 +84,16 @@ module Google
|
|
43
84
|
module V2
|
44
85
|
Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.Environment").msgclass
|
45
86
|
Environment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.Environment.State").enummodule
|
87
|
+
TextToSpeechSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.TextToSpeechSettings").msgclass
|
46
88
|
ListEnvironmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ListEnvironmentsRequest").msgclass
|
47
89
|
ListEnvironmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.ListEnvironmentsResponse").msgclass
|
90
|
+
GetEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.GetEnvironmentRequest").msgclass
|
91
|
+
CreateEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.CreateEnvironmentRequest").msgclass
|
92
|
+
UpdateEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.UpdateEnvironmentRequest").msgclass
|
93
|
+
DeleteEnvironmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.DeleteEnvironmentRequest").msgclass
|
94
|
+
GetEnvironmentHistoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.GetEnvironmentHistoryRequest").msgclass
|
95
|
+
EnvironmentHistory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.EnvironmentHistory").msgclass
|
96
|
+
EnvironmentHistory::Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.dialogflow.v2.EnvironmentHistory.Entry").msgclass
|
48
97
|
end
|
49
98
|
end
|
50
99
|
end
|