google-cloud-dataqna-v1alpha 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3f6f0e58c39b0fb1eb1f3207b25c44139c718f78bfe171c468358dc8fd2e4f07
4
- data.tar.gz: 98f88ff1bef171a4faeb3557f9fe14ac3f5d652d8dc7674426f0febe38469c4a
3
+ metadata.gz: 6798ba0890695c7b3696d7534256b6aea5d27d439c9cfa77c0a1f25044cef2cf
4
+ data.tar.gz: c808c31f48cee6bcd66d131236c6e70a4fff805f23572ebacc1082dd8f030b05
5
5
  SHA512:
6
- metadata.gz: f2206a5f64d5035b1128838eef85c59358eb12aef420af09f7b6a8fa904ba8b3643d9adcc5a16584edd09d257c26fe22b7901f7105da0e5318303b6ba5f352f4
7
- data.tar.gz: da3b64548bcf359d9e10bdbc5fdfe8aaf6e64af5ce304c849e90fcdc6dffb33611988ca61cb47d97824397ee1234fcd86b572ca28becd1a33a0816fbd7abc82d
6
+ metadata.gz: cabd5f7b929c194c4413d929ac86728027363db1be7189db1b97e69afa8a8d2cff296f41973198c12e6a3a70d0eaadbf971c3c24a48c655ac9eebc0c56319f52
7
+ data.tar.gz: fde68b3e1efa21066b7183578ba9bd9da9da684be26ff232fabe3ff91b637768106cfd0f043d7a0f87c0d3eb95fefdc4f0dcd50634ab60c5846bf2347c5fb9c8
data/AUTHENTICATION.md CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
114
114
  To configure your system for this, simply:
115
115
 
116
116
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
117
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
117
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
118
118
  3. Write code as if already authenticated.
119
119
 
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the BigQuery Data QnA V1alpha API
2
2
 
3
- API Client library for the BigQuery Data QnA V1alpha API
3
+ Data QnA is a natural language question and answer service for BigQuery data.
4
4
 
5
5
  Data QnA is a natural language question and answer service for BigQuery data.
6
6
 
@@ -43,8 +43,8 @@ for class and method documentation.
43
43
  ## Enabling Logging
44
44
 
45
45
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
46
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
47
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
46
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
47
+ or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
48
48
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
49
49
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
50
50
 
@@ -1,30 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/dataqna/v1alpha/annotated_string.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/cloud/dataqna/v1alpha/annotated_string.proto", :syntax => :proto3) do
8
- add_message "google.cloud.dataqna.v1alpha.AnnotatedString" do
9
- optional :text_formatted, :string, 1
10
- optional :html_formatted, :string, 2
11
- repeated :markups, :message, 3, "google.cloud.dataqna.v1alpha.AnnotatedString.SemanticMarkup"
12
- end
13
- add_message "google.cloud.dataqna.v1alpha.AnnotatedString.SemanticMarkup" do
14
- optional :type, :enum, 1, "google.cloud.dataqna.v1alpha.AnnotatedString.SemanticMarkupType"
15
- optional :start_char_index, :int32, 2
16
- optional :length, :int32, 3
17
- end
18
- add_enum "google.cloud.dataqna.v1alpha.AnnotatedString.SemanticMarkupType" do
19
- value :MARKUP_TYPE_UNSPECIFIED, 0
20
- value :METRIC, 1
21
- value :DIMENSION, 2
22
- value :FILTER, 3
23
- value :UNUSED, 4
24
- value :BLOCKED, 5
25
- value :ROW, 6
7
+
8
+ descriptor_data = "\n3google/cloud/dataqna/v1alpha/annotated_string.proto\x12\x1cgoogle.cloud.dataqna.v1alpha\"\x99\x03\n\x0f\x41nnotatedString\x12\x16\n\x0etext_formatted\x18\x01 \x01(\t\x12\x16\n\x0ehtml_formatted\x18\x02 \x01(\t\x12M\n\x07markups\x18\x03 \x03(\x0b\x32<.google.cloud.dataqna.v1alpha.AnnotatedString.SemanticMarkup\x1a\x8a\x01\n\x0eSemanticMarkup\x12N\n\x04type\x18\x01 \x01(\x0e\x32@.google.cloud.dataqna.v1alpha.AnnotatedString.SemanticMarkupType\x12\x18\n\x10start_char_index\x18\x02 \x01(\x05\x12\x0e\n\x06length\x18\x03 \x01(\x05\"z\n\x12SemanticMarkupType\x12\x1b\n\x17MARKUP_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06METRIC\x10\x01\x12\r\n\tDIMENSION\x10\x02\x12\n\n\x06\x46ILTER\x10\x03\x12\n\n\x06UNUSED\x10\x04\x12\x0b\n\x07\x42LOCKED\x10\x05\x12\x07\n\x03ROW\x10\x06\x42\xd6\x01\n com.google.cloud.dataqna.v1alphaB\x14\x41nnotatedStringProtoP\x01Z:cloud.google.com/go/dataqna/apiv1alpha/dataqnapb;dataqnapb\xaa\x02\x1cGoogle.Cloud.DataQnA.V1Alpha\xca\x02\x1cGoogle\\Cloud\\DataQnA\\V1alpha\xea\x02\x1fGoogle::Cloud::DataQnA::V1alphab\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
26
28
  end
27
29
  end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
28
32
  end
29
33
 
30
34
  module Google
@@ -190,7 +190,7 @@ module Google
190
190
  credentials = @config.credentials
191
191
  # Use self-signed JWT if the endpoint is unchanged from default,
192
192
  # but only if the default endpoint does not have a region prefix.
193
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
193
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
194
194
  !@config.endpoint.split(".").first.include?("-")
195
195
  credentials ||= Credentials.default scope: @config.scope,
196
196
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -351,9 +351,9 @@ module Google
351
351
  # * (`String`) The path to a service account key file in JSON format
352
352
  # * (`Hash`) A service account key as a Hash
353
353
  # * (`Google::Auth::Credentials`) A googleauth credentials object
354
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
354
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
355
355
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
356
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
356
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
357
357
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
358
358
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
359
359
  # * (`nil`) indicating no credentials
@@ -395,7 +395,9 @@ module Google
395
395
  class Configuration
396
396
  extend ::Gapic::Config
397
397
 
398
- config_attr :endpoint, "dataqna.googleapis.com", ::String
398
+ DEFAULT_ENDPOINT = "dataqna.googleapis.com"
399
+
400
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
399
401
  config_attr :credentials, nil do |value|
400
402
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
401
403
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -98,7 +98,7 @@ module Google
98
98
  # }
99
99
  # ```
100
100
  #
101
- # To load this service and instantiate a client:
101
+ # @example Load this service and instantiate a gRPC client
102
102
  #
103
103
  # require "google/cloud/dataqna/v1alpha/auto_suggestion_service"
104
104
  # client = ::Google::Cloud::DataQnA::V1alpha::AutoSuggestionService::Client.new
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/dataqna/v1alpha/auto_suggestion_service.proto
3
4
 
@@ -9,36 +10,32 @@ require 'google/api/resource_pb'
9
10
  require 'google/cloud/dataqna/v1alpha/annotated_string_pb'
10
11
  require 'google/api/client_pb'
11
12
 
12
- Google::Protobuf::DescriptorPool.generated_pool.build do
13
- add_file("google/cloud/dataqna/v1alpha/auto_suggestion_service.proto", :syntax => :proto3) do
14
- add_message "google.cloud.dataqna.v1alpha.SuggestQueriesRequest" do
15
- optional :parent, :string, 1
16
- repeated :scopes, :string, 2
17
- optional :query, :string, 3
18
- repeated :suggestion_types, :enum, 4, "google.cloud.dataqna.v1alpha.SuggestionType"
19
- end
20
- add_message "google.cloud.dataqna.v1alpha.Suggestion" do
21
- optional :suggestion_info, :message, 1, "google.cloud.dataqna.v1alpha.SuggestionInfo"
22
- optional :ranking_score, :double, 2
23
- optional :suggestion_type, :enum, 3, "google.cloud.dataqna.v1alpha.SuggestionType"
24
- end
25
- add_message "google.cloud.dataqna.v1alpha.SuggestionInfo" do
26
- optional :annotated_suggestion, :message, 1, "google.cloud.dataqna.v1alpha.AnnotatedString"
27
- repeated :query_matches, :message, 2, "google.cloud.dataqna.v1alpha.SuggestionInfo.MatchInfo"
28
- end
29
- add_message "google.cloud.dataqna.v1alpha.SuggestionInfo.MatchInfo" do
30
- optional :start_char_index, :int32, 1
31
- optional :length, :int32, 2
32
- end
33
- add_message "google.cloud.dataqna.v1alpha.SuggestQueriesResponse" do
34
- repeated :suggestions, :message, 1, "google.cloud.dataqna.v1alpha.Suggestion"
35
- end
36
- add_enum "google.cloud.dataqna.v1alpha.SuggestionType" do
37
- value :SUGGESTION_TYPE_UNSPECIFIED, 0
38
- value :ENTITY, 1
39
- value :TEMPLATE, 2
13
+
14
+ descriptor_data = "\n:google/cloud/dataqna/v1alpha/auto_suggestion_service.proto\x12\x1cgoogle.cloud.dataqna.v1alpha\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/dataqna/v1alpha/annotated_string.proto\x1a\x17google/api/client.proto\"\xb9\x01\n\x15SuggestQueriesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06scopes\x18\x02 \x03(\t\x12\r\n\x05query\x18\x03 \x01(\t\x12\x46\n\x10suggestion_types\x18\x04 \x03(\x0e\x32,.google.cloud.dataqna.v1alpha.SuggestionType\"\xb1\x01\n\nSuggestion\x12\x45\n\x0fsuggestion_info\x18\x01 \x01(\x0b\x32,.google.cloud.dataqna.v1alpha.SuggestionInfo\x12\x15\n\rranking_score\x18\x02 \x01(\x01\x12\x45\n\x0fsuggestion_type\x18\x03 \x01(\x0e\x32,.google.cloud.dataqna.v1alpha.SuggestionType\"\xe3\x01\n\x0eSuggestionInfo\x12K\n\x14\x61nnotated_suggestion\x18\x01 \x01(\x0b\x32-.google.cloud.dataqna.v1alpha.AnnotatedString\x12M\n\rquery_matches\x18\x02 \x03(\x0b\x32\x36.google.cloud.dataqna.v1alpha.SuggestionInfo.MatchInfo\x1a\x35\n\tMatchInfo\x12\x18\n\x10start_char_index\x18\x01 \x01(\x05\x12\x0e\n\x06length\x18\x02 \x01(\x05\"W\n\x16SuggestQueriesResponse\x12=\n\x0bsuggestions\x18\x01 \x03(\x0b\x32(.google.cloud.dataqna.v1alpha.Suggestion*K\n\x0eSuggestionType\x12\x1f\n\x1bSUGGESTION_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06\x45NTITY\x10\x01\x12\x0c\n\x08TEMPLATE\x10\x02\x32\xa5\x02\n\x15\x41utoSuggestionService\x12\xbf\x01\n\x0eSuggestQueries\x12\x33.google.cloud.dataqna.v1alpha.SuggestQueriesRequest\x1a\x34.google.cloud.dataqna.v1alpha.SuggestQueriesResponse\"B\x82\xd3\xe4\x93\x02<\"7/v1alpha/{parent=projects/*/locations/*}:suggestQueries:\x01*\x1aJ\xca\x41\x16\x64\x61taqna.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xdc\x01\n com.google.cloud.dataqna.v1alphaB\x1a\x41utoSuggestionServiceProtoP\x01Z:cloud.google.com/go/dataqna/apiv1alpha/dataqnapb;dataqnapb\xaa\x02\x1cGoogle.Cloud.DataQnA.V1Alpha\xca\x02\x1cGoogle\\Cloud\\DataQnA\\V1alpha\xea\x02\x1fGoogle::Cloud::DataQnA::V1alphab\x06proto3"
15
+
16
+ pool = Google::Protobuf::DescriptorPool.generated_pool
17
+
18
+ begin
19
+ pool.add_serialized_file(descriptor_data)
20
+ rescue TypeError => e
21
+ # Compatibility code: will be removed in the next major version.
22
+ require 'google/protobuf/descriptor_pb'
23
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
24
+ parsed.clear_dependency
25
+ serialized = parsed.class.encode(parsed)
26
+ file = pool.add_serialized_file(serialized)
27
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
28
+ imports = [
29
+ ["google.cloud.dataqna.v1alpha.AnnotatedString", "google/cloud/dataqna/v1alpha/annotated_string.proto"],
30
+ ]
31
+ imports.each do |type_name, expected_filename|
32
+ import_file = pool.lookup(type_name).file_descriptor
33
+ if import_file.name != expected_filename
34
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
40
35
  end
41
36
  end
37
+ warn "Each proto file must use a consistent fully-qualified name."
38
+ warn "This will become an error in the next major version."
42
39
  end
43
40
 
44
41
  module Google
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/dataqna/v1alpha/question.proto
3
4
 
@@ -10,122 +11,35 @@ require 'google/protobuf/any_pb'
10
11
  require 'google/protobuf/timestamp_pb'
11
12
  require 'google/rpc/status_pb'
12
13
 
