Class Condition (1.15.0)

public final class Condition extends GeneratedMessageV3 implements ConditionOrBuilder

A condition necessary for an AccessLevel to be granted. The Condition is an AND over its fields. So a Condition is true if: 1) the request IP is from one of the listed subnetworks AND 2) the originating device complies with the listed device policy AND 3) all listed access levels are granted AND 4) the request was sent at a time allowed by the DateTimeRestriction.

Protobuf type google.identity.accesscontextmanager.v1.Condition

Implements

ConditionOrBuilder

Static Fields

DEVICE_POLICY_FIELD_NUMBER

public static final int DEVICE_POLICY_FIELD_NUMBER
Field Value
TypeDescription
int

IP_SUBNETWORKS_FIELD_NUMBER

public static final int IP_SUBNETWORKS_FIELD_NUMBER
Field Value
TypeDescription
int

MEMBERS_FIELD_NUMBER

public static final int MEMBERS_FIELD_NUMBER
Field Value
TypeDescription
int

NEGATE_FIELD_NUMBER

public static final int NEGATE_FIELD_NUMBER
Field Value
TypeDescription
int

REGIONS_FIELD_NUMBER

public static final int REGIONS_FIELD_NUMBER
Field Value
TypeDescription
int

REQUIRED_ACCESS_LEVELS_FIELD_NUMBER

public static final int REQUIRED_ACCESS_LEVELS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Condition getDefaultInstance()
Returns
TypeDescription
Condition

getDescriptor()

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

newBuilder()

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

newBuilder(Condition prototype)

public static Condition.Builder newBuilder(Condition prototype)
Parameter
NameDescription
prototypeCondition
Returns
TypeDescription
Condition.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public Condition getDefaultInstanceForType()
Returns
TypeDescription
Condition

getDevicePolicy()

public DevicePolicy getDevicePolicy()

Device specific restrictions, all restrictions must hold for the Condition to be true. If not specified, all devices are allowed.

.google.identity.accesscontextmanager.v1.DevicePolicy device_policy = 2;

Returns
TypeDescription
DevicePolicy

The devicePolicy.

getDevicePolicyOrBuilder()

public DevicePolicyOrBuilder getDevicePolicyOrBuilder()

Device specific restrictions, all restrictions must hold for the Condition to be true. If not specified, all devices are allowed.

.google.identity.accesscontextmanager.v1.DevicePolicy device_policy = 2;

Returns
TypeDescription
DevicePolicyOrBuilder

getIpSubnetworks(int index)

public String getIpSubnetworks(int index)

CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32" is not. The originating IP of a request must be in one of the listed subnets in order for this Condition to be true. If empty, all IP addresses are allowed.

repeated string ip_subnetworks = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The ipSubnetworks at the given index.

getIpSubnetworksBytes(int index)

public ByteString getIpSubnetworksBytes(int index)

CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32" is not. The originating IP of a request must be in one of the listed subnets in order for this Condition to be true. If empty, all IP addresses are allowed.

repeated string ip_subnetworks = 1;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the ipSubnetworks at the given index.

getIpSubnetworksCount()

public int getIpSubnetworksCount()

CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32" is not. The originating IP of a request must be in one of the listed subnets in order for this Condition to be true. If empty, all IP addresses are allowed.

repeated string ip_subnetworks = 1;

Returns
TypeDescription
int

The count of ipSubnetworks.

getIpSubnetworksList()

public ProtocolStringList getIpSubnetworksList()

CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32" is not. The originating IP of a request must be in one of the listed subnets in order for this Condition to be true. If empty, all IP addresses are allowed.

repeated string ip_subnetworks = 1;

Returns
TypeDescription
ProtocolStringList

A list containing the ipSubnetworks.

getMembers(int index)

public String getMembers(int index)

The request must be made by one of the provided user or service accounts. Groups are not supported. Syntax: user:{emailid} serviceAccount:{emailid} If not specified, a request may come from any user.

repeated string members = 6;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The members at the given index.

getMembersBytes(int index)

public ByteString getMembersBytes(int index)

The request must be made by one of the provided user or service accounts. Groups are not supported. Syntax: user:{emailid} serviceAccount:{emailid} If not specified, a request may come from any user.

repeated string members = 6;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the members at the given index.

getMembersCount()

public int getMembersCount()

The request must be made by one of the provided user or service accounts. Groups are not supported. Syntax: user:{emailid} serviceAccount:{emailid} If not specified, a request may come from any user.

repeated string members = 6;

Returns
TypeDescription
int

The count of members.

getMembersList()

public ProtocolStringList getMembersList()

The request must be made by one of the provided user or service accounts. Groups are not supported. Syntax: user:{emailid} serviceAccount:{emailid} If not specified, a request may come from any user.

repeated string members = 6;

Returns
TypeDescription
ProtocolStringList

A list containing the members.

getNegate()

public boolean getNegate()

Whether to negate the Condition. If true, the Condition becomes a NAND over its non-empty fields, each field must be false for the Condition overall to be satisfied. Defaults to false.

bool negate = 5;

Returns
TypeDescription
boolean

The negate.

getParserForType()

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

getRegions(int index)

public String getRegions(int index)

The request must originate from one of the provided countries/regions. Must be valid ISO 3166-1 alpha-2 codes.

repeated string regions = 7;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The regions at the given index.

getRegionsBytes(int index)

public ByteString getRegionsBytes(int index)

The request must originate from one of the provided countries/regions. Must be valid ISO 3166-1 alpha-2 codes.

repeated string regions = 7;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the regions at the given index.

getRegionsCount()

public int getRegionsCount()

The request must originate from one of the provided countries/regions. Must be valid ISO 3166-1 alpha-2 codes.

repeated string regions = 7;

Returns
TypeDescription
int

The count of regions.

getRegionsList()

public ProtocolStringList getRegionsList()

The request must originate from one of the provided countries/regions. Must be valid ISO 3166-1 alpha-2 codes.

repeated string regions = 7;

Returns
TypeDescription
ProtocolStringList

A list containing the regions.

getRequiredAccessLevels(int index)

public String getRequiredAccessLevels(int index)

A list of other access levels defined in the same Policy, referenced by resource name. Referencing an AccessLevel which does not exist is an error. All access levels listed must be granted for the Condition to be true. Example: "accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"

repeated string required_access_levels = 3;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The requiredAccessLevels at the given index.

getRequiredAccessLevelsBytes(int index)

public ByteString getRequiredAccessLevelsBytes(int index)

A list of other access levels defined in the same Policy, referenced by resource name. Referencing an AccessLevel which does not exist is an error. All access levels listed must be granted for the Condition to be true. Example: "accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"

repeated string required_access_levels = 3;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the requiredAccessLevels at the given index.

getRequiredAccessLevelsCount()

public int getRequiredAccessLevelsCount()

A list of other access levels defined in the same Policy, referenced by resource name. Referencing an AccessLevel which does not exist is an error. All access levels listed must be granted for the Condition to be true. Example: "accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"

repeated string required_access_levels = 3;

Returns
TypeDescription
int

The count of requiredAccessLevels.

getRequiredAccessLevelsList()

public ProtocolStringList getRequiredAccessLevelsList()

A list of other access levels defined in the same Policy, referenced by resource name. Referencing an AccessLevel which does not exist is an error. All access levels listed must be granted for the Condition to be true. Example: "accessPolicies/MY_POLICY/accessLevels/LEVEL_NAME"

repeated string required_access_levels = 3;

Returns
TypeDescription
ProtocolStringList

A list containing the requiredAccessLevels.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasDevicePolicy()

public boolean hasDevicePolicy()

Device specific restrictions, all restrictions must hold for the Condition to be true. If not specified, all devices are allowed.

.google.identity.accesscontextmanager.v1.DevicePolicy device_policy = 2;

Returns
TypeDescription
boolean

Whether the devicePolicy field is set.

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 Condition.Builder newBuilderForType()
Returns
TypeDescription
Condition.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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