google-cloud-language-v1 0.4.1 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56447f17a2ea8af3c04ed682080ea4f9b1cb628166d8a8498958e3c052865c1c
4
- data.tar.gz: 9c9c08bab0fef3efe7f48bb4ef1572ae0569b7c437db41d0c950e31f5f465ecf
3
+ metadata.gz: c13f2bfa5d69ebf00f48707bbfc20f7433ad31f4e5db2f224ae6eec7bdd382bc
4
+ data.tar.gz: f99904a6b061a5644ede65372a0ca4ed260ec4a66934fd3935e3bc33e0e459d0
5
5
  SHA512:
6
- metadata.gz: febb4581c18e1e195f487a968623065f77ff9a408ff66db4ea02820c48e0634198d9b57b74ea34111a19d6280daf7af6e30c5c10dfc7ac08fa9d265a25dddf60
7
- data.tar.gz: 31d9b787ce13e3832d48115da04dc1cfb2b7fd9b9b98fc1c44c2ea64041dc55e6d0b0c39eea784fd6b05ddb1e0c098898da0d69417a43a2581814dda233b815a
6
+ metadata.gz: 6308689a706646fa05d1ab8a740b64660e5bf3cc949fedd99701a76a71ed33ae31768ae517aff8a0b60159cc8bb86b183b67c267fba021199e49b2215289dd51
7
+ data.tar.gz: 3ea4253f9bdb550ca0192a87058521b054b06d386c6feb9b42467dc27b892ff2e159f35f044c4ceeca18151bebe0ed7eedede05c57cdca0b36fa0781ee4d6ffa
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Natural Language V1 API
2
+ --title="Natural Language V1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-language-v1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::Language::V1::LanguageService::Credentials}):
68
68
 
69
- 1. `LANGUAGE_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `LANGUAGE_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `LANGUAGE_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `LANGUAGE_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/language/v1"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Language::V1::LanguageService::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/language/v1"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Language::V1::LanguageService::Client.new do |config|
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/language/v1"
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/language/v1"
34
34
 
35
35
  client = ::Google::Cloud::Language::V1::LanguageService::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::Language::V1::AnalyzeSentimentRequest.new # (request fields as keyword arguments...)
37
37
  response = client.analyze_sentiment request
38
38
  ```
39
39
 
@@ -40,13 +40,12 @@ module Google
40
40
  # See {::Google::Cloud::Language::V1::LanguageService::Client::Configuration}
41
41
  # for a description of the configuration fields.
42
42
  #
43
- # ## Example
43
+ # @example
44
44
  #
45
- # To modify the configuration for all LanguageService clients:
46
- #
47
- # ::Google::Cloud::Language::V1::LanguageService::Client.configure do |config|
48
- # config.timeout = 10.0
49
- # end
45
+ # # Modify the configuration for all LanguageService clients
46
+ # ::Google::Cloud::Language::V1::LanguageService::Client.configure do |config|
47
+ # config.timeout = 10.0
48
+ # end
50
49
  #
51
50
  # @yield [config] Configure the Client client.
52
51
  # @yieldparam config [Client::Configuration]
@@ -66,50 +65,32 @@ module Google
66
65
 
67
66
  default_config.rpcs.analyze_sentiment.timeout = 600.0
68
67
  default_config.rpcs.analyze_sentiment.retry_policy = {
69
- initial_delay: 0.1,
70
- max_delay: 60.0,
71
- multiplier: 1.3,
72
- retry_codes: [4, 14]
68
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
73
69
  }
74
70
 
75
71
  default_config.rpcs.analyze_entities.timeout = 600.0
76
72
  default_config.rpcs.analyze_entities.retry_policy = {
77
- initial_delay: 0.1,
78
- max_delay: 60.0,
79
- multiplier: 1.3,
80
- retry_codes: [4, 14]
73
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
81
74
  }
82
75
 
83
76
  default_config.rpcs.analyze_entity_sentiment.timeout = 600.0
84
77
  default_config.rpcs.analyze_entity_sentiment.retry_policy = {
85
- initial_delay: 0.1,
86
- max_delay: 60.0,
87
- multiplier: 1.3,
88
- retry_codes: [4, 14]
78
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
89
79
  }
90
80
 
91
81
  default_config.rpcs.analyze_syntax.timeout = 600.0
92
82
  default_config.rpcs.analyze_syntax.retry_policy = {
93
- initial_delay: 0.1,
94
- max_delay: 60.0,
95
- multiplier: 1.3,
96
- retry_codes: [4, 14]
83
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
97
84
  }
98
85
 
99
86
  default_config.rpcs.classify_text.timeout = 600.0
100
87
  default_config.rpcs.classify_text.retry_policy = {
101
- initial_delay: 0.1,
102
- max_delay: 60.0,
103
- multiplier: 1.3,
104
- retry_codes: [4, 14]
88
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
105
89
  }
106
90
 
107
91
  default_config.rpcs.annotate_text.timeout = 600.0
108
92
  default_config.rpcs.annotate_text.retry_policy = {
109
- initial_delay: 0.1,
110
- max_delay: 60.0,
111
- multiplier: 1.3,
112
- retry_codes: [4, 14]
93
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
113
94
  }
114
95
 
115
96
  default_config
@@ -141,19 +122,15 @@ module Google
141
122
  ##
142
123
  # Create a new LanguageService client object.
143
124
  #
144
- # ## Examples
145
- #
146
- # To create a new LanguageService client with the default
147
- # configuration:
148
- #
149
- # client = ::Google::Cloud::Language::V1::LanguageService::Client.new
125
+ # @example
150
126
  #
151
- # To create a new LanguageService client with a custom
152
- # configuration:
127
+ # # Create a client using the default configuration
128
+ # client = ::Google::Cloud::Language::V1::LanguageService::Client.new
153
129
  #
154
- # client = ::Google::Cloud::Language::V1::LanguageService::Client.new do |config|
155
- # config.timeout = 10.0
156
- # end
130
+ # # Create a client using a custom configuration
131
+ # client = ::Google::Cloud::Language::V1::LanguageService::Client.new do |config|
132
+ # config.timeout = 10.0
133
+ # end
157
134
  #
158
135
  # @yield [config] Configure the LanguageService client.
159
136
  # @yieldparam config [Client::Configuration]
@@ -173,14 +150,13 @@ module Google
173
150
 
174
151
  # Create credentials
175
152
  credentials = @config.credentials
176
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
153
+ # Use self-signed JWT if the endpoint is unchanged from default,
177
154
  # but only if the default endpoint does not have a region prefix.
178
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
179
- @config.endpoint == Client.configure.endpoint &&
155
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
180
156
  !@config.endpoint.split(".").first.include?("-")
181
157
  credentials ||= Credentials.default scope: @config.scope,
182
158
  enable_self_signed_jwt: enable_self_signed_jwt
183
- if credentials.is_a?(String) || credentials.is_a?(Hash)
159
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
184
160
  credentials = Credentials.new credentials, scope: @config.scope
185
161
  end
186
162
  @quota_project_id = @config.quota_project
@@ -228,6 +204,21 @@ module Google
228
204
  #
229
205
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
230
206
  #
207
+ # @example Basic example
208
+ # require "google/cloud/language/v1"
209
+ #
210
+ # # Create a client object. The client can be reused for multiple calls.
211
+ # client = Google::Cloud::Language::V1::LanguageService::Client.new
212
+ #
213
+ # # Create a request. To set request fields, pass in keyword arguments.
214
+ # request = Google::Cloud::Language::V1::AnalyzeSentimentRequest.new
215
+ #
216
+ # # Call the analyze_sentiment method.
217
+ # result = client.analyze_sentiment request
218
+ #
219
+ # # The returned object is of type Google::Cloud::Language::V1::AnalyzeSentimentResponse.
220
+ # p result
221
+ #
231
222
  def analyze_sentiment request, options = nil
232
223
  raise ::ArgumentError, "request must be provided" if request.nil?
233
224
 
@@ -248,7 +239,9 @@ module Google
248
239
  options.apply_defaults timeout: @config.rpcs.analyze_sentiment.timeout,
249
240
  metadata: metadata,
250
241
  retry_policy: @config.rpcs.analyze_sentiment.retry_policy
251
- options.apply_defaults metadata: @config.metadata,
242
+
243
+ options.apply_defaults timeout: @config.timeout,
244
+ metadata: @config.metadata,
252
245
  retry_policy: @config.retry_policy
253
246
 
254
247
  @language_service_stub.call_rpc :analyze_sentiment, request, options: options do |response, operation|
@@ -292,6 +285,21 @@ module Google
292
285
  #
293
286
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
294
287
  #
288
+ # @example Basic example
289
+ # require "google/cloud/language/v1"
290
+ #
291
+ # # Create a client object. The client can be reused for multiple calls.
292
+ # client = Google::Cloud::Language::V1::LanguageService::Client.new
293
+ #
294
+ # # Create a request. To set request fields, pass in keyword arguments.
295
+ # request = Google::Cloud::Language::V1::AnalyzeEntitiesRequest.new
296
+ #
297
+ # # Call the analyze_entities method.
298
+ # result = client.analyze_entities request
299
+ #
300
+ # # The returned object is of type Google::Cloud::Language::V1::AnalyzeEntitiesResponse.
301
+ # p result
302
+ #
295
303
  def analyze_entities request, options = nil
296
304
  raise ::ArgumentError, "request must be provided" if request.nil?
297
305
 
@@ -312,7 +320,9 @@ module Google
312
320
  options.apply_defaults timeout: @config.rpcs.analyze_entities.timeout,
313
321
  metadata: metadata,
314
322
  retry_policy: @config.rpcs.analyze_entities.retry_policy
315
- options.apply_defaults metadata: @config.metadata,
323
+
324
+ options.apply_defaults timeout: @config.timeout,
325
+ metadata: @config.metadata,
316
326
  retry_policy: @config.retry_policy
317
327
 
318
328
  @language_service_stub.call_rpc :analyze_entities, request, options: options do |response, operation|
@@ -355,6 +365,21 @@ module Google
355
365
  #
356
366
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
357
367
  #
368
+ # @example Basic example
369
+ # require "google/cloud/language/v1"
370
+ #
371
+ # # Create a client object. The client can be reused for multiple calls.
372
+ # client = Google::Cloud::Language::V1::LanguageService::Client.new
373
+ #
374
+ # # Create a request. To set request fields, pass in keyword arguments.
375
+ # request = Google::Cloud::Language::V1::AnalyzeEntitySentimentRequest.new
376
+ #
377
+ # # Call the analyze_entity_sentiment method.
378
+ # result = client.analyze_entity_sentiment request
379
+ #
380
+ # # The returned object is of type Google::Cloud::Language::V1::AnalyzeEntitySentimentResponse.
381
+ # p result
382
+ #
358
383
  def analyze_entity_sentiment request, options = nil
359
384
  raise ::ArgumentError, "request must be provided" if request.nil?
360
385
 
@@ -375,7 +400,9 @@ module Google
375
400
  options.apply_defaults timeout: @config.rpcs.analyze_entity_sentiment.timeout,
376
401
  metadata: metadata,
377
402
  retry_policy: @config.rpcs.analyze_entity_sentiment.retry_policy
378
- options.apply_defaults metadata: @config.metadata,
403
+
404
+ options.apply_defaults timeout: @config.timeout,
405
+ metadata: @config.metadata,
379
406
  retry_policy: @config.retry_policy
380
407
 
381
408
  @language_service_stub.call_rpc :analyze_entity_sentiment, request, options: options do |response, operation|
@@ -419,6 +446,21 @@ module Google
419
446
  #
420
447
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
421
448
  #
449
+ # @example Basic example
450
+ # require "google/cloud/language/v1"
451
+ #
452
+ # # Create a client object. The client can be reused for multiple calls.
453
+ # client = Google::Cloud::Language::V1::LanguageService::Client.new
454
+ #
455
+ # # Create a request. To set request fields, pass in keyword arguments.
456
+ # request = Google::Cloud::Language::V1::AnalyzeSyntaxRequest.new
457
+ #
458
+ # # Call the analyze_syntax method.
459
+ # result = client.analyze_syntax request
460
+ #
461
+ # # The returned object is of type Google::Cloud::Language::V1::AnalyzeSyntaxResponse.
462
+ # p result
463
+ #
422
464
  def analyze_syntax request, options = nil
423
465
  raise ::ArgumentError, "request must be provided" if request.nil?
424
466
 
@@ -439,7 +481,9 @@ module Google
439
481
  options.apply_defaults timeout: @config.rpcs.analyze_syntax.timeout,
440
482
  metadata: metadata,
441
483
  retry_policy: @config.rpcs.analyze_syntax.retry_policy
442
- options.apply_defaults metadata: @config.metadata,
484
+
485
+ options.apply_defaults timeout: @config.timeout,
486
+ metadata: @config.metadata,
443
487
  retry_policy: @config.retry_policy
444
488
 
445
489
  @language_service_stub.call_rpc :analyze_syntax, request, options: options do |response, operation|
@@ -479,6 +523,21 @@ module Google
479
523
  #
480
524
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
481
525
  #
526
+ # @example Basic example
527
+ # require "google/cloud/language/v1"
528
+ #
529
+ # # Create a client object. The client can be reused for multiple calls.
530
+ # client = Google::Cloud::Language::V1::LanguageService::Client.new
531
+ #
532
+ # # Create a request. To set request fields, pass in keyword arguments.
533
+ # request = Google::Cloud::Language::V1::ClassifyTextRequest.new
534
+ #
535
+ # # Call the classify_text method.
536
+ # result = client.classify_text request
537
+ #
538
+ # # The returned object is of type Google::Cloud::Language::V1::ClassifyTextResponse.
539
+ # p result
540
+ #
482
541
  def classify_text request, options = nil
483
542
  raise ::ArgumentError, "request must be provided" if request.nil?
484
543
 
@@ -499,7 +558,9 @@ module Google
499
558
  options.apply_defaults timeout: @config.rpcs.classify_text.timeout,
500
559
  metadata: metadata,
501
560
  retry_policy: @config.rpcs.classify_text.retry_policy
502
- options.apply_defaults metadata: @config.metadata,
561
+
562
+ options.apply_defaults timeout: @config.timeout,
563
+ metadata: @config.metadata,
503
564
  retry_policy: @config.retry_policy
504
565
 
505
566
  @language_service_stub.call_rpc :classify_text, request, options: options do |response, operation|
@@ -544,6 +605,21 @@ module Google
544
605
  #
545
606
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
546
607
  #
608
+ # @example Basic example
609
+ # require "google/cloud/language/v1"
610
+ #
611
+ # # Create a client object. The client can be reused for multiple calls.
612
+ # client = Google::Cloud::Language::V1::LanguageService::Client.new
613
+ #
614
+ # # Create a request. To set request fields, pass in keyword arguments.
615
+ # request = Google::Cloud::Language::V1::AnnotateTextRequest.new
616
+ #
617
+ # # Call the annotate_text method.
618
+ # result = client.annotate_text request
619
+ #
620
+ # # The returned object is of type Google::Cloud::Language::V1::AnnotateTextResponse.
621
+ # p result
622
+ #
547
623
  def annotate_text request, options = nil
548
624
  raise ::ArgumentError, "request must be provided" if request.nil?
549
625
 
@@ -564,7 +640,9 @@ module Google
564
640
  options.apply_defaults timeout: @config.rpcs.annotate_text.timeout,
565
641
  metadata: metadata,
566
642
  retry_policy: @config.rpcs.annotate_text.retry_policy
567
- options.apply_defaults metadata: @config.metadata,
643
+
644
+ options.apply_defaults timeout: @config.timeout,
645
+ metadata: @config.metadata,
568
646
  retry_policy: @config.retry_policy
569
647
 
570
648
  @language_service_stub.call_rpc :annotate_text, request, options: options do |response, operation|
@@ -588,22 +666,21 @@ module Google
588
666
  # Configuration can be applied globally to all clients, or to a single client
589
667
  # on construction.
590
668
  #
591
- # # Examples
592
- #
593
- # To modify the global config, setting the timeout for analyze_sentiment
594
- # to 20 seconds, and all remaining timeouts to 10 seconds:
595
- #
596
- # ::Google::Cloud::Language::V1::LanguageService::Client.configure do |config|
597
- # config.timeout = 10.0
598
- # config.rpcs.analyze_sentiment.timeout = 20.0
599
- # end
600
- #
601
- # To apply the above configuration only to a new client:
602
- #
603
- # client = ::Google::Cloud::Language::V1::LanguageService::Client.new do |config|
604
- # config.timeout = 10.0
605
- # config.rpcs.analyze_sentiment.timeout = 20.0
606
- # end
669
+ # @example
670
+ #
671
+ # # Modify the global config, setting the timeout for
672
+ # # analyze_sentiment to 20 seconds,
673
+ # # and all remaining timeouts to 10 seconds.
674
+ # ::Google::Cloud::Language::V1::LanguageService::Client.configure do |config|
675
+ # config.timeout = 10.0
676
+ # config.rpcs.analyze_sentiment.timeout = 20.0
677
+ # end
678
+ #
679
+ # # Apply the above configuration only to a new client.
680
+ # client = ::Google::Cloud::Language::V1::LanguageService::Client.new do |config|
681
+ # config.timeout = 10.0
682
+ # config.rpcs.analyze_sentiment.timeout = 20.0
683
+ # end
607
684
  #
608
685
  # @!attribute [rw] endpoint
609
686
  # The hostname or hostname:port of the service endpoint.
@@ -1,11 +1,11 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/language/v1/language_service.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
7
+ require 'google/protobuf'
8
+
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_file("google/cloud/language/v1/language_service.proto", :syntax => :proto3) do
11
11
  add_message "google.cloud.language.v1.Document" do
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Language
23
23
  module V1
24
- VERSION = "0.4.1"
24
+ VERSION = "0.4.5"
25
25
  end
26
26
  end
27
27
  end
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-language-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-17 00:00:00.000000000 Z
11
+ date: 2022-01-11 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.5'
19
+ version: '0.7'
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.5'
29
+ version: '0.7'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -201,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  - !ruby/object:Gem::Version
202
202
  version: '0'
203
203
  requirements: []
204
- rubygems_version: 3.2.17
204
+ rubygems_version: 3.3.4
205
205
  signing_key:
206
206
  specification_version: 4
207
207
  summary: API Client library for the Natural Language V1 API