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

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EnrollmentToken

Returns a new instance of EnrollmentToken.



2947
2948
2949
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 2947

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 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

Returns:

  • (String)


2858
2859
2860
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 2858

def additional_data
  @additional_data
end

#allow_personal_usageString

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

Returns:

  • (String)


2869
2870
2871
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 2869

def allow_personal_usage
  @allow_personal_usage
end

#durationString

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. Corresponds to the JSON property duration

Returns:

  • (String)


2881
2882
2883
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 2881

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)


2887
2888
2889
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 2887

def expiration_timestamp
  @expiration_timestamp
end

#google_authentication_optionsGoogle::Apis::AndroidmanagementV1::GoogleAuthenticationOptions

Options for Google authentication during the enrollment.When triggering the enrollment with a SigninDetail, these options are enforced after the user completes third-party sign-in and an EnrollmentToken is created. If this token' s authentication_requirement is set to REQUIRED, these options interact with the SigninDetail.googleAuthenticationOptions that initiated the flow in the following ways: - If the user skipped Google sign-in earlier (permitted by SigninDetail.googleAuthenticationOptions), an error will occur and the user will be prompted to sign in again. - If required_account_email is set on this token and the user signed in with a different email earlier, an error will occur and the user will be asked to sign in again with the correct account. Corresponds to the JSON property googleAuthenticationOptions



2901
2902
2903
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 2901

def google_authentication_options
  @google_authentication_options
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)


2908
2909
2910
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 2908

def name
  @name
end

#one_time_onlyBoolean 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

Returns:

  • (Boolean)


2914
2915
2916
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 2914

def one_time_only
  @one_time_only
end

#policy_nameString

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

Returns:

  • (String)


2926
2927
2928
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 2926

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)


2934
2935
2936
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 2934

def qr_code
  @qr_code
end

#userGoogle::Apis::AndroidmanagementV1::User

A user belonging to an enterprise. Corresponds to the JSON property user



2939
2940
2941
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 2939

def user
  @user
end

#valueString

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

Returns:

  • (String)


2945
2946
2947
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 2945

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
# File 'lib/google/apis/androidmanagement_v1/classes.rb', line 2952

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)
  @google_authentication_options = args[:google_authentication_options] if args.key?(:google_authentication_options)
  @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