Class: Google::Apis::AndroidenterpriseV1::EnrollmentToken

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/androidenterprise_v1/classes.rb,
lib/google/apis/androidenterprise_v1/representations.rb,
lib/google/apis/androidenterprise_v1/representations.rb

Overview

A token used to enroll a device.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EnrollmentToken

Returns a new instance of EnrollmentToken.



888
889
890
# File 'lib/google/apis/androidenterprise_v1/classes.rb', line 888

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#durationString

[Optional] The length of time the enrollment token is valid, ranging from 1 minute to Durations.MAX_VALUE, approximately 10,000 years. If not specified, the default duration is 1 hour. In the JSON REST API, this is represented as a string (e.g., 3600s). Corresponds to the JSON property duration

Returns:

  • (String)


870
871
872
# File 'lib/google/apis/androidenterprise_v1/classes.rb', line 870

def duration
  @duration
end

#enrollment_token_typeString

[Required] The type of the enrollment token. Corresponds to the JSON property enrollmentTokenType

Returns:

  • (String)


875
876
877
# File 'lib/google/apis/androidenterprise_v1/classes.rb', line 875

def enrollment_token_type
  @enrollment_token_type
end

#google_authentication_optionsGoogle::Apis::AndroidenterpriseV1::EnrollmentTokenGoogleAuthenticationOptions

Options for Google authentication during the enrollment. Corresponds to the JSON property googleAuthenticationOptions



880
881
882
# File 'lib/google/apis/androidenterprise_v1/classes.rb', line 880

def google_authentication_options
  @google_authentication_options
end

#tokenString

The token value that's passed to the device and authorizes the device to enroll. This is a read-only field generated by the server. Corresponds to the JSON property token

Returns:

  • (String)


886
887
888
# File 'lib/google/apis/androidenterprise_v1/classes.rb', line 886

def token
  @token
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



893
894
895
896
897
898
# File 'lib/google/apis/androidenterprise_v1/classes.rb', line 893

def update!(**args)
  @duration = args[:duration] if args.key?(:duration)
  @enrollment_token_type = args[:enrollment_token_type] if args.key?(:enrollment_token_type)
  @google_authentication_options = args[:google_authentication_options] if args.key?(:google_authentication_options)
  @token = args[:token] if args.key?(:token)
end