public final class Policy extends GeneratedMessageV3 implements PolicyOrBuilder
Defines a Cloud Organization Policy
which is used to specify Constraints
for configurations of Cloud Platform resources.
Protobuf type google.cloud.orgpolicy.v1.Policy
Static Fields
BOOLEAN_POLICY_FIELD_NUMBER
public static final int BOOLEAN_POLICY_FIELD_NUMBER
Field Value
CONSTRAINT_FIELD_NUMBER
public static final int CONSTRAINT_FIELD_NUMBER
Field Value
ETAG_FIELD_NUMBER
public static final int ETAG_FIELD_NUMBER
Field Value
LIST_POLICY_FIELD_NUMBER
public static final int LIST_POLICY_FIELD_NUMBER
Field Value
RESTORE_DEFAULT_FIELD_NUMBER
public static final int RESTORE_DEFAULT_FIELD_NUMBER
Field Value
UPDATE_TIME_FIELD_NUMBER
public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
VERSION_FIELD_NUMBER
public static final int VERSION_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static Policy getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static Policy.Builder newBuilder()
Returns
newBuilder(Policy prototype)
public static Policy.Builder newBuilder(Policy prototype)
Parameter
Name | Description |
prototype | Policy
|
Returns
public static Policy parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static Policy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static Policy parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Policy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static Policy parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Policy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Policy parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static Policy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Policy parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static Policy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static Policy parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Policy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<Policy> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getBooleanPolicy()
public Policy.BooleanPolicy getBooleanPolicy()
For boolean Constraints
, whether to enforce the Constraint
or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6;
Returns
getBooleanPolicyOrBuilder()
public Policy.BooleanPolicyOrBuilder getBooleanPolicyOrBuilder()
For boolean Constraints
, whether to enforce the Constraint
or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6;
Returns
getConstraint()
public String getConstraint()
The name of the Constraint
the Policy
is configuring, for example,
constraints/serviceuser.services
.
Immutable after creation.
string constraint = 2;
Returns
Type | Description |
String | The constraint.
|
getConstraintBytes()
public ByteString getConstraintBytes()
The name of the Constraint
the Policy
is configuring, for example,
constraints/serviceuser.services
.
Immutable after creation.
string constraint = 2;
Returns
Type | Description |
ByteString | The bytes for constraint.
|
getDefaultInstanceForType()
public Policy getDefaultInstanceForType()
Returns
getEtag()
public ByteString getEtag()
An opaque tag indicating the current version of the Policy
, used for
concurrency control.
When the Policy
is returned from either a GetPolicy
or a
ListOrgPolicy
request, this etag
indicates the version of the current
Policy
to use when executing a read-modify-write loop.
When the Policy
is returned from a GetEffectivePolicy
request, the
etag
will be unset.
When the Policy
is used in a SetOrgPolicy
method, use the etag
value
that was returned from a GetOrgPolicy
request as part of a
read-modify-write loop for concurrency control. Not setting the etag
in a
SetOrgPolicy
request will result in an unconditional write of the
Policy
.
bytes etag = 3;
Returns
getListPolicy()
public Policy.ListPolicy getListPolicy()
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;
Returns
getListPolicyOrBuilder()
public Policy.ListPolicyOrBuilder getListPolicyOrBuilder()
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;
Returns
getParserForType()
public Parser<Policy> getParserForType()
Returns
Overrides
getPolicyTypeCase()
public Policy.PolicyTypeCase getPolicyTypeCase()
Returns
getRestoreDefault()
public Policy.RestoreDefault getRestoreDefault()
Restores the default behavior of the constraint; independent of
Constraint
type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7;
Returns
getRestoreDefaultOrBuilder()
public Policy.RestoreDefaultOrBuilder getRestoreDefaultOrBuilder()
Restores the default behavior of the constraint; independent of
Constraint
type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7;
Returns
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
getUpdateTime()
public Timestamp getUpdateTime()
The time stamp the Policy
was previously updated. This is set by the
server, not specified by the caller, and represents the last time a call to
SetOrgPolicy
was made for that Policy
. Any value set by the client will
be ignored.
.google.protobuf.Timestamp update_time = 4;
Returns
getUpdateTimeOrBuilder()
public TimestampOrBuilder getUpdateTimeOrBuilder()
The time stamp the Policy
was previously updated. This is set by the
server, not specified by the caller, and represents the last time a call to
SetOrgPolicy
was made for that Policy
. Any value set by the client will
be ignored.
.google.protobuf.Timestamp update_time = 4;
Returns
getVersion()
Version of the Policy
. Default version is 0;
int32 version = 1;
Returns
Type | Description |
int | The version.
|
hasBooleanPolicy()
public boolean hasBooleanPolicy()
For boolean Constraints
, whether to enforce the Constraint
or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6;
Returns
Type | Description |
boolean | Whether the booleanPolicy field is set.
|
hasListPolicy()
public boolean hasListPolicy()
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;
Returns
Type | Description |
boolean | Whether the listPolicy field is set.
|
hasRestoreDefault()
public boolean hasRestoreDefault()
Restores the default behavior of the constraint; independent of
Constraint
type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7;
Returns
Type | Description |
boolean | Whether the restoreDefault field is set.
|
hasUpdateTime()
public boolean hasUpdateTime()
The time stamp the Policy
was previously updated. This is set by the
server, not specified by the caller, and represents the last time a call to
SetOrgPolicy
was made for that Policy
. Any value set by the client will
be ignored.
.google.protobuf.Timestamp update_time = 4;
Returns
Type | Description |
boolean | Whether the updateTime field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public Policy.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Policy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public Policy.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions