Class DevicePolicy (1.15.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
TypeDescription
int

ALLOWED_ENCRYPTION_STATUSES_FIELD_NUMBER

public static final int ALLOWED_ENCRYPTION_STATUSES_FIELD_NUMBER
Field Value
TypeDescription
int

OS_CONSTRAINTS_FIELD_NUMBER

public static final int OS_CONSTRAINTS_FIELD_NUMBER
Field Value
TypeDescription
int

REQUIRE_ADMIN_APPROVAL_FIELD_NUMBER

public static final int REQUIRE_ADMIN_APPROVAL_FIELD_NUMBER
Field Value
TypeDescription
int

REQUIRE_CORP_OWNED_FIELD_NUMBER

public static final int REQUIRE_CORP_OWNED_FIELD_NUMBER
Field Value
TypeDescription
int

REQUIRE_SCREENLOCK_FIELD_NUMBER

public static final int REQUIRE_SCREENLOCK_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static DevicePolicy getDefaultInstance()
Returns
TypeDescription
DevicePolicy

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static DevicePolicy.Builder newBuilder()
Returns
TypeDescription
DevicePolicy.Builder

newBuilder(DevicePolicy prototype)

public static DevicePolicy.Builder newBuilder(DevicePolicy prototype)
Parameter
NameDescription
prototypeDevicePolicy
Returns
TypeDescription
DevicePolicy.Builder

parseDelimitedFrom(InputStream input)

public static DevicePolicy parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
DevicePolicy
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DevicePolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DevicePolicy
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static DevicePolicy parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
DevicePolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static DevicePolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DevicePolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static DevicePolicy parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
DevicePolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static DevicePolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DevicePolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static DevicePolicy parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
DevicePolicy
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static DevicePolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DevicePolicy
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static DevicePolicy parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
DevicePolicy
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DevicePolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DevicePolicy
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static DevicePolicy parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
DevicePolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static DevicePolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DevicePolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<DevicePolicy> parser()
Returns
TypeDescription
Parser<DevicePolicy>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
List<Integer>

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

getDefaultInstanceForType()

public DevicePolicy getDefaultInstanceForType()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.identity.accesscontextmanager.v1.OsConstraintOrBuilder>

getParserForType()

public Parser<DevicePolicy> getParserForType()
Returns
TypeDescription
Parser<DevicePolicy>
Overrides

getRequireAdminApproval()

public boolean getRequireAdminApproval()

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

bool require_admin_approval = 7;

Returns
TypeDescription
boolean

The requireAdminApproval.

getRequireCorpOwned()

public boolean getRequireCorpOwned()

Whether the device needs to be corp owned.

bool require_corp_owned = 8;

Returns
TypeDescription
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
TypeDescription
boolean

The requireScreenlock.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public DevicePolicy.Builder newBuilderForType()
Returns
TypeDescription
DevicePolicy.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected DevicePolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
DevicePolicy.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public DevicePolicy.Builder toBuilder()
Returns
TypeDescription
DevicePolicy.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException