google-apis-gmailpostmastertools_v2 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 172079657c579d05eb13733430656fc6b280018593bfbc2fe2c8a52fad9a1cff
4
- data.tar.gz: 7c3de1a314c78bb2e040d9afb0a24206e5d7083a71766c57504b2ee4d188640c
3
+ metadata.gz: b107090cf19f5db819973808e922491266b81e1fe54bab3d69af126e6241ac4e
4
+ data.tar.gz: 677dfa251faf9efa133e7d7b5b8d713ee9e3e0cedb6bc45e3044fe5deab42d77
5
5
  SHA512:
6
- metadata.gz: 844bcfceb240fab45c40ded7e4d9e95b2064aefe1334c8bd5d9b78e722998526032e90721d7ba4b0c583a93cdb1aad30aaf11f46f14db703351a51c247786392
7
- data.tar.gz: b854e9ad4198aec6437440f99b6bd02a1f79a7872199b75cd2b7c4be4270d75b18b6bd256998ed055edb4165509e6869b9fc6e8b03f227b4b527a10397e377d7
6
+ metadata.gz: 95b3e291dcc600b88deb0f19ded0953198b15be2b224c1cd2a847754dcf862a308985aeab1fc901c072329196a8387bb0cc601698eedfdef143982b63529efd9
7
+ data.tar.gz: 3978beb77a7ca0c4a54ba48891c9590325b3990a5de33be0756a6351308c09fe05ed0f7b137aecceb0bb8d96470e0d915ccea4aa2b083bb94093bbb47ea76f10
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release history for google-apis-gmailpostmastertools_v2
2
2
 
3
+ ### v0.3.0 (2026-06-28)
4
+
5
+ * Regenerated from discovery document revision 20260623
6
+
3
7
  ### v0.2.0 (2026-06-14)
4
8
 
5
9
  * Regenerated from discovery document revision 20260512
@@ -156,6 +156,53 @@ module Google
156
156
  end
157
157
  end
158
158
 
159
+ # [Developer Preview](https://developers.google.com/workspace/preview): Request
160
+ # message for CreateDomain.
161
+ class CreateDomainRequest
162
+ include Google::Apis::Core::Hashable
163
+
164
+ # Required. The domain to add. e.g., "example.com"
165
+ # Corresponds to the JSON property `domainId`
166
+ # @return [String]
167
+ attr_accessor :domain_id
168
+
169
+ def initialize(**args)
170
+ update!(**args)
171
+ end
172
+
173
+ # Update properties of this object
174
+ def update!(**args)
175
+ @domain_id = args[:domain_id] if args.key?(:domain_id)
176
+ end
177
+ end
178
+
179
+ # [Developer Preview](https://developers.google.com/workspace/preview): Request
180
+ # message for CreateUser.
181
+ class CreateUserRequest
182
+ include Google::Apis::Core::Hashable
183
+
184
+ # Optional. Specifies the permission level to give the user for the specified
185
+ # domain. If not specified, the default value for this field is READER.
186
+ # Corresponds to the JSON property `permission`
187
+ # @return [String]
188
+ attr_accessor :permission
189
+
190
+ # Required. The user to create.
191
+ # Corresponds to the JSON property `userId`
192
+ # @return [String]
193
+ attr_accessor :user_id
194
+
195
+ def initialize(**args)
196
+ update!(**args)
197
+ end
198
+
199
+ # Update properties of this object
200
+ def update!(**args)
201
+ @permission = args[:permission] if args.key?(:permission)
202
+ @user_id = args[:user_id] if args.key?(:user_id)
203
+ end
204
+ end
205
+
159
206
  # Represents a whole or partial calendar date, such as a birthday. The time of
160
207
  # day and time zone are either specified elsewhere or are insignificant. The
161
208
  # date is relative to the Gregorian Calendar. This can represent one of the
@@ -274,6 +321,32 @@ module Google
274
321
  end
275
322
  end
276
323
 
324
+ # [Developer Preview](https://developers.google.com/workspace/preview): Verdict
325
+ # of domain deliverability status.
326
+ class DeliverabilityStatusVerdict
327
+ include Google::Apis::Core::Hashable
328
+
329
+ # Output only. The specific reason for the compliance verdict.
330
+ # Corresponds to the JSON property `reason`
331
+ # @return [String]
332
+ attr_accessor :reason
333
+
334
+ # The status of a sender compliance requirement.
335
+ # Corresponds to the JSON property `state`
336
+ # @return [Google::Apis::GmailpostmastertoolsV2::ComplianceStatus]
337
+ attr_accessor :state
338
+
339
+ def initialize(**args)
340
+ update!(**args)
341
+ end
342
+
343
+ # Update properties of this object
344
+ def update!(**args)
345
+ @reason = args[:reason] if args.key?(:reason)
346
+ @state = args[:state] if args.key?(:state)
347
+ end
348
+ end
349
+
277
350
  # Information about a domain registered by the user.