13
- Google::Protobuf::DescriptorPool.generated_pool.build do
14
- add_file("google/cloud/dataqna/v1alpha/question.proto", :syntax => :proto3) do
15
- add_message "google.cloud.dataqna.v1alpha.Question" do
16
- optional :name, :string, 1
17
- repeated :scopes, :string, 2
18
- optional :query, :string, 3
19
- repeated :data_source_annotations, :string, 4
20
- optional :interpret_error, :message, 5, "google.cloud.dataqna.v1alpha.InterpretError"
21
- repeated :interpretations, :message, 6, "google.cloud.dataqna.v1alpha.Interpretation"
22
- optional :create_time, :message, 7, "google.protobuf.Timestamp"
23
- optional :user_email, :string, 8
24
- optional :debug_flags, :message, 9, "google.cloud.dataqna.v1alpha.DebugFlags"
25
- optional :debug_info, :message, 10, "google.protobuf.Any"
26
- end
27
- add_message "google.cloud.dataqna.v1alpha.InterpretError" do
28
- optional :message, :string, 1
29
- optional :code, :enum, 2, "google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorCode"
30
- optional :details, :message, 3, "google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorDetails"
31
- end
32
- add_message "google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorDetails" do
33
- optional :unsupported_details, :message, 1, "google.cloud.dataqna.v1alpha.InterpretError.InterpretUnsupportedDetails"
34
- optional :incomplete_query_details, :message, 2, "google.cloud.dataqna.v1alpha.InterpretError.InterpretIncompleteQueryDetails"
35
- optional :ambiguity_details, :message, 3, "google.cloud.dataqna.v1alpha.InterpretError.InterpretAmbiguityDetails"
36
- end
37
- add_message "google.cloud.dataqna.v1alpha.InterpretError.InterpretUnsupportedDetails" do
38
- repeated :operators, :string, 1
39
- repeated :intent, :string, 2
40
- end
41
- add_message "google.cloud.dataqna.v1alpha.InterpretError.InterpretIncompleteQueryDetails" do
42
- repeated :entities, :enum, 1, "google.cloud.dataqna.v1alpha.InterpretEntity"
43
- end
44
- add_message "google.cloud.dataqna.v1alpha.InterpretError.InterpretAmbiguityDetails" do
45
- end
46
- add_enum "google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorCode" do
47
- value :INTERPRET_ERROR_CODE_UNSPECIFIED, 0
48
- value :INVALID_QUERY, 1
49
- value :FAILED_TO_UNDERSTAND, 2
50
- value :FAILED_TO_ANSWER, 3
51
- end
52
- add_message "google.cloud.dataqna.v1alpha.ExecutionInfo" do
53
- optional :job_creation_status, :message, 1, "google.rpc.Status"
54
- optional :job_execution_state, :enum, 2, "google.cloud.dataqna.v1alpha.ExecutionInfo.JobExecutionState"
55
- optional :create_time, :message, 3, "google.protobuf.Timestamp"
56
- optional :bigquery_job, :message, 4, "google.cloud.dataqna.v1alpha.BigQueryJob"
57
- end
58
- add_enum "google.cloud.dataqna.v1alpha.ExecutionInfo.JobExecutionState" do
59
- value :JOB_EXECUTION_STATE_UNSPECIFIED, 0
60
- value :NOT_EXECUTED, 1
61
- value :RUNNING, 2
62
- value :SUCCEEDED, 3
63
- value :FAILED, 4
64
- end
65
- add_message "google.cloud.dataqna.v1alpha.BigQueryJob" do
66
- optional :job_id, :string, 1
67
- optional :project_id, :string, 2
68
- optional :location, :string, 3
69
- end
70
- add_message "google.cloud.dataqna.v1alpha.Interpretation" do
71
- repeated :data_sources, :string, 1
72
- optional :confidence, :double, 2
73
- repeated :unused_phrases, :string, 3
74
- optional :human_readable, :message, 4, "google.cloud.dataqna.v1alpha.HumanReadable"
75
- optional :interpretation_structure, :message, 5, "google.cloud.dataqna.v1alpha.InterpretationStructure"
76
- optional :data_query, :message, 6, "google.cloud.dataqna.v1alpha.DataQuery"
77
- optional :execution_info, :message, 7, "google.cloud.dataqna.v1alpha.ExecutionInfo"
78
- end
79
- add_message "google.cloud.dataqna.v1alpha.DataQuery" do
80
- optional :sql, :string, 1
81
- end
82
- add_message "google.cloud.dataqna.v1alpha.HumanReadable" do
83
- optional :generated_interpretation, :message, 1, "google.cloud.dataqna.v1alpha.AnnotatedString"
84
- optional :original_question, :message, 2, "google.cloud.dataqna.v1alpha.AnnotatedString"
85
- end
86
- add_message "google.cloud.dataqna.v1alpha.InterpretationStructure" do
87
- repeated :visualization_types, :enum, 1, "google.cloud.dataqna.v1alpha.InterpretationStructure.VisualizationType"
88
- repeated :column_info, :message, 2, "google.cloud.dataqna.v1alpha.InterpretationStructure.ColumnInfo"
89
- end
90
- add_message "google.cloud.dataqna.v1alpha.InterpretationStructure.ColumnInfo" do
91
- optional :output_alias, :string, 1
92
- optional :display_name, :string, 2
93
- end
94
- add_enum "google.cloud.dataqna.v1alpha.InterpretationStructure.VisualizationType" do
95
- value :VISUALIZATION_TYPE_UNSPECIFIED, 0
96
- value :TABLE, 1
97
- value :BAR_CHART, 2
98
- value :COLUMN_CHART, 3
99
- value :TIMELINE, 4
100
- value :SCATTER_PLOT, 5
101
- value :PIE_CHART, 6
102
- value :LINE_CHART, 7
103
- value :AREA_CHART, 8
104
- value :COMBO_CHART, 9
105
- value :HISTOGRAM, 10
106
- value :GENERIC_CHART, 11
107
- value :CHART_NOT_UNDERSTOOD, 12
108
- end
109
- add_message "google.cloud.dataqna.v1alpha.DebugFlags" do
110
- optional :include_va_query, :bool, 1
111
- optional :include_nested_va_query, :bool, 2
112
- optional :include_human_interpretation, :bool, 3
113
- optional :include_aqua_debug_response, :bool, 4
114
- optional :time_override, :int64, 5
115
- optional :is_internal_google_user, :bool, 6
116
- optional :ignore_cache, :bool, 7
117
- optional :include_search_entities_rpc, :bool, 8
118
- optional :include_list_column_annotations_rpc, :bool, 9
119
- optional :include_virtual_analyst_entities, :bool, 10
120
- optional :include_table_list, :bool, 11
121
- optional :include_domain_list, :bool, 12
122
- end
123
- add_enum "google.cloud.dataqna.v1alpha.InterpretEntity" do
124
- value :INTERPRET_ENTITY_UNSPECIFIED, 0
125
- value :DIMENSION, 1
126
- value :METRIC, 2
14
+
15
+ descriptor_data = "\n+google/cloud/dataqna/v1alpha/question.proto\x12\x1cgoogle.cloud.dataqna.v1alpha\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/dataqna/v1alpha/annotated_string.proto\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x9d\x04\n\x08Question\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x16\n\x06scopes\x18\x02 \x03(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x15\n\x05query\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1f\n\x17\x64\x61ta_source_annotations\x18\x04 \x03(\t\x12\x45\n\x0finterpret_error\x18\x05 \x01(\x0b\x32,.google.cloud.dataqna.v1alpha.InterpretError\x12\x45\n\x0finterpretations\x18\x06 \x03(\x0b\x32,.google.cloud.dataqna.v1alpha.Interpretation\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\nuser_email\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x0b\x64\x65\x62ug_flags\x18\t \x01(\x0b\x32(.google.cloud.dataqna.v1alpha.DebugFlagsB\x06\xe0\x41\x05\xe0\x41\x04\x12(\n\ndebug_info\x18\n \x01(\x0b\x32\x14.google.protobuf.Any:b\xea\x41_\n\x1f\x64\x61taqna.googleapis.com/Question\x12<projects/{project}/locations/{location}/questions/{question}\"\xdb\x06\n\x0eInterpretError\x12\x0f\n\x07message\x18\x01 \x01(\t\x12M\n\x04\x63ode\x18\x02 \x01(\x0e\x32?.google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorCode\x12S\n\x07\x64\x65tails\x18\x03 \x01(\x0b\x32\x42.google.cloud.dataqna.v1alpha.InterpretError.InterpretErrorDetails\x1a\xd1\x02\n\x15InterpretErrorDetails\x12\x65\n\x13unsupported_details\x18\x01 \x01(\x0b\x32H.google.cloud.dataqna.v1alpha.InterpretError.InterpretUnsupportedDetails\x12n\n\x18incomplete_query_details\x18\x02 \x01(\x0b\x32L.google.cloud.dataqna.v1alpha.InterpretError.InterpretIncompleteQueryDetails\x12\x61\n\x11\x61mbiguity_details\x18\x03 \x01(\x0b\x32\x46.google.cloud.dataqna.v1alpha.InterpretError.InterpretAmbiguityDetails\x1a@\n\x1bInterpretUnsupportedDetails\x12\x11\n\toperators\x18\x01 \x03(\t\x12\x0e\n\x06intent\x18\x02 \x03(\t\x1a\x62\n\x1fInterpretIncompleteQueryDetails\x12?\n\x08\x65ntities\x18\x01 \x03(\x0e\x32-.google.cloud.dataqna.v1alpha.InterpretEntity\x1a\x1b\n\x19InterpretAmbiguityDetails\"}\n\x12InterpretErrorCode\x12$\n INTERPRET_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x11\n\rINVALID_QUERY\x10\x01\x12\x18\n\x14\x46\x41ILED_TO_UNDERSTAND\x10\x02\x12\x14\n\x10\x46\x41ILED_TO_ANSWER\x10\x03\"\x82\x03\n\rExecutionInfo\x12/\n\x13job_creation_status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12Z\n\x13job_execution_state\x18\x02 \x01(\x0e\x32=.google.cloud.dataqna.v1alpha.ExecutionInfo.JobExecutionState\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12?\n\x0c\x62igquery_job\x18\x04 \x01(\x0b\x32).google.cloud.dataqna.v1alpha.BigQueryJob\"r\n\x11JobExecutionState\x12#\n\x1fJOB_EXECUTION_STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_EXECUTED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\"C\n\x0b\x42igQueryJob\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x10\n\x08location\x18\x03 \x01(\t\"\xf2\x02\n\x0eInterpretation\x12\x14\n\x0c\x64\x61ta_sources\x18\x01 \x03(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x01\x12\x16\n\x0eunused_phrases\x18\x03 \x03(\t\x12\x43\n\x0ehuman_readable\x18\x04 \x01(\x0b\x32+.google.cloud.dataqna.v1alpha.HumanReadable\x12W\n\x18interpretation_structure\x18\x05 \x01(\x0b\x32\x35.google.cloud.dataqna.v1alpha.InterpretationStructure\x12;\n\ndata_query\x18\x06 \x01(\x0b\x32\'.google.cloud.dataqna.v1alpha.DataQuery\x12\x43\n\x0e\x65xecution_info\x18\x07 \x01(\x0b\x32+.google.cloud.dataqna.v1alpha.ExecutionInfo\"\x18\n\tDataQuery\x12\x0b\n\x03sql\x18\x01 \x01(\t\"\xaa\x01\n\rHumanReadable\x12O\n\x18generated_interpretation\x18\x01 \x01(\x0b\x32-.google.cloud.dataqna.v1alpha.AnnotatedString\x12H\n\x11original_question\x18\x02 \x01(\x0b\x32-.google.cloud.dataqna.v1alpha.AnnotatedString\"\x92\x04\n\x17InterpretationStructure\x12\x64\n\x13visualization_types\x18\x01 \x03(\x0e\x32G.google.cloud.dataqna.v1alpha.InterpretationStructure.VisualizationType\x12U\n\x0b\x63olumn_info\x18\x02 \x03(\x0b\x32@.google.cloud.dataqna.v1alpha.InterpretationStructure.ColumnInfo\x1a\x38\n\nColumnInfo\x12\x14\n\x0coutput_alias\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"\xff\x01\n\x11VisualizationType\x12\"\n\x1eVISUALIZATION_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TABLE\x10\x01\x12\r\n\tBAR_CHART\x10\x02\x12\x10\n\x0c\x43OLUMN_CHART\x10\x03\x12\x0c\n\x08TIMELINE\x10\x04\x12\x10\n\x0cSCATTER_PLOT\x10\x05\x12\r\n\tPIE_CHART\x10\x06\x12\x0e\n\nLINE_CHART\x10\x07\x12\x0e\n\nAREA_CHART\x10\x08\x12\x0f\n\x0b\x43OMBO_CHART\x10\t\x12\r\n\tHISTOGRAM\x10\n\x12\x11\n\rGENERIC_CHART\x10\x0b\x12\x18\n\x14\x43HART_NOT_UNDERSTOOD\x10\x0c\"\x95\x03\n\nDebugFlags\x12\x18\n\x10include_va_query\x18\x01 \x01(\x08\x12\x1f\n\x17include_nested_va_query\x18\x02 \x01(\x08\x12$\n\x1cinclude_human_interpretation\x18\x03 \x01(\x08\x12#\n\x1binclude_aqua_debug_response\x18\x04 \x01(\x08\x12\x15\n\rtime_override\x18\x05 \x01(\x03\x12\x1f\n\x17is_internal_google_user\x18\x06 \x01(\x08\x12\x14\n\x0cignore_cache\x18\x07 \x01(\x08\x12#\n\x1binclude_search_entities_rpc\x18\x08 \x01(\x08\x12+\n#include_list_column_annotations_rpc\x18\t \x01(\x08\x12(\n include_virtual_analyst_entities\x18\n \x01(\x08\x12\x1a\n\x12include_table_list\x18\x0b \x01(\x08\x12\x1b\n\x13include_domain_list\x18\x0c \x01(\x08*N\n\x0fInterpretEntity\x12 \n\x1cINTERPRET_ENTITY_UNSPECIFIED\x10\x00\x12\r\n\tDIMENSION\x10\x01\x12\n\n\x06METRIC\x10\x02\x42\xcf\x01\n com.google.cloud.dataqna.v1alphaB\rQuestionProtoP\x01Z:cloud.google.com/go/dataqna/apiv1alpha/dataqnapb;dataqnapb\xaa\x02\x1cGoogle.Cloud.DataQnA.V1Alpha\xca\x02\x1cGoogle\\Cloud\\DataQnA\\V1alpha\xea\x02\x1fGoogle::Cloud::DataQnA::V1alphab\x06proto3"
16
+
17
+ pool = Google::Protobuf::DescriptorPool.generated_pool
18
+
19
+ begin
20
+ pool.add_serialized_file(descriptor_data)
21
+ rescue TypeError => e
22
+ # Compatibility code: will be removed in the next major version.
23
+ require 'google/protobuf/descriptor_pb'
24
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
25
+ parsed.clear_dependency
26
+ serialized = parsed.class.encode(parsed)
27
+ file = pool.add_serialized_file(serialized)
28
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
29
+ imports = [
30
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
31
+ ["google.protobuf.Any", "google/protobuf/any.proto"],
32
+ ["google.rpc.Status", "google/rpc/status.proto"],
33
+ ["google.cloud.dataqna.v1alpha.AnnotatedString", "google/cloud/dataqna/v1alpha/annotated_string.proto"],
34
+ ]
35
+ imports.each do |type_name, expected_filename|
36
+ import_file = pool.lookup(type_name).file_descriptor
37
+ if import_file.name != expected_filename
38
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
127
39
  end
128
40
  end
41
+ warn "Each proto file must use a consistent fully-qualified name."
42
+ warn "This will become an error in the next major version."
129
43
  end
130
44
 
131
45
  module Google
@@ -148,7 +148,7 @@ module Google
148
148
  credentials = @config.credentials
149
149
  # Use self-signed JWT if the endpoint is unchanged from default,
150
150
  # but only if the default endpoint does not have a region prefix.
151
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
151
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
152
152
  !@config.endpoint.split(".").first.include?("-")
153
153
  credentials ||= Credentials.default scope: @config.scope,
154
154
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -649,9 +649,9 @@ module Google
649
649
  # * (`String`) The path to a service account key file in JSON format
650
650
  # * (`Hash`) A service account key as a Hash
651
651
  # * (`Google::Auth::Credentials`) A googleauth credentials object
652
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
652
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
653
653
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
654
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
654
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
655
655
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
656
656
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
657
657
  # * (`nil`) indicating no credentials
@@ -693,7 +693,9 @@ module Google
693
693
  class Configuration
694
694
  extend ::Gapic::Config
695
695
 
696
- config_attr :endpoint, "dataqna.googleapis.com", ::String
696
+ DEFAULT_ENDPOINT = "dataqna.googleapis.com"
697
+
698
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
697
699
  config_attr :credentials, nil do |value|
698
700
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
699
701
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -47,7 +47,7 @@ module Google
47
47
  # `projects/*/locations/*/questions/*/userFeedback`, which allows access to
48
48
  # user feedback.
49
49
  #
50
- # To load this service and instantiate a client:
50
+ # @example Load this service and instantiate a gRPC client
51
51
  #
52
52
  # require "google/cloud/dataqna/v1alpha/question_service"
53
53
  # client = ::Google::Cloud::DataQnA::V1alpha::QuestionService::Client.new
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/dataqna/v1alpha/question_service.proto
3
4
 
@@ -11,28 +12,34 @@ require 'google/cloud/dataqna/v1alpha/question_pb'
11
12
  require 'google/cloud/dataqna/v1alpha/user_feedback_pb'
12
13
  require 'google/protobuf/field_mask_pb'
13
14
 
14
- Google::Protobuf::DescriptorPool.generated_pool.build do
15
- add_file("google/cloud/dataqna/v1alpha/question_service.proto", :syntax => :proto3) do
16
- add_message "google.cloud.dataqna.v1alpha.GetQuestionRequest" do
17
- optional :name, :string, 1
18
- optional :read_mask, :message, 2, "google.protobuf.FieldMask"
19
- end
20
- add_message "google.cloud.dataqna.v1alpha.CreateQuestionRequest" do
21
- optional :parent, :string, 1
22
- optional :question, :message, 2, "google.cloud.dataqna.v1alpha.Question"
23
- end
24
- add_message "google.cloud.dataqna.v1alpha.ExecuteQuestionRequest" do
25
- optional :name, :string, 1
26
- optional :interpretation_index, :int32, 2
27
- end
28
- add_message "google.cloud.dataqna.v1alpha.GetUserFeedbackRequest" do
29
- optional :name, :string, 1
30
- end
31
- add_message "google.cloud.dataqna.v1alpha.UpdateUserFeedbackRequest" do
32
- optional :user_feedback, :message, 1, "google.cloud.dataqna.v1alpha.UserFeedback"
33
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
15
+
16
+ descriptor_data = "\n3google/cloud/dataqna/v1alpha/question_service.proto\x12\x1cgoogle.cloud.dataqna.v1alpha\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a+google/cloud/dataqna/v1alpha/question.proto\x1a\x30google/cloud/dataqna/v1alpha/user_feedback.proto\x1a google/protobuf/field_mask.proto\"z\n\x12GetQuestionRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x64\x61taqna.googleapis.com/Question\x12-\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x91\x01\n\x15\x43reateQuestionRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12=\n\x08question\x18\x02 \x01(\x0b\x32&.google.cloud.dataqna.v1alpha.QuestionB\x03\xe0\x41\x02\"N\n\x16\x45xecuteQuestionRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14interpretation_index\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"S\n\x16GetUserFeedbackRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#dataqna.googleapis.com/UserFeedback\"\x94\x01\n\x19UpdateUserFeedbackRequest\x12\x46\n\ruser_feedback\x18\x01 \x01(\x0b\x32*.google.cloud.dataqna.v1alpha.UserFeedbackB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask2\xec\x08\n\x0fQuestionService\x12\xaa\x01\n\x0bGetQuestion\x12\x30.google.cloud.dataqna.v1alpha.GetQuestionRequest\x1a&.google.cloud.dataqna.v1alpha.Question\"A\x82\xd3\xe4\x93\x02\x34\x12\x32/v1alpha/{name=projects/*/locations/*/questions/*}\xda\x41\x04name\x12\xc5\x01\n\x0e\x43reateQuestion\x12\x33.google.cloud.dataqna.v1alpha.CreateQuestionRequest\x1a&.google.cloud.dataqna.v1alpha.Question\"V\x82\xd3\xe4\x93\x02>\"2/v1alpha/{parent=projects/*/locations/*}/questions:\x08question\xda\x41\x0fparent,question\x12\xd2\x01\n\x0f\x45xecuteQuestion\x12\x34.google.cloud.dataqna.v1alpha.ExecuteQuestionRequest\x1a&.google.cloud.dataqna.v1alpha.Question\"a\x82\xd3\xe4\x93\x02?\":/v1alpha/{name=projects/*/locations/*/questions/*}:execute:\x01*\xda\x41\x19name,interpretation_index\x12\xc3\x01\n\x0fGetUserFeedback\x12\x34.google.cloud.dataqna.v1alpha.GetUserFeedbackRequest\x1a*.google.cloud.dataqna.v1alpha.UserFeedback\"N\x82\xd3\xe4\x93\x02\x41\x12?/v1alpha/{name=projects/*/locations/*/questions/*/userFeedback}\xda\x41\x04name\x12\xfc\x01\n\x12UpdateUserFeedback\x12\x37.google.cloud.dataqna.v1alpha.UpdateUserFeedbackRequest\x1a*.google.cloud.dataqna.v1alpha.UserFeedback\"\x80\x01\x82\xd3\xe4\x93\x02^2M/v1alpha/{user_feedback.name=projects/*/locations/*/questions/*/userFeedback}:\ruser_feedback\xda\x41\x19user_feedback,update_mask\x1aJ\xca\x41\x16\x64\x61taqna.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd6\x01\n com.google.cloud.dataqna.v1alphaB\x14QuestionServiceProtoP\x01Z:cloud.google.com/go/dataqna/apiv1alpha/dataqnapb;dataqnapb\xaa\x02\x1cGoogle.Cloud.DataQnA.V1Alpha\xca\x02\x1cGoogle\\Cloud\\DataQnA\\V1alpha\xea\x02\x1fGoogle::Cloud::DataQnA::V1alphab\x06proto3"
17
+
18
+ pool = Google::Protobuf::DescriptorPool.generated_pool
19
+
20
+ begin
21
+ pool.add_serialized_file(descriptor_data)
22
+ rescue TypeError => e
23
+ # Compatibility code: will be removed in the next major version.
24
+ require 'google/protobuf/descriptor_pb'
25
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
26
+ parsed.clear_dependency
27
+ serialized = parsed.class.encode(parsed)
28
+ file = pool.add_serialized_file(serialized)
29
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
30
+ imports = [
31
+ ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
32
+ ["google.cloud.dataqna.v1alpha.Question", "google/cloud/dataqna/v1alpha/question.proto"],
33
+ ["google.cloud.dataqna.v1alpha.UserFeedback", "google/cloud/dataqna/v1alpha/user_feedback.proto"],
34
+ ]
35
+ imports.each do |type_name, expected_filename|
36
+ import_file = pool.lookup(type_name).file_descriptor
37
+ if import_file.name != expected_filename
38
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
34
39
  end
35
40
  end
41
+ warn "Each proto file must use a consistent fully-qualified name."
42
+ warn "This will become an error in the next major version."
36
43
  end
37
44
 
38
45
  module Google
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/cloud/dataqna/v1alpha/user_feedback.proto
3
4
 
@@ -6,19 +7,31 @@ require 'google/protobuf'
6
7
  require 'google/api/field_behavior_pb'
7
8
  require 'google/api/resource_pb'
8
9
 
9
- Google::Protobuf::DescriptorPool.generated_pool.build do
10
- add_file("google/cloud/dataqna/v1alpha/user_feedback.proto", :syntax => :proto3) do
11
- add_message "google.cloud.dataqna.v1alpha.UserFeedback" do
12
- optional :name, :string, 1
13
- optional :free_form_feedback, :string, 2
14
- optional :rating, :enum, 3, "google.cloud.dataqna.v1alpha.UserFeedback.UserFeedbackRating"
15
- end
16
- add_enum "google.cloud.dataqna.v1alpha.UserFeedback.UserFeedbackRating" do
17
- value :USER_FEEDBACK_RATING_UNSPECIFIED, 0
18
- value :POSITIVE, 1
19
- value :NEGATIVE, 2
10
+
11
+ descriptor_data = "\n0google/cloud/dataqna/v1alpha/user_feedback.proto\x12\x1cgoogle.cloud.dataqna.v1alpha\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xd9\x02\n\x0cUserFeedback\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\x12\x66ree_form_feedback\x18\x02 \x01(\t\x12M\n\x06rating\x18\x03 \x01(\x0e\x32=.google.cloud.dataqna.v1alpha.UserFeedback.UserFeedbackRating\"V\n\x12UserFeedbackRating\x12$\n USER_FEEDBACK_RATING_UNSPECIFIED\x10\x00\x12\x0c\n\x08POSITIVE\x10\x01\x12\x0c\n\x08NEGATIVE\x10\x02:s\xea\x41p\n#dataqna.googleapis.com/UserFeedback\x12Iprojects/{project}/locations/{location}/questions/{question}/userFeedbackB\xd3\x01\n com.google.cloud.dataqna.v1alphaB\x11UserFeedbackProtoP\x01Z:cloud.google.com/go/dataqna/apiv1alpha/dataqnapb;dataqnapb\xaa\x02\x1cGoogle.Cloud.DataQnA.V1Alpha\xca\x02\x1cGoogle\\Cloud\\DataQnA\\V1alpha\xea\x02\x1fGoogle::Cloud::DataQnA::V1alphab\x06proto3"
12
+
13
+ pool = Google::Protobuf::DescriptorPool.generated_pool
14
+
15
+ begin
16
+ pool.add_serialized_file(descriptor_data)
17
+ rescue TypeError => e
18
+ # Compatibility code: will be removed in the next major version.
19
+ require 'google/protobuf/descriptor_pb'
20
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
21
+ parsed.clear_dependency
22
+ serialized = parsed.class.encode(parsed)
23
+ file = pool.add_serialized_file(serialized)
24
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
25
+ imports = [
26
+ ]
27
+ imports.each do |type_name, expected_filename|
28
+ import_file = pool.lookup(type_name).file_descriptor
29
+ if import_file.name != expected_filename
30
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
20
31
  end
21
32
  end
33
+ warn "Each proto file must use a consistent fully-qualified name."
34
+ warn "This will become an error in the next major version."
22
35
  end
23
36
 
24
37
  module Google
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module DataQnA
23
23
  module V1alpha
24
- VERSION = "0.3.0"
24
+ VERSION = "0.4.0"
25
25
  end
26
26
  end
27
27
  end
@@ -24,9 +24,9 @@ module Google
24
24
  module Cloud
25
25
  module DataQnA
26
26
  ##
27
- # To load this package, including all its services, and instantiate a client:
27
+ # API client module.
28
28
  #
29
- # @example
29
+ # @example Load this package, including all its services, and instantiate a gRPC client
30
30
  #
31
31
  # require "google/cloud/dataqna/v1alpha"
32
32
  # client = ::Google::Cloud::DataQnA::V1alpha::AutoSuggestionService::Client.new
@@ -0,0 +1,381 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Api
22
+ # Required information for every language.
23
+ # @!attribute [rw] reference_docs_uri
24
+ # @return [::String]
25
+ # Link to automatically generated reference documentation. Example:
26
+ # https://cloud.google.com/nodejs/docs/reference/asset/latest
27
+ # @!attribute [rw] destinations
28
+ # @return [::Array<::Google::Api::ClientLibraryDestination>]
29
+ # The destination where API teams want this client library to be published.
30
+ class CommonLanguageSettings
31
+ include ::Google::Protobuf::MessageExts
32
+ extend ::Google::Protobuf::MessageExts::ClassMethods
33
+ end
34
+
35
+ # Details about how and where to publish client libraries.
36
+ # @!attribute [rw] version
37
+ # @return [::String]
38
+ # Version of the API to apply these settings to. This is the full protobuf
39
+ # package for the API, ending in the version element.
40
+ # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
41
+ # @!attribute [rw] launch_stage
42
+ # @return [::Google::Api::LaunchStage]
43
+ # Launch stage of this version of the API.
44
+ # @!attribute [rw] rest_numeric_enums
45
+ # @return [::Boolean]
46
+ # When using transport=rest, the client request will encode enums as
47
+ # numbers rather than strings.
48
+ # @!attribute [rw] java_settings
49
+ # @return [::Google::Api::JavaSettings]
50
+ # Settings for legacy Java features, supported in the Service YAML.
51
+ # @!attribute [rw] cpp_settings
52
+ # @return [::Google::Api::CppSettings]
53
+ # Settings for C++ client libraries.
54
+ # @!attribute [rw] php_settings
55
+ # @return [::Google::Api::PhpSettings]
56
+ # Settings for PHP client libraries.
57
+ # @!attribute [rw] python_settings
58
+ # @return [::Google::Api::PythonSettings]
59
+ # Settings for Python client libraries.
60
+ # @!attribute [rw] node_settings
61
+ # @return [::Google::Api::NodeSettings]
62
+ # Settings for Node client libraries.
63
+ # @!attribute [rw] dotnet_settings
64
+ # @return [::Google::Api::DotnetSettings]
65
+ # Settings for .NET client libraries.
66
+ # @!attribute [rw] ruby_settings
67
+ # @return [::Google::Api::RubySettings]
68
+ # Settings for Ruby client libraries.
69
+ # @!attribute [rw] go_settings
70
+ # @return [::Google::Api::GoSettings]
71
+ # Settings for Go client libraries.
72
+ class ClientLibrarySettings
73
+ include ::Google::Protobuf::MessageExts
74
+ extend ::Google::Protobuf::MessageExts::ClassMethods
75
+ end
76
+
77
+ # This message configures the settings for publishing [Google Cloud Client
78
+ # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries)
79
+ # generated from the service config.
80
+ # @!attribute [rw] method_settings
81
+ # @return [::Array<::Google::Api::MethodSettings>]
82
+ # A list of API method settings, e.g. the behavior for methods that use the
83
+ # long-running operation pattern.
84
+ # @!attribute [rw] new_issue_uri
85
+ # @return [::String]
86
+ # Link to a *public* URI where users can report issues. Example:
87
+ # https://issuetracker.google.com/issues/new?component=190865&template=1161103
88
+ # @!attribute [rw] documentation_uri
89
+ # @return [::String]
90
+ # Link to product home page. Example:
91
+ # https://cloud.google.com/asset-inventory/docs/overview
92
+ # @!attribute [rw] api_short_name
93
+ # @return [::String]
94
+ # Used as a tracking tag when collecting data about the APIs developer
95
+ # relations artifacts like docs, packages delivered to package managers,
96
+ # etc. Example: "speech".
97
+ # @!attribute [rw] github_label
98
+ # @return [::String]
99
+ # GitHub label to apply to issues and pull requests opened for this API.
100
+ # @!attribute [rw] codeowner_github_teams
101
+ # @return [::Array<::String>]
102
+ # GitHub teams to be added to CODEOWNERS in the directory in GitHub
103
+ # containing source code for the client libraries for this API.
104
+ # @!attribute [rw] doc_tag_prefix
105
+ # @return [::String]
106
+ # A prefix used in sample code when demarking regions to be included in
107
+ # documentation.
108
+ # @!attribute [rw] organization
109
+ # @return [::Google::Api::ClientLibraryOrganization]
110
+ # For whom the client library is being published.
111
+ # @!attribute [rw] library_settings
112
+ # @return [::Array<::Google::Api::ClientLibrarySettings>]
113
+ # Client library settings. If the same version string appears multiple
114
+ # times in this list, then the last one wins. Settings from earlier
115
+ # settings with the same version string are discarded.
116
+ # @!attribute [rw] proto_reference_documentation_uri
117
+ # @return [::String]
118
+ # Optional link to proto reference documentation. Example:
119
+ # https://cloud.google.com/pubsub/lite/docs/reference/rpc
120
+ class Publishing
121
+ include ::Google::Protobuf::MessageExts
122
+ extend ::Google::Protobuf::MessageExts::ClassMethods
123
+ end
124
+
125
+ # Settings for Java client libraries.
126
+ # @!attribute [rw] library_package
127
+ # @return [::String]
128
+ # The package name to use in Java. Clobbers the java_package option
129
+ # set in the protobuf. This should be used **only** by APIs
130
+ # who have already set the language_settings.java.package_name" field
131
+ # in gapic.yaml. API teams should use the protobuf java_package option
132
+ # where possible.
133
+ #
134
+ # Example of a YAML configuration::
135
+ #
136
+ # publishing:
137
+ # java_settings:
138
+ # library_package: com.google.cloud.pubsub.v1
139
+ # @!attribute [rw] service_class_names
140
+ # @return [::Google::Protobuf::Map{::String => ::String}]
141
+ # Configure the Java class name to use instead of the service's for its
142
+ # corresponding generated GAPIC client. Keys are fully-qualified
143
+ # service names as they appear in the protobuf (including the full
144
+ # the language_settings.java.interface_names" field in gapic.yaml. API
145
+ # teams should otherwise use the service name as it appears in the
146
+ # protobuf.
147
+ #
148
+ # Example of a YAML configuration::
149
+ #
150
+ # publishing:
151
+ # java_settings:
152
+ # service_class_names:
153
+ # - google.pubsub.v1.Publisher: TopicAdmin
154
+ # - google.pubsub.v1.Subscriber: SubscriptionAdmin
155
+ # @!attribute [rw] common
156
+ # @return [::Google::Api::CommonLanguageSettings]
157
+ # Some settings.
158
+ class JavaSettings
159
+ include ::Google::Protobuf::MessageExts
160
+ extend ::Google::Protobuf::MessageExts::ClassMethods
161
+
162
+ # @!attribute [rw] key
163
+ # @return [::String]
164
+ # @!attribute [rw] value
165
+ # @return [::String]
166
+ class ServiceClassNamesEntry
167
+ include ::Google::Protobuf::MessageExts
168
+ extend ::Google::Protobuf::MessageExts::ClassMethods
169
+ end
170
+ end
171
+
172
+ # Settings for C++ client libraries.
173
+ # @!attribute [rw] common
174
+ # @return [::Google::Api::CommonLanguageSettings]
175
+ # Some settings.
176
+ class CppSettings
177
+ include ::Google::Protobuf::MessageExts
178
+ extend ::Google::Protobuf::MessageExts::ClassMethods
179
+ end
180
+
181
+ # Settings for Php client libraries.
182
+ # @!attribute [rw] common
183
+ # @return [::Google::Api::CommonLanguageSettings]
184
+ # Some settings.
185
+ class PhpSettings
186
+ include ::Google::Protobuf::MessageExts
187
+ extend ::Google::Protobuf::MessageExts::ClassMethods
188
+ end
189
+
190
+ # Settings for Python client libraries.
191
+ # @!attribute [rw] common
192
+ # @return [::Google::Api::CommonLanguageSettings]
193
+ # Some settings.
194
+ class PythonSettings
195
+ include ::Google::Protobuf::MessageExts
196
+ extend ::Google::Protobuf::MessageExts::ClassMethods
197
+ end
198
+
199
+ # Settings for Node client libraries.
200
+ # @!attribute [rw] common
201
+ # @return [::Google::Api::CommonLanguageSettings]
202
+ # Some settings.
203
+ class NodeSettings
204
+ include ::Google::Protobuf::MessageExts
205
+ extend ::Google::Protobuf::MessageExts::ClassMethods
206
+ end
207
+
208
+ # Settings for Dotnet client libraries.
209
+ # @!attribute [rw] common
210
+ # @return [::Google::Api::CommonLanguageSettings]
211
+ # Some settings.
212
+ # @!attribute [rw] renamed_services
213
+ # @return [::Google::Protobuf::Map{::String => ::String}]
214
+ # Map from original service names to renamed versions.
215
+ # This is used when the default generated types
216
+ # would cause a naming conflict. (Neither name is
217
+ # fully-qualified.)
218
+ # Example: Subscriber to SubscriberServiceApi.
219
+ # @!attribute [rw] renamed_resources
220
+ # @return [::Google::Protobuf::Map{::String => ::String}]
221
+ # Map from full resource types to the effective short name
222
+ # for the resource. This is used when otherwise resource
223
+ # named from different services would cause naming collisions.
224
+ # Example entry:
225
+ # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
226
+ # @!attribute [rw] ignored_resources
227
+ # @return [::Array<::String>]
228
+ # List of full resource types to ignore during generation.
229
+ # This is typically used for API-specific Location resources,
230
+ # which should be handled by the generator as if they were actually
231
+ # the common Location resources.
232
+ # Example entry: "documentai.googleapis.com/Location"
233
+ # @!attribute [rw] forced_namespace_aliases
234
+ # @return [::Array<::String>]
235
+ # Namespaces which must be aliased in snippets due to
236
+ # a known (but non-generator-predictable) naming collision
237
+ # @!attribute [rw] handwritten_signatures
238
+ # @return [::Array<::String>]
239
+ # Method signatures (in the form "service.method(signature)")
240
+ # which are provided separately, so shouldn't be generated.
241
+ # Snippets *calling* these methods are still generated, however.
242
+ class DotnetSettings
243
+ include ::Google::Protobuf::MessageExts
244
+ extend ::Google::Protobuf::MessageExts::ClassMethods
245
+
246
+ # @!attribute [rw] key
247
+ # @return [::String]
248
+ # @!attribute [rw] value
249
+ # @return [::String]
250
+ class RenamedServicesEntry
251
+ include ::Google::Protobuf::MessageExts
252
+ extend ::Google::Protobuf::MessageExts::ClassMethods
253
+ end
254
+
255
+ # @!attribute [rw] key
256
+ # @return [::String]
257
+ # @!attribute [rw] value
258
+ # @return [::String]
259
+ class RenamedResourcesEntry
260
+ include ::Google::Protobuf::MessageExts
261
+ extend ::Google::Protobuf::MessageExts::ClassMethods
262
+ end
263
+ end
264
+
265
+ # Settings for Ruby client libraries.
266
+ # @!attribute [rw] common
267
+ # @return [::Google::Api::CommonLanguageSettings]
268
+ # Some settings.
269
+ class RubySettings
270
+ include ::Google::Protobuf::MessageExts
271
+ extend ::Google::Protobuf::MessageExts::ClassMethods
272
+ end
273
+
274
+ # Settings for Go client libraries.
275
+ # @!attribute [rw] common
276
+ # @return [::Google::Api::CommonLanguageSettings]
277
+ # Some settings.
278
+ class GoSettings
279
+ include ::Google::Protobuf::MessageExts
280
+ extend ::Google::Protobuf::MessageExts::ClassMethods
281
+ end
282
+
283
+ # Describes the generator configuration for a method.
284
+ # @!attribute [rw] selector
285
+ # @return [::String]
286
+ # The fully qualified name of the method, for which the options below apply.
287
+ # This is used to find the method to apply the options.
288
+ # @!attribute [rw] long_running
289
+ # @return [::Google::Api::MethodSettings::LongRunning]
290
+ # Describes settings to use for long-running operations when generating
291
+ # API methods for RPCs. Complements RPCs that use the annotations in
292
+ # google/longrunning/operations.proto.
293
+ #
294
+ # Example of a YAML configuration::
295
+ #
296
+ # publishing:
297
+ # method_settings:
298
+ # - selector: google.cloud.speech.v2.Speech.BatchRecognize
299
+ # long_running:
300
+ # initial_poll_delay:
301
+ # seconds: 60 # 1 minute
302
+ # poll_delay_multiplier: 1.5
303
+ # max_poll_delay:
304
+ # seconds: 360 # 6 minutes
305
+ # total_poll_timeout:
306
+ # seconds: 54000 # 90 minutes
307
+ class MethodSettings
308
+ include ::Google::Protobuf::MessageExts
309
+ extend ::Google::Protobuf::MessageExts::ClassMethods
310
+
311
+ # Describes settings to use when generating API methods that use the
312
+ # long-running operation pattern.
313
+ # All default values below are from those used in the client library
314
+ # generators (e.g.
315
+ # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).
316
+ # @!attribute [rw] initial_poll_delay
317
+ # @return [::Google::Protobuf::Duration]
318
+ # Initial delay after which the first poll request will be made.
319
+ # Default value: 5 seconds.
320
+ # @!attribute [rw] poll_delay_multiplier
321
+ # @return [::Float]
322
+ # Multiplier to gradually increase delay between subsequent polls until it
323
+ # reaches max_poll_delay.
324
+ # Default value: 1.5.
325
+ # @!attribute [rw] max_poll_delay
326
+ # @return [::Google::Protobuf::Duration]
327
+ # Maximum time between two subsequent poll requests.
328
+ # Default value: 45 seconds.
329
+ # @!attribute [rw] total_poll_timeout
330
+ # @return [::Google::Protobuf::Duration]
331
+ # Total polling timeout.
332
+ # Default value: 5 minutes.
333
+ class LongRunning
334
+ include ::Google::Protobuf::MessageExts
335
+ extend ::Google::Protobuf::MessageExts::ClassMethods
336
+ end
337
+ end
338
+
339
+ # The organization for which the client libraries are being published.
340
+ # Affects the url where generated docs are published, etc.
341
+ module ClientLibraryOrganization
342
+ # Not useful.
343
+ CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0
344
+
345
+ # Google Cloud Platform Org.
346
+ CLOUD = 1
347
+
348
+ # Ads (Advertising) Org.
349
+ ADS = 2
350
+
351
+ # Photos Org.
352
+ PHOTOS = 3
353
+
354
+ # Street View Org.
355
+ STREET_VIEW = 4
356
+
357
+ # Shopping Org.
358
+ SHOPPING = 5
359
+
360
+ # Geo Org.
361
+ GEO = 6
362
+
363
+ # Generative AI - https://developers.generativeai.google
364
+ GENERATIVE_AI = 7
365
+ end
366
+
367
+ # To where should client libraries be published?
368
+ module ClientLibraryDestination
369
+ # Client libraries will neither be generated nor published to package
370
+ # managers.
371
+ CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0
372
+
373
+ # Generate the client library in a repo under github.com/googleapis,
374
+ # but don't publish it to package managers.
375
+ GITHUB = 10
376
+
377
+ # Publish the library to package managers like nuget.org and npmjs.com.
378
+ PACKAGE_MANAGER = 20
379
+ end
380
+ end
381
+ end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Api
22
+ # The launch stage as defined by [Google Cloud Platform
23
+ # Launch Stages](https://cloud.google.com/terms/launch-stages).
24
+ module LaunchStage
25
+ # Do not use this default value.
26
+ LAUNCH_STAGE_UNSPECIFIED = 0
27
+
28
+ # The feature is not yet implemented. Users can not use it.
29
+ UNIMPLEMENTED = 6
30
+
31
+ # Prelaunch features are hidden from users and are only visible internally.
32
+ PRELAUNCH = 7
33
+
34
+ # Early Access features are limited to a closed group of testers. To use
35
+ # these features, you must sign up in advance and sign a Trusted Tester
36
+ # agreement (which includes confidentiality provisions). These features may
37
+ # be unstable, changed in backward-incompatible ways, and are not
38
+ # guaranteed to be released.
39
+ EARLY_ACCESS = 1
40
+
41
+ # Alpha is a limited availability test for releases before they are cleared
42
+ # for widespread use. By Alpha, all significant design issues are resolved
43
+ # and we are in the process of verifying functionality. Alpha customers
44
+ # need to apply for access, agree to applicable terms, and have their
45
+ # projects allowlisted. Alpha releases don't have to be feature complete,
46
+ # no SLAs are provided, and there are no technical support obligations, but
47
+ # they will be far enough along that customers can actually use them in
48
+ # test environments or for limited-use tests -- just like they would in
49
+ # normal production cases.
50
+ ALPHA = 2
51
+
52
+ # Beta is the point at which we are ready to open a release for any
53
+ # customer to use. There are no SLA or technical support obligations in a
54
+ # Beta release. Products will be complete from a feature perspective, but
55
+ # may have some open outstanding issues. Beta releases are suitable for
56
+ # limited production use cases.
57
+ BETA = 3
58
+
59
+ # GA features are open to all developers and are considered stable and
60
+ # fully qualified for production use.
61
+ GA = 4
62
+
63
+ # Deprecated features are scheduled to be shut down and removed. For more
64
+ # information, see the "Deprecation Policy" section of our [Terms of
65
+ # Service](https://cloud.google.com/terms/)
66
+ # and the [Google Cloud Platform Subject to the Deprecation
67
+ # Policy](https://cloud.google.com/terms/deprecation) documentation.
68
+ DEPRECATED = 5
69
+ end
70
+ end
71
+ end
@@ -43,8 +43,12 @@ module Google
43
43
  # if (any.is(Foo.class)) {
