Send feedback
Class Policy (2.18.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.18.0 keyboard_arrow_down
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
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
Static Fields
BOOLEAN_POLICY_FIELD_NUMBER
public static final int BOOLEAN_POLICY_FIELD_NUMBER
Field Value Type Description int
CONSTRAINT_FIELD_NUMBER
public static final int CONSTRAINT_FIELD_NUMBER
Field Value Type Description int
ETAG_FIELD_NUMBER
public static final int ETAG_FIELD_NUMBER
Field Value Type Description int
LIST_POLICY_FIELD_NUMBER
public static final int LIST_POLICY_FIELD_NUMBER
Field Value Type Description int
RESTORE_DEFAULT_FIELD_NUMBER
public static final int RESTORE_DEFAULT_FIELD_NUMBER
Field Value Type Description int
UPDATE_TIME_FIELD_NUMBER
public static final int UPDATE_TIME_FIELD_NUMBER
Field Value Type Description int
VERSION_FIELD_NUMBER
public static final int VERSION_FIELD_NUMBER
Field Value Type Description int
Static Methods
getDefaultInstance()
public static Policy getDefaultInstance ()
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
newBuilder()
public static Policy . Builder newBuilder ()
newBuilder(Policy prototype)
public static Policy . Builder newBuilder ( Policy prototype )
Parameter Name Description prototype
Policy
public static Policy parseDelimitedFrom ( InputStream input )
public static Policy parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(byte[] data)
public static Policy parseFrom ( byte [] data )
Parameter Name Description data
byte []
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Policy parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteString data)
public static Policy parseFrom ( ByteString data )
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Policy parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
public static Policy parseFrom ( CodedInputStream input )
public static Policy parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
public static Policy parseFrom ( InputStream input )
public static Policy parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteBuffer data)
public static Policy parseFrom ( ByteBuffer data )
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Policy parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
parser()
public static Parser<Policy> parser ()
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter Name Description obj
Object
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;
getBooleanPolicyOrBuilder()
public Policy . BooleanPolicyOrBuilder getBooleanPolicyOrBuilder ()
For boolean Constraints
, whether to enforce the Constraint
or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6;
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 ()
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;
getListPolicy()
public Policy . ListPolicy getListPolicy ()
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;
getListPolicyOrBuilder()
public Policy . ListPolicyOrBuilder getListPolicyOrBuilder ()
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;
getParserForType()
public Parser<Policy> getParserForType ()
Overrides
getPolicyTypeCase()
public Policy . PolicyTypeCase getPolicyTypeCase ()
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;
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;
getSerializedSize()
public int getSerializedSize ()
Returns Type Description int
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields ()
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 Type Description Timestamp
The updateTime.
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;
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 Type Description int
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
newBuilderForType()
public Policy . Builder newBuilderForType ()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Policy . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Overrides
toBuilder()
public Policy . Builder toBuilder ()
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-22 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-22 UTC."],[],[]]