Class: Google::Apis::AndroidmanagementV1::EnrollmentToken
- Inherits:
-
Object
- Object
- Google::Apis::AndroidmanagementV1::EnrollmentToken
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/androidmanagement_v1/classes.rb,
lib/google/apis/androidmanagement_v1/representations.rb,
lib/google/apis/androidmanagement_v1/representations.rb
Overview
An enrollment token.
Instance Attribute Summary collapse
-
#additional_data ⇒ String
Optional, arbitrary data associated with the enrollment token.
-
#allow_personal_usage ⇒ String
Controls whether personal usage is allowed on a device provisioned with this enrollment token.For company-owned devices: Enabling personal usage allows the user to set up a work profile on the device.
-
#duration ⇒ String
The length of time the enrollment token is valid, ranging from 1 minute to 90 days.
-
#expiration_timestamp ⇒ String
The expiration time of the token.
-
#name ⇒ String
The name of the enrollment token, which is generated by the server during creation, in the form enterprises/
enterpriseId/enrollmentTokens/enrollmentTokenId. -
#one_time_only ⇒ Boolean
(also: #one_time_only?)
Whether the enrollment token is for one time use only.
-
#policy_name ⇒ String
The name of the policy initially applied to the enrolled device, in the form enterprises/
enterpriseId/policies/policyId. -
#qr_code ⇒ String
A JSON string whose UTF-8 representation can be used to generate a QR code to enroll a device with this enrollment token.
-
#user ⇒ Google::Apis::AndroidmanagementV1::User
A user belonging to an enterprise.
-
#value ⇒ String
The token value that's passed to the device and authorizes the device to enroll.
Instance Method Summary collapse
-
#initialize(**args) ⇒ EnrollmentToken
constructor
A new instance of EnrollmentToken.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ EnrollmentToken
Returns a new instance of EnrollmentToken.
1518 1519 1520 |
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 1518 def initialize(**args) update!(**args) end |
Instance Attribute Details
#additional_data ⇒ String
Optional, arbitrary data associated with the enrollment token. This could
contain, for example, the ID of an org unit the device is assigned to 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
1449 1450 1451 |
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 1449 def additional_data @additional_data end |
#allow_personal_usage ⇒ String
Controls whether personal usage is allowed on a device provisioned with this
enrollment token.For company-owned devices: Enabling personal usage allows the
user to set up a work profile on the device. Disabling personal usage requires
the user provision the device as a fully managed device.For personally-owned
devices: Enabling personal usage allows the user to set up a work profile on
the device. Disabling personal usage will prevent the device from provisioning.
Personal usage cannot be disabled on personally-owned device.
Corresponds to the JSON property allowPersonalUsage
1460 1461 1462 |
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 1460 def allow_personal_usage @allow_personal_usage end |
#duration ⇒ String
The length of time the enrollment token is valid, ranging from 1 minute to 90
days. If not specified, the default duration is 1 hour.
Corresponds to the JSON property duration
1466 1467 1468 |
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 1466 def duration @duration end |
#expiration_timestamp ⇒ String
The expiration time of the token. This is a read-only field generated by the
server.
Corresponds to the JSON property expirationTimestamp
1472 1473 1474 |
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 1472 def @expiration_timestamp end |
#name ⇒ String
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
1479 1480 1481 |
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 1479 def name @name end |
#one_time_only ⇒ Boolean Also known as: one_time_only?
Whether the enrollment token is for one time use only. If the flag is set to
true, only one device can use it for registration.
Corresponds to the JSON property oneTimeOnly
1485 1486 1487 |
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 1485 def one_time_only @one_time_only end |
#policy_name ⇒ String
The name of the policy initially applied to the enrolled device, in the form
enterprises/enterpriseId/policies/policyId. If not specified, the
policy_name for the device’s user is applied. If user_name is also not
specified, enterprises/enterpriseId/policies/default is applied by default.
When updating this field, you can specify only the policyId as long as the
policyId doesn’t contain any slashes. The rest of the policy name will be
inferred.
Corresponds to the JSON property policyName
1497 1498 1499 |
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 1497 def policy_name @policy_name end |
#qr_code ⇒ String
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
1505 1506 1507 |
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 1505 def qr_code @qr_code end |
#user ⇒ Google::Apis::AndroidmanagementV1::User
A user belonging to an enterprise.
Corresponds to the JSON property user
1510 1511 1512 |
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 1510 def user @user end |
#value ⇒ String
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 value
1516 1517 1518 |
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 1516 def value @value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 |
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 1523 def update!(**args) @additional_data = args[:additional_data] if args.key?(:additional_data) @allow_personal_usage = args[:allow_personal_usage] if args.key?(:allow_personal_usage) @duration = args[:duration] if args.key?(:duration) @expiration_timestamp = args[:expiration_timestamp] if args.key?(:expiration_timestamp) @name = args[:name] if args.key?(:name) @one_time_only = args[:one_time_only] if args.key?(:one_time_only) @policy_name = args[:policy_name] if args.key?(:policy_name) @qr_code = args[:qr_code] if args.key?(:qr_code) @user = args[:user] if args.key?(:user) @value = args[:value] if args.key?(:value) end |