public final class PolicySpec extends com.google.protobuf.GeneratedMessageV3 implements PolicySpecOrBuilder
Defines a Cloud Organization `PolicySpec` which is used to specify `Constraints` for configurations of Cloud Platform resources.Protobuf type
google.cloud.orgpolicy.v2.PolicySpec| Modifier and Type | Class and Description |
|---|---|
static class |
PolicySpec.Builder
Defines a Cloud Organization `PolicySpec` which is used to specify
`Constraints` for configurations of Cloud Platform resources.
|
static class |
PolicySpec.PolicyRule
A rule used to express this policy.
|
static interface |
PolicySpec.PolicyRuleOrBuilder |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
ETAG_FIELD_NUMBER |
static int |
INHERIT_FROM_PARENT_FIELD_NUMBER |
static int |
RESET_FIELD_NUMBER |
static int |
RULES_FIELD_NUMBER |
static int |
UPDATE_TIME_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static PolicySpec |
getDefaultInstance() |
PolicySpec |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
String |
getEtag()
An opaque tag indicating the current version of the `Policy`, used for
concurrency control.
|
com.google.protobuf.ByteString |
getEtagBytes()
An opaque tag indicating the current version of the `Policy`, used for
concurrency control.
|
boolean |
getInheritFromParent()
Determines the inheritance behavior for this `Policy`.
|
com.google.protobuf.Parser<PolicySpec> |
getParserForType() |
boolean |
getReset()
Ignores policies set above this resource and restores the
`constraint_default` enforcement behavior of the specific `Constraint` at
this resource.
|
PolicySpec.PolicyRule |
getRules(int index)
Up to 10 PolicyRules are allowed.
|
int |
getRulesCount()
Up to 10 PolicyRules are allowed.
|
List<PolicySpec.PolicyRule> |
getRulesList()
Up to 10 PolicyRules are allowed.
|
PolicySpec.PolicyRuleOrBuilder |
getRulesOrBuilder(int index)
Up to 10 PolicyRules are allowed.
|
List<? extends PolicySpec.PolicyRuleOrBuilder> |
getRulesOrBuilderList()
Up to 10 PolicyRules are allowed.
|
int |
getSerializedSize() |
com.google.protobuf.Timestamp |
getUpdateTime()
Output only.
|
com.google.protobuf.TimestampOrBuilder |
getUpdateTimeOrBuilder()
Output only.
|
int |
hashCode() |
boolean |
hasUpdateTime()
Output only.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static PolicySpec.Builder |
newBuilder() |
static PolicySpec.Builder |
newBuilder(PolicySpec prototype) |
PolicySpec.Builder |
newBuilderForType() |
protected PolicySpec.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static PolicySpec |
parseDelimitedFrom(InputStream input) |
static PolicySpec |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PolicySpec |
parseFrom(byte[] data) |
static PolicySpec |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PolicySpec |
parseFrom(ByteBuffer data) |
static PolicySpec |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PolicySpec |
parseFrom(com.google.protobuf.ByteString data) |
static PolicySpec |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PolicySpec |
parseFrom(com.google.protobuf.CodedInputStream input) |
static PolicySpec |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static PolicySpec |
parseFrom(InputStream input) |
static PolicySpec |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<PolicySpec> |
parser() |
PolicySpec.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int ETAG_FIELD_NUMBER
public static final int UPDATE_TIME_FIELD_NUMBER
public static final int RULES_FIELD_NUMBER
public static final int INHERIT_FROM_PARENT_FIELD_NUMBER
public static final int RESET_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public String getEtag()
An opaque tag indicating the current version of the `Policy`, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the `Policy` is returned from either a `GetPolicy` or a `ListPolicies` 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.
string etag = 1;getEtag in interface PolicySpecOrBuilderpublic com.google.protobuf.ByteString getEtagBytes()
An opaque tag indicating the current version of the `Policy`, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the `Policy` is returned from either a `GetPolicy` or a `ListPolicies` 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.
string etag = 1;getEtagBytes in interface PolicySpecOrBuilderpublic boolean hasUpdateTime()
Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that `Policy`.
.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasUpdateTime in interface PolicySpecOrBuilderpublic com.google.protobuf.Timestamp getUpdateTime()
Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that `Policy`.
.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getUpdateTime in interface PolicySpecOrBuilderpublic com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that `Policy`.
.google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getUpdateTimeOrBuilder in interface PolicySpecOrBuilderpublic List<PolicySpec.PolicyRule> getRulesList()
Up to 10 PolicyRules are allowed.
In Policies for boolean constraints, the following requirements apply:
- There must be one and only one PolicyRule where condition is unset.
- BooleanPolicyRules with conditions must set `enforced` to the opposite
of the PolicyRule without a condition.
- During policy evaluation, PolicyRules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;getRulesList in interface PolicySpecOrBuilderpublic List<? extends PolicySpec.PolicyRuleOrBuilder> getRulesOrBuilderList()
Up to 10 PolicyRules are allowed.
In Policies for boolean constraints, the following requirements apply:
- There must be one and only one PolicyRule where condition is unset.
- BooleanPolicyRules with conditions must set `enforced` to the opposite
of the PolicyRule without a condition.
- During policy evaluation, PolicyRules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;getRulesOrBuilderList in interface PolicySpecOrBuilderpublic int getRulesCount()
Up to 10 PolicyRules are allowed.
In Policies for boolean constraints, the following requirements apply:
- There must be one and only one PolicyRule where condition is unset.
- BooleanPolicyRules with conditions must set `enforced` to the opposite
of the PolicyRule without a condition.
- During policy evaluation, PolicyRules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;getRulesCount in interface PolicySpecOrBuilderpublic PolicySpec.PolicyRule getRules(int index)
Up to 10 PolicyRules are allowed.
In Policies for boolean constraints, the following requirements apply:
- There must be one and only one PolicyRule where condition is unset.
- BooleanPolicyRules with conditions must set `enforced` to the opposite
of the PolicyRule without a condition.
- During policy evaluation, PolicyRules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;getRules in interface PolicySpecOrBuilderpublic PolicySpec.PolicyRuleOrBuilder getRulesOrBuilder(int index)
Up to 10 PolicyRules are allowed.
In Policies for boolean constraints, the following requirements apply:
- There must be one and only one PolicyRule where condition is unset.
- BooleanPolicyRules with conditions must set `enforced` to the opposite
of the PolicyRule without a condition.
- During policy evaluation, PolicyRules with conditions that are
true for a target resource take precedence.
repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3;getRulesOrBuilder in interface PolicySpecOrBuilderpublic boolean getInheritFromParent()
Determines the inheritance behavior for this `Policy`. If `inherit_from_parent` is true, PolicyRules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this Policy becomes the new root for evaluation. This field can be set only for Policies which configure list constraints.
bool inherit_from_parent = 4;getInheritFromParent in interface PolicySpecOrBuilderpublic boolean getReset()
Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific `Constraint` at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.
bool reset = 5;getReset in interface PolicySpecOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static PolicySpec parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PolicySpec parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PolicySpec parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PolicySpec parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PolicySpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PolicySpec parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static PolicySpec parseFrom(InputStream input) throws IOException
IOExceptionpublic static PolicySpec parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static PolicySpec parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static PolicySpec parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static PolicySpec parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static PolicySpec parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic PolicySpec.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static PolicySpec.Builder newBuilder()
public static PolicySpec.Builder newBuilder(PolicySpec prototype)
public PolicySpec.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected PolicySpec.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static PolicySpec getDefaultInstance()
public static com.google.protobuf.Parser<PolicySpec> parser()
public com.google.protobuf.Parser<PolicySpec> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public PolicySpec getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2023 Google LLC. All rights reserved.