google-cloud-dialogflow-cx-v3 0.22.0 → 0.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +72 -101
- data/lib/google/cloud/dialogflow/cx/v3/agent_pb.rb +2 -1
- data/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +33 -8
- data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +28 -6
- data/lib/google/cloud/dialogflow/cx/v3/agents/rest/client.rb +35 -7
- data/lib/google/cloud/dialogflow/cx/v3/agents/rest/operations.rb +33 -8
- data/lib/google/cloud/dialogflow/cx/v3/agents/rest/service_stub.rb +14 -2
- data/lib/google/cloud/dialogflow/cx/v3/audio_config_pb.rb +2 -1
- data/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb +32 -8
- data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/client.rb +34 -7
- data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/service_stub.rb +14 -2
- data/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb +32 -8
- data/lib/google/cloud/dialogflow/cx/v3/deployments/rest/client.rb +34 -7
- data/lib/google/cloud/dialogflow/cx/v3/deployments/rest/service_stub.rb +14 -2
- data/lib/google/cloud/dialogflow/cx/v3/entity_type_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/entity_type_services_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +151 -127
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb +146 -119
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/service_stub.rb +62 -50
- data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +33 -8
- data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +28 -6
- data/lib/google/cloud/dialogflow/cx/v3/environments/rest/client.rb +35 -7
- data/lib/google/cloud/dialogflow/cx/v3/environments/rest/operations.rb +33 -8
- data/lib/google/cloud/dialogflow/cx/v3/environments/rest/service_stub.rb +14 -2
- data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +32 -8
- data/lib/google/cloud/dialogflow/cx/v3/experiments/rest/client.rb +34 -7
- data/lib/google/cloud/dialogflow/cx/v3/experiments/rest/service_stub.rb +14 -2
- data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +33 -8
- data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +28 -6
- data/lib/google/cloud/dialogflow/cx/v3/flows/rest/client.rb +35 -7
- data/lib/google/cloud/dialogflow/cx/v3/flows/rest/operations.rb +33 -8
- data/lib/google/cloud/dialogflow/cx/v3/flows/rest/service_stub.rb +14 -2
- data/lib/google/cloud/dialogflow/cx/v3/generator_pb.rb +60 -0
- data/lib/google/cloud/dialogflow/cx/v3/generator_services_pb.rb +55 -0
- data/lib/google/cloud/dialogflow/cx/v3/generators/client.rb +851 -0
- data/lib/google/cloud/dialogflow/cx/v3/generators/credentials.rb +54 -0
- data/lib/google/cloud/dialogflow/cx/v3/generators/paths.rb +75 -0
- data/lib/google/cloud/dialogflow/cx/v3/generators/rest/client.rb +798 -0
- data/lib/google/cloud/dialogflow/cx/v3/generators/rest/service_stub.rb +359 -0
- data/lib/google/cloud/dialogflow/cx/v3/generators/rest.rb +55 -0
- data/lib/google/cloud/dialogflow/cx/v3/generators.rb +57 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +33 -8
- data/lib/google/cloud/dialogflow/cx/v3/intents/operations.rb +28 -6
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest/client.rb +35 -7
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest/operations.rb +33 -8
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest/service_stub.rb +14 -2
- data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +32 -8
- data/lib/google/cloud/dialogflow/cx/v3/pages/rest/client.rb +34 -7
- data/lib/google/cloud/dialogflow/cx/v3/pages/rest/service_stub.rb +14 -2
- data/lib/google/cloud/dialogflow/cx/v3/rest.rb +1 -0
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +32 -8
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/client.rb +34 -7
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/service_stub.rb +14 -2
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +32 -8
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/client.rb +34 -7
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/service_stub.rb +14 -2
- data/lib/google/cloud/dialogflow/cx/v3/session_pb.rb +12 -1
- data/lib/google/cloud/dialogflow/cx/v3/session_services_pb.rb +3 -0
- data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +133 -8
- data/lib/google/cloud/dialogflow/cx/v3/sessions/paths.rb +45 -0
- data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/client.rb +128 -7
- data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/service_stub.rb +74 -2
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +33 -8
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +28 -6
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/client.rb +35 -7
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/operations.rb +33 -8
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/service_stub.rb +14 -2
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +32 -8
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/client.rb +34 -7
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/service_stub.rb +14 -2
- data/lib/google/cloud/dialogflow/cx/v3/version.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +33 -8
- data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +28 -6
- data/lib/google/cloud/dialogflow/cx/v3/versions/rest/client.rb +35 -7
- data/lib/google/cloud/dialogflow/cx/v3/versions/rest/operations.rb +33 -8
- data/lib/google/cloud/dialogflow/cx/v3/versions/rest/service_stub.rb +14 -2
- data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +32 -8
- data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/client.rb +34 -7
- data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/service_stub.rb +14 -2
- data/lib/google/cloud/dialogflow/cx/v3.rb +1 -0
- data/proto_docs/google/api/client.rb +14 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/agent.rb +16 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/audio_config.rb +47 -3
- data/proto_docs/google/cloud/dialogflow/cx/v3/generator.rb +187 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +187 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/validation_message.rb +1 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/webhook.rb +2 -0
- metadata +17 -7
@@ -32,6 +32,9 @@ module Google
|
|
32
32
|
# Service for managing {::Google::Cloud::Dialogflow::CX::V3::Version Versions}.
|
33
33
|
#
|
34
34
|
class Client
|
35
|
+
# @private
|
36
|
+
DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$"
|
37
|
+
|
35
38
|
include Paths
|
36
39
|
|
37
40
|
# @private
|
@@ -97,6 +100,15 @@ module Google
|
|
97
100
|
@config
|
98
101
|
end
|
99
102
|
|
103
|
+
##
|
104
|
+
# The effective universe domain
|
105
|
+
#
|
106
|
+
# @return [String]
|
107
|
+
#
|
108
|
+
def universe_domain
|
109
|
+
@versions_stub.universe_domain
|
110
|
+
end
|
111
|
+
|
100
112
|
##
|
101
113
|
# Create a new Versions client object.
|
102
114
|
#
|
@@ -130,8 +142,9 @@ module Google
|
|
130
142
|
credentials = @config.credentials
|
131
143
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
132
144
|
# but only if the default endpoint does not have a region prefix.
|
133
|
-
enable_self_signed_jwt = @config.endpoint
|
134
|
-
|
145
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
146
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
147
|
+
!@config.endpoint.split(".").first.include?("-"))
|
135
148
|
credentials ||= Credentials.default scope: @config.scope,
|
136
149
|
enable_self_signed_jwt: enable_self_signed_jwt
|
137
150
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -144,18 +157,22 @@ module Google
|
|
144
157
|
config.credentials = credentials
|
145
158
|
config.quota_project = @quota_project_id
|
146
159
|
config.endpoint = @config.endpoint
|
160
|
+
config.universe_domain = @config.universe_domain
|
147
161
|
end
|
148
162
|
|
149
163
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
150
164
|
config.credentials = credentials
|
151
165
|
config.quota_project = @quota_project_id
|
152
166
|
config.endpoint = @config.endpoint
|
167
|
+
config.universe_domain = @config.universe_domain
|
153
168
|
end
|
154
169
|
|
155
170
|
@versions_stub = ::Gapic::ServiceStub.new(
|
156
171
|
::Google::Cloud::Dialogflow::CX::V3::Versions::Stub,
|
157
|
-
credentials:
|
158
|
-
endpoint:
|
172
|
+
credentials: credentials,
|
173
|
+
endpoint: @config.endpoint,
|
174
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
175
|
+
universe_domain: @config.universe_domain,
|
159
176
|
channel_args: @config.channel_args,
|
160
177
|
interceptors: @config.interceptors,
|
161
178
|
channel_pool_config: @config.channel_pool
|
@@ -886,9 +903,9 @@ module Google
|
|
886
903
|
# end
|
887
904
|
#
|
888
905
|
# @!attribute [rw] endpoint
|
889
|
-
#
|
890
|
-
#
|
891
|
-
# @return [::String]
|
906
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
907
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
908
|
+
# @return [::String,nil]
|
892
909
|
# @!attribute [rw] credentials
|
893
910
|
# Credentials to send with calls. You may provide any of the following types:
|
894
911
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -934,13 +951,20 @@ module Google
|
|
934
951
|
# @!attribute [rw] quota_project
|
935
952
|
# A separate project against which to charge quota.
|
936
953
|
# @return [::String]
|
954
|
+
# @!attribute [rw] universe_domain
|
955
|
+
# The universe domain within which to make requests. This determines the
|
956
|
+
# default endpoint URL. The default value of nil uses the environment
|
957
|
+
# universe (usually the default "googleapis.com" universe).
|
958
|
+
# @return [::String,nil]
|
937
959
|
#
|
938
960
|
class Configuration
|
939
961
|
extend ::Gapic::Config
|
940
962
|
|
963
|
+
# @private
|
964
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
941
965
|
DEFAULT_ENDPOINT = "dialogflow.googleapis.com"
|
942
966
|
|
943
|
-
config_attr :endpoint,
|
967
|
+
config_attr :endpoint, nil, ::String, nil
|
944
968
|
config_attr :credentials, nil do |value|
|
945
969
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
946
970
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -955,6 +979,7 @@ module Google
|
|
955
979
|
config_attr :metadata, nil, ::Hash, nil
|
956
980
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
957
981
|
config_attr :quota_project, nil, ::String, nil
|
982
|
+
config_attr :universe_domain, nil, ::String, nil
|
958
983
|
|
959
984
|
# @private
|
960
985
|
def initialize parent_config = nil
|
@@ -27,6 +27,9 @@ module Google
|
|
27
27
|
module Versions
|
28
28
|
# Service that implements Longrunning Operations API.
|
29
29
|
class Operations
|
30
|
+
# @private
|
31
|
+
DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$"
|
32
|
+
|
30
33
|
# @private
|
31
34
|
attr_reader :operations_stub
|
32
35
|
|
@@ -61,6 +64,15 @@ module Google
|
|
61
64
|
@config
|
62
65
|
end
|
63
66
|
|
67
|
+
##
|
68
|
+
# The effective universe domain
|
69
|
+
#
|
70
|
+
# @return [String]
|
71
|
+
#
|
72
|
+
def universe_domain
|
73
|
+
@operations_stub.universe_domain
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# Create a new Operations client object.
|
66
78
|
#
|
@@ -91,8 +103,10 @@ module Google
|
|
91
103
|
|
92
104
|
@operations_stub = ::Gapic::ServiceStub.new(
|
93
105
|
::Google::Longrunning::Operations::Stub,
|
94
|
-
credentials:
|
95
|
-
endpoint:
|
106
|
+
credentials: credentials,
|
107
|
+
endpoint: @config.endpoint,
|
108
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
109
|
+
universe_domain: @config.universe_domain,
|
96
110
|
channel_args: @config.channel_args,
|
97
111
|
interceptors: @config.interceptors,
|
98
112
|
channel_pool_config: @config.channel_pool
|
@@ -614,9 +628,9 @@ module Google
|
|
614
628
|
# end
|
615
629
|
#
|
616
630
|
# @!attribute [rw] endpoint
|
617
|
-
#
|
618
|
-
#
|
619
|
-
# @return [::String]
|
631
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
632
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
633
|
+
# @return [::String,nil]
|
620
634
|
# @!attribute [rw] credentials
|
621
635
|
# Credentials to send with calls. You may provide any of the following types:
|
622
636
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -662,13 +676,20 @@ module Google
|
|
662
676
|
# @!attribute [rw] quota_project
|
663
677
|
# A separate project against which to charge quota.
|
664
678
|
# @return [::String]
|
679
|
+
# @!attribute [rw] universe_domain
|
680
|
+
# The universe domain within which to make requests. This determines the
|
681
|
+
# default endpoint URL. The default value of nil uses the environment
|
682
|
+
# universe (usually the default "googleapis.com" universe).
|
683
|
+
# @return [::String,nil]
|
665
684
|
#
|
666
685
|
class Configuration
|
667
686
|
extend ::Gapic::Config
|
668
687
|
|
688
|
+
# @private
|
689
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
669
690
|
DEFAULT_ENDPOINT = "dialogflow.googleapis.com"
|
670
691
|
|
671
|
-
config_attr :endpoint,
|
692
|
+
config_attr :endpoint, nil, ::String, nil
|
672
693
|
config_attr :credentials, nil do |value|
|
673
694
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
674
695
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -683,6 +704,7 @@ module Google
|
|
683
704
|
config_attr :metadata, nil, ::Hash, nil
|
684
705
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
685
706
|
config_attr :quota_project, nil, ::String, nil
|
707
|
+
config_attr :universe_domain, nil, ::String, nil
|
686
708
|
|
687
709
|
# @private
|
688
710
|
def initialize parent_config = nil
|
@@ -34,6 +34,9 @@ module Google
|
|
34
34
|
# Service for managing {::Google::Cloud::Dialogflow::CX::V3::Version Versions}.
|
35
35
|
#
|
36
36
|
class Client
|
37
|
+
# @private
|
38
|
+
DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$"
|
39
|
+
|
37
40
|
include Paths
|
38
41
|
|
39
42
|
# @private
|
@@ -99,6 +102,15 @@ module Google
|
|
99
102
|
@config
|
100
103
|
end
|
101
104
|
|
105
|
+
##
|
106
|
+
# The effective universe domain
|
107
|
+
#
|
108
|
+
# @return [String]
|
109
|
+
#
|
110
|
+
def universe_domain
|
111
|
+
@versions_stub.universe_domain
|
112
|
+
end
|
113
|
+
|
102
114
|
##
|
103
115
|
# Create a new Versions REST client object.
|
104
116
|
#
|
@@ -126,8 +138,9 @@ module Google
|
|
126
138
|
credentials = @config.credentials
|
127
139
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
128
140
|
# but only if the default endpoint does not have a region prefix.
|
129
|
-
enable_self_signed_jwt = @config.endpoint
|
130
|
-
|
141
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
142
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
143
|
+
!@config.endpoint.split(".").first.include?("-"))
|
131
144
|
credentials ||= Credentials.default scope: @config.scope,
|
132
145
|
enable_self_signed_jwt: enable_self_signed_jwt
|
133
146
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -141,16 +154,23 @@ module Google
|
|
141
154
|
config.credentials = credentials
|
142
155
|
config.quota_project = @quota_project_id
|
143
156
|
config.endpoint = @config.endpoint
|
157
|
+
config.universe_domain = @config.universe_domain
|
144
158
|
end
|
145
159
|
|
146
160
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
147
161
|
config.credentials = credentials
|
148
162
|
config.quota_project = @quota_project_id
|
149
163
|
config.endpoint = @config.endpoint
|
164
|
+
config.universe_domain = @config.universe_domain
|
150
165
|
config.bindings_override = @config.bindings_override
|
151
166
|
end
|
152
167
|
|
153
|
-
@versions_stub = ::Google::Cloud::Dialogflow::CX::V3::Versions::Rest::ServiceStub.new
|
168
|
+
@versions_stub = ::Google::Cloud::Dialogflow::CX::V3::Versions::Rest::ServiceStub.new(
|
169
|
+
endpoint: @config.endpoint,
|
170
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
171
|
+
universe_domain: @config.universe_domain,
|
172
|
+
credentials: credentials
|
173
|
+
)
|
154
174
|
end
|
155
175
|
|
156
176
|
##
|
@@ -828,9 +848,9 @@ module Google
|
|
828
848
|
# end
|
829
849
|
#
|
830
850
|
# @!attribute [rw] endpoint
|
831
|
-
#
|
832
|
-
#
|
833
|
-
# @return [::String]
|
851
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
852
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
853
|
+
# @return [::String,nil]
|
834
854
|
# @!attribute [rw] credentials
|
835
855
|
# Credentials to send with calls. You may provide any of the following types:
|
836
856
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -867,13 +887,20 @@ module Google
|
|
867
887
|
# @!attribute [rw] quota_project
|
868
888
|
# A separate project against which to charge quota.
|
869
889
|
# @return [::String]
|
890
|
+
# @!attribute [rw] universe_domain
|
891
|
+
# The universe domain within which to make requests. This determines the
|
892
|
+
# default endpoint URL. The default value of nil uses the environment
|
893
|
+
# universe (usually the default "googleapis.com" universe).
|
894
|
+
# @return [::String,nil]
|
870
895
|
#
|
871
896
|
class Configuration
|
872
897
|
extend ::Gapic::Config
|
873
898
|
|
899
|
+
# @private
|
900
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
874
901
|
DEFAULT_ENDPOINT = "dialogflow.googleapis.com"
|
875
902
|
|
876
|
-
config_attr :endpoint,
|
903
|
+
config_attr :endpoint, nil, ::String, nil
|
877
904
|
config_attr :credentials, nil do |value|
|
878
905
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
879
906
|
allowed.any? { |klass| klass === value }
|
@@ -885,6 +912,7 @@ module Google
|
|
885
912
|
config_attr :metadata, nil, ::Hash, nil
|
886
913
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
887
914
|
config_attr :quota_project, nil, ::String, nil
|
915
|
+
config_attr :universe_domain, nil, ::String, nil
|
888
916
|
|
889
917
|
# @private
|
890
918
|
# Overrides for http bindings for the RPCs of this service
|
@@ -27,6 +27,9 @@ module Google
|
|
27
27
|
module Rest
|
28
28
|
# Service that implements Longrunning Operations API.
|
29
29
|
class Operations
|
30
|
+
# @private
|
31
|
+
DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$"
|
32
|
+
|
30
33
|
# @private
|
31
34
|
attr_reader :operations_stub
|
32
35
|
|
@@ -61,6 +64,15 @@ module Google
|
|
61
64
|
@config
|
62
65
|
end
|
63
66
|
|
67
|
+
##
|
68
|
+
# The effective universe domain
|
69
|
+
#
|
70
|
+
# @return [String]
|
71
|
+
#
|
72
|
+
def universe_domain
|
73
|
+
@operations_stub.universe_domain
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# Create a new Operations client object.
|
66
78
|
#
|
@@ -85,8 +97,10 @@ module Google
|
|
85
97
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
86
98
|
|
87
99
|
@operations_stub = OperationsServiceStub.new(
|
88
|
-
endpoint:
|
89
|
-
|
100
|
+
endpoint: @config.endpoint,
|
101
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
102
|
+
universe_domain: @config.universe_domain,
|
103
|
+
credentials: credentials
|
90
104
|
)
|
91
105
|
|
92
106
|
# Used by an LRO wrapper for some methods of this service
|
@@ -479,9 +493,9 @@ module Google
|
|
479
493
|
# end
|
480
494
|
#
|
481
495
|
# @!attribute [rw] endpoint
|
482
|
-
#
|
483
|
-
#
|
484
|
-
# @return [::String]
|
496
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
497
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
498
|
+
# @return [::String,nil]
|
485
499
|
# @!attribute [rw] credentials
|
486
500
|
# Credentials to send with calls. You may provide any of the following types:
|
487
501
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -518,13 +532,20 @@ module Google
|
|
518
532
|
# @!attribute [rw] quota_project
|
519
533
|
# A separate project against which to charge quota.
|
520
534
|
# @return [::String]
|
535
|
+
# @!attribute [rw] universe_domain
|
536
|
+
# The universe domain within which to make requests. This determines the
|
537
|
+
# default endpoint URL. The default value of nil uses the environment
|
538
|
+
# universe (usually the default "googleapis.com" universe).
|
539
|
+
# @return [::String,nil]
|
521
540
|
#
|
522
541
|
class Configuration
|
523
542
|
extend ::Gapic::Config
|
524
543
|
|
544
|
+
# @private
|
545
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
525
546
|
DEFAULT_ENDPOINT = "dialogflow.googleapis.com"
|
526
547
|
|
527
|
-
config_attr :endpoint,
|
548
|
+
config_attr :endpoint, nil, ::String, nil
|
528
549
|
config_attr :credentials, nil do |value|
|
529
550
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
530
551
|
allowed.any? { |klass| klass === value }
|
@@ -536,6 +557,7 @@ module Google
|
|
536
557
|
config_attr :metadata, nil, ::Hash, nil
|
537
558
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
538
559
|
config_attr :quota_project, nil, ::String, nil
|
560
|
+
config_attr :universe_domain, nil, ::String, nil
|
539
561
|
|
540
562
|
# @private
|
541
563
|
def initialize parent_config = nil
|
@@ -618,12 +640,15 @@ module Google
|
|
618
640
|
# Service stub contains baseline method implementations
|
619
641
|
# including transcoding, making the REST call, and deserialing the response.
|
620
642
|
class OperationsServiceStub
|
621
|
-
def initialize endpoint:, credentials:
|
643
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
622
644
|
# These require statements are intentionally placed here to initialize
|
623
645
|
# the REST modules only when it's required.
|
624
646
|
require "gapic/rest"
|
625
647
|
|
626
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
648
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
649
|
+
endpoint_template: endpoint_template,
|
650
|
+
universe_domain: universe_domain,
|
651
|
+
credentials: credentials
|
627
652
|
end
|
628
653
|
|
629
654
|
##
|
@@ -31,16 +31,28 @@ module Google
|
|
31
31
|
# including transcoding, making the REST call, and deserialing the response.
|
32
32
|
#
|
33
33
|
class ServiceStub
|
34
|
-
def initialize endpoint:, credentials:
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
35
35
|
# These require statements are intentionally placed here to initialize
|
36
36
|
# the REST modules only when it's required.
|
37
37
|
require "gapic/rest"
|
38
38
|
|
39
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
39
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
40
|
+
endpoint_template: endpoint_template,
|
41
|
+
universe_domain: universe_domain,
|
42
|
+
credentials: credentials,
|
40
43
|
numeric_enums: true,
|
41
44
|
raise_faraday_errors: false
|
42
45
|
end
|
43
46
|
|
47
|
+
##
|
48
|
+
# The effective universe domain
|
49
|
+
#
|
50
|
+
# @return [String]
|
51
|
+
#
|
52
|
+
def universe_domain
|
53
|
+
@client_stub.universe_domain
|
54
|
+
end
|
55
|
+
|
44
56
|
##
|
45
57
|
# Baseline implementation for the list_versions REST call
|
46
58
|
#
|
@@ -32,6 +32,9 @@ module Google
|
|
32
32
|
# Service for managing {::Google::Cloud::Dialogflow::CX::V3::Webhook Webhooks}.
|
33
33
|
#
|
34
34
|
class Client
|
35
|
+
# @private
|
36
|
+
DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$"
|
37
|
+
|
35
38
|
include Paths
|
36
39
|
|
37
40
|
# @private
|
@@ -97,6 +100,15 @@ module Google
|
|
97
100
|
@config
|
98
101
|
end
|
99
102
|
|
103
|
+
##
|
104
|
+
# The effective universe domain
|
105
|
+
#
|
106
|
+
# @return [String]
|
107
|
+
#
|
108
|
+
def universe_domain
|
109
|
+
@webhooks_stub.universe_domain
|
110
|
+
end
|
111
|
+
|
100
112
|
##
|
101
113
|
# Create a new Webhooks client object.
|
102
114
|
#
|
@@ -130,8 +142,9 @@ module Google
|
|
130
142
|
credentials = @config.credentials
|
131
143
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
132
144
|
# but only if the default endpoint does not have a region prefix.
|
133
|
-
enable_self_signed_jwt = @config.endpoint
|
134
|
-
|
145
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
146
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
147
|
+
!@config.endpoint.split(".").first.include?("-"))
|
135
148
|
credentials ||= Credentials.default scope: @config.scope,
|
136
149
|
enable_self_signed_jwt: enable_self_signed_jwt
|
137
150
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -144,12 +157,15 @@ module Google
|
|
144
157
|
config.credentials = credentials
|
145
158
|
config.quota_project = @quota_project_id
|
146
159
|
config.endpoint = @config.endpoint
|
160
|
+
config.universe_domain = @config.universe_domain
|
147
161
|
end
|
148
162
|
|
149
163
|
@webhooks_stub = ::Gapic::ServiceStub.new(
|
150
164
|
::Google::Cloud::Dialogflow::CX::V3::Webhooks::Stub,
|
151
|
-
credentials:
|
152
|
-
endpoint:
|
165
|
+
credentials: credentials,
|
166
|
+
endpoint: @config.endpoint,
|
167
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
168
|
+
universe_domain: @config.universe_domain,
|
153
169
|
channel_args: @config.channel_args,
|
154
170
|
interceptors: @config.interceptors,
|
155
171
|
channel_pool_config: @config.channel_pool
|
@@ -652,9 +668,9 @@ module Google
|
|
652
668
|
# end
|
653
669
|
#
|
654
670
|
# @!attribute [rw] endpoint
|
655
|
-
#
|
656
|
-
#
|
657
|
-
# @return [::String]
|
671
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
672
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
673
|
+
# @return [::String,nil]
|
658
674
|
# @!attribute [rw] credentials
|
659
675
|
# Credentials to send with calls. You may provide any of the following types:
|
660
676
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -700,13 +716,20 @@ module Google
|
|
700
716
|
# @!attribute [rw] quota_project
|
701
717
|
# A separate project against which to charge quota.
|
702
718
|
# @return [::String]
|
719
|
+
# @!attribute [rw] universe_domain
|
720
|
+
# The universe domain within which to make requests. This determines the
|
721
|
+
# default endpoint URL. The default value of nil uses the environment
|
722
|
+
# universe (usually the default "googleapis.com" universe).
|
723
|
+
# @return [::String,nil]
|
703
724
|
#
|
704
725
|
class Configuration
|
705
726
|
extend ::Gapic::Config
|
706
727
|
|
728
|
+
# @private
|
729
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
707
730
|
DEFAULT_ENDPOINT = "dialogflow.googleapis.com"
|
708
731
|
|
709
|
-
config_attr :endpoint,
|
732
|
+
config_attr :endpoint, nil, ::String, nil
|
710
733
|
config_attr :credentials, nil do |value|
|
711
734
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
712
735
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -721,6 +744,7 @@ module Google
|
|
721
744
|
config_attr :metadata, nil, ::Hash, nil
|
722
745
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
723
746
|
config_attr :quota_project, nil, ::String, nil
|
747
|
+
config_attr :universe_domain, nil, ::String, nil
|
724
748
|
|
725
749
|
# @private
|
726
750
|
def initialize parent_config = nil
|
@@ -34,6 +34,9 @@ module Google
|
|
34
34
|
# Service for managing {::Google::Cloud::Dialogflow::CX::V3::Webhook Webhooks}.
|
35
35
|
#
|
36
36
|
class Client
|
37
|
+
# @private
|
38
|
+
DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$"
|
39
|
+
|
37
40
|
include Paths
|
38
41
|
|
39
42
|
# @private
|
@@ -99,6 +102,15 @@ module Google
|
|
99
102
|
@config
|
100
103
|
end
|
101
104
|
|
105
|
+
##
|
106
|
+
# The effective universe domain
|
107
|
+
#
|
108
|
+
# @return [String]
|
109
|
+
#
|
110
|
+
def universe_domain
|
111
|
+
@webhooks_stub.universe_domain
|
112
|
+
end
|
113
|
+
|
102
114
|
##
|
103
115
|
# Create a new Webhooks REST client object.
|
104
116
|
#
|
@@ -126,8 +138,9 @@ module Google
|
|
126
138
|
credentials = @config.credentials
|
127
139
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
128
140
|
# but only if the default endpoint does not have a region prefix.
|
129
|
-
enable_self_signed_jwt = @config.endpoint
|
130
|
-
|
141
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
142
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
143
|
+
!@config.endpoint.split(".").first.include?("-"))
|
131
144
|
credentials ||= Credentials.default scope: @config.scope,
|
132
145
|
enable_self_signed_jwt: enable_self_signed_jwt
|
133
146
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -141,10 +154,16 @@ module Google
|
|
141
154
|
config.credentials = credentials
|
142
155
|
config.quota_project = @quota_project_id
|
143
156
|
config.endpoint = @config.endpoint
|
157
|
+
config.universe_domain = @config.universe_domain
|
144
158
|
config.bindings_override = @config.bindings_override
|
145
159
|
end
|
146
160
|
|
147
|
-
@webhooks_stub = ::Google::Cloud::Dialogflow::CX::V3::Webhooks::Rest::ServiceStub.new
|
161
|
+
@webhooks_stub = ::Google::Cloud::Dialogflow::CX::V3::Webhooks::Rest::ServiceStub.new(
|
162
|
+
endpoint: @config.endpoint,
|
163
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
164
|
+
universe_domain: @config.universe_domain,
|
165
|
+
credentials: credentials
|
166
|
+
)
|
148
167
|
end
|
149
168
|
|
150
169
|
##
|
@@ -608,9 +627,9 @@ module Google
|
|
608
627
|
# end
|
609
628
|
#
|
610
629
|
# @!attribute [rw] endpoint
|
611
|
-
#
|
612
|
-
#
|
613
|
-
# @return [::String]
|
630
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
631
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
632
|
+
# @return [::String,nil]
|
614
633
|
# @!attribute [rw] credentials
|
615
634
|
# Credentials to send with calls. You may provide any of the following types:
|
616
635
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -647,13 +666,20 @@ module Google
|
|
647
666
|
# @!attribute [rw] quota_project
|
648
667
|
# A separate project against which to charge quota.
|
649
668
|
# @return [::String]
|
669
|
+
# @!attribute [rw] universe_domain
|
670
|
+
# The universe domain within which to make requests. This determines the
|
671
|
+
# default endpoint URL. The default value of nil uses the environment
|
672
|
+
# universe (usually the default "googleapis.com" universe).
|
673
|
+
# @return [::String,nil]
|
650
674
|
#
|
651
675
|
class Configuration
|
652
676
|
extend ::Gapic::Config
|
653
677
|
|
678
|
+
# @private
|
679
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
654
680
|
DEFAULT_ENDPOINT = "dialogflow.googleapis.com"
|
655
681
|
|
656
|
-
config_attr :endpoint,
|
682
|
+
config_attr :endpoint, nil, ::String, nil
|
657
683
|
config_attr :credentials, nil do |value|
|
658
684
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
659
685
|
allowed.any? { |klass| klass === value }
|
@@ -665,6 +691,7 @@ module Google
|
|
665
691
|
config_attr :metadata, nil, ::Hash, nil
|
666
692
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
667
693
|
config_attr :quota_project, nil, ::String, nil
|
694
|
+
config_attr :universe_domain, nil, ::String, nil
|
668
695
|
|
669
696
|
# @private
|
670
697
|
# Overrides for http bindings for the RPCs of this service
|
@@ -31,16 +31,28 @@ module Google
|
|
31
31
|
# including transcoding, making the REST call, and deserialing the response.
|
32
32
|
#
|
33
33
|
class ServiceStub
|
34
|
-
def initialize endpoint:, credentials:
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
35
35
|
# These require statements are intentionally placed here to initialize
|
36
36
|
# the REST modules only when it's required.
|
37
37
|
require "gapic/rest"
|
38
38
|
|
39
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
39
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
40
|
+
endpoint_template: endpoint_template,
|
41
|
+
universe_domain: universe_domain,
|
42
|
+
credentials: credentials,
|
40
43
|
numeric_enums: true,
|
41
44
|
raise_faraday_errors: false
|
42
45
|
end
|
43
46
|
|
47
|
+
##
|
48
|
+
# The effective universe domain
|
49
|
+
#
|
50
|
+
# @return [String]
|
51
|
+
#
|
52
|
+
def universe_domain
|
53
|
+
@client_stub.universe_domain
|
54
|
+
end
|
55
|
+
|
44
56
|
##
|
45
57
|
# Baseline implementation for the list_webhooks REST call
|
46
58
|
#
|
@@ -30,6 +30,7 @@ require "google/cloud/dialogflow/cx/v3/test_cases"
|
|
30
30
|
require "google/cloud/dialogflow/cx/v3/webhooks"
|
31
31
|
require "google/cloud/dialogflow/cx/v3/environments"
|
32
32
|
require "google/cloud/dialogflow/cx/v3/experiments"
|
33
|
+
require "google/cloud/dialogflow/cx/v3/generators"
|
33
34
|
require "google/cloud/dialogflow/cx/v3/security_settings_service"
|
34
35
|
require "google/cloud/dialogflow/cx/v3/versions"
|
35
36
|
require "google/cloud/dialogflow/cx/v3/version"
|