44
44
  # foo = any.unpack(Foo.class);
45
45
  # }
46
+ # // or ...
47
+ # if (any.isSameTypeAs(Foo.getDefaultInstance())) {
48
+ # foo = any.unpack(Foo.getDefaultInstance());
49
+ # }
46
50
  #
47
- # Example 3: Pack and unpack a message in Python.
51
+ # Example 3: Pack and unpack a message in Python.
48
52
  #
49
53
  # foo = Foo(...)
50
54
  # any = Any()
@@ -54,7 +58,7 @@ module Google
54
58
  # any.Unpack(foo)
55
59
  # ...
56
60
  #
57
- # Example 4: Pack and unpack a message in Go
61
+ # Example 4: Pack and unpack a message in Go
58
62
  #
59
63
  # foo := &pb.Foo{...}
60
64
  # any, err := anypb.New(foo)
@@ -73,9 +77,8 @@ module Google
73
77
  # in the type URL, for example "foo.bar.com/x/y.z" will yield type
74
78
  # name "y.z".
75
79
  #
76
- #
77
80
  # JSON
78
- #
81
+ # ====
79
82
  # The JSON representation of an `Any` value uses the regular
80
83
  # representation of the deserialized, embedded message, with an
81
84
  # additional field `@type` which contains the type URL. Example:
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Protobuf
22
+ # A Duration represents a signed, fixed-length span of time represented
23
+ # as a count of seconds and fractions of seconds at nanosecond
24
+ # resolution. It is independent of any calendar and concepts like "day"
25
+ # or "month". It is related to Timestamp in that the difference between
26
+ # two Timestamp values is a Duration and it can be added or subtracted
27
+ # from a Timestamp. Range is approximately +-10,000 years.
28
+ #
29
+ # # Examples
30
+ #
31
+ # Example 1: Compute Duration from two Timestamps in pseudo code.
32
+ #
33
+ # Timestamp start = ...;
34
+ # Timestamp end = ...;
35
+ # Duration duration = ...;
36
+ #
37
+ # duration.seconds = end.seconds - start.seconds;
38
+ # duration.nanos = end.nanos - start.nanos;
39
+ #
40
+ # if (duration.seconds < 0 && duration.nanos > 0) {
41
+ # duration.seconds += 1;
42
+ # duration.nanos -= 1000000000;
43
+ # } else if (duration.seconds > 0 && duration.nanos < 0) {
44
+ # duration.seconds -= 1;
45
+ # duration.nanos += 1000000000;
46
+ # }
47
+ #
48
+ # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
49
+ #
50
+ # Timestamp start = ...;
51
+ # Duration duration = ...;
52
+ # Timestamp end = ...;
53
+ #
54
+ # end.seconds = start.seconds + duration.seconds;
55
+ # end.nanos = start.nanos + duration.nanos;
56
+ #
57
+ # if (end.nanos < 0) {
58
+ # end.seconds -= 1;
59
+ # end.nanos += 1000000000;
60
+ # } else if (end.nanos >= 1000000000) {
61
+ # end.seconds += 1;
62
+ # end.nanos -= 1000000000;
63
+ # }
64
+ #
65
+ # Example 3: Compute Duration from datetime.timedelta in Python.
66
+ #
67
+ # td = datetime.timedelta(days=3, minutes=10)
68
+ # duration = Duration()
69
+ # duration.FromTimedelta(td)
70
+ #
71
+ # # JSON Mapping
72
+ #
73
+ # In JSON format, the Duration type is encoded as a string rather than an
74
+ # object, where the string ends in the suffix "s" (indicating seconds) and
75
+ # is preceded by the number of seconds, with nanoseconds expressed as
76
+ # fractional seconds. For example, 3 seconds with 0 nanoseconds should be
77
+ # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
78
+ # be expressed in JSON format as "3.000000001s", and 3 seconds and 1
79
+ # microsecond should be expressed in JSON format as "3.000001s".
80
+ # @!attribute [rw] seconds
81
+ # @return [::Integer]
82
+ # Signed seconds of the span of time. Must be from -315,576,000,000
83
+ # to +315,576,000,000 inclusive. Note: these bounds are computed from:
84
+ # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
85
+ # @!attribute [rw] nanos
86
+ # @return [::Integer]
87
+ # Signed fractions of a second at nanosecond resolution of the span
88
+ # of time. Durations less than one second are represented with a 0
89
+ # `seconds` field and a positive or negative `nanos` field. For durations
90
+ # of one second or more, a non-zero value for the `nanos` field must be
91
+ # of the same sign as the `seconds` field. Must be from -999,999,999
92
+ # to +999,999,999 inclusive.
93
+ class Duration
94
+ include ::Google::Protobuf::MessageExts
95
+ extend ::Google::Protobuf::MessageExts::ClassMethods
96
+ end
97
+ end
98
+ end
@@ -69,7 +69,6 @@ module Google
69
69
  # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
70
70
  # .setNanos((int) ((millis % 1000) * 1000000)).build();
71
71
  #
72
- #
73
72
  # Example 5: Compute Timestamp from Java `Instant.now()`.
74
73
  #
75
74
  # Instant now = Instant.now();
@@ -78,7 +77,6 @@ module Google
78
77
  # Timestamp.newBuilder().setSeconds(now.getEpochSecond())
79
78
  # .setNanos(now.getNano()).build();
80
79
  #
81
- #
82
80
  # Example 6: Compute Timestamp from current time in Python.
83
81
  #
84
82
  # timestamp = Timestamp()
@@ -108,7 +106,7 @@ module Google
108
106
  # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
109
107
  # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
110
108
  # the Joda Time's [`ISODateTimeFormat.dateTime()`](
111
- # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
109
+ # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
112
110
  # ) to obtain a formatter capable of generating timestamps in this format.
113
111
  # @!attribute [rw] seconds
114
112
  # @return [::Integer]
@@ -28,12 +28,14 @@ module Google
28
28
  # [API Design Guide](https://cloud.google.com/apis/design/errors).
29
29
  # @!attribute [rw] code
30
30
  # @return [::Integer]
31
- # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
31
+ # The status code, which should be an enum value of
32
+ # [google.rpc.Code][google.rpc.Code].
32
33
  # @!attribute [rw] message
33
34
  # @return [::String]
34
35
  # A developer-facing error message, which should be in English. Any
35
36
  # user-facing error message should be localized and sent in the
36
- # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized by the client.
37
+ # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized
38
+ # by the client.
37
39
  # @!attribute [rw] details
38
40
  # @return [::Array<::Google::Protobuf::Any>]
39
41
  # A list of messages that carry the error details. There is a common set of
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-dataqna-v1alpha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-02 00:00:00.000000000 Z
11
+ date: 2023-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.10'
19
+ version: 0.19.1
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.10'
29
+ version: 0.19.1
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -50,14 +50,14 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 1.26.1
53
+ version: 1.26.3
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 1.26.1
60
+ version: 1.26.3
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: minitest
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -188,7 +188,9 @@ files:
188
188
  - lib/google/cloud/dataqna/v1alpha/user_feedback_pb.rb
189
189
  - lib/google/cloud/dataqna/v1alpha/version.rb
190
190
  - proto_docs/README.md
191
+ - proto_docs/google/api/client.rb
191
192
  - proto_docs/google/api/field_behavior.rb
193
+ - proto_docs/google/api/launch_stage.rb
192
194
  - proto_docs/google/api/resource.rb
193
195
  - proto_docs/google/cloud/dataqna/v1alpha/annotated_string.rb
194
196
  - proto_docs/google/cloud/dataqna/v1alpha/auto_suggestion_service.rb
@@ -196,6 +198,7 @@ files:
196
198
  - proto_docs/google/cloud/dataqna/v1alpha/question_service.rb
197
199
  - proto_docs/google/cloud/dataqna/v1alpha/user_feedback.rb
198
200
  - proto_docs/google/protobuf/any.rb
201
+ - proto_docs/google/protobuf/duration.rb
199
202
  - proto_docs/google/protobuf/field_mask.rb
200
203
  - proto_docs/google/protobuf/timestamp.rb
201
204
  - proto_docs/google/rpc/status.rb
@@ -218,8 +221,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
221
  - !ruby/object:Gem::Version
219
222
  version: '0'
220
223
  requirements: []
221
- rubygems_version: 3.3.14
224
+ rubygems_version: 3.4.2
222
225
  signing_key:
223
226
  specification_version: 4
224
- summary: API Client library for the BigQuery Data QnA V1alpha API
227
+ summary: Data QnA is a natural language question and answer service for BigQuery data.
225
228
  test_files: []