google-api-client 0.40.0 → 0.40.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +53 -0
  3. data/generated/google/apis/admob_v1.rb +1 -1
  4. data/generated/google/apis/admob_v1/classes.rb +5 -6
  5. data/generated/google/apis/androidenterprise_v1.rb +2 -2
  6. data/generated/google/apis/androidenterprise_v1/classes.rb +547 -724
  7. data/generated/google/apis/androidenterprise_v1/representations.rb +0 -54
  8. data/generated/google/apis/androidenterprise_v1/service.rb +540 -795
  9. data/generated/google/apis/androidpublisher_v3.rb +1 -1
  10. data/generated/google/apis/androidpublisher_v3/classes.rb +21 -2
  11. data/generated/google/apis/androidpublisher_v3/representations.rb +2 -0
  12. data/generated/google/apis/appsmarket_v2.rb +3 -3
  13. data/generated/google/apis/appsmarket_v2/classes.rb +160 -159
  14. data/generated/google/apis/appsmarket_v2/representations.rb +78 -78
  15. data/generated/google/apis/appsmarket_v2/service.rb +24 -39
  16. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  17. data/generated/google/apis/cloudbuild_v1/classes.rb +14 -2
  18. data/generated/google/apis/cloudbuild_v1/representations.rb +1 -0
  19. data/generated/google/apis/cloudbuild_v1/service.rb +42 -0
  20. data/generated/google/apis/cloudbuild_v1alpha1.rb +1 -1
  21. data/generated/google/apis/cloudbuild_v1alpha1/classes.rb +12 -0
  22. data/generated/google/apis/cloudbuild_v1alpha1/representations.rb +1 -0
  23. data/generated/google/apis/cloudbuild_v1alpha2.rb +1 -1
  24. data/generated/google/apis/cloudbuild_v1alpha2/classes.rb +12 -0
  25. data/generated/google/apis/cloudbuild_v1alpha2/representations.rb +1 -0
  26. data/generated/google/apis/cloudsearch_v1.rb +1 -1
  27. data/generated/google/apis/cloudsearch_v1/service.rb +1 -1
  28. data/generated/google/apis/cloudtasks_v2.rb +1 -1
  29. data/generated/google/apis/cloudtasks_v2/classes.rb +6 -4
  30. data/generated/google/apis/cloudtasks_v2beta3.rb +1 -1
  31. data/generated/google/apis/cloudtasks_v2beta3/classes.rb +9 -0
  32. data/generated/google/apis/cloudtasks_v2beta3/representations.rb +1 -0
  33. data/generated/google/apis/compute_alpha.rb +1 -1
  34. data/generated/google/apis/compute_alpha/classes.rb +63 -99
  35. data/generated/google/apis/compute_alpha/representations.rb +14 -32
  36. data/generated/google/apis/compute_alpha/service.rb +37 -0
  37. data/generated/google/apis/compute_beta.rb +1 -1
  38. data/generated/google/apis/compute_beta/classes.rb +51 -26
  39. data/generated/google/apis/compute_beta/representations.rb +3 -0
  40. data/generated/google/apis/compute_v1.rb +1 -1
  41. data/generated/google/apis/compute_v1/classes.rb +5 -5
  42. data/generated/google/apis/content_v2.rb +1 -1
  43. data/generated/google/apis/content_v2/classes.rb +34 -0
  44. data/generated/google/apis/content_v2/representations.rb +16 -0
  45. data/generated/google/apis/content_v2/service.rb +5 -1
  46. data/generated/google/apis/content_v2_1.rb +1 -1
  47. data/generated/google/apis/content_v2_1/classes.rb +357 -5
  48. data/generated/google/apis/content_v2_1/representations.rb +135 -0
  49. data/generated/google/apis/content_v2_1/service.rb +85 -1
  50. data/generated/google/apis/dataproc_v1.rb +1 -1
  51. data/generated/google/apis/dataproc_v1/classes.rb +22 -22
  52. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  53. data/generated/google/apis/dataproc_v1beta2/classes.rb +23 -23
  54. data/generated/google/apis/dialogflow_v2.rb +1 -1
  55. data/generated/google/apis/dialogflow_v2/classes.rb +9 -29
  56. data/generated/google/apis/dialogflow_v2/representations.rb +0 -4
  57. data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
  58. data/generated/google/apis/dialogflow_v2beta1/classes.rb +0 -28
  59. data/generated/google/apis/dialogflow_v2beta1/representations.rb +0 -4
  60. data/generated/google/apis/displayvideo_v1.rb +1 -1
  61. data/generated/google/apis/displayvideo_v1/classes.rb +463 -0
  62. data/generated/google/apis/displayvideo_v1/representations.rb +238 -0
  63. data/generated/google/apis/displayvideo_v1/service.rb +1718 -376
  64. data/generated/google/apis/file_v1.rb +1 -1
  65. data/generated/google/apis/file_v1/classes.rb +0 -1156
  66. data/generated/google/apis/file_v1/representations.rb +0 -381
  67. data/generated/google/apis/file_v1beta1.rb +1 -1
  68. data/generated/google/apis/file_v1beta1/classes.rb +67 -1156
  69. data/generated/google/apis/file_v1beta1/representations.rb +14 -376
  70. data/generated/google/apis/firebasehosting_v1beta1.rb +1 -1
  71. data/generated/google/apis/firebasehosting_v1beta1/classes.rb +30 -25
  72. data/generated/google/apis/fitness_v1.rb +1 -1
  73. data/generated/google/apis/fitness_v1/classes.rb +1 -1
  74. data/generated/google/apis/games_v1.rb +1 -1
  75. data/generated/google/apis/healthcare_v1.rb +1 -1
  76. data/generated/google/apis/healthcare_v1/classes.rb +3 -3
  77. data/generated/google/apis/healthcare_v1/service.rb +3 -3
  78. data/generated/google/apis/healthcare_v1beta1.rb +1 -1
  79. data/generated/google/apis/healthcare_v1beta1/classes.rb +3 -3
  80. data/generated/google/apis/healthcare_v1beta1/service.rb +3 -3
  81. data/generated/google/apis/memcache_v1beta2.rb +1 -1
  82. data/generated/google/apis/memcache_v1beta2/classes.rb +36 -5
  83. data/generated/google/apis/memcache_v1beta2/representations.rb +15 -0
  84. data/generated/google/apis/people_v1.rb +1 -1
  85. data/generated/google/apis/people_v1/classes.rb +100 -0
  86. data/generated/google/apis/people_v1/representations.rb +31 -0
  87. data/generated/google/apis/people_v1/service.rb +95 -2
  88. data/generated/google/apis/prod_tt_sasportal_v1alpha1.rb +1 -1
  89. data/generated/google/apis/prod_tt_sasportal_v1alpha1/service.rb +30 -0
  90. data/generated/google/apis/pubsub_v1.rb +1 -1
  91. data/generated/google/apis/pubsub_v1/classes.rb +15 -1
  92. data/generated/google/apis/pubsub_v1/representations.rb +12 -0
  93. data/generated/google/apis/pubsub_v1/service.rb +35 -1
  94. data/generated/google/apis/{dialogflow_v3alpha1.rb → recommender_v1.rb} +9 -13
  95. data/generated/google/apis/recommender_v1/classes.rb +505 -0
  96. data/generated/google/apis/recommender_v1/representations.rb +232 -0
  97. data/generated/google/apis/recommender_v1/service.rb +266 -0
  98. data/generated/google/apis/run_v1.rb +1 -1
  99. data/generated/google/apis/run_v1/classes.rb +9 -0
  100. data/generated/google/apis/run_v1/representations.rb +1 -0
  101. data/generated/google/apis/run_v1alpha1.rb +1 -1
  102. data/generated/google/apis/run_v1alpha1/classes.rb +9 -0
  103. data/generated/google/apis/run_v1alpha1/representations.rb +1 -0
  104. data/generated/google/apis/sasportal_v1alpha1.rb +1 -1
  105. data/generated/google/apis/sasportal_v1alpha1/service.rb +30 -0
  106. data/generated/google/apis/serviceconsumermanagement_v1.rb +1 -1
  107. data/generated/google/apis/serviceconsumermanagement_v1/classes.rb +97 -0
  108. data/generated/google/apis/serviceconsumermanagement_v1/representations.rb +32 -0
  109. data/generated/google/apis/serviceconsumermanagement_v1beta1.rb +1 -1
  110. data/generated/google/apis/serviceconsumermanagement_v1beta1/classes.rb +97 -0
  111. data/generated/google/apis/serviceconsumermanagement_v1beta1/representations.rb +32 -0
  112. data/generated/google/apis/servicecontrol_v1.rb +1 -1
  113. data/generated/google/apis/servicecontrol_v1/classes.rb +3 -3
  114. data/generated/google/apis/serviceusage_v1.rb +1 -1
  115. data/generated/google/apis/serviceusage_v1/classes.rb +89 -0
  116. data/generated/google/apis/serviceusage_v1/representations.rb +32 -0
  117. data/generated/google/apis/serviceusage_v1beta1.rb +1 -1
  118. data/generated/google/apis/serviceusage_v1beta1/classes.rb +89 -0
  119. data/generated/google/apis/serviceusage_v1beta1/representations.rb +32 -0
  120. data/generated/google/apis/sourcerepo_v1.rb +1 -1
  121. data/generated/google/apis/sourcerepo_v1/classes.rb +23 -10
  122. data/generated/google/apis/sourcerepo_v1/service.rb +3 -0
  123. data/generated/google/apis/spanner_v1.rb +1 -1
  124. data/generated/google/apis/spanner_v1/classes.rb +1 -2
  125. data/generated/google/apis/spanner_v1/service.rb +8 -8
  126. data/generated/google/apis/sql_v1beta4.rb +1 -1
  127. data/generated/google/apis/sql_v1beta4/classes.rb +7 -0
  128. data/generated/google/apis/sql_v1beta4/representations.rb +1 -0
  129. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  130. data/generated/google/apis/storagetransfer_v1/classes.rb +2 -1
  131. data/generated/google/apis/testing_v1.rb +1 -1
  132. data/generated/google/apis/testing_v1/classes.rb +2 -1
  133. data/generated/google/apis/videointelligence_v1.rb +1 -1
  134. data/generated/google/apis/videointelligence_v1/classes.rb +1 -1
  135. data/generated/google/apis/videointelligence_v1/service.rb +32 -0
  136. data/generated/google/apis/videointelligence_v1beta2.rb +1 -1
  137. data/generated/google/apis/videointelligence_v1beta2/classes.rb +1 -1
  138. data/generated/google/apis/videointelligence_v1p1beta1.rb +1 -1
  139. data/generated/google/apis/videointelligence_v1p1beta1/classes.rb +1 -1
  140. data/generated/google/apis/videointelligence_v1p2beta1.rb +1 -1
  141. data/generated/google/apis/videointelligence_v1p2beta1/classes.rb +1 -1
  142. data/generated/google/apis/videointelligence_v1p3beta1.rb +1 -1
  143. data/generated/google/apis/videointelligence_v1p3beta1/classes.rb +1 -1
  144. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  145. data/lib/google/apis/core/api_command.rb +12 -7
  146. data/lib/google/apis/options.rb +5 -1
  147. data/lib/google/apis/version.rb +1 -1
  148. metadata +7 -7
  149. data/generated/google/apis/dialogflow_v3alpha1/classes.rb +0 -5579
  150. data/generated/google/apis/dialogflow_v3alpha1/representations.rb +0 -2295
  151. data/generated/google/apis/dialogflow_v3alpha1/service.rb +0 -296
@@ -82,6 +82,12 @@ module Google
82
82
  include Google::Apis::Core::JsonObjectSupport
83
83
  end
84
84
 
85
+ class CopyOtherContactToMyContactsGroupRequest
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
85
91
  class CoverPhoto
86
92
  class Representation < Google::Apis::Core::JsonRepresentation; end
87
93
 
@@ -172,6 +178,12 @@ module Google
172
178
  include Google::Apis::Core::JsonObjectSupport
173
179
  end
174
180
 
181
+ class ListOtherContactsResponse
182
+ class Representation < Google::Apis::Core::JsonRepresentation; end
183
+
184
+ include Google::Apis::Core::JsonObjectSupport
185
+ end
186
+
175
187
  class Locale
176
188
  class Representation < Google::Apis::Core::JsonRepresentation; end
177
189
 
@@ -448,6 +460,14 @@ module Google
448
460
  end
449
461
  end
450
462
 
463
+ class CopyOtherContactToMyContactsGroupRequest
464
+ # @private
465
+ class Representation < Google::Apis::Core::JsonRepresentation
466
+ property :copy_mask, as: 'copyMask'
467
+ property :read_mask, as: 'readMask'
468
+ end
469
+ end
470
+
451
471
  class CoverPhoto
452
472
  # @private
453
473
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -594,6 +614,16 @@ module Google
594
614
  end
595
615
  end
596
616
 
617
+ class ListOtherContactsResponse
618
+ # @private
619
+ class Representation < Google::Apis::Core::JsonRepresentation
620
+ property :next_page_token, as: 'nextPageToken'
621
+ property :next_sync_token, as: 'nextSyncToken'
622
+ collection :other_contacts, as: 'otherContacts', class: Google::Apis::PeopleV1::Person, decorator: Google::Apis::PeopleV1::Person::Representation
623
+
624
+ end
625
+ end
626
+
597
627
  class Locale
598
628
  # @private
599
629
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -649,6 +679,7 @@ module Google
649
679
  property :phonetic_honorific_prefix, as: 'phoneticHonorificPrefix'
650
680
  property :phonetic_honorific_suffix, as: 'phoneticHonorificSuffix'
651
681
  property :phonetic_middle_name, as: 'phoneticMiddleName'
682
+ property :unstructured_name, as: 'unstructuredName'
652
683
  end
653
684
  end
654
685
 
@@ -296,6 +296,39 @@ module Google
296
296
  execute_or_queue_command(command, &block)
297
297
  end
298
298
 
299
+ # Copies an other contact to a new contact in the user's MY_CONTACTS group
300
+ # @param [String] resource_name
301
+ # Required. The resource name of the other contact to copy.
302
+ # @param [Google::Apis::PeopleV1::CopyOtherContactToMyContactsGroupRequest] copy_other_contact_to_my_contacts_group_request_object
303
+ # @param [String] fields
304
+ # Selector specifying which fields to include in a partial response.
305
+ # @param [String] quota_user
306
+ # Available to use for quota purposes for server-side applications. Can be any
307
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
308
+ # @param [Google::Apis::RequestOptions] options
309
+ # Request-specific options
310
+ #
311
+ # @yield [result, err] Result & error if block supplied
312
+ # @yieldparam result [Google::Apis::PeopleV1::Person] parsed result object
313
+ # @yieldparam err [StandardError] error object if request failed
314
+ #
315
+ # @return [Google::Apis::PeopleV1::Person]
316
+ #
317
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
318
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
319
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
320
+ def copy_other_contact_to_my_contacts_group(resource_name, copy_other_contact_to_my_contacts_group_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
321
+ command = make_simple_command(:post, 'v1/{+resourceName}:copyOtherContactToMyContactsGroup', options)
322
+ command.request_representation = Google::Apis::PeopleV1::CopyOtherContactToMyContactsGroupRequest::Representation
323
+ command.request_object = copy_other_contact_to_my_contacts_group_request_object
324
+ command.response_representation = Google::Apis::PeopleV1::Person::Representation
325
+ command.response_class = Google::Apis::PeopleV1::Person
326
+ command.params['resourceName'] = resource_name unless resource_name.nil?
327
+ command.query['fields'] = fields unless fields.nil?
328
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
329
+ execute_or_queue_command(command, &block)
330
+ end
331
+
299
332
  # Create a new contact and return the person resource for that contact.
300
333
  # @param [Google::Apis::PeopleV1::Person] person_object
301
334
  # @param [String] fields
@@ -670,8 +703,7 @@ module Google
670
703
  execute_or_queue_command(command, &block)
671
704
  end
672
705
 
673
- # Provides a list of the authenticated user's contacts merged with any
674
- # connected profiles.
706
+ # Provides a list of the authenticated user's contacts.
675
707
  # The request throws a 400 error if 'personFields' is not specified.
676
708
  # @param [String] resource_name
677
709
  # Required. The resource name to return connections for. Only `people/me` is
@@ -767,6 +799,67 @@ module Google
767
799
  command.query['quotaUser'] = quota_user unless quota_user.nil?
768
800
  execute_or_queue_command(command, &block)
769
801
  end
802
+
803
+ # List all other contacts, that is contacts that are not in a contact group.
804
+ # Other contacts are typically auto created contacts from interactions.
805
+ # @param [Fixnum] page_size
806
+ # Optional. The number of other contacts to include in the response. Valid
807
+ # values are
808
+ # between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0.
809
+ # @param [String] page_token
810
+ # Optional. A page token, received from a previous `ListOtherContacts` call.
811
+ # Provide this to retrieve the subsequent page.
812
+ # When paginating, all other parameters provided to `ListOtherContacts`
813
+ # must match the call that provided the page token.
814
+ # @param [String] read_mask
815
+ # Required. A field mask to restrict which fields on each person are returned.
816
+ # Multiple
817
+ # fields can be specified by separating them with commas. Valid values are:
818
+ # * emailAddresses
819
+ # * names
820
+ # * phoneNumbers
821
+ # @param [Boolean] request_sync_token
822
+ # Optional. Whether the response should include `next_sync_token`, which can be
823
+ # used to
824
+ # get all changes since the last request. For subsequent sync requests use
825
+ # the `sync_token` param instead. Initial sync requests that specify
826
+ # `request_sync_token` have an additional rate limit.
827
+ # @param [String] sync_token
828
+ # Optional. A sync token, received from a previous `ListOtherContacts` call.
829
+ # Provide this to retrieve only the resources changed since the last request.
830
+ # Sync requests that specify `sync_token` have an additional rate limit.
831
+ # When syncing, all other parameters provided to `ListOtherContacts`
832
+ # must match the call that provided the sync token.
833
+ # @param [String] fields
834
+ # Selector specifying which fields to include in a partial response.
835
+ # @param [String] quota_user
836
+ # Available to use for quota purposes for server-side applications. Can be any
837
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
838
+ # @param [Google::Apis::RequestOptions] options
839
+ # Request-specific options
840
+ #
841
+ # @yield [result, err] Result & error if block supplied
842
+ # @yieldparam result [Google::Apis::PeopleV1::ListOtherContactsResponse] parsed result object
843
+ # @yieldparam err [StandardError] error object if request failed
844
+ #
845
+ # @return [Google::Apis::PeopleV1::ListOtherContactsResponse]
846
+ #
847
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
848
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
849
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
850
+ def other_contacts(page_size: nil, page_token: nil, read_mask: nil, request_sync_token: nil, sync_token: nil, fields: nil, quota_user: nil, options: nil, &block)
851
+ command = make_simple_command(:post, 'v1/otherContacts', options)
852
+ command.response_representation = Google::Apis::PeopleV1::ListOtherContactsResponse::Representation
853
+ command.response_class = Google::Apis::PeopleV1::ListOtherContactsResponse
854
+ command.query['pageSize'] = page_size unless page_size.nil?
855
+ command.query['pageToken'] = page_token unless page_token.nil?
856
+ command.query['readMask'] = read_mask unless read_mask.nil?
857
+ command.query['requestSyncToken'] = request_sync_token unless request_sync_token.nil?
858
+ command.query['syncToken'] = sync_token unless sync_token.nil?
859
+ command.query['fields'] = fields unless fields.nil?
860
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
861
+ execute_or_queue_command(command, &block)
862
+ end
770
863
 
771
864
  protected
772
865
 
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/spectrum-access-system/
26
26
  module ProdTtSasportalV1alpha1
27
27
  VERSION = 'V1alpha1'
28
- REVISION = '20200416'
28
+ REVISION = '20200601'
29
29
 
30
30
  # View your email address
31
31
  AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email'
@@ -818,6 +818,36 @@ module Google
818
818
  execute_or_queue_command(command, &block)
819
819
  end
820
820
 
821
+ # Returns a requested node.
822
+ # @param [String] name
823
+ # Required. The name of the node.
824
+ # @param [String] fields
825
+ # Selector specifying which fields to include in a partial response.
826
+ # @param [String] quota_user
827
+ # Available to use for quota purposes for server-side applications. Can be any
828
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
829
+ # @param [Google::Apis::RequestOptions] options
830
+ # Request-specific options
831
+ #
832
+ # @yield [result, err] Result & error if block supplied
833
+ # @yieldparam result [Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode] parsed result object
834
+ # @yieldparam err [StandardError] error object if request failed
835
+ #
836
+ # @return [Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode]
837
+ #
838
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
839
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
840
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
841
+ def get_node(name, fields: nil, quota_user: nil, options: nil, &block)
842
+ command = make_simple_command(:get, 'v1alpha1/{+name}', options)
843
+ command.response_representation = Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode::Representation
844
+ command.response_class = Google::Apis::ProdTtSasportalV1alpha1::SasPortalNode
845
+ command.params['name'] = name unless name.nil?
846
+ command.query['fields'] = fields unless fields.nil?
847
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
848
+ execute_or_queue_command(command, &block)
849
+ end
850
+
821
851
  # Creates a device under a node or customer. Returned devices are unordered.
822
852
  # @param [String] parent
823
853
  # Required. The name of the parent resource.
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://cloud.google.com/pubsub/docs
26
26
  module PubsubV1
27
27
  VERSION = 'V1'
28
- REVISION = '20200505'
28
+ REVISION = '20200525'
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'
@@ -203,6 +203,20 @@ module Google
203
203
  end
204
204
  end
205
205
 
206
+ # Response for the DetachSubscription method.
207
+ # Reserved for future use.
208
+ class DetachSubscriptionResponse
209
+ include Google::Apis::Core::Hashable
210
+
211
+ def initialize(**args)
212
+ update!(**args)
213
+ end
214
+
215
+ # Update properties of this object
216
+ def update!(**args)
217
+ end
218
+ end
219
+
206
220
  # A generic empty message that you can re-use to avoid defining duplicated
207
221
  # empty messages in your APIs. A typical example is to use it as the request
208
222
  # or the response type of an API method. For instance:
@@ -401,7 +415,7 @@ module Google
401
415
  # @return [String]
402
416
  attr_accessor :next_page_token
403
417
 
404
- # The names of the subscriptions that match the request.
418
+ # The names of subscriptions attached to the topic specified in the request.
405
419
  # Corresponds to the JSON property `subscriptions`
406
420
  # @return [Array<String>]
407
421
  attr_accessor :subscriptions
@@ -46,6 +46,12 @@ module Google
46
46
  include Google::Apis::Core::JsonObjectSupport
47
47
  end
48
48
 
49
+ class DetachSubscriptionResponse
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
49
55
  class Empty
50
56
  class Representation < Google::Apis::Core::JsonRepresentation; end
51
57
 
@@ -265,6 +271,12 @@ module Google
265
271
  end
266
272
  end
267
273
 
274
+ class DetachSubscriptionResponse
275
+ # @private
276
+ class Representation < Google::Apis::Core::JsonRepresentation
277
+ end
278
+ end
279
+
268
280
  class Empty
269
281
  # @private
270
282
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -502,6 +502,40 @@ module Google
502
502
  execute_or_queue_command(command, &block)
503
503
  end
504
504
 
505
+ # Detaches a subscription from this topic. All messages retained in the
506
+ # subscription are dropped. Subsequent `Pull` and `StreamingPull` requests
507
+ # will return FAILED_PRECONDITION. If the subscription is a push
508
+ # subscription, pushes to the endpoint will stop.
509
+ # @param [String] subscription
510
+ # Required. The subscription to detach.
511
+ # Format is `projects/`project`/subscriptions/`subscription``.
512
+ # @param [String] fields
513
+ # Selector specifying which fields to include in a partial response.
514
+ # @param [String] quota_user
515
+ # Available to use for quota purposes for server-side applications. Can be any
516
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
517
+ # @param [Google::Apis::RequestOptions] options
518
+ # Request-specific options
519
+ #
520
+ # @yield [result, err] Result & error if block supplied
521
+ # @yieldparam result [Google::Apis::PubsubV1::DetachSubscriptionResponse] parsed result object
522
+ # @yieldparam err [StandardError] error object if request failed
523
+ #
524
+ # @return [Google::Apis::PubsubV1::DetachSubscriptionResponse]
525
+ #
526
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
527
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
528
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
529
+ def detach_project_subscription(subscription, fields: nil, quota_user: nil, options: nil, &block)
530
+ command = make_simple_command(:post, 'v1/{+subscription}:detach', options)
531
+ command.response_representation = Google::Apis::PubsubV1::DetachSubscriptionResponse::Representation
532
+ command.response_class = Google::Apis::PubsubV1::DetachSubscriptionResponse
533
+ command.params['subscription'] = subscription unless subscription.nil?
534
+ command.query['fields'] = fields unless fields.nil?
535
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
536
+ execute_or_queue_command(command, &block)
537
+ end
538
+
505
539
  # Gets the configuration details of a subscription.
506
540
  # @param [String] subscription
507
541
  # Required. The name of the subscription to get.
@@ -1264,7 +1298,7 @@ module Google
1264
1298
  execute_or_queue_command(command, &block)
1265
1299
  end
1266
1300
 
1267
- # Lists the names of the subscriptions on this topic.
1301
+ # Lists the names of the attached subscriptions on this topic.
1268
1302
  # @param [String] topic
1269
1303
  # Required. The name of the topic that subscriptions are attached to.
1270
1304
  # Format is `projects/`project`/topics/`topic``.
@@ -12,27 +12,23 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require 'google/apis/dialogflow_v3alpha1/service.rb'
16
- require 'google/apis/dialogflow_v3alpha1/classes.rb'
17
- require 'google/apis/dialogflow_v3alpha1/representations.rb'
15
+ require 'google/apis/recommender_v1/service.rb'
16
+ require 'google/apis/recommender_v1/classes.rb'
17
+ require 'google/apis/recommender_v1/representations.rb'
18
18
 
19
19
  module Google
20
20
  module Apis
21
- # Dialogflow API
21
+ # Recommender API
22
22
  #
23
- # Builds conversational interfaces (for example, chatbots, and voice-powered
24
- # apps and devices).
23
+ #
25
24
  #
26
- # @see https://cloud.google.com/dialogflow/
27
- module DialogflowV3alpha1
28
- VERSION = 'V3alpha1'
29
- REVISION = '20200526'
25
+ # @see https://cloud.google.com/recommender/docs/
26
+ module RecommenderV1
27
+ VERSION = 'V1'
28
+ REVISION = '20200516'
30
29
 
31
30
  # View and manage your data across Google Cloud Platform services
32
31
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
33
-
34
- # View, manage and query your Dialogflow agents
35
- AUTH_DIALOGFLOW = 'https://www.googleapis.com/auth/dialogflow'
36
32
  end
37
33
  end
38
34
  end
@@ -0,0 +1,505 @@
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 RecommenderV1
24
+
25
+ # Contains metadata about how much money a recommendation can save or incur.
26
+ class GoogleCloudRecommenderV1CostProjection
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Represents an amount of money with its currency type.
30
+ # Corresponds to the JSON property `cost`
31
+ # @return [Google::Apis::RecommenderV1::GoogleTypeMoney]
32
+ attr_accessor :cost
33
+
34
+ # Duration for which this cost applies.
35
+ # Corresponds to the JSON property `duration`
36
+ # @return [String]
37
+ attr_accessor :duration
38
+
39
+ def initialize(**args)
40
+ update!(**args)
41
+ end
42
+
43
+ # Update properties of this object
44
+ def update!(**args)
45
+ @cost = args[:cost] if args.key?(:cost)
46
+ @duration = args[:duration] if args.key?(:duration)
47
+ end
48
+ end
49
+
50
+ # Contains the impact a recommendation can have for a given category.
51
+ class GoogleCloudRecommenderV1Impact
52
+ include Google::Apis::Core::Hashable
53
+
54
+ # Category that is being targeted.
55
+ # Corresponds to the JSON property `category`
56
+ # @return [String]
57
+ attr_accessor :category
58
+
59
+ # Contains metadata about how much money a recommendation can save or incur.
60
+ # Corresponds to the JSON property `costProjection`
61
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1CostProjection]
62
+ attr_accessor :cost_projection
63
+
64
+ def initialize(**args)
65
+ update!(**args)
66
+ end
67
+
68
+ # Update properties of this object
69
+ def update!(**args)
70
+ @category = args[:category] if args.key?(:category)
71
+ @cost_projection = args[:cost_projection] if args.key?(:cost_projection)
72
+ end
73
+ end
74
+
75
+ # Response to the `ListRecommendations` method.
76
+ class GoogleCloudRecommenderV1ListRecommendationsResponse
77
+ include Google::Apis::Core::Hashable
78
+
79
+ # A token that can be used to request the next page of results. This field is
80
+ # empty if there are no additional results.
81
+ # Corresponds to the JSON property `nextPageToken`
82
+ # @return [String]
83
+ attr_accessor :next_page_token
84
+
85
+ # The set of recommendations for the `parent` resource.
86
+ # Corresponds to the JSON property `recommendations`
87
+ # @return [Array<Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation>]
88
+ attr_accessor :recommendations
89
+
90
+ def initialize(**args)
91
+ update!(**args)
92
+ end
93
+
94
+ # Update properties of this object
95
+ def update!(**args)
96
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
97
+ @recommendations = args[:recommendations] if args.key?(:recommendations)
98
+ end
99
+ end
100
+
101
+ # Request for the `MarkRecommendationClaimed` Method.
102
+ class GoogleCloudRecommenderV1MarkRecommendationClaimedRequest
103
+ include Google::Apis::Core::Hashable
104
+
105
+ # Required. Fingerprint of the Recommendation. Provides optimistic locking.
106
+ # Corresponds to the JSON property `etag`
107
+ # @return [String]
108
+ attr_accessor :etag
109
+
110
+ # State properties to include with this state. Overwrites any existing
111
+ # `state_metadata`.
112
+ # Keys must match the regex /^a-z0-9`0,62`$/.
113
+ # Values must match the regex /^[a-zA-Z0-9_./-]`0,255`$/.
114
+ # Corresponds to the JSON property `stateMetadata`
115
+ # @return [Hash<String,String>]
116
+ attr_accessor :state_metadata
117
+
118
+ def initialize(**args)
119
+ update!(**args)
120
+ end
121
+
122
+ # Update properties of this object
123
+ def update!(**args)
124
+ @etag = args[:etag] if args.key?(:etag)
125
+ @state_metadata = args[:state_metadata] if args.key?(:state_metadata)
126
+ end
127
+ end
128
+
129
+ # Request for the `MarkRecommendationFailed` Method.
130
+ class GoogleCloudRecommenderV1MarkRecommendationFailedRequest
131
+ include Google::Apis::Core::Hashable
132
+
133
+ # Required. Fingerprint of the Recommendation. Provides optimistic locking.
134
+ # Corresponds to the JSON property `etag`
135
+ # @return [String]
136
+ attr_accessor :etag
137
+
138
+ # State properties to include with this state. Overwrites any existing
139
+ # `state_metadata`.
140
+ # Keys must match the regex /^a-z0-9`0,62`$/.
141
+ # Values must match the regex /^[a-zA-Z0-9_./-]`0,255`$/.
142
+ # Corresponds to the JSON property `stateMetadata`
143
+ # @return [Hash<String,String>]
144
+ attr_accessor :state_metadata
145
+
146
+ def initialize(**args)
147
+ update!(**args)
148
+ end
149
+
150
+ # Update properties of this object
151
+ def update!(**args)
152
+ @etag = args[:etag] if args.key?(:etag)
153
+ @state_metadata = args[:state_metadata] if args.key?(:state_metadata)
154
+ end
155
+ end
156
+
157
+ # Request for the `MarkRecommendationSucceeded` Method.
158
+ class GoogleCloudRecommenderV1MarkRecommendationSucceededRequest
159
+ include Google::Apis::Core::Hashable
160
+
161
+ # Required. Fingerprint of the Recommendation. Provides optimistic locking.
162
+ # Corresponds to the JSON property `etag`
163
+ # @return [String]
164
+ attr_accessor :etag
165
+
166
+ # State properties to include with this state. Overwrites any existing
167
+ # `state_metadata`.
168
+ # Keys must match the regex /^a-z0-9`0,62`$/.
169
+ # Values must match the regex /^[a-zA-Z0-9_./-]`0,255`$/.
170
+ # Corresponds to the JSON property `stateMetadata`
171
+ # @return [Hash<String,String>]
172
+ attr_accessor :state_metadata
173
+
174
+ def initialize(**args)
175
+ update!(**args)
176
+ end
177
+
178
+ # Update properties of this object
179
+ def update!(**args)
180
+ @etag = args[:etag] if args.key?(:etag)
181
+ @state_metadata = args[:state_metadata] if args.key?(:state_metadata)
182
+ end
183
+ end
184
+
185
+ # Contains an operation for a resource loosely based on the JSON-PATCH format
186
+ # with support for:
187
+ # * Custom filters for describing partial array patch.
188
+ # * Extended path values for describing nested arrays.
189
+ # * Custom fields for describing the resource for which the operation is being
190
+ # described.
191
+ # * Allows extension to custom operations not natively supported by RFC6902.
192
+ # See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
193
+ class GoogleCloudRecommenderV1Operation
194
+ include Google::Apis::Core::Hashable
195
+
196
+ # Type of this operation. Contains one of 'and', 'remove', 'replace', 'move',
197
+ # 'copy', 'test' and custom operations. This field is case-insensitive and
198
+ # always populated.
199
+ # Corresponds to the JSON property `action`
200
+ # @return [String]
201
+ attr_accessor :action
202
+
203
+ # Path to the target field being operated on. If the operation is at the
204
+ # resource level, then path should be "/". This field is always populated.
205
+ # Corresponds to the JSON property `path`
206
+ # @return [String]
207
+ attr_accessor :path
208
+
209
+ # Set of filters to apply if `path` refers to array elements or nested array
210
+ # elements in order to narrow down to a single unique element that is being
211
+ # tested/modified.
212
+ # This is intended to be an exact match per filter. To perform advanced
213
+ # matching, use path_value_matchers.
214
+ # * Example: `
215
+ # "/versions/*/name" : "it-123"
216
+ # "/versions/*/targetSize/percent": 20
217
+ # `
218
+ # * Example: `
219
+ # "/bindings/*/role": "roles/admin"
220
+ # "/bindings/*/condition" : null
221
+ # `
222
+ # * Example: `
223
+ # "/bindings/*/role": "roles/admin"
224
+ # "/bindings/*/members/*" : ["x@google.com", "y@google.com"]
225
+ # `
226
+ # When both path_filters and path_value_matchers are set, an implicit AND
227
+ # must be performed.
228
+ # Corresponds to the JSON property `pathFilters`
229
+ # @return [Hash<String,Object>]
230
+ attr_accessor :path_filters
231
+
232
+ # Similar to path_filters, this contains set of filters to apply if `path`
233
+ # field referes to array elements. This is meant to support value matching
234
+ # beyond exact match. To perform exact match, use path_filters.
235
+ # When both path_filters and path_value_matchers are set, an implicit AND
236
+ # must be performed.
237
+ # Corresponds to the JSON property `pathValueMatchers`
238
+ # @return [Hash<String,Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ValueMatcher>]
239
+ attr_accessor :path_value_matchers
240
+
241
+ # Contains the fully qualified resource name. This field is always populated.
242
+ # ex: //cloudresourcemanager.googleapis.com/projects/foo.
243
+ # Corresponds to the JSON property `resource`
244
+ # @return [String]
245
+ attr_accessor :resource
246
+
247
+ # Type of GCP resource being modified/tested. This field is always populated.
248
+ # Example: cloudresourcemanager.googleapis.com/Project,
249
+ # compute.googleapis.com/Instance
250
+ # Corresponds to the JSON property `resourceType`
251
+ # @return [String]
252
+ attr_accessor :resource_type
253
+
254
+ # Can be set with action 'copy' or 'move' to indicate the source field within
255
+ # resource or source_resource, ignored if provided for other operation types.
256
+ # Corresponds to the JSON property `sourcePath`
257
+ # @return [String]
258
+ attr_accessor :source_path
259
+
260
+ # Can be set with action 'copy' to copy resource configuration across
261
+ # different resources of the same type. Example: A resource clone can be
262
+ # done via action = 'copy', path = "/", from = "/",
263
+ # source_resource = <source> and resource_name = <target>.
264
+ # This field is empty for all other values of `action`.
265
+ # Corresponds to the JSON property `sourceResource`
266
+ # @return [String]
267
+ attr_accessor :source_resource
268
+
269
+ # Value for the `path` field. Will be set for actions:'add'/'replace'.
270
+ # Maybe set for action: 'test'. Either this or `value_matcher` will be set
271
+ # for 'test' operation. An exact match must be performed.
272
+ # Corresponds to the JSON property `value`
273
+ # @return [Object]
274
+ attr_accessor :value
275
+
276
+ # Contains various matching options for values for a GCP resource field.
277
+ # Corresponds to the JSON property `valueMatcher`
278
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1ValueMatcher]
279
+ attr_accessor :value_matcher
280
+
281
+ def initialize(**args)
282
+ update!(**args)
283
+ end
284
+
285
+ # Update properties of this object
286
+ def update!(**args)
287
+ @action = args[:action] if args.key?(:action)
288
+ @path = args[:path] if args.key?(:path)
289
+ @path_filters = args[:path_filters] if args.key?(:path_filters)
290
+ @path_value_matchers = args[:path_value_matchers] if args.key?(:path_value_matchers)
291
+ @resource = args[:resource] if args.key?(:resource)
292
+ @resource_type = args[:resource_type] if args.key?(:resource_type)
293
+ @source_path = args[:source_path] if args.key?(:source_path)
294
+ @source_resource = args[:source_resource] if args.key?(:source_resource)
295
+ @value = args[:value] if args.key?(:value)
296
+ @value_matcher = args[:value_matcher] if args.key?(:value_matcher)
297
+ end
298
+ end
299
+
300
+ # Group of operations that need to be performed atomically.
301
+ class GoogleCloudRecommenderV1OperationGroup
302
+ include Google::Apis::Core::Hashable
303
+
304
+ # List of operations across one or more resources that belong to this group.
305
+ # Loosely based on RFC6902 and should be performed in the order they appear.
306
+ # Corresponds to the JSON property `operations`
307
+ # @return [Array<Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Operation>]
308
+ attr_accessor :operations
309
+
310
+ def initialize(**args)
311
+ update!(**args)
312
+ end
313
+
314
+ # Update properties of this object
315
+ def update!(**args)
316
+ @operations = args[:operations] if args.key?(:operations)
317
+ end
318
+ end
319
+
320
+ # A recommendation along with a suggested action. E.g., a rightsizing
321
+ # recommendation for an underutilized VM, IAM role recommendations, etc
322
+ class GoogleCloudRecommenderV1Recommendation
323
+ include Google::Apis::Core::Hashable
324
+
325
+ # Optional set of additional impact that this recommendation may have when
326
+ # trying to optimize for the primary category. These may be positive
327
+ # or negative.
328
+ # Corresponds to the JSON property `additionalImpact`
329
+ # @return [Array<Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Impact>]
330
+ attr_accessor :additional_impact
331
+
332
+ # Contains what resources are changing and how they are changing.
333
+ # Corresponds to the JSON property `content`
334
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1RecommendationContent]
335
+ attr_accessor :content
336
+
337
+ # Free-form human readable summary in English. The maximum length is 500
338
+ # characters.
339
+ # Corresponds to the JSON property `description`
340
+ # @return [String]
341
+ attr_accessor :description
342
+
343
+ # Fingerprint of the Recommendation. Provides optimistic locking when
344
+ # updating states.
345
+ # Corresponds to the JSON property `etag`
346
+ # @return [String]
347
+ attr_accessor :etag
348
+
349
+ # Last time this recommendation was refreshed by the system that created it
350
+ # in the first place.
351
+ # Corresponds to the JSON property `lastRefreshTime`
352
+ # @return [String]
353
+ attr_accessor :last_refresh_time
354
+
355
+ # Name of recommendation.
356
+ # Corresponds to the JSON property `name`
357
+ # @return [String]
358
+ attr_accessor :name
359
+
360
+ # Contains the impact a recommendation can have for a given category.
361
+ # Corresponds to the JSON property `primaryImpact`
362
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Impact]
363
+ attr_accessor :primary_impact
364
+
365
+ # Contains an identifier for a subtype of recommendations produced for the
366
+ # same recommender. Subtype is a function of content and impact, meaning a
367
+ # new subtype might be added when significant changes to `content` or
368
+ # `primary_impact.category` are introduced. See the Recommenders section
369
+ # to see a list of subtypes for a given Recommender.
370
+ # Examples:
371
+ # For recommender = "google.iam.policy.Recommender",
372
+ # recommender_subtype can be one of "REMOVE_ROLE"/"REPLACE_ROLE"
373
+ # Corresponds to the JSON property `recommenderSubtype`
374
+ # @return [String]
375
+ attr_accessor :recommender_subtype
376
+
377
+ # Information for state. Contains state and metadata.
378
+ # Corresponds to the JSON property `stateInfo`
379
+ # @return [Google::Apis::RecommenderV1::GoogleCloudRecommenderV1RecommendationStateInfo]
380
+ attr_accessor :state_info
381
+
382
+ def initialize(**args)
383
+ update!(**args)
384
+ end
385
+
386
+ # Update properties of this object
387
+ def update!(**args)
388
+ @additional_impact = args[:additional_impact] if args.key?(:additional_impact)
389
+ @content = args[:content] if args.key?(:content)
390
+ @description = args[:description] if args.key?(:description)
391
+ @etag = args[:etag] if args.key?(:etag)
392
+ @last_refresh_time = args[:last_refresh_time] if args.key?(:last_refresh_time)
393
+ @name = args[:name] if args.key?(:name)
394
+ @primary_impact = args[:primary_impact] if args.key?(:primary_impact)
395
+ @recommender_subtype = args[:recommender_subtype] if args.key?(:recommender_subtype)
396
+ @state_info = args[:state_info] if args.key?(:state_info)
397
+ end
398
+ end
399
+
400
+ # Contains what resources are changing and how they are changing.
401
+ class GoogleCloudRecommenderV1RecommendationContent
402
+ include Google::Apis::Core::Hashable
403
+
404
+ # Operations to one or more Google Cloud resources grouped in such a way
405
+ # that, all operations within one group are expected to be performed
406
+ # atomically and in an order.
407
+ # Corresponds to the JSON property `operationGroups`
408
+ # @return [Array<Google::Apis::RecommenderV1::GoogleCloudRecommenderV1OperationGroup>]
409
+ attr_accessor :operation_groups
410
+
411
+ def initialize(**args)
412
+ update!(**args)
413
+ end
414
+
415
+ # Update properties of this object
416
+ def update!(**args)
417
+ @operation_groups = args[:operation_groups] if args.key?(:operation_groups)
418
+ end
419
+ end
420
+
421
+ # Information for state. Contains state and metadata.
422
+ class GoogleCloudRecommenderV1RecommendationStateInfo
423
+ include Google::Apis::Core::Hashable
424
+
425
+ # The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.
426
+ # Corresponds to the JSON property `state`
427
+ # @return [String]
428
+ attr_accessor :state
429
+
430
+ # A map of metadata for the state, provided by user or automations systems.
431
+ # Corresponds to the JSON property `stateMetadata`
432
+ # @return [Hash<String,String>]
433
+ attr_accessor :state_metadata
434
+
435
+ def initialize(**args)
436
+ update!(**args)
437
+ end
438
+
439
+ # Update properties of this object
440
+ def update!(**args)
441
+ @state = args[:state] if args.key?(:state)
442
+ @state_metadata = args[:state_metadata] if args.key?(:state_metadata)
443
+ end
444
+ end
445
+
446
+ # Contains various matching options for values for a GCP resource field.
447
+ class GoogleCloudRecommenderV1ValueMatcher
448
+ include Google::Apis::Core::Hashable
449
+
450
+ # To be used for full regex matching. The regular expression is using the
451
+ # Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be
452
+ # used with RE2::FullMatch
453
+ # Corresponds to the JSON property `matchesPattern`
454
+ # @return [String]
455
+ attr_accessor :matches_pattern
456
+
457
+ def initialize(**args)
458
+ update!(**args)
459
+ end
460
+
461
+ # Update properties of this object
462
+ def update!(**args)
463
+ @matches_pattern = args[:matches_pattern] if args.key?(:matches_pattern)
464
+ end
465
+ end
466
+
467
+ # Represents an amount of money with its currency type.
468
+ class GoogleTypeMoney
469
+ include Google::Apis::Core::Hashable
470
+
471
+ # The 3-letter currency code defined in ISO 4217.
472
+ # Corresponds to the JSON property `currencyCode`
473
+ # @return [String]
474
+ attr_accessor :currency_code
475
+
476
+ # Number of nano (10^-9) units of the amount.
477
+ # The value must be between -999,999,999 and +999,999,999 inclusive.
478
+ # If `units` is positive, `nanos` must be positive or zero.
479
+ # If `units` is zero, `nanos` can be positive, zero, or negative.
480
+ # If `units` is negative, `nanos` must be negative or zero.
481
+ # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
482
+ # Corresponds to the JSON property `nanos`
483
+ # @return [Fixnum]
484
+ attr_accessor :nanos
485
+
486
+ # The whole units of the amount.
487
+ # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
488
+ # Corresponds to the JSON property `units`
489
+ # @return [Fixnum]
490
+ attr_accessor :units
491
+
492
+ def initialize(**args)
493
+ update!(**args)
494
+ end
495
+
496
+ # Update properties of this object
497
+ def update!(**args)
498
+ @currency_code = args[:currency_code] if args.key?(:currency_code)
499
+ @nanos = args[:nanos] if args.key?(:nanos)
500
+ @units = args[:units] if args.key?(:units)
501
+ end
502
+ end
503
+ end
504
+ end
505
+ end