google-api-client 0.9.12 → 0.9.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -1
  3. data/README.md +9 -1
  4. data/api_names.yaml +2 -0
  5. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  6. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +8 -0
  7. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +1 -0
  8. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +12 -4
  9. data/generated/google/apis/admin_directory_v1.rb +1 -1
  10. data/generated/google/apis/adsense_v1_4.rb +1 -1
  11. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  12. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  13. data/generated/google/apis/androidenterprise_v1/classes.rb +13 -5
  14. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  15. data/generated/google/apis/appstate_v1.rb +1 -1
  16. data/generated/google/apis/bigquery_v2.rb +1 -1
  17. data/generated/google/apis/bigquery_v2/classes.rb +186 -0
  18. data/generated/google/apis/bigquery_v2/representations.rb +77 -0
  19. data/generated/google/apis/calendar_v3.rb +1 -1
  20. data/generated/google/apis/civicinfo_v2.rb +1 -1
  21. data/generated/google/apis/civicinfo_v2/classes.rb +10 -4
  22. data/generated/google/apis/civicinfo_v2/representations.rb +1 -0
  23. data/generated/google/apis/civicinfo_v2/service.rb +6 -1
  24. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  25. data/generated/google/apis/cloudbuild_v1/classes.rb +7 -0
  26. data/generated/google/apis/cloudbuild_v1/representations.rb +1 -0
  27. data/generated/google/apis/compute_beta.rb +1 -1
  28. data/generated/google/apis/compute_v1.rb +1 -1
  29. data/generated/google/apis/content_v2.rb +1 -1
  30. data/generated/google/apis/datastore_v1beta3.rb +1 -1
  31. data/generated/google/apis/datastore_v1beta3/classes.rb +26 -27
  32. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  33. data/generated/google/apis/deploymentmanager_v2/classes.rb +4 -2
  34. data/generated/google/apis/dns_v1.rb +1 -1
  35. data/generated/google/apis/dns_v1/classes.rb +1 -1
  36. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  37. data/generated/google/apis/drive_v2.rb +1 -1
  38. data/generated/google/apis/drive_v2/classes.rb +4 -2
  39. data/generated/google/apis/drive_v3.rb +1 -1
  40. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  41. data/generated/google/apis/games_management_v1management.rb +1 -1
  42. data/generated/google/apis/games_v1.rb +1 -1
  43. data/generated/google/apis/genomics_v1.rb +1 -1
  44. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  45. data/generated/google/apis/identitytoolkit_v3/classes.rb +26 -0
  46. data/generated/google/apis/identitytoolkit_v3/representations.rb +4 -0
  47. data/generated/google/apis/language_v1beta1.rb +36 -0
  48. data/generated/google/apis/language_v1beta1/classes.rb +596 -0
  49. data/generated/google/apis/language_v1beta1/representations.rb +289 -0
  50. data/generated/google/apis/language_v1beta1/service.rb +154 -0
  51. data/generated/google/apis/monitoring_v3.rb +1 -1
  52. data/generated/google/apis/monitoring_v3/classes.rb +2 -2
  53. data/generated/google/apis/oauth2_v2.rb +1 -1
  54. data/generated/google/apis/plus_domains_v1.rb +1 -1
  55. data/generated/google/apis/plus_v1.rb +1 -1
  56. data/generated/google/apis/sheets_v4.rb +1 -1
  57. data/generated/google/apis/speech_v1beta1.rb +34 -0
  58. data/generated/google/apis/speech_v1beta1/classes.rb +512 -0
  59. data/generated/google/apis/speech_v1beta1/representations.rb +218 -0
  60. data/generated/google/apis/speech_v1beta1/service.rb +268 -0
  61. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  62. data/generated/google/apis/sqladmin_v1beta4/service.rb +2 -1
  63. data/generated/google/apis/vision_v1.rb +1 -1
  64. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  65. data/google-api-client.gemspec +2 -1
  66. data/lib/google/apis/core/base_service.rb +10 -5
  67. data/lib/google/apis/version.rb +1 -1
  68. metadata +20 -12
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://cloud.google.com/deployment-manager/
26
26
  module DeploymentmanagerV2
27
27
  VERSION = 'V2'
28
- REVISION = '20160731'
28
+ REVISION = '20160819'
29
29
 
30
30
  # View and manage your data across Google Cloud Platform services
31
31
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -528,7 +528,9 @@ module Google
528
528
  # @return [String]
529
529
  attr_accessor :target_id
530
530
 
531
- # [Output Only] The URL of the resource that the operation modifies.
531
+ # [Output Only] The URL of the resource that the operation modifies. If creating
532
+ # a persistent disk snapshot, this points to the persistent disk that the
533
+ # snapshot was created from.
532
534
  # Corresponds to the JSON property `targetLink`
533
535
  # @return [String]
534
536
  attr_accessor :target_link
@@ -763,7 +765,7 @@ module Google
763
765
  attr_accessor :properties
764
766
 
765
767
  # [Output Only] The type of the resource, for example compute.v1.instance, or
766
- # replicaPools.v1beta2.instanceGroupManager.
768
+ # cloudfunctions.v1beta1.function.
767
769
  # Corresponds to the JSON property `type`
768
770
  # @return [String]
769
771
  attr_accessor :type
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/cloud-dns
26
26
  module DnsV1
27
27
  VERSION = 'V1'
28
- REVISION = '20160601'
28
+ REVISION = '20160825'
29
29
 
30
30
  # View and manage your data across Google Cloud Platform services
31
31
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -146,7 +146,7 @@ module Google
146
146
  attr_accessor :kind
147
147
 
148
148
  # User assigned name for this resource. Must be unique within the project. The
149
- # name must be 1-32 characters long, must begin with a letter, end with a letter
149
+ # name must be 1-63 characters long, must begin with a letter, end with a letter
150
150
  # or digit, and only contain lowercase letters, digits or dashes.
151
151
  # Corresponds to the JSON property `name`
152
152
  # @return [String]
@@ -26,7 +26,7 @@ module Google
26
26
  # @see https://developers.google.com/doubleclick-search/
27
27
  module DoubleclicksearchV2
28
28
  VERSION = 'V2'
29
- REVISION = '20160810'
29
+ REVISION = '20160829'
30
30
 
31
31
  # View and manage your advertising data in DoubleClick Search
32
32
  AUTH_DOUBLECLICKSEARCH = 'https://www.googleapis.com/auth/doubleclicksearch'
@@ -26,7 +26,7 @@ module Google
26
26
  # @see https://developers.google.com/drive/
27
27
  module DriveV2
28
28
  VERSION = 'V2'
29
- REVISION = '20160805'
29
+ REVISION = '20160819'
30
30
 
31
31
  # View and manage the files in your Google Drive
32
32
  AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
@@ -2100,7 +2100,8 @@ module Google
2100
2100
 
2101
2101
  # The ID of the user this permission refers to, and identical to the
2102
2102
  # permissionId in the About and Files resources. When making a drive.permissions.
2103
- # insert request, exactly one of the id or value fields must be specified.
2103
+ # insert request, exactly one of the id or value fields must be specified unless
2104
+ # the permission type anyone, in which case both id and value are ignored.
2104
2105
  # Corresponds to the JSON property `id`
2105
2106
  # @return [String]
2106
2107
  attr_accessor :id
@@ -2144,7 +2145,8 @@ module Google
2144
2145
 
2145
2146
  # The email address or domain name for the entity. This is used during inserts
2146
2147
  # and is not populated in responses. When making a drive.permissions.insert
2147
- # request, exactly one of the id or value fields must be specified.
2148
+ # request, exactly one of the id or value fields must be specified unless the
2149
+ # permission type anyone, in which case both id and value are ignored.
2148
2150
  # Corresponds to the JSON property `value`
2149
2151
  # @return [String]
2150
2152
  attr_accessor :value
@@ -26,7 +26,7 @@ module Google
26
26
  # @see https://developers.google.com/drive/
27
27
  module DriveV3
28
28
  VERSION = 'V3'
29
- REVISION = '20160805'
29
+ REVISION = '20160819'
30
30
 
31
31
  # View and manage the files in your Google Drive
32
32
  AUTH_DRIVE = 'https://www.googleapis.com/auth/drive'
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/games/services
26
26
  module GamesConfigurationV1configuration
27
27
  VERSION = 'V1configuration'
28
- REVISION = '20160810'
28
+ REVISION = '20160824'
29
29
 
30
30
  # View and manage your Google Play Developer account
31
31
  AUTH_ANDROIDPUBLISHER = 'https://www.googleapis.com/auth/androidpublisher'
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/games/services
26
26
  module GamesManagementV1management
27
27
  VERSION = 'V1management'
28
- REVISION = '20160810'
28
+ REVISION = '20160824'
29
29
 
30
30
  # Share your Google+ profile information and view and manage your game activity
31
31
  AUTH_GAMES = 'https://www.googleapis.com/auth/games'
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/games/services/
26
26
  module GamesV1
27
27
  VERSION = 'V1'
28
- REVISION = '20160810'
28
+ REVISION = '20160824'
29
29
 
30
30
  # View and manage its own configuration data in your Google Drive
31
31
  AUTH_DRIVE_APPDATA = 'https://www.googleapis.com/auth/drive.appdata'
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://cloud.google.com/genomics/
26
26
  module GenomicsV1
27
27
  VERSION = 'V1'
28
- REVISION = '20160809'
28
+ REVISION = '20160830'
29
29
 
30
30
  # View and manage your data in Google BigQuery
31
31
  AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery'
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/identity-toolkit/v3/
26
26
  module IdentitytoolkitV3
27
27
  VERSION = 'V3'
28
- REVISION = '20160810'
28
+ REVISION = '20160812'
29
29
  end
30
30
  end
31
31
  end
@@ -1030,6 +1030,13 @@ module Google
1030
1030
  # @return [String]
1031
1031
  attr_accessor :request_uri
1032
1032
 
1033
+ # Whether return 200 and IDP credential rather than throw exception when
1034
+ # federated id is already linked.
1035
+ # Corresponds to the JSON property `returnIdpCredential`
1036
+ # @return [Boolean]
1037
+ attr_accessor :return_idp_credential
1038
+ alias_method :return_idp_credential?, :return_idp_credential
1039
+
1033
1040
  # Whether to return refresh tokens.
1034
1041
  # Corresponds to the JSON property `returnRefreshToken`
1035
1042
  # @return [Boolean]
@@ -1059,6 +1066,7 @@ module Google
1059
1066
  @pending_id_token = args[:pending_id_token] if args.key?(:pending_id_token)
1060
1067
  @post_body = args[:post_body] if args.key?(:post_body)
1061
1068
  @request_uri = args[:request_uri] if args.key?(:request_uri)
1069
+ @return_idp_credential = args[:return_idp_credential] if args.key?(:return_idp_credential)
1062
1070
  @return_refresh_token = args[:return_refresh_token] if args.key?(:return_refresh_token)
1063
1071
  @return_secure_token = args[:return_secure_token] if args.key?(:return_secure_token)
1064
1072
  @session_id = args[:session_id] if args.key?(:session_id)
@@ -1674,6 +1682,11 @@ module Google
1674
1682
  # @return [String]
1675
1683
  attr_accessor :raw_id
1676
1684
 
1685
+ # Raw IDP-returned user info.
1686
+ # Corresponds to the JSON property `rawUserInfo`
1687
+ # @return [String]
1688
+ attr_accessor :raw_user_info
1689
+
1677
1690
  # User's screen name at Twitter.
1678
1691
  # Corresponds to the JSON property `screenName`
1679
1692
  # @return [String]
@@ -1691,6 +1704,7 @@ module Google
1691
1704
  @photo_url = args[:photo_url] if args.key?(:photo_url)
1692
1705
  @provider_id = args[:provider_id] if args.key?(:provider_id)
1693
1706
  @raw_id = args[:raw_id] if args.key?(:raw_id)
1707
+ @raw_user_info = args[:raw_user_info] if args.key?(:raw_user_info)
1694
1708
  @screen_name = args[:screen_name] if args.key?(:screen_name)
1695
1709
  end
1696
1710
  end
@@ -1750,6 +1764,11 @@ module Google
1750
1764
  attr_accessor :email_verified
1751
1765
  alias_method :email_verified?, :email_verified
1752
1766
 
1767
+ # Client error code.
1768
+ # Corresponds to the JSON property `errorMessage`
1769
+ # @return [String]
1770
+ attr_accessor :error_message
1771
+
1753
1772
  # If idToken is STS id token, then this field will be expiration time of STS id
1754
1773
  # token in seconds.
1755
1774
  # Corresponds to the JSON property `expiresIn`
@@ -1877,6 +1896,11 @@ module Google
1877
1896
  # @return [String]
1878
1897
  attr_accessor :provider_id
1879
1898
 
1899
+ # Raw IDP-returned user info.
1900
+ # Corresponds to the JSON property `rawUserInfo`
1901
+ # @return [String]
1902
+ attr_accessor :raw_user_info
1903
+
1880
1904
  # If idToken is STS id token, then this field will be refresh token.
1881
1905
  # Corresponds to the JSON property `refreshToken`
1882
1906
  # @return [String]
@@ -1912,6 +1936,7 @@ module Google
1912
1936
  @email = args[:email] if args.key?(:email)
1913
1937
  @email_recycled = args[:email_recycled] if args.key?(:email_recycled)
1914
1938
  @email_verified = args[:email_verified] if args.key?(:email_verified)
1939
+ @error_message = args[:error_message] if args.key?(:error_message)
1915
1940
  @expires_in = args[:expires_in] if args.key?(:expires_in)
1916
1941
  @federated_id = args[:federated_id] if args.key?(:federated_id)
1917
1942
  @first_name = args[:first_name] if args.key?(:first_name)
@@ -1935,6 +1960,7 @@ module Google
1935
1960
  @original_email = args[:original_email] if args.key?(:original_email)
1936
1961
  @photo_url = args[:photo_url] if args.key?(:photo_url)
1937
1962
  @provider_id = args[:provider_id] if args.key?(:provider_id)
1963
+ @raw_user_info = args[:raw_user_info] if args.key?(:raw_user_info)
1938
1964
  @refresh_token = args[:refresh_token] if args.key?(:refresh_token)
1939
1965
  @screen_name = args[:screen_name] if args.key?(:screen_name)
1940
1966
  @time_zone = args[:time_zone] if args.key?(:time_zone)
@@ -494,6 +494,7 @@ module Google
494
494
  property :pending_id_token, as: 'pendingIdToken'
495
495
  property :post_body, as: 'postBody'
496
496
  property :request_uri, as: 'requestUri'
497
+ property :return_idp_credential, as: 'returnIdpCredential'
497
498
  property :return_refresh_token, as: 'returnRefreshToken'
498
499
  property :return_secure_token, as: 'returnSecureToken'
499
500
  property :session_id, as: 'sessionId'
@@ -647,6 +648,7 @@ module Google
647
648
  property :photo_url, as: 'photoUrl'
648
649
  property :provider_id, as: 'providerId'
649
650
  property :raw_id, as: 'rawId'
651
+ property :raw_user_info, as: 'rawUserInfo'
650
652
  property :screen_name, as: 'screenName'
651
653
  end
652
654
  end
@@ -664,6 +666,7 @@ module Google
664
666
  property :email, as: 'email'
665
667
  property :email_recycled, as: 'emailRecycled'
666
668
  property :email_verified, as: 'emailVerified'
669
+ property :error_message, as: 'errorMessage'
667
670
  property :expires_in, as: 'expiresIn'
668
671
  property :federated_id, as: 'federatedId'
669
672
  property :first_name, as: 'firstName'
@@ -687,6 +690,7 @@ module Google
687
690
  property :original_email, as: 'originalEmail'
688
691
  property :photo_url, as: 'photoUrl'
689
692
  property :provider_id, as: 'providerId'
693
+ property :raw_user_info, as: 'rawUserInfo'
690
694
  property :refresh_token, as: 'refreshToken'
691
695
  property :screen_name, as: 'screenName'
692
696
  property :time_zone, as: 'timeZone'
@@ -0,0 +1,36 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/language_v1beta1/service.rb'
16
+ require 'google/apis/language_v1beta1/classes.rb'
17
+ require 'google/apis/language_v1beta1/representations.rb'
18
+
19
+ module Google
20
+ module Apis
21
+ # Google Cloud Natural Language API
22
+ #
23
+ # Google Cloud Natural Language API provides natural language understanding
24
+ # technologies to developers. Examples include sentiment analysis, entity
25
+ # recognition, and text annotations.
26
+ #
27
+ # @see https://cloud.google.com/natural-language/
28
+ module LanguageV1beta1
29
+ VERSION = 'V1beta1'
30
+ REVISION = '20160816'
31
+
32
+ # View and manage your data across Google Cloud Platform services
33
+ AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,596 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module LanguageV1beta1
24
+
25
+ # ################################################################ #
26
+ # Represents the input to API methods.
27
+ class Document
28
+ include Google::Apis::Core::Hashable
29
+
30
+ # The language of the document (if not specified, the language is
31
+ # automatically detected). Both ISO and BCP-47 language codes are
32
+ # accepted.<br>
33
+ # **Current Language Restrictions:**
34
+ # * Only English, Spanish, and Japanese textual content
35
+ # are supported, with the following additional restriction:
36
+ # * `analyzeSentiment` only supports English text.
37
+ # If the language (either specified by the caller or automatically detected)
38
+ # is not supported by the called API method, an `INVALID_ARGUMENT` error
39
+ # is returned.
40
+ # Corresponds to the JSON property `language`
41
+ # @return [String]
42
+ attr_accessor :language
43
+
44
+ # The Google Cloud Storage URI where the file content is located.
45
+ # Corresponds to the JSON property `gcsContentUri`
46
+ # @return [String]
47
+ attr_accessor :gcs_content_uri
48
+
49
+ # Required. If the type is not set or is `TYPE_UNSPECIFIED`,
50
+ # returns an `INVALID_ARGUMENT` error.
51
+ # Corresponds to the JSON property `type`
52
+ # @return [String]
53
+ attr_accessor :type
54
+
55
+ # The content of the input in string format.
56
+ # Corresponds to the JSON property `content`
57
+ # @return [String]
58
+ attr_accessor :content
59
+
60
+ def initialize(**args)
61
+ update!(**args)
62
+ end
63
+
64
+ # Update properties of this object
65
+ def update!(**args)
66
+ @language = args[:language] if args.key?(:language)
67
+ @gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri)
68
+ @type = args[:type] if args.key?(:type)
69
+ @content = args[:content] if args.key?(:content)
70
+ end
71
+ end
72
+
73
+ # Represents an output piece of text.
74
+ class TextSpan
75
+ include Google::Apis::Core::Hashable
76
+
77
+ # The API calculates the beginning offset of the content in the original
78
+ # document according to the EncodingType specified in the API request.
79
+ # Corresponds to the JSON property `beginOffset`
80
+ # @return [Fixnum]
81
+ attr_accessor :begin_offset
82
+
83
+ # The content of the output text.
84
+ # Corresponds to the JSON property `content`
85
+ # @return [String]
86
+ attr_accessor :content
87
+
88
+ def initialize(**args)
89
+ update!(**args)
90
+ end
91
+
92
+ # Update properties of this object
93
+ def update!(**args)
94
+ @begin_offset = args[:begin_offset] if args.key?(:begin_offset)
95
+ @content = args[:content] if args.key?(:content)
96
+ end
97
+ end
98
+
99
+ # The `Status` type defines a logical error model that is suitable for different
100
+ # programming environments, including REST APIs and RPC APIs. It is used by
101
+ # [gRPC](https://github.com/grpc). The error model is designed to be:
102
+ # - Simple to use and understand for most users
103
+ # - Flexible enough to meet unexpected needs
104
+ # # Overview
105
+ # The `Status` message contains three pieces of data: error code, error message,
106
+ # and error details. The error code should be an enum value of
107
+ # google.rpc.Code, but it may accept additional error codes if needed. The
108
+ # error message should be a developer-facing English message that helps
109
+ # developers *understand* and *resolve* the error. If a localized user-facing
110
+ # error message is needed, put the localized message in the error details or
111
+ # localize it in the client. The optional error details may contain arbitrary
112
+ # information about the error. There is a predefined set of error detail types
113
+ # in the package `google.rpc` which can be used for common error conditions.
114
+ # # Language mapping
115
+ # The `Status` message is the logical representation of the error model, but it
116
+ # is not necessarily the actual wire format. When the `Status` message is
117
+ # exposed in different client libraries and different wire protocols, it can be
118
+ # mapped differently. For example, it will likely be mapped to some exceptions
119
+ # in Java, but more likely mapped to some error codes in C.
120
+ # # Other uses
121
+ # The error model and the `Status` message can be used in a variety of
122
+ # environments, either with or without APIs, to provide a
123
+ # consistent developer experience across different environments.
124
+ # Example uses of this error model include:
125
+ # - Partial errors. If a service needs to return partial errors to the client,
126
+ # it may embed the `Status` in the normal response to indicate the partial
127
+ # errors.
128
+ # - Workflow errors. A typical workflow has multiple steps. Each step may
129
+ # have a `Status` message for error reporting purpose.
130
+ # - Batch operations. If a client uses batch request and batch response, the
131
+ # `Status` message should be used directly inside batch response, one for
132
+ # each error sub-response.
133
+ # - Asynchronous operations. If an API call embeds asynchronous operation
134
+ # results in its response, the status of those operations should be
135
+ # represented directly using the `Status` message.
136
+ # - Logging. If some API errors are stored in logs, the message `Status` could
137
+ # be used directly after any stripping needed for security/privacy reasons.
138
+ class Status
139
+ include Google::Apis::Core::Hashable
140
+
141
+ # The status code, which should be an enum value of google.rpc.Code.
142
+ # Corresponds to the JSON property `code`
143
+ # @return [Fixnum]
144
+ attr_accessor :code
145
+
146
+ # A list of messages that carry the error details. There will be a
147
+ # common set of message types for APIs to use.
148
+ # Corresponds to the JSON property `details`
149
+ # @return [Array<Hash<String,Object>>]
150
+ attr_accessor :details
151
+
152
+ # A developer-facing error message, which should be in English. Any
153
+ # user-facing error message should be localized and sent in the
154
+ # google.rpc.Status.details field, or localized by the client.
155
+ # Corresponds to the JSON property `message`
156
+ # @return [String]
157
+ attr_accessor :message
158
+
159
+ def initialize(**args)
160
+ update!(**args)
161
+ end
162
+
163
+ # Update properties of this object
164
+ def update!(**args)
165
+ @code = args[:code] if args.key?(:code)
166
+ @details = args[:details] if args.key?(:details)
167
+ @message = args[:message] if args.key?(:message)
168
+ end
169
+ end
170
+
171
+ # The entity analysis request message.
172
+ class AnalyzeEntitiesRequest
173
+ include Google::Apis::Core::Hashable
174
+
175
+ # ################################################################ #
176
+ # Represents the input to API methods.
177
+ # Corresponds to the JSON property `document`
178
+ # @return [Google::Apis::LanguageV1beta1::Document]
179
+ attr_accessor :document
180
+
181
+ # The encoding type used by the API to calculate offsets.
182
+ # Corresponds to the JSON property `encodingType`
183
+ # @return [String]
184
+ attr_accessor :encoding_type
185
+
186
+ def initialize(**args)
187
+ update!(**args)
188
+ end
189
+
190
+ # Update properties of this object
191
+ def update!(**args)
192
+ @document = args[:document] if args.key?(:document)
193
+ @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
194
+ end
195
+ end
196
+
197
+ # Represents a mention for an entity in the text. Currently, proper noun
198
+ # mentions are supported.
199
+ class EntityMention
200
+ include Google::Apis::Core::Hashable
201
+
202
+ # Represents an output piece of text.
203
+ # Corresponds to the JSON property `text`
204
+ # @return [Google::Apis::LanguageV1beta1::TextSpan]
205
+ attr_accessor :text
206
+
207
+ def initialize(**args)
208
+ update!(**args)
209
+ end
210
+
211
+ # Update properties of this object
212
+ def update!(**args)
213
+ @text = args[:text] if args.key?(:text)
214
+ end
215
+ end
216
+
217
+ # The sentiment analysis request message.
218
+ class AnalyzeSentimentRequest
219
+ include Google::Apis::Core::Hashable
220
+
221
+ # ################################################################ #
222
+ # Represents the input to API methods.
223
+ # Corresponds to the JSON property `document`
224
+ # @return [Google::Apis::LanguageV1beta1::Document]
225
+ attr_accessor :document
226
+
227
+ def initialize(**args)
228
+ update!(**args)
229
+ end
230
+
231
+ # Update properties of this object
232
+ def update!(**args)
233
+ @document = args[:document] if args.key?(:document)
234
+ end
235
+ end
236
+
237
+ # The sentiment analysis response message.
238
+ class AnalyzeSentimentResponse
239
+ include Google::Apis::Core::Hashable
240
+
241
+ # Represents the feeling associated with the entire text or entities in
242
+ # the text.
243
+ # Corresponds to the JSON property `documentSentiment`
244
+ # @return [Google::Apis::LanguageV1beta1::Sentiment]
245
+ attr_accessor :document_sentiment
246
+
247
+ # The language of the text, which will be the same as the language specified
248
+ # in the request or, if not specified, the automatically-detected language.
249
+ # Corresponds to the JSON property `language`
250
+ # @return [String]
251
+ attr_accessor :language
252
+
253
+ def initialize(**args)
254
+ update!(**args)
255
+ end
256
+
257
+ # Update properties of this object
258
+ def update!(**args)
259
+ @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
260
+ @language = args[:language] if args.key?(:language)
261
+ end
262
+ end
263
+
264
+ # Represents dependency parse tree information for a token.
265
+ class DependencyEdge
266
+ include Google::Apis::Core::Hashable
267
+
268
+ # Represents the head of this token in the dependency tree.
269
+ # This is the index of the token which has an arc going to this token.
270
+ # The index is the position of the token in the array of tokens returned
271
+ # by the API method. If this token is a root token, then the
272
+ # `head_token_index` is its own index.
273
+ # Corresponds to the JSON property `headTokenIndex`
274
+ # @return [Fixnum]
275
+ attr_accessor :head_token_index
276
+
277
+ # The parse label for the token.
278
+ # Corresponds to the JSON property `label`
279
+ # @return [String]
280
+ attr_accessor :label
281
+
282
+ def initialize(**args)
283
+ update!(**args)
284
+ end
285
+
286
+ # Update properties of this object
287
+ def update!(**args)
288
+ @head_token_index = args[:head_token_index] if args.key?(:head_token_index)
289
+ @label = args[:label] if args.key?(:label)
290
+ end
291
+ end
292
+
293
+ # The request message for the advanced text annotation API, which performs all
294
+ # the above plus syntactic analysis.
295
+ class AnnotateTextRequest
296
+ include Google::Apis::Core::Hashable
297
+
298
+ # ################################################################ #
299
+ # Represents the input to API methods.
300
+ # Corresponds to the JSON property `document`
301
+ # @return [Google::Apis::LanguageV1beta1::Document]
302
+ attr_accessor :document
303
+
304
+ # The encoding type used by the API to calculate offsets.
305
+ # Corresponds to the JSON property `encodingType`
306
+ # @return [String]
307
+ attr_accessor :encoding_type
308
+
309
+ # All available features for sentiment, syntax, and semantic analysis.
310
+ # Setting each one to true will enable that specific analysis for the input.
311
+ # Corresponds to the JSON property `features`
312
+ # @return [Google::Apis::LanguageV1beta1::Features]
313
+ attr_accessor :features
314
+
315
+ def initialize(**args)
316
+ update!(**args)
317
+ end
318
+
319
+ # Update properties of this object
320
+ def update!(**args)
321
+ @document = args[:document] if args.key?(:document)
322
+ @encoding_type = args[:encoding_type] if args.key?(:encoding_type)
323
+ @features = args[:features] if args.key?(:features)
324
+ end
325
+ end
326
+
327
+ # Represents a sentence in the input document.
328
+ class Sentence
329
+ include Google::Apis::Core::Hashable
330
+
331
+ # Represents an output piece of text.
332
+ # Corresponds to the JSON property `text`
333
+ # @return [Google::Apis::LanguageV1beta1::TextSpan]
334
+ attr_accessor :text
335
+
336
+ def initialize(**args)
337
+ update!(**args)
338
+ end
339
+
340
+ # Update properties of this object
341
+ def update!(**args)
342
+ @text = args[:text] if args.key?(:text)
343
+ end
344
+ end
345
+
346
+ # All available features for sentiment, syntax, and semantic analysis.
347
+ # Setting each one to true will enable that specific analysis for the input.
348
+ class Features
349
+ include Google::Apis::Core::Hashable
350
+
351
+ # Extract document-level sentiment.
352
+ # Corresponds to the JSON property `extractDocumentSentiment`
353
+ # @return [Boolean]
354
+ attr_accessor :extract_document_sentiment
355
+ alias_method :extract_document_sentiment?, :extract_document_sentiment
356
+
357
+ # Extract entities.
358
+ # Corresponds to the JSON property `extractEntities`
359
+ # @return [Boolean]
360
+ attr_accessor :extract_entities
361
+ alias_method :extract_entities?, :extract_entities
362
+
363
+ # Extract syntax information.
364
+ # Corresponds to the JSON property `extractSyntax`
365
+ # @return [Boolean]
366
+ attr_accessor :extract_syntax
367
+ alias_method :extract_syntax?, :extract_syntax
368
+
369
+ def initialize(**args)
370
+ update!(**args)
371
+ end
372
+
373
+ # Update properties of this object
374
+ def update!(**args)
375
+ @extract_document_sentiment = args[:extract_document_sentiment] if args.key?(:extract_document_sentiment)
376
+ @extract_entities = args[:extract_entities] if args.key?(:extract_entities)
377
+ @extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax)
378
+ end
379
+ end
380
+
381
+ # Represents part of speech information for a token.
382
+ class PartOfSpeech
383
+ include Google::Apis::Core::Hashable
384
+
385
+ # The part of speech tag.
386
+ # Corresponds to the JSON property `tag`
387
+ # @return [String]
388
+ attr_accessor :tag
389
+
390
+ def initialize(**args)
391
+ update!(**args)
392
+ end
393
+
394
+ # Update properties of this object
395
+ def update!(**args)
396
+ @tag = args[:tag] if args.key?(:tag)
397
+ end
398
+ end
399
+
400
+ # The text annotations response message.
401
+ class AnnotateTextResponse
402
+ include Google::Apis::Core::Hashable
403
+
404
+ # Entities, along with their semantic information, in the input document.
405
+ # Populated if the user enables
406
+ # AnnotateTextRequest.Features.extract_entities.
407
+ # Corresponds to the JSON property `entities`
408
+ # @return [Array<Google::Apis::LanguageV1beta1::Entity>]
409
+ attr_accessor :entities
410
+
411
+ # Represents the feeling associated with the entire text or entities in
412
+ # the text.
413
+ # Corresponds to the JSON property `documentSentiment`
414
+ # @return [Google::Apis::LanguageV1beta1::Sentiment]
415
+ attr_accessor :document_sentiment
416
+
417
+ # The language of the text, which will be the same as the language specified
418
+ # in the request or, if not specified, the automatically-detected language.
419
+ # Corresponds to the JSON property `language`
420
+ # @return [String]
421
+ attr_accessor :language
422
+
423
+ # Tokens, along with their syntactic information, in the input document.
424
+ # Populated if the user enables
425
+ # AnnotateTextRequest.Features.extract_syntax.
426
+ # Corresponds to the JSON property `tokens`
427
+ # @return [Array<Google::Apis::LanguageV1beta1::Token>]
428
+ attr_accessor :tokens
429
+
430
+ # Sentences in the input document. Populated if the user enables
431
+ # AnnotateTextRequest.Features.extract_syntax.
432
+ # Corresponds to the JSON property `sentences`
433
+ # @return [Array<Google::Apis::LanguageV1beta1::Sentence>]
434
+ attr_accessor :sentences
435
+
436
+ def initialize(**args)
437
+ update!(**args)
438
+ end
439
+
440
+ # Update properties of this object
441
+ def update!(**args)
442
+ @entities = args[:entities] if args.key?(:entities)
443
+ @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment)
444
+ @language = args[:language] if args.key?(:language)
445
+ @tokens = args[:tokens] if args.key?(:tokens)
446
+ @sentences = args[:sentences] if args.key?(:sentences)
447
+ end
448
+ end
449
+
450
+ # Represents a phrase in the text that is a known entity, such as
451
+ # a person, an organization, or location. The API associates information, such
452
+ # as salience and mentions, with entities.
453
+ class Entity
454
+ include Google::Apis::Core::Hashable
455
+
456
+ # Metadata associated with the entity.
457
+ # Currently, only Wikipedia URLs are provided, if available.
458
+ # The associated key is "wikipedia_url".
459
+ # Corresponds to the JSON property `metadata`
460
+ # @return [Hash<String,String>]
461
+ attr_accessor :metadata
462
+
463
+ # The salience score associated with the entity in the [0, 1.0] range.
464
+ # The salience score for an entity provides information about the
465
+ # importance or centrality of that entity to the entire document text.
466
+ # Scores closer to 0 are less salient, while scores closer to 1.0 are highly
467
+ # salient.
468
+ # Corresponds to the JSON property `salience`
469
+ # @return [Float]
470
+ attr_accessor :salience
471
+
472
+ # The entity type.
473
+ # Corresponds to the JSON property `type`
474
+ # @return [String]
475
+ attr_accessor :type
476
+
477
+ # The mentions of this entity in the input document. The API currently
478
+ # supports proper noun mentions.
479
+ # Corresponds to the JSON property `mentions`
480
+ # @return [Array<Google::Apis::LanguageV1beta1::EntityMention>]
481
+ attr_accessor :mentions
482
+
483
+ # The representative name for the entity.
484
+ # Corresponds to the JSON property `name`
485
+ # @return [String]
486
+ attr_accessor :name
487
+
488
+ def initialize(**args)
489
+ update!(**args)
490
+ end
491
+
492
+ # Update properties of this object
493
+ def update!(**args)
494
+ @metadata = args[:metadata] if args.key?(:metadata)
495
+ @salience = args[:salience] if args.key?(:salience)
496
+ @type = args[:type] if args.key?(:type)
497
+ @mentions = args[:mentions] if args.key?(:mentions)
498
+ @name = args[:name] if args.key?(:name)
499
+ end
500
+ end
501
+
502
+ # Represents the feeling associated with the entire text or entities in
503
+ # the text.
504
+ class Sentiment
505
+ include Google::Apis::Core::Hashable
506
+
507
+ # Polarity of the sentiment in the [-1.0, 1.0] range. Larger numbers
508
+ # represent more positive sentiments.
509
+ # Corresponds to the JSON property `polarity`
510
+ # @return [Float]
511
+ attr_accessor :polarity
512
+
513
+ # A non-negative number in the [0, +inf) range, which represents
514
+ # the absolute magnitude of sentiment regardless of polarity (positive or
515
+ # negative).
516
+ # Corresponds to the JSON property `magnitude`
517
+ # @return [Float]
518
+ attr_accessor :magnitude
519
+
520
+ def initialize(**args)
521
+ update!(**args)
522
+ end
523
+
524
+ # Update properties of this object
525
+ def update!(**args)
526
+ @polarity = args[:polarity] if args.key?(:polarity)
527
+ @magnitude = args[:magnitude] if args.key?(:magnitude)
528
+ end
529
+ end
530
+
531
+ # Represents the smallest syntactic building block of the text.
532
+ class Token
533
+ include Google::Apis::Core::Hashable
534
+
535
+ # Represents an output piece of text.
536
+ # Corresponds to the JSON property `text`
537
+ # @return [Google::Apis::LanguageV1beta1::TextSpan]
538
+ attr_accessor :text
539
+
540
+ # Represents part of speech information for a token.
541
+ # Corresponds to the JSON property `partOfSpeech`
542
+ # @return [Google::Apis::LanguageV1beta1::PartOfSpeech]
543
+ attr_accessor :part_of_speech
544
+
545
+ # Represents dependency parse tree information for a token.
546
+ # Corresponds to the JSON property `dependencyEdge`
547
+ # @return [Google::Apis::LanguageV1beta1::DependencyEdge]
548
+ attr_accessor :dependency_edge
549
+
550
+ # [Lemma](https://en.wikipedia.org/wiki/Lemma_(morphology))
551
+ # of the token.
552
+ # Corresponds to the JSON property `lemma`
553
+ # @return [String]
554
+ attr_accessor :lemma
555
+
556
+ def initialize(**args)
557
+ update!(**args)
558
+ end
559
+
560
+ # Update properties of this object
561
+ def update!(**args)
562
+ @text = args[:text] if args.key?(:text)
563
+ @part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech)
564
+ @dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge)
565
+ @lemma = args[:lemma] if args.key?(:lemma)
566
+ end
567
+ end
568
+
569
+ # The entity analysis response message.
570
+ class AnalyzeEntitiesResponse
571
+ include Google::Apis::Core::Hashable
572
+
573
+ # The recognized entities in the input document.
574
+ # Corresponds to the JSON property `entities`
575
+ # @return [Array<Google::Apis::LanguageV1beta1::Entity>]
576
+ attr_accessor :entities
577
+
578
+ # The language of the text, which will be the same as the language specified
579
+ # in the request or, if not specified, the automatically-detected language.
580
+ # Corresponds to the JSON property `language`
581
+ # @return [String]
582
+ attr_accessor :language
583
+
584
+ def initialize(**args)
585
+ update!(**args)
586
+ end
587
+
588
+ # Update properties of this object
589
+ def update!(**args)
590
+ @entities = args[:entities] if args.key?(:entities)
591
+ @language = args[:language] if args.key?(:language)
592
+ end
593
+ end
594
+ end
595
+ end
596
+ end