google-cloud-dialogflow-cx-v3 0.23.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/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/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_types/client.rb +32 -8
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb +34 -7
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/service_stub.rb +14 -2
- 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/generators/client.rb +32 -8
- data/lib/google/cloud/dialogflow/cx/v3/generators/rest/client.rb +34 -7
- data/lib/google/cloud/dialogflow/cx/v3/generators/rest/service_stub.rb +14 -2
- 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/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/sessions/client.rb +32 -8
- data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/client.rb +34 -7
- data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/service_stub.rb +14 -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/proto_docs/google/api/client.rb +1 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/agent.rb +1 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +2 -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 +6 -6
@@ -35,6 +35,9 @@ module Google
|
|
35
35
|
# determine user intent and respond.
|
36
36
|
#
|
37
37
|
class Client
|
38
|
+
# @private
|
39
|
+
DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$"
|
40
|
+
|
38
41
|
include Paths
|
39
42
|
|
40
43
|
# @private
|
@@ -107,6 +110,15 @@ module Google
|
|
107
110
|
@config
|
108
111
|
end
|
109
112
|
|
113
|
+
##
|
114
|
+
# The effective universe domain
|
115
|
+
#
|
116
|
+
# @return [String]
|
117
|
+
#
|
118
|
+
def universe_domain
|
119
|
+
@sessions_stub.universe_domain
|
120
|
+
end
|
121
|
+
|
110
122
|
##
|
111
123
|
# Create a new Sessions client object.
|
112
124
|
#
|
@@ -140,8 +152,9 @@ module Google
|
|
140
152
|
credentials = @config.credentials
|
141
153
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
142
154
|
# but only if the default endpoint does not have a region prefix.
|
143
|
-
enable_self_signed_jwt = @config.endpoint
|
144
|
-
|
155
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
156
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
157
|
+
!@config.endpoint.split(".").first.include?("-"))
|
145
158
|
credentials ||= Credentials.default scope: @config.scope,
|
146
159
|
enable_self_signed_jwt: enable_self_signed_jwt
|
147
160
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -154,12 +167,15 @@ module Google
|
|
154
167
|
config.credentials = credentials
|
155
168
|
config.quota_project = @quota_project_id
|
156
169
|
config.endpoint = @config.endpoint
|
170
|
+
config.universe_domain = @config.universe_domain
|
157
171
|
end
|
158
172
|
|
159
173
|
@sessions_stub = ::Gapic::ServiceStub.new(
|
160
174
|
::Google::Cloud::Dialogflow::CX::V3::Sessions::Stub,
|
161
|
-
credentials:
|
162
|
-
endpoint:
|
175
|
+
credentials: credentials,
|
176
|
+
endpoint: @config.endpoint,
|
177
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
178
|
+
universe_domain: @config.universe_domain,
|
163
179
|
channel_args: @config.channel_args,
|
164
180
|
interceptors: @config.interceptors,
|
165
181
|
channel_pool_config: @config.channel_pool
|
@@ -695,9 +711,9 @@ module Google
|
|
695
711
|
# end
|
696
712
|
#
|
697
713
|
# @!attribute [rw] endpoint
|
698
|
-
#
|
699
|
-
#
|
700
|
-
# @return [::String]
|
714
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
715
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
716
|
+
# @return [::String,nil]
|
701
717
|
# @!attribute [rw] credentials
|
702
718
|
# Credentials to send with calls. You may provide any of the following types:
|
703
719
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -743,13 +759,20 @@ module Google
|
|
743
759
|
# @!attribute [rw] quota_project
|
744
760
|
# A separate project against which to charge quota.
|
745
761
|
# @return [::String]
|
762
|
+
# @!attribute [rw] universe_domain
|
763
|
+
# The universe domain within which to make requests. This determines the
|
764
|
+
# default endpoint URL. The default value of nil uses the environment
|
765
|
+
# universe (usually the default "googleapis.com" universe).
|
766
|
+
# @return [::String,nil]
|
746
767
|
#
|
747
768
|
class Configuration
|
748
769
|
extend ::Gapic::Config
|
749
770
|
|
771
|
+
# @private
|
772
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
750
773
|
DEFAULT_ENDPOINT = "dialogflow.googleapis.com"
|
751
774
|
|
752
|
-
config_attr :endpoint,
|
775
|
+
config_attr :endpoint, nil, ::String, nil
|
753
776
|
config_attr :credentials, nil do |value|
|
754
777
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
755
778
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -764,6 +787,7 @@ module Google
|
|
764
787
|
config_attr :metadata, nil, ::Hash, nil
|
765
788
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
766
789
|
config_attr :quota_project, nil, ::String, nil
|
790
|
+
config_attr :universe_domain, nil, ::String, nil
|
767
791
|
|
768
792
|
# @private
|
769
793
|
def initialize parent_config = nil
|
@@ -37,6 +37,9 @@ module Google
|
|
37
37
|
# determine user intent and respond.
|
38
38
|
#
|
39
39
|
class Client
|
40
|
+
# @private
|
41
|
+
DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$"
|
42
|
+
|
40
43
|
include Paths
|
41
44
|
|
42
45
|
# @private
|
@@ -107,6 +110,15 @@ module Google
|
|
107
110
|
@config
|
108
111
|
end
|
109
112
|
|
113
|
+
##
|
114
|
+
# The effective universe domain
|
115
|
+
#
|
116
|
+
# @return [String]
|
117
|
+
#
|
118
|
+
def universe_domain
|
119
|
+
@sessions_stub.universe_domain
|
120
|
+
end
|
121
|
+
|
110
122
|
##
|
111
123
|
# Create a new Sessions REST client object.
|
112
124
|
#
|
@@ -134,8 +146,9 @@ module Google
|
|
134
146
|
credentials = @config.credentials
|
135
147
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
136
148
|
# but only if the default endpoint does not have a region prefix.
|
137
|
-
enable_self_signed_jwt = @config.endpoint
|
138
|
-
|
149
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
150
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
151
|
+
!@config.endpoint.split(".").first.include?("-"))
|
139
152
|
credentials ||= Credentials.default scope: @config.scope,
|
140
153
|
enable_self_signed_jwt: enable_self_signed_jwt
|
141
154
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -149,10 +162,16 @@ module Google
|
|
149
162
|
config.credentials = credentials
|
150
163
|
config.quota_project = @quota_project_id
|
151
164
|
config.endpoint = @config.endpoint
|
165
|
+
config.universe_domain = @config.universe_domain
|
152
166
|
config.bindings_override = @config.bindings_override
|
153
167
|
end
|
154
168
|
|
155
|
-
@sessions_stub = ::Google::Cloud::Dialogflow::CX::V3::Sessions::Rest::ServiceStub.new
|
169
|
+
@sessions_stub = ::Google::Cloud::Dialogflow::CX::V3::Sessions::Rest::ServiceStub.new(
|
170
|
+
endpoint: @config.endpoint,
|
171
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
172
|
+
universe_domain: @config.universe_domain,
|
173
|
+
credentials: credentials
|
174
|
+
)
|
156
175
|
end
|
157
176
|
|
158
177
|
##
|
@@ -572,9 +591,9 @@ module Google
|
|
572
591
|
# end
|
573
592
|
#
|
574
593
|
# @!attribute [rw] endpoint
|
575
|
-
#
|
576
|
-
#
|
577
|
-
# @return [::String]
|
594
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
595
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
596
|
+
# @return [::String,nil]
|
578
597
|
# @!attribute [rw] credentials
|
579
598
|
# Credentials to send with calls. You may provide any of the following types:
|
580
599
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -611,13 +630,20 @@ module Google
|
|
611
630
|
# @!attribute [rw] quota_project
|
612
631
|
# A separate project against which to charge quota.
|
613
632
|
# @return [::String]
|
633
|
+
# @!attribute [rw] universe_domain
|
634
|
+
# The universe domain within which to make requests. This determines the
|
635
|
+
# default endpoint URL. The default value of nil uses the environment
|
636
|
+
# universe (usually the default "googleapis.com" universe).
|
637
|
+
# @return [::String,nil]
|
614
638
|
#
|
615
639
|
class Configuration
|
616
640
|
extend ::Gapic::Config
|
617
641
|
|
642
|
+
# @private
|
643
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
618
644
|
DEFAULT_ENDPOINT = "dialogflow.googleapis.com"
|
619
645
|
|
620
|
-
config_attr :endpoint,
|
646
|
+
config_attr :endpoint, nil, ::String, nil
|
621
647
|
config_attr :credentials, nil do |value|
|
622
648
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
623
649
|
allowed.any? { |klass| klass === value }
|
@@ -629,6 +655,7 @@ module Google
|
|
629
655
|
config_attr :metadata, nil, ::Hash, nil
|
630
656
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
631
657
|
config_attr :quota_project, nil, ::String, nil
|
658
|
+
config_attr :universe_domain, nil, ::String, nil
|
632
659
|
|
633
660
|
# @private
|
634
661
|
# 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 detect_intent REST call
|
46
58
|
#
|
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# {::Google::Cloud::Dialogflow::CX::V3::TestCaseResult Test Case Results}.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$"
|
38
|
+
|
36
39
|
include Paths
|
37
40
|
|
38
41
|
# @private
|
@@ -98,6 +101,15 @@ module Google
|
|
98
101
|
@config
|
99
102
|
end
|
100
103
|
|
104
|
+
##
|
105
|
+
# The effective universe domain
|
106
|
+
#
|
107
|
+
# @return [String]
|
108
|
+
#
|
109
|
+
def universe_domain
|
110
|
+
@test_cases_stub.universe_domain
|
111
|
+
end
|
112
|
+
|
101
113
|
##
|
102
114
|
# Create a new TestCases client object.
|
103
115
|
#
|
@@ -131,8 +143,9 @@ module Google
|
|
131
143
|
credentials = @config.credentials
|
132
144
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
133
145
|
# but only if the default endpoint does not have a region prefix.
|
134
|
-
enable_self_signed_jwt = @config.endpoint
|
135
|
-
|
146
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
147
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
148
|
+
!@config.endpoint.split(".").first.include?("-"))
|
136
149
|
credentials ||= Credentials.default scope: @config.scope,
|
137
150
|
enable_self_signed_jwt: enable_self_signed_jwt
|
138
151
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -145,18 +158,22 @@ module Google
|
|
145
158
|
config.credentials = credentials
|
146
159
|
config.quota_project = @quota_project_id
|
147
160
|
config.endpoint = @config.endpoint
|
161
|
+
config.universe_domain = @config.universe_domain
|
148
162
|
end
|
149
163
|
|
150
164
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
151
165
|
config.credentials = credentials
|
152
166
|
config.quota_project = @quota_project_id
|
153
167
|
config.endpoint = @config.endpoint
|
168
|
+
config.universe_domain = @config.universe_domain
|
154
169
|
end
|
155
170
|
|
156
171
|
@test_cases_stub = ::Gapic::ServiceStub.new(
|
157
172
|
::Google::Cloud::Dialogflow::CX::V3::TestCases::Stub,
|
158
|
-
credentials:
|
159
|
-
endpoint:
|
173
|
+
credentials: credentials,
|
174
|
+
endpoint: @config.endpoint,
|
175
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
176
|
+
universe_domain: @config.universe_domain,
|
160
177
|
channel_args: @config.channel_args,
|
161
178
|
interceptors: @config.interceptors,
|
162
179
|
channel_pool_config: @config.channel_pool
|
@@ -1424,9 +1441,9 @@ module Google
|
|
1424
1441
|
# end
|
1425
1442
|
#
|
1426
1443
|
# @!attribute [rw] endpoint
|
1427
|
-
#
|
1428
|
-
#
|
1429
|
-
# @return [::String]
|
1444
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
1445
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
1446
|
+
# @return [::String,nil]
|
1430
1447
|
# @!attribute [rw] credentials
|
1431
1448
|
# Credentials to send with calls. You may provide any of the following types:
|
1432
1449
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -1472,13 +1489,20 @@ module Google
|
|
1472
1489
|
# @!attribute [rw] quota_project
|
1473
1490
|
# A separate project against which to charge quota.
|
1474
1491
|
# @return [::String]
|
1492
|
+
# @!attribute [rw] universe_domain
|
1493
|
+
# The universe domain within which to make requests. This determines the
|
1494
|
+
# default endpoint URL. The default value of nil uses the environment
|
1495
|
+
# universe (usually the default "googleapis.com" universe).
|
1496
|
+
# @return [::String,nil]
|
1475
1497
|
#
|
1476
1498
|
class Configuration
|
1477
1499
|
extend ::Gapic::Config
|
1478
1500
|
|
1501
|
+
# @private
|
1502
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
1479
1503
|
DEFAULT_ENDPOINT = "dialogflow.googleapis.com"
|
1480
1504
|
|
1481
|
-
config_attr :endpoint,
|
1505
|
+
config_attr :endpoint, nil, ::String, nil
|
1482
1506
|
config_attr :credentials, nil do |value|
|
1483
1507
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1484
1508
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -1493,6 +1517,7 @@ module Google
|
|
1493
1517
|
config_attr :metadata, nil, ::Hash, nil
|
1494
1518
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1495
1519
|
config_attr :quota_project, nil, ::String, nil
|
1520
|
+
config_attr :universe_domain, nil, ::String, nil
|
1496
1521
|
|
1497
1522
|
# @private
|
1498
1523
|
def initialize parent_config = nil
|
@@ -27,6 +27,9 @@ module Google
|
|
27
27
|
module TestCases
|
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
|
@@ -35,6 +35,9 @@ module Google
|
|
35
35
|
# {::Google::Cloud::Dialogflow::CX::V3::TestCaseResult Test Case Results}.
|
36
36
|
#
|
37
37
|
class Client
|
38
|
+
# @private
|
39
|
+
DEFAULT_ENDPOINT_TEMPLATE = "dialogflow.$UNIVERSE_DOMAIN$"
|
40
|
+
|
38
41
|
include Paths
|
39
42
|
|
40
43
|
# @private
|
@@ -100,6 +103,15 @@ module Google
|
|
100
103
|
@config
|
101
104
|
end
|
102
105
|
|
106
|
+
##
|
107
|
+
# The effective universe domain
|
108
|
+
#
|
109
|
+
# @return [String]
|
110
|
+
#
|
111
|
+
def universe_domain
|
112
|
+
@test_cases_stub.universe_domain
|
113
|
+
end
|
114
|
+
|
103
115
|
##
|
104
116
|
# Create a new TestCases REST client object.
|
105
117
|
#
|
@@ -127,8 +139,9 @@ module Google
|
|
127
139
|
credentials = @config.credentials
|
128
140
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
129
141
|
# but only if the default endpoint does not have a region prefix.
|
130
|
-
enable_self_signed_jwt = @config.endpoint
|
131
|
-
|
142
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
143
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
144
|
+
!@config.endpoint.split(".").first.include?("-"))
|
132
145
|
credentials ||= Credentials.default scope: @config.scope,
|
133
146
|
enable_self_signed_jwt: enable_self_signed_jwt
|
134
147
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -142,16 +155,23 @@ module Google
|
|
142
155
|
config.credentials = credentials
|
143
156
|
config.quota_project = @quota_project_id
|
144
157
|
config.endpoint = @config.endpoint
|
158
|
+
config.universe_domain = @config.universe_domain
|
145
159
|
end
|
146
160
|
|
147
161
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
148
162
|
config.credentials = credentials
|
149
163
|
config.quota_project = @quota_project_id
|
150
164
|
config.endpoint = @config.endpoint
|
165
|
+
config.universe_domain = @config.universe_domain
|
151
166
|
config.bindings_override = @config.bindings_override
|
152
167
|
end
|
153
168
|
|
154
|
-
@test_cases_stub = ::Google::Cloud::Dialogflow::CX::V3::TestCases::Rest::ServiceStub.new
|
169
|
+
@test_cases_stub = ::Google::Cloud::Dialogflow::CX::V3::TestCases::Rest::ServiceStub.new(
|
170
|
+
endpoint: @config.endpoint,
|
171
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
172
|
+
universe_domain: @config.universe_domain,
|
173
|
+
credentials: credentials
|
174
|
+
)
|
155
175
|
end
|
156
176
|
|
157
177
|
##
|
@@ -1331,9 +1351,9 @@ module Google
|
|
1331
1351
|
# end
|
1332
1352
|
#
|
1333
1353
|
# @!attribute [rw] endpoint
|
1334
|
-
#
|
1335
|
-
#
|
1336
|
-
# @return [::String]
|
1354
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
1355
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
1356
|
+
# @return [::String,nil]
|
1337
1357
|
# @!attribute [rw] credentials
|
1338
1358
|
# Credentials to send with calls. You may provide any of the following types:
|
1339
1359
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -1370,13 +1390,20 @@ module Google
|
|
1370
1390
|
# @!attribute [rw] quota_project
|
1371
1391
|
# A separate project against which to charge quota.
|
1372
1392
|
# @return [::String]
|
1393
|
+
# @!attribute [rw] universe_domain
|
1394
|
+
# The universe domain within which to make requests. This determines the
|
1395
|
+
# default endpoint URL. The default value of nil uses the environment
|
1396
|
+
# universe (usually the default "googleapis.com" universe).
|
1397
|
+
# @return [::String,nil]
|
1373
1398
|
#
|
1374
1399
|
class Configuration
|
1375
1400
|
extend ::Gapic::Config
|
1376
1401
|
|
1402
|
+
# @private
|
1403
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
1377
1404
|
DEFAULT_ENDPOINT = "dialogflow.googleapis.com"
|
1378
1405
|
|
1379
|
-
config_attr :endpoint,
|
1406
|
+
config_attr :endpoint, nil, ::String, nil
|
1380
1407
|
config_attr :credentials, nil do |value|
|
1381
1408
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1382
1409
|
allowed.any? { |klass| klass === value }
|
@@ -1388,6 +1415,7 @@ module Google
|
|
1388
1415
|
config_attr :metadata, nil, ::Hash, nil
|
1389
1416
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1390
1417
|
config_attr :quota_project, nil, ::String, nil
|
1418
|
+
config_attr :universe_domain, nil, ::String, nil
|
1391
1419
|
|
1392
1420
|
# @private
|
1393
1421
|
# 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_test_cases REST call
|
46
58
|
#
|