public final class PolicySpec extends 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 |
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable, GeneratedMessageV3.UnusedPrivateParameter
AbstractMessageLite.InternalOneOfEnum
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 |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, 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, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public 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(GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance
in class GeneratedMessageV3
public final UnknownFieldSet getUnknownFields()
getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
public 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 PolicySpecOrBuilder
public 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 PolicySpecOrBuilder
public 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 PolicySpecOrBuilder
public 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 PolicySpecOrBuilder
public 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 PolicySpecOrBuilder
public 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 PolicySpecOrBuilder
public 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 PolicySpecOrBuilder
public 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 PolicySpecOrBuilder
public 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 PolicySpecOrBuilder
public 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 PolicySpecOrBuilder
public 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 PolicySpecOrBuilder
public 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 PolicySpecOrBuilder
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static PolicySpec parseFrom(ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static PolicySpec parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static PolicySpec parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static PolicySpec parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static PolicySpec parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static PolicySpec parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static PolicySpec parseFrom(InputStream input) throws IOException
IOException
public static PolicySpec parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static PolicySpec parseDelimitedFrom(InputStream input) throws IOException
IOException
public static PolicySpec parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static PolicySpec parseFrom(CodedInputStream input) throws IOException
IOException
public static PolicySpec parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public PolicySpec.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static PolicySpec.Builder newBuilder()
public static PolicySpec.Builder newBuilder(PolicySpec prototype)
public PolicySpec.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected PolicySpec.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static PolicySpec getDefaultInstance()
public static Parser<PolicySpec> parser()
public Parser<PolicySpec> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public PolicySpec getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
Copyright © 2021 Google LLC. All rights reserved.