pub struct EnrollmentToken {
pub additional_data: Option<String>,
pub allow_personal_usage: Option<String>,
pub duration: Option<Duration>,
pub expiration_timestamp: Option<DateTime<Utc>>,
pub name: Option<String>,
pub one_time_only: Option<bool>,
pub policy_name: Option<String>,
pub qr_code: Option<String>,
pub user: Option<User>,
pub value: Option<String>,
}
Expand description
An enrollment token.
§Activities
This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).
- enrollment tokens create enterprises (request|response)
- enrollment tokens get enterprises (response)
Fields§
§additional_data: Option<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.
allow_personal_usage: Option<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.
duration: Option<Duration>
The length of time the enrollment token is valid, ranging from 1 minute to Durations.MAX_VALUE (https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/util/Durations.html#MAX_VALUE), approximately 10,000 years. If not specified, the default duration is 1 hour. Please note that if requested duration causes the resulting expiration_timestamp to exceed Timestamps.MAX_VALUE (https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/util/Timestamps.html#MAX_VALUE), then expiration_timestamp is coerced to Timestamps.MAX_VALUE.
expiration_timestamp: Option<DateTime<Utc>>
The expiration time of the token. This is a read-only field generated by the server.
name: Option<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: Option<bool>
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.
policy_name: Option<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.
qr_code: Option<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.
user: Option<User>
This field is deprecated and the value is ignored.
value: Option<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.
Trait Implementations§
Source§impl Clone for EnrollmentToken
impl Clone for EnrollmentToken
Source§fn clone(&self) -> EnrollmentToken
fn clone(&self) -> EnrollmentToken
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for EnrollmentToken
impl Debug for EnrollmentToken
Source§impl Default for EnrollmentToken
impl Default for EnrollmentToken
Source§fn default() -> EnrollmentToken
fn default() -> EnrollmentToken
Source§impl<'de> Deserialize<'de> for EnrollmentToken
impl<'de> Deserialize<'de> for EnrollmentToken
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for EnrollmentToken
impl Serialize for EnrollmentToken
impl RequestValue for EnrollmentToken
impl ResponseResult for EnrollmentToken
Auto Trait Implementations§
impl Freeze for EnrollmentToken
impl RefUnwindSafe for EnrollmentToken
impl Send for EnrollmentToken
impl Sync for EnrollmentToken
impl Unpin for EnrollmentToken
impl UnwindSafe for EnrollmentToken
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more