@@ -290,6 +290,42 @@ def update_device(enterprise_id, user_id, device_id, device_object = nil, update
290290 execute_or_queue_command ( command , &block )
291291 end
292292
293+ # Returns a token for device enrollment. The DPC can encode this token within
294+ # the QR/NFC/zero-touch enrollment payload or fetch it before calling the on-
295+ # device API to authenticate the user. The token can be generated for each
296+ # device or reused across multiple devices.
297+ # @param [String] enterprise_id
298+ # Required. The ID of the enterprise.
299+ # @param [Google::Apis::AndroidenterpriseV1::EnrollmentToken] enrollment_token_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::AndroidenterpriseV1::EnrollmentToken] parsed result object
310+ # @yieldparam err [StandardError] error object if request failed
311+ #
312+ # @return [Google::Apis::AndroidenterpriseV1::EnrollmentToken]
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 create_enrollment_token ( enterprise_id , enrollment_token_object = nil , fields : nil , quota_user : nil , options : nil , &block )
318+ command = make_simple_command ( :post , 'androidenterprise/v1/enterprises/{enterpriseId}/enrollmentTokens' , options )
319+ command . request_representation = Google ::Apis ::AndroidenterpriseV1 ::EnrollmentToken ::Representation
320+ command . request_object = enrollment_token_object
321+ command . response_representation = Google ::Apis ::AndroidenterpriseV1 ::EnrollmentToken ::Representation
322+ command . response_class = Google ::Apis ::AndroidenterpriseV1 ::EnrollmentToken
323+ command . params [ 'enterpriseId' ] = enterprise_id unless enterprise_id . 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+
293329 # Acknowledges notifications that were received from Enterprises.
294330 # PullNotificationSet to prevent subsequent calls from returning the same
295331 # notifications.
@@ -356,42 +392,6 @@ def complete_enterprise_signup(completion_token: nil, enterprise_token: nil, fie
356392 execute_or_queue_command ( command , &block )
357393 end
358394
359- # Returns a token for device enrollment. The DPC can encode this token within
360- # the QR/NFC/zero-touch enrollment payload or fetch it before calling the on-
361- # device API to authenticate the user. The token can be generated for each
362- # device or reused across multiple devices.
363- # @param [String] enterprise_id
364- # Required. The ID of the enterprise.
365- # @param [Google::Apis::AndroidenterpriseV1::EnrollmentToken] enrollment_token_object
366- # @param [String] fields
367- # Selector specifying which fields to include in a partial response.
368- # @param [String] quota_user
369- # Available to use for quota purposes for server-side applications. Can be any
370- # arbitrary string assigned to a user, but should not exceed 40 characters.
371- # @param [Google::Apis::RequestOptions] options
372- # Request-specific options
373- #
374- # @yield [result, err] Result & error if block supplied
375- # @yieldparam result [Google::Apis::AndroidenterpriseV1::EnrollmentToken] parsed result object
376- # @yieldparam err [StandardError] error object if request failed
377- #
378- # @return [Google::Apis::AndroidenterpriseV1::EnrollmentToken]
379- #
380- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
381- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
382- # @raise [Google::Apis::AuthorizationError] Authorization is required
383- def create_enterprise_enrollment_token ( enterprise_id , enrollment_token_object = nil , fields : nil , quota_user : nil , options : nil , &block )
384- command = make_simple_command ( :post , 'androidenterprise/v1/enterprises/{enterpriseId}/createEnrollmentToken' , options )
385- command . request_representation = Google ::Apis ::AndroidenterpriseV1 ::EnrollmentToken ::Representation
386- command . request_object = enrollment_token_object
387- command . response_representation = Google ::Apis ::AndroidenterpriseV1 ::EnrollmentToken ::Representation
388- command . response_class = Google ::Apis ::AndroidenterpriseV1 ::EnrollmentToken
389- command . params [ 'enterpriseId' ] = enterprise_id unless enterprise_id . nil?
390- command . query [ 'fields' ] = fields unless fields . nil?
391- command . query [ 'quotaUser' ] = quota_user unless quota_user . nil?
392- execute_or_queue_command ( command , &block )
393- end
394-
395395 # Returns a unique token to access an embeddable UI. To generate a web UI, pass
396396 # the generated token into the managed Google Play javascript API. Each token
397397 # may only be used to start one UI session. See the JavaScript API documentation
@@ -464,7 +464,18 @@ def enroll_enterprise(token, enterprise_object = nil, fields: nil, quota_user: n
464464 # Generates a sign-up URL.
465465 # @param [String] admin_email
466466 # Optional. Email address used to prefill the admin field of the enterprise
467- # signup form. This value is a hint only and can be altered by the user.
467+ # signup form. This value is a hint only and can be altered by the user. If `
468+ # allowedDomains` is non-empty then this must belong to one of the `
469+ # allowedDomains`.
470+ # @param [Array<String>, String] allowed_domains
471+ # Optional. A list of domains that are permitted for the admin email. The IT
472+ # admin cannot enter an email address with a domain name that is not in this
473+ # list. Subdomains of domains in this list are not allowed but can be allowed by
474+ # adding a second entry which has `*.` prefixed to the domain name (e.g. *.
475+ # example.com). If the field is not present or is an empty list then the IT
476+ # admin is free to use any valid domain name. Personal email domains are always
477+ # allowed, but will result in the creation of a managed Google Play Accounts
478+ # enterprise.
468479 # @param [String] callback_url
469480 # The callback URL to which the Admin will be redirected after successfully
470481 # creating an enterprise. Before redirecting there the system will add a single
@@ -490,11 +501,12 @@ def enroll_enterprise(token, enterprise_object = nil, fields: nil, quota_user: n
490501 # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
491502 # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
492503 # @raise [Google::Apis::AuthorizationError] Authorization is required
493- def generate_enterprise_signup_url ( admin_email : nil , callback_url : nil , fields : nil , quota_user : nil , options : nil , &block )
504+ def generate_enterprise_signup_url ( admin_email : nil , allowed_domains : nil , callback_url : nil , fields : nil , quota_user : nil , options : nil , &block )
494505 command = make_simple_command ( :post , 'androidenterprise/v1/enterprises/signupUrl' , options )
495506 command . response_representation = Google ::Apis ::AndroidenterpriseV1 ::SignupInfo ::Representation
496507 command . response_class = Google ::Apis ::AndroidenterpriseV1 ::SignupInfo
497508 command . query [ 'adminEmail' ] = admin_email unless admin_email . nil?
509+ command . query [ 'allowedDomains' ] = allowed_domains unless allowed_domains . nil?
498510 command . query [ 'callbackUrl' ] = callback_url unless callback_url . nil?
499511 command . query [ 'fields' ] = fields unless fields . nil?
500512 command . query [ 'quotaUser' ] = quota_user unless quota_user . nil?
0 commit comments