Class DevicePolicy (1.53.0)

public final class DevicePolicy extends GeneratedMessageV3 implements DevicePolicyOrBuilder

DevicePolicy specifies device specific restrictions necessary to acquire a given access level. A DevicePolicy specifies requirements for requests from devices to be granted access levels, it does not do any enforcement on the device. DevicePolicy acts as an AND over all specified fields, and each repeated field is an OR over its elements. Any unset fields are ignored. For example, if the proto is { os_type : DESKTOP_WINDOWS, os_type : DESKTOP_LINUX, encryption_status: ENCRYPTED}, then the DevicePolicy will be true for requests originating from encrypted Linux desktops and encrypted Windows desktops.

Protobuf type google.identity.accesscontextmanager.v1.DevicePolicy

Static Fields

ALLOWED_DEVICE_MANAGEMENT_LEVELS_FIELD_NUMBER

public static final int ALLOWED_DEVICE_MANAGEMENT_LEVELS_FIELD_NUMBER
Field Value
Type Description
int

ALLOWED_ENCRYPTION_STATUSES_FIELD_NUMBER

public static final int ALLOWED_ENCRYPTION_STATUSES_FIELD_NUMBER
Field Value
Type Description
int

OS_CONSTRAINTS_FIELD_NUMBER

public static final int OS_CONSTRAINTS_FIELD_NUMBER
Field Value
Type Description
int

REQUIRE_ADMIN_APPROVAL_FIELD_NUMBER

public static final int REQUIRE_ADMIN_APPROVAL_FIELD_NUMBER
Field Value
Type Description
int

REQUIRE_CORP_OWNED_FIELD_NUMBER

public static final int REQUIRE_CORP_OWNED_FIELD_NUMBER
Field Value
Type Description
int

REQUIRE_SCREENLOCK_FIELD_NUMBER

public static final int REQUIRE_SCREENLOCK_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static DevicePolicy getDefaultInstance()
Returns
Type Description
DevicePolicy

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static DevicePolicy.Builder newBuilder()
Returns
Type Description
DevicePolicy.Builder

newBuilder(DevicePolicy prototype)

public static DevicePolicy.Builder newBuilder(DevicePolicy prototype)
Parameter
Name Description
prototype DevicePolicy
Returns
Type Description
DevicePolicy.Builder

parseDelimitedFrom(InputStream input)

public static DevicePolicy parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
DevicePolicy
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DevicePolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DevicePolicy
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static DevicePolicy parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
DevicePolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static DevicePolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DevicePolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static DevicePolicy parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
DevicePolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static DevicePolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DevicePolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static DevicePolicy parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
DevicePolicy
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static DevicePolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DevicePolicy
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static DevicePolicy parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
DevicePolicy
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DevicePolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DevicePolicy
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static DevicePolicy parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
DevicePolicy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static DevicePolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DevicePolicy
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<DevicePolicy> parser()
Returns
Type Description
Parser<DevicePolicy>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAllowedDeviceManagementLevels(int index)

public DeviceManagementLevel getAllowedDeviceManagementLevels(int index)

Allowed device management levels, an empty list allows all management levels.

repeated .google.identity.accesscontextmanager.type.DeviceManagementLevel allowed_device_management_levels = 6;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
DeviceManagementLevel

The allowedDeviceManagementLevels at the given index.

getAllowedDeviceManagementLevelsCount()

public int getAllowedDeviceManagementLevelsCount()

Allowed device management levels, an empty list allows all management levels.

repeated .google.identity.accesscontextmanager.type.DeviceManagementLevel allowed_device_management_levels = 6;

Returns
Type Description
int

The count of allowedDeviceManagementLevels.

getAllowedDeviceManagementLevelsList()

public List<DeviceManagementLevel> getAllowedDeviceManagementLevelsList()

Allowed device management levels, an empty list allows all management levels.

repeated .google.identity.accesscontextmanager.type.DeviceManagementLevel allowed_device_management_levels = 6;

Returns
Type Description
List<DeviceManagementLevel>

A list containing the allowedDeviceManagementLevels.

getAllowedDeviceManagementLevelsValue(int index)

public int getAllowedDeviceManagementLevelsValue(int index)

Allowed device management levels, an empty list allows all management levels.

repeated .google.identity.accesscontextmanager.type.DeviceManagementLevel allowed_device_management_levels = 6;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

The enum numeric value on the wire of allowedDeviceManagementLevels at the given index.

getAllowedDeviceManagementLevelsValueList()

public List<Integer> getAllowedDeviceManagementLevelsValueList()

Allowed device management levels, an empty list allows all management levels.

repeated .google.identity.accesscontextmanager.type.DeviceManagementLevel allowed_device_management_levels = 6;

Returns
Type Description
List<Integer>

A list containing the enum numeric values on the wire for allowedDeviceManagementLevels.

getAllowedEncryptionStatuses(int index)

public DeviceEncryptionStatus getAllowedEncryptionStatuses(int index)

Allowed encryptions statuses, an empty list allows all statuses.

repeated .google.identity.accesscontextmanager.type.DeviceEncryptionStatus allowed_encryption_statuses = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
DeviceEncryptionStatus

The allowedEncryptionStatuses at the given index.

getAllowedEncryptionStatusesCount()

public int getAllowedEncryptionStatusesCount()

Allowed encryptions statuses, an empty list allows all statuses.

repeated .google.identity.accesscontextmanager.type.DeviceEncryptionStatus allowed_encryption_statuses = 2;

Returns
Type Description
int

The count of allowedEncryptionStatuses.

getAllowedEncryptionStatusesList()

public List<DeviceEncryptionStatus> getAllowedEncryptionStatusesList()

Allowed encryptions statuses, an empty list allows all statuses.

repeated .google.identity.accesscontextmanager.type.DeviceEncryptionStatus allowed_encryption_statuses = 2;

Returns
Type Description
List<DeviceEncryptionStatus>

A list containing the allowedEncryptionStatuses.

getAllowedEncryptionStatusesValue(int index)

public int getAllowedEncryptionStatusesValue(int index)

Allowed encryptions statuses, an empty list allows all statuses.

repeated .google.identity.accesscontextmanager.type.DeviceEncryptionStatus allowed_encryption_statuses = 2;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

The enum numeric value on the wire of allowedEncryptionStatuses at the given index.

getAllowedEncryptionStatusesValueList()

public List<Integer> getAllowedEncryptionStatusesValueList()

Allowed encryptions statuses, an empty list allows all statuses.

repeated .google.identity.accesscontextmanager.type.DeviceEncryptionStatus allowed_encryption_statuses = 2;

Returns
Type Description
List<Integer>

A list containing the enum numeric values on the wire for allowedEncryptionStatuses.

getDefaultInstanceForType()

public DevicePolicy getDefaultInstanceForType()
Returns
Type Description
DevicePolicy

getOsConstraints(int index)

public OsConstraint getOsConstraints(int index)

Allowed OS versions, an empty list allows all types and all versions.

repeated .google.identity.accesscontextmanager.v1.OsConstraint os_constraints = 3;

Parameter
Name Description
index int
Returns
Type Description
OsConstraint

getOsConstraintsCount()

public int getOsConstraintsCount()

Allowed OS versions, an empty list allows all types and all versions.

repeated .google.identity.accesscontextmanager.v1.OsConstraint os_constraints = 3;

Returns
Type Description
int

getOsConstraintsList()

public List<OsConstraint> getOsConstraintsList()

Allowed OS versions, an empty list allows all types and all versions.

repeated .google.identity.accesscontextmanager.v1.OsConstraint os_constraints = 3;

Returns
Type Description
List<OsConstraint>

getOsConstraintsOrBuilder(int index)

public OsConstraintOrBuilder getOsConstraintsOrBuilder(int index)

Allowed OS versions, an empty list allows all types and all versions.

repeated .google.identity.accesscontextmanager.v1.OsConstraint os_constraints = 3;

Parameter
Name Description
index int
Returns
Type Description
OsConstraintOrBuilder

getOsConstraintsOrBuilderList()

public List<? extends OsConstraintOrBuilder> getOsConstraintsOrBuilderList()

Allowed OS versions, an empty list allows all types and all versions.

repeated .google.identity.accesscontextmanager.v1.OsConstraint os_constraints = 3;

Returns
Type Description
List<? extends com.google.identity.accesscontextmanager.v1.OsConstraintOrBuilder>

getParserForType()

public Parser<DevicePolicy> getParserForType()
Returns
Type Description
Parser<DevicePolicy>
Overrides

getRequireAdminApproval()

public boolean getRequireAdminApproval()

Whether the device needs to be approved by the customer admin.

bool require_admin_approval = 7;

Returns
Type Description
boolean

The requireAdminApproval.

getRequireCorpOwned()

public boolean getRequireCorpOwned()

Whether the device needs to be corp owned.

bool require_corp_owned = 8;

Returns
Type Description
boolean

The requireCorpOwned.

getRequireScreenlock()

public boolean getRequireScreenlock()

Whether or not screenlock is required for the DevicePolicy to be true. Defaults to false.

bool require_screenlock = 1;

Returns
Type Description
boolean

The requireScreenlock.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public DevicePolicy.Builder newBuilderForType()
Returns
Type Description
DevicePolicy.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected DevicePolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
DevicePolicy.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public DevicePolicy.Builder toBuilder()
Returns
Type Description
DevicePolicy.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException