Class: Google::Apis::AndroidmanagementV1::EnrollmentToken

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

Overview

An enrollment token.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ EnrollmentToken

Returns a new instance of EnrollmentToken



599
600
601
# File 'generated/google/apis/androidmanagement_v1/classes.rb', line 599

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

Instance Attribute Details

#additional_dataString

Optional, arbitrary data associated with the enrollment token. This could contain, for example, the id of an org unit to which the device is assigned after enrollment. After a device enrolls with the token, this data will be exposed in the enrollment_token_data field of the Device resource. The data must be 1024 characters or less; otherwise, the creation request will fail. Corresponds to the JSON property additionalData

Returns:

  • (String)


555
556
557
# File 'generated/google/apis/androidmanagement_v1/classes.rb', line 555

def additional_data
  @additional_data
end

#durationString

The duration of the token. If not specified, the duration will be 1 hour. The allowed range is 1 minute to 30 days. Corresponds to the JSON property duration

Returns:

  • (String)


561
562
563
# File 'generated/google/apis/androidmanagement_v1/classes.rb', line 561

def duration
  @duration
end

#expiration_timestampString

The expiration time of the token. This is a read-only field generated by the server. Corresponds to the JSON property expirationTimestamp

Returns:

  • (String)


567
568
569
# File 'generated/google/apis/androidmanagement_v1/classes.rb', line 567

def expiration_timestamp
  @expiration_timestamp
end

#nameString

The name of the enrollment token, which is generated by the server during creation, in the form enterprises/enterpriseId/enrollmentTokens/ enrollmentTokenId Corresponds to the JSON property name

Returns:

  • (String)


574
575
576
# File 'generated/google/apis/androidmanagement_v1/classes.rb', line 574

def name
  @name
end

#policy_nameString

The name of the policy that will be initially applied to the enrolled device in the form enterprises/enterpriseId/policies/policyId. If not specified, the policy with id default is applied. It is permissible to only specify the policyId when updating this field as long as the policyId contains no slashes since the rest of the policy name can be inferred from context. Corresponds to the JSON property policyName

Returns:

  • (String)


583
584
585
# File 'generated/google/apis/androidmanagement_v1/classes.rb', line 583

def policy_name
  @policy_name
end

#qr_codeString

A JSON string whose UTF-8 representation can be used to generate a QR code to enroll a device with this enrollment token. To enroll a device using NFC, the NFC record must contain a serialized java.util.Properties representation of the properties in the JSON. Corresponds to the JSON property qrCode

Returns:

  • (String)


591
592
593
# File 'generated/google/apis/androidmanagement_v1/classes.rb', line 591

def qr_code
  @qr_code
end

#valueString

The token value which is 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 value

Returns:

  • (String)


597
598
599
# File 'generated/google/apis/androidmanagement_v1/classes.rb', line 597

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



604
605
606
607
608
609
610
611
612
# File 'generated/google/apis/androidmanagement_v1/classes.rb', line 604

def update!(**args)
  @additional_data = args[:additional_data] if args.key?(:additional_data)
  @duration = args[:duration] if args.key?(:duration)
  @expiration_timestamp = args[:expiration_timestamp] if args.key?(:expiration_timestamp)
  @name = args[:name] if args.key?(:name)
  @policy_name = args[:policy_name] if args.key?(:policy_name)
  @qr_code = args[:qr_code] if args.key?(:qr_code)
  @value = args[:value] if args.key?(:value)
end