278
351
  class Domain
279
352
  include Google::Apis::Core::Hashable
@@ -325,6 +398,12 @@ module Google
325
398
  class DomainComplianceData
326
399
  include Google::Apis::Core::Hashable
327
400
 
401
+ # [Developer Preview](https://developers.google.com/workspace/preview): Verdict
402
+ # of domain deliverability status.
403
+ # Corresponds to the JSON property `deliverabilityStatusVerdict`
404
+ # @return [Google::Apis::GmailpostmastertoolsV2::DeliverabilityStatusVerdict]
405
+ attr_accessor :deliverability_status_verdict
406
+
328
407
  # Domain that this data is for.
329
408
  # Corresponds to the JSON property `domainId`
330
409
  # @return [String]
@@ -354,6 +433,7 @@ module Google
354
433
 
355
434
  # Update properties of this object
356
435
  def update!(**args)
436
+ @deliverability_status_verdict = args[:deliverability_status_verdict] if args.key?(:deliverability_status_verdict)
357
437
  @domain_id = args[:domain_id] if args.key?(:domain_id)
358
438
  @honor_unsubscribe_verdict = args[:honor_unsubscribe_verdict] if args.key?(:honor_unsubscribe_verdict)
359
439
  @one_click_unsubscribe_verdict = args[:one_click_unsubscribe_verdict] if args.key?(:one_click_unsubscribe_verdict)
@@ -441,6 +521,55 @@ module Google
441
521
  end
442
522
  end
443
523
 
524
+ # [Developer Preview](https://developers.google.com/workspace/preview): The DNS
525
+ # token a user can use to verify ownership of a domain.
526
+ class DomainVerificationToken
527
+ include Google::Apis::Core::Hashable
528
+
529
+ # Identifier. The resource name of the domain verification token. Format:
530
+ # domains/`domain`/verificationToken
531
+ # Corresponds to the JSON property `name`
532
+ # @return [String]
533
+ attr_accessor :name
534
+
535
+ # The verification token.
536
+ # Corresponds to the JSON property `token`
537
+ # @return [String]
538
+ attr_accessor :token
539
+
540
+ # The verification method used.
541
+ # Corresponds to the JSON property `verificationMethod`
542
+ # @return [String]
543
+ attr_accessor :verification_method
544
+
545
+ def initialize(**args)
546
+ update!(**args)
547
+ end
548
+
549
+ # Update properties of this object
550
+ def update!(**args)
551
+ @name = args[:name] if args.key?(:name)
552
+ @token = args[:token] if args.key?(:token)
553
+ @verification_method = args[:verification_method] if args.key?(:verification_method)
554
+ end
555
+ end
556
+
557
+ # A generic empty message that you can re-use to avoid defining duplicated empty
558
+ # messages in your APIs. A typical example is to use it as the request or the
559
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
560
+ # protobuf.Empty) returns (google.protobuf.Empty); `
561
+ class Empty
562
+ include Google::Apis::Core::Hashable
563
+
564
+ def initialize(**args)
565
+ update!(**args)
566
+ end
567
+
568
+ # Update properties of this object
569
+ def update!(**args)
570
+ end
571
+ end
572
+
444
573
  # Compliance verdict for whether a sender meets the unsubscribe honoring
445
574
  # compliance requirement.
446
575
  class HonorUnsubscribeVerdict
@@ -494,6 +623,33 @@ module Google
494
623
  end
495
624
  end
496
625
 
626
+ # [Developer Preview](https://developers.google.com/workspace/preview): Response
627
+ # message for ListUsers.
628
+ class ListUsersResponse
629
+ include Google::Apis::Core::Hashable
630
+
631
+ # Token to retrieve the next page of results, or empty if there are no more
632
+ # results in the list.
633
+ # Corresponds to the JSON property `nextPageToken`
634
+ # @return [String]
635
+ attr_accessor :next_page_token
636
+
637
+ # The users that have access to the domain.
638
+ # Corresponds to the JSON property `users`
639
+ # @return [Array<Google::Apis::GmailpostmastertoolsV2::User>]
640
+ attr_accessor :users
641
+
642
+ def initialize(**args)
643
+ update!(**args)
644
+ end
645
+
646
+ # Update properties of this object
647
+ def update!(**args)
648
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
649
+ @users = args[:users] if args.key?(:users)
650
+ end
651
+ end
652
+
497
653
  # Defines a specific metric to query, including a user-defined name, the base
498
654
  # metric type, and optional filters.
499
655
  class MetricDefinition
@@ -764,6 +920,85 @@ module Google
764
920
  @date_ranges = args[:date_ranges] if args.key?(:date_ranges)
765
921
  end
766
922
  end
923
+
924
+ # [Developer Preview](https://developers.google.com/workspace/preview):
925
+ # Information about a user's access to a domain.
926
+ class User
927
+ include Google::Apis::Core::Hashable
928
+
929
+ # Output only. The user that added the current user.
930
+ # Corresponds to the JSON property `accessGranter`
931
+ # @return [String]
932
+ attr_accessor :access_granter
933
+
934
+ # Output only. The time the user was granted access.
935
+ # Corresponds to the JSON property `createTime`
936
+ # @return [String]
937
+ attr_accessor :create_time
938
+
939
+ # Identifier. The resource name of the user. Format: users/`user` Note: `user`
940
+ # is the user's email address.
941
+ # Corresponds to the JSON property `name`
942
+ # @return [String]
943
+ attr_accessor :name
944
+
945
+ # The permission level that the user has for the specified domain.
946
+ # Corresponds to the JSON property `permission`
947
+ # @return [String]
948
+ attr_accessor :permission
949
+
950
+ # The user's email address.
951
+ # Corresponds to the JSON property `user`
952
+ # @return [String]
953
+ attr_accessor :user
954
+
955
+ def initialize(**args)
956
+ update!(**args)
957
+ end
958
+
959
+ # Update properties of this object
960
+ def update!(**args)
961
+ @access_granter = args[:access_granter] if args.key?(:access_granter)
962
+ @create_time = args[:create_time] if args.key?(:create_time)
963
+ @name = args[:name] if args.key?(:name)
964
+ @permission = args[:permission] if args.key?(:permission)
965
+ @user = args[:user] if args.key?(:user)
966
+ end
967
+ end
968
+
969
+ # [Developer Preview](https://developers.google.com/workspace/preview): Request
970
+ # message for VerifyDomain.
971
+ class VerifyDomainRequest
972
+ include Google::Apis::Core::Hashable
973
+
974
+ # Required. The verification method used. Must be specified, i.e. TXT or CNAME.
975
+ # Corresponds to the JSON property `verificationMethod`
976
+ # @return [String]
977
+ attr_accessor :verification_method
978
+
979
+ def initialize(**args)
980
+ update!(**args)
981
+ end
982
+
983
+ # Update properties of this object
984
+ def update!(**args)
985
+ @verification_method = args[:verification_method] if args.key?(:verification_method)
986
+ end
987
+ end
988
+
989
+ # [Developer Preview](https://developers.google.com/workspace/preview): Response
990
+ # message for VerifyDomain.
991
+ class VerifyDomainResponse
992
+ include Google::Apis::Core::Hashable
993
+
994
+ def initialize(**args)
995
+ update!(**args)
996
+ end
997
+
998
+ # Update properties of this object
999
+ def update!(**args)
1000
+ end
1001
+ end
767
1002
  end
768
1003
  end
769
1004
  end
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module GmailpostmastertoolsV2
18
18
  # Version of the google-apis-gmailpostmastertools_v2 gem
19
- GEM_VERSION = "0.2.0"
19
+ GEM_VERSION = "0.3.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.19.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20260512"
25
+ REVISION = "20260623"
26
26
  end
27
27
  end
28
28
  end
@@ -58,6 +58,18 @@ module Google
58
58
  include Google::Apis::Core::JsonObjectSupport
59
59
  end
60
60
 
61
+ class CreateDomainRequest
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class CreateUserRequest
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
61
73
  class Date
62
74
  class Representation < Google::Apis::Core::JsonRepresentation; end
63
75
 
@@ -82,6 +94,12 @@ module Google
82
94
  include Google::Apis::Core::JsonObjectSupport
83
95
  end
84
96
 
97
+ class DeliverabilityStatusVerdict
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
85
103
  class Domain
86
104
  class Representation < Google::Apis::Core::JsonRepresentation; end
87
105
 
@@ -106,6 +124,18 @@ module Google
106
124
  include Google::Apis::Core::JsonObjectSupport
107
125
  end
108
126
 
127
+ class DomainVerificationToken
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
133
+ class Empty
134
+ class Representation < Google::Apis::Core::JsonRepresentation; end
135
+
136
+ include Google::Apis::Core::JsonObjectSupport
137
+ end
138
+
109
139
  class HonorUnsubscribeVerdict
110
140
  class Representation < Google::Apis::Core::JsonRepresentation; end
111
141
 
@@ -118,6 +148,12 @@ module Google
118
148
  include Google::Apis::Core::JsonObjectSupport
119
149
  end
120
150
 
151
+ class ListUsersResponse
152
+ class Representation < Google::Apis::Core::JsonRepresentation; end
153
+
154
+ include Google::Apis::Core::JsonObjectSupport
155
+ end
156
+
121
157
  class MetricDefinition
122
158
  class Representation < Google::Apis::Core::JsonRepresentation; end
123
159
 
@@ -166,6 +202,24 @@ module Google
166
202
  include Google::Apis::Core::JsonObjectSupport
167
203
  end
168
204
 
205
+ class User
206
+ class Representation < Google::Apis::Core::JsonRepresentation; end
207
+
208
+ include Google::Apis::Core::JsonObjectSupport
209
+ end
210
+
211
+ class VerifyDomainRequest
212
+ class Representation < Google::Apis::Core::JsonRepresentation; end
213
+
214
+ include Google::Apis::Core::JsonObjectSupport
215
+ end
216
+
217
+ class VerifyDomainResponse
218
+ class Representation < Google::Apis::Core::JsonRepresentation; end
219
+
220
+ include Google::Apis::Core::JsonObjectSupport
221
+ end
222
+
169
223
  class BaseMetric
170
224
  # @private
171
225
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -215,6 +269,21 @@ module Google
215
269
  end
216
270
  end
217
271
 
272
+ class CreateDomainRequest
273
+ # @private
274
+ class Representation < Google::Apis::Core::JsonRepresentation
275
+ property :domain_id, as: 'domainId'
276
+ end
277
+ end
278
+
279
+ class CreateUserRequest
280
+ # @private
281
+ class Representation < Google::Apis::Core::JsonRepresentation
282
+ property :permission, as: 'permission'
283
+ property :user_id, as: 'userId'
284
+ end
285
+ end
286
+
218
287
  class Date
219
288
  # @private
220
289
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -250,6 +319,15 @@ module Google
250
319
  end
251
320
  end
252
321
 
322
+ class DeliverabilityStatusVerdict
323
+ # @private
324
+ class Representation < Google::Apis::Core::JsonRepresentation
325
+ property :reason, as: 'reason'
326
+ property :state, as: 'state', class: Google::Apis::GmailpostmastertoolsV2::ComplianceStatus, decorator: Google::Apis::GmailpostmastertoolsV2::ComplianceStatus::Representation
327
+
328
+ end
329
+ end
330
+
253
331
  class Domain
254
332
  # @private
255
333
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -264,6 +342,8 @@ module Google
264
342
  class DomainComplianceData
265
343
  # @private
266
344
  class Representation < Google::Apis::Core::JsonRepresentation
345
+ property :deliverability_status_verdict, as: 'deliverabilityStatusVerdict', class: Google::Apis::GmailpostmastertoolsV2::DeliverabilityStatusVerdict, decorator: Google::Apis::GmailpostmastertoolsV2::DeliverabilityStatusVerdict::Representation
346
+
267
347
  property :domain_id, as: 'domainId'
268
348
  property :honor_unsubscribe_verdict, as: 'honorUnsubscribeVerdict', class: Google::Apis::GmailpostmastertoolsV2::HonorUnsubscribeVerdict, decorator: Google::Apis::GmailpostmastertoolsV2::HonorUnsubscribeVerdict::Representation
269
349
 
@@ -297,6 +377,21 @@ module Google
297
377
  end
298
378
  end
299
379
 
380
+ class DomainVerificationToken
381
+ # @private
382
+ class Representation < Google::Apis::Core::JsonRepresentation
383
+ property :name, as: 'name'
384
+ property :token, as: 'token'
385
+ property :verification_method, as: 'verificationMethod'
386
+ end
387
+ end
388
+
389
+ class Empty
390
+ # @private
391
+ class Representation < Google::Apis::Core::JsonRepresentation
392
+ end
393
+ end
394
+
300
395
  class HonorUnsubscribeVerdict
301
396
  # @private
302
397
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -315,6 +410,15 @@ module Google
315
410
  end
316
411
  end
317
412
 
413
+ class ListUsersResponse
414
+ # @private
415
+ class Representation < Google::Apis::Core::JsonRepresentation
416
+ property :next_page_token, as: 'nextPageToken'
417
+ collection :users, as: 'users', class: Google::Apis::GmailpostmastertoolsV2::User, decorator: Google::Apis::GmailpostmastertoolsV2::User::Representation
418
+
419
+ end
420
+ end
421
+
318
422
  class MetricDefinition
319
423
  # @private
320
424
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -394,6 +498,30 @@ module Google
394
498
 
395
499
  end
396
500
  end
501
+
502
+ class User
503
+ # @private
504
+ class Representation < Google::Apis::Core::JsonRepresentation
505
+ property :access_granter, as: 'accessGranter'
506
+ property :create_time, as: 'createTime'
507
+ property :name, as: 'name'
508
+ property :permission, as: 'permission'
509
+ property :user, as: 'user'
510
+ end
511
+ end
512
+
513
+ class VerifyDomainRequest
514
+ # @private
515
+ class Representation < Google::Apis::Core::JsonRepresentation
516
+ property :verification_method, as: 'verificationMethod'
517
+ end
518
+ end
519
+
520
+ class VerifyDomainResponse
521
+ # @private
522
+ class Representation < Google::Apis::Core::JsonRepresentation
523
+ end
524
+ end
397
525
  end
398
526
  end
399
527
  end
@@ -85,6 +85,71 @@ module Google
85
85
  execute_or_queue_command(command, &block)
86
86
  end
87
87
 
88
+ # [Developer Preview](https://developers.google.com/workspace/preview): Adds a
89
+ # domain to the user's account. Returns INVALID_ARGUMENT if a domain is not
90
+ # provided. Returns ALREADY_EXISTS if the domain is already registered by the
91
+ # user.
92
+ # @param [Google::Apis::GmailpostmastertoolsV2::CreateDomainRequest] create_domain_request_object
93
+ # @param [String] fields
94
+ # Selector specifying which fields to include in a partial response.
95
+ # @param [String] quota_user
96
+ # Available to use for quota purposes for server-side applications. Can be any
97
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
98
+ # @param [Google::Apis::RequestOptions] options
99
+ # Request-specific options
100
+ #
101
+ # @yield [result, err] Result & error if block supplied
102
+ # @yieldparam result [Google::Apis::GmailpostmastertoolsV2::Domain] parsed result object
103
+ # @yieldparam err [StandardError] error object if request failed
104
+ #
105
+ # @return [Google::Apis::GmailpostmastertoolsV2::Domain]
106
+ #
107
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
108
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
109
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
110
+ def create_domain(create_domain_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
111
+ command = make_simple_command(:post, 'v2/domains', options)
112
+ command.request_representation = Google::Apis::GmailpostmastertoolsV2::CreateDomainRequest::Representation
113
+ command.request_object = create_domain_request_object
114
+ command.response_representation = Google::Apis::GmailpostmastertoolsV2::Domain::Representation
115
+ command.response_class = Google::Apis::GmailpostmastertoolsV2::Domain
116
+ command.query['fields'] = fields unless fields.nil?
117
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
118
+ execute_or_queue_command(command, &block)
119
+ end
120
+
121
+ # [Developer Preview](https://developers.google.com/workspace/preview): Deletes
122
+ # a domain from the user's account. Returns NOT_FOUND if the domain is not
123
+ # registered by the user.
124
+ # @param [String] name
125
+ # Required. The domain to delete.
126
+ # @param [String] fields
127
+ # Selector specifying which fields to include in a partial response.
128
+ # @param [String] quota_user
129
+ # Available to use for quota purposes for server-side applications. Can be any
130
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
131
+ # @param [Google::Apis::RequestOptions] options
132
+ # Request-specific options
133
+ #
134
+ # @yield [result, err] Result & error if block supplied
135
+ # @yieldparam result [Google::Apis::GmailpostmastertoolsV2::Empty] parsed result object
136
+ # @yieldparam err [StandardError] error object if request failed
137
+ #
138
+ # @return [Google::Apis::GmailpostmastertoolsV2::Empty]
139
+ #
140
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
141
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
142
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
143
+ def delete_domain(name, fields: nil, quota_user: nil, options: nil, &block)
144
+ command = make_simple_command(:delete, 'v2/{+name}', options)
145
+ command.response_representation = Google::Apis::GmailpostmastertoolsV2::Empty::Representation
146
+ command.response_class = Google::Apis::GmailpostmastertoolsV2::Empty
147
+ command.params['name'] = name unless name.nil?
148
+ command.query['fields'] = fields unless fields.nil?
149
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
150
+ execute_or_queue_command(command, &block)
151
+ end
152
+
88
153
  # Retrieves detailed information about a domain registered by you. Returns
89
154
  # NOT_FOUND if the domain is not registered by you. Domain represents the
90
155
  # metadata of a domain that has been registered within the system and linked to
@@ -152,6 +217,41 @@ module Google
152
217
  execute_or_queue_command(command, &block)
153
218
  end
154
219
 
220
+ # [Developer Preview](https://developers.google.com/workspace/preview): Gets a
221
+ # verification token used for verifying a user's ownership over a domain.
222
+ # @param [String] name
223
+ # Required. The resource name of the verification token to retrieve. Format: `
224
+ # domains/`domain`/verificationToken`
225
+ # @param [String] verification_method
226
+ # Required. The verification method used. Must be specified, i.e. TXT or CNAME.
227
+ # @param [String] fields
228
+ # Selector specifying which fields to include in a partial response.
229
+ # @param [String] quota_user
230
+ # Available to use for quota purposes for server-side applications. Can be any
231
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
232
+ # @param [Google::Apis::RequestOptions] options
233
+ # Request-specific options
234
+ #
235
+ # @yield [result, err] Result & error if block supplied
236
+ # @yieldparam result [Google::Apis::GmailpostmastertoolsV2::DomainVerificationToken] parsed result object
237
+ # @yieldparam err [StandardError] error object if request failed
238
+ #
239
+ # @return [Google::Apis::GmailpostmastertoolsV2::DomainVerificationToken]
240
+ #
241
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
242
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
243
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
244
+ def get_domain_verification_token(name, verification_method: nil, fields: nil, quota_user: nil, options: nil, &block)
245
+ command = make_simple_command(:get, 'v2/{+name}', options)
246
+ command.response_representation = Google::Apis::GmailpostmastertoolsV2::DomainVerificationToken::Representation
247
+ command.response_class = Google::Apis::GmailpostmastertoolsV2::DomainVerificationToken
248
+ command.params['name'] = name unless name.nil?
249
+ command.query['verificationMethod'] = verification_method unless verification_method.nil?
250
+ command.query['fields'] = fields unless fields.nil?
251
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
252
+ execute_or_queue_command(command, &block)
253
+ end
254
+
155
255
  # Retrieves a list of all domains registered by you, along with their
156
256
  # corresponding metadata. The order of domains in the response is unspecified
157
257
  # and non-deterministic. Newly registered domains will not necessarily be added
@@ -191,6 +291,41 @@ module Google
191
291
  execute_or_queue_command(command, &block)
192
292
  end
193
293
 
294
+ # [Developer Preview](https://developers.google.com/workspace/preview): Verifies
295
+ # a user's ownership of a domain at the DNS level. Note that this is distinct
296
+ # from checking if the user has OWNER status within IRDB.
297
+ # @param [String] name
298
+ # Required. The domain to verify.
299
+ # @param [Google::Apis::GmailpostmastertoolsV2::VerifyDomainRequest] verify_domain_request_object
300
+ # @param [String] fields
301
+ # Selector specifying which fields to include in a partial response.
302
+ # @param [String] quota_user
303
+ # Available to use for quota purposes for server-side applications. Can be any
304
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
305
+ # @param [Google::Apis::RequestOptions] options
306
+ # Request-specific options
307
+ #
308
+ # @yield [result, err] Result & error if block supplied
309
+ # @yieldparam result [Google::Apis::GmailpostmastertoolsV2::VerifyDomainResponse] parsed result object
310
+ # @yieldparam err [StandardError] error object if request failed
311
+ #
312
+ # @return [Google::Apis::GmailpostmastertoolsV2::VerifyDomainResponse]
313
+ #
314
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
315
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
316
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
317
+ def verify_domain(name, verify_domain_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
318
+ command = make_simple_command(:post, 'v2/{+name}:verify', options)
319
+ command.request_representation = Google::Apis::GmailpostmastertoolsV2::VerifyDomainRequest::Representation
320
+ command.request_object = verify_domain_request_object
321
+ command.response_representation = Google::Apis::GmailpostmastertoolsV2::VerifyDomainResponse::Representation
322
+ command.response_class = Google::Apis::GmailpostmastertoolsV2::VerifyDomainResponse
323
+ command.params['name'] = name unless name.nil?
324
+ command.query['fields'] = fields unless fields.nil?
325
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
326
+ execute_or_queue_command(command, &block)
327
+ end
328
+
194
329
  # Retrieves a list of domain statistics for a given domain and time period.
195
330
  # Returns statistics only for dates where data is available. Returns
196
331
  # PERMISSION_DENIED if you don't have permission to access DomainStats for the
@@ -227,6 +362,189 @@ module Google
227
362
  command.query['quotaUser'] = quota_user unless quota_user.nil?
228
363
  execute_or_queue_command(command, &block)
229
364
  end
365
+
366
+ # [Developer Preview](https://developers.google.com/workspace/preview): Creates
367
+ # a user, who has access to a domain. Returns INVALID_ARGUMENT if a user is not
368
+ # provided.
369
+ # @param [String] parent
370
+ # Required. The parent resource where this user will be created. Format: domains/
371
+ # `domain`
372
+ # @param [Google::Apis::GmailpostmastertoolsV2::CreateUserRequest] create_user_request_object
373
+ # @param [String] fields
374
+ # Selector specifying which fields to include in a partial response.
375
+ # @param [String] quota_user
376
+ # Available to use for quota purposes for server-side applications. Can be any
377
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
378
+ # @param [Google::Apis::RequestOptions] options
379
+ # Request-specific options
380
+ #
381
+ # @yield [result, err] Result & error if block supplied
382
+ # @yieldparam result [Google::Apis::GmailpostmastertoolsV2::User] parsed result object
383
+ # @yieldparam err [StandardError] error object if request failed
384
+ #
385
+ # @return [Google::Apis::GmailpostmastertoolsV2::User]
386
+ #
387
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
388
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
389
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
390
+ def create_user(parent, create_user_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
391
+ command = make_simple_command(:post, 'v2/{+parent}/users', options)
392
+ command.request_representation = Google::Apis::GmailpostmastertoolsV2::CreateUserRequest::Representation
393
+ command.request_object = create_user_request_object
394
+ command.response_representation = Google::Apis::GmailpostmastertoolsV2::User::Representation
395
+ command.response_class = Google::Apis::GmailpostmastertoolsV2::User
396
+ command.params['parent'] = parent unless parent.nil?
397
+ command.query['fields'] = fields unless fields.nil?
398
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
399
+ execute_or_queue_command(command, &block)
400
+ end
401
+
402
+ # [Developer Preview](https://developers.google.com/workspace/preview): Deletes
403
+ # a user from a domain. Returns NOT_FOUND if the user does not exist.
404
+ # @param [String] name
405
+ # Required. The resource name of the user to delete. Format: domains/`domain`/
406
+ # users/`user`
407
+ # @param [String] fields
408
+ # Selector specifying which fields to include in a partial response.
409
+ # @param [String] quota_user
410
+ # Available to use for quota purposes for server-side applications. Can be any
411
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
412
+ # @param [Google::Apis::RequestOptions] options
413
+ # Request-specific options
414
+ #
415
+ # @yield [result, err] Result & error if block supplied
416
+ # @yieldparam result [Google::Apis::GmailpostmastertoolsV2::Empty] parsed result object
417
+ # @yieldparam err [StandardError] error object if request failed
418
+ #
419
+ # @return [Google::Apis::GmailpostmastertoolsV2::Empty]
420
+ #
421
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
422
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
423
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
424
+ def delete_domain_user(name, fields: nil, quota_user: nil, options: nil, &block)
425
+ command = make_simple_command(:delete, 'v2/{+name}', options)
426
+ command.response_representation = Google::Apis::GmailpostmastertoolsV2::Empty::Representation
427
+ command.response_class = Google::Apis::GmailpostmastertoolsV2::Empty
428
+ command.params['name'] = name unless name.nil?
429
+ command.query['fields'] = fields unless fields.nil?
430
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
431
+ execute_or_queue_command(command, &block)
432
+ end
433
+
434
+ # [Developer Preview](https://developers.google.com/workspace/preview):
435
+ # Retrieves detailed information about a user that has access to a domain.
436
+ # Returns NOT_FOUND if the user does not exist.
437
+ # @param [String] name
438
+ # Required. The resource name of the user to retrieve. Format: `domains/`domain`/
439
+ # users/`user``
440
+ # @param [String] fields
441
+ # Selector specifying which fields to include in a partial response.
442
+ # @param [String] quota_user
443
+ # Available to use for quota purposes for server-side applications. Can be any
444
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
445
+ # @param [Google::Apis::RequestOptions] options
446
+ # Request-specific options
447
+ #
448
+ # @yield [result, err] Result & error if block supplied
449
+ # @yieldparam result [Google::Apis::GmailpostmastertoolsV2::User] parsed result object
450
+ # @yieldparam err [StandardError] error object if request failed
451
+ #
452
+ # @return [Google::Apis::GmailpostmastertoolsV2::User]
453
+ #
454
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
455
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
456
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
457
+ def get_domain_user(name, fields: nil, quota_user: nil, options: nil, &block)
458
+ command = make_simple_command(:get, 'v2/{+name}', options)
459
+ command.response_representation = Google::Apis::GmailpostmastertoolsV2::User::Representation
460
+ command.response_class = Google::Apis::GmailpostmastertoolsV2::User
461
+ command.params['name'] = name unless name.nil?
462
+ command.query['fields'] = fields unless fields.nil?
463
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
464
+ execute_or_queue_command(command, &block)
465
+ end
466
+
467
+ # [Developer Preview](https://developers.google.com/workspace/preview): Lists
468
+ # the users that have access to a domain.
469
+ # @param [String] parent
470
+ # Required. The parent resource name for which to list users. Format: `domains/`
471
+ # domain``
472
+ # @param [Fixnum] page_size
473
+ # Optional. Requested page size. Server may return fewer users than requested.
474
+ # If unspecified, the default value for this field is 10. The maximum value for
475
+ # this field is 200.
476
+ # @param [String] page_token
477
+ # Optional. The next_page_token value returned from a previous List request, if
478
+ # any.
479
+ # @param [String] fields
480
+ # Selector specifying which fields to include in a partial response.
481
+ # @param [String] quota_user
482
+ # Available to use for quota purposes for server-side applications. Can be any
483
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
484
+ # @param [Google::Apis::RequestOptions] options
485
+ # Request-specific options
486
+ #
487
+ # @yield [result, err] Result & error if block supplied
488
+ # @yieldparam result [Google::Apis::GmailpostmastertoolsV2::ListUsersResponse] parsed result object
489
+ # @yieldparam err [StandardError] error object if request failed
490
+ #
491
+ # @return [Google::Apis::GmailpostmastertoolsV2::ListUsersResponse]
492
+ #
493
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
494
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
495
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
496
+ def list_domain_users(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
497
+ command = make_simple_command(:get, 'v2/{+parent}/users', options)
498
+ command.response_representation = Google::Apis::GmailpostmastertoolsV2::ListUsersResponse::Representation
499
+ command.response_class = Google::Apis::GmailpostmastertoolsV2::ListUsersResponse
500
+ command.params['parent'] = parent unless parent.nil?
501
+ command.query['pageSize'] = page_size unless page_size.nil?
502
+ command.query['pageToken'] = page_token unless page_token.nil?
503
+ command.query['fields'] = fields unless fields.nil?
504
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
505
+ execute_or_queue_command(command, &block)
506
+ end
507
+
508
+ # [Developer Preview](https://developers.google.com/workspace/preview): Updates
509
+ # a user for a domain. Only Owners and Admins can execute this RPC, only a user'
510
+ # s domain permission will be allowed to be updated. Returns NOT_FOUND if the
511
+ # user does not exist. Returns INVALID_ARGUMENT if a permission is not provided
512
+ # or is PERMISSION_UNSPECIFIED, NONE, or OWNER.
513
+ # @param [String] name
514
+ # Identifier. The resource name of the user. Format: users/`user` Note: `user`
515
+ # is the user's email address.
516
+ # @param [Google::Apis::GmailpostmastertoolsV2::User] user_object
517
+ # @param [String] update_mask
518
+ # The list of fields to update.
519
+ # @param [String] fields
520
+ # Selector specifying which fields to include in a partial response.
521
+ # @param [String] quota_user
522
+ # Available to use for quota purposes for server-side applications. Can be any
523
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
524
+ # @param [Google::Apis::RequestOptions] options
525
+ # Request-specific options
526
+ #
527
+ # @yield [result, err] Result & error if block supplied
528
+ # @yieldparam result [Google::Apis::GmailpostmastertoolsV2::User] parsed result object
529
+ # @yieldparam err [StandardError] error object if request failed
530
+ #
531
+ # @return [Google::Apis::GmailpostmastertoolsV2::User]
532
+ #
533
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
534
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
535
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
536
+ def patch_domain_user(name, user_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
537
+ command = make_simple_command(:patch, 'v2/{+name}', options)
538
+ command.request_representation = Google::Apis::GmailpostmastertoolsV2::User::Representation
539
+ command.request_object = user_object
540
+ command.response_representation = Google::Apis::GmailpostmastertoolsV2::User::Representation
541
+ command.response_class = Google::Apis::GmailpostmastertoolsV2::User
542
+ command.params['name'] = name unless name.nil?
543
+ command.query['updateMask'] = update_mask unless update_mask.nil?
544
+ command.query['fields'] = fields unless fields.nil?
545
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
546
+ execute_or_queue_command(command, &block)
547
+ end
230
548
 
231
549
  protected
232
550
 
@@ -39,6 +39,9 @@ module Google
39
39
 
40
40
  # Get email traffic metrics for the domains you have registered with Postmaster Tools
41
41
  AUTH_POSTMASTER_TRAFFIC_READONLY = 'https://www.googleapis.com/auth/postmaster.traffic.readonly'
42
+
43
+ # View and manage users for the domains you have registered with Postmaster Tools
44
+ AUTH_POSTMASTER_USER = 'https://www.googleapis.com/auth/postmaster.user'
42
45
  end
43
46
  end
44
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-gmailpostmastertools_v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -57,7 +57,7 @@ licenses:
57
57
  metadata:
58
58
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
59
59
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-gmailpostmastertools_v2/CHANGELOG.md
60
- documentation_uri: https://googleapis.dev/ruby/google-apis-gmailpostmastertools_v2/v0.2.0
60
+ documentation_uri: https://googleapis.dev/ruby/google-apis-gmailpostmastertools_v2/v0.3.0
61
61
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-gmailpostmastertools_v2
62
62
  rdoc_options: []
63
63
  require_paths: