Package com.google.cloud.orgpolicy.v2
Class PolicySpec
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.orgpolicy.v2.PolicySpec
-
- All Implemented Interfaces:
PolicySpecOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
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 typegoogle.cloud.orgpolicy.v2.PolicySpec- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPolicySpec.BuilderDefines a Cloud Organization `PolicySpec` which is used to specify `Constraints` for configurations of Cloud Platform resources.static classPolicySpec.PolicyRuleA rule used to express this policy.static interfacePolicySpec.PolicyRuleOrBuilder-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
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
-
-
Field Summary
Fields Modifier and Type Field Description static intETAG_FIELD_NUMBERstatic intINHERIT_FROM_PARENT_FIELD_NUMBERstatic intRESET_FIELD_NUMBERstatic intRULES_FIELD_NUMBERstatic intUPDATE_TIME_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static PolicySpecgetDefaultInstance()PolicySpecgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()StringgetEtag()An opaque tag indicating the current version of the `Policy`, used for concurrency control.com.google.protobuf.ByteStringgetEtagBytes()An opaque tag indicating the current version of the `Policy`, used for concurrency control.booleangetInheritFromParent()Determines the inheritance behavior for this `Policy`.com.google.protobuf.Parser<PolicySpec>getParserForType()booleangetReset()Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific `Constraint` at this resource.PolicySpec.PolicyRulegetRules(int index)Up to 10 PolicyRules are allowed.intgetRulesCount()Up to 10 PolicyRules are allowed.List<PolicySpec.PolicyRule>getRulesList()Up to 10 PolicyRules are allowed.PolicySpec.PolicyRuleOrBuildergetRulesOrBuilder(int index)Up to 10 PolicyRules are allowed.List<? extends PolicySpec.PolicyRuleOrBuilder>getRulesOrBuilderList()Up to 10 PolicyRules are allowed.intgetSerializedSize()com.google.protobuf.TimestampgetUpdateTime()Output only.com.google.protobuf.TimestampOrBuildergetUpdateTimeOrBuilder()Output only.inthashCode()booleanhasUpdateTime()Output only.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static PolicySpec.BuildernewBuilder()static PolicySpec.BuildernewBuilder(PolicySpec prototype)PolicySpec.BuildernewBuilderForType()protected PolicySpec.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static PolicySpecparseDelimitedFrom(InputStream input)static PolicySpecparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static PolicySpecparseFrom(byte[] data)static PolicySpecparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static PolicySpecparseFrom(com.google.protobuf.ByteString data)static PolicySpecparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static PolicySpecparseFrom(com.google.protobuf.CodedInputStream input)static PolicySpecparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static PolicySpecparseFrom(InputStream input)static PolicySpecparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static PolicySpecparseFrom(ByteBuffer data)static PolicySpecparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<PolicySpec>parser()PolicySpec.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, 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, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
ETAG_FIELD_NUMBER
public static final int ETAG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
UPDATE_TIME_FIELD_NUMBER
public static final int UPDATE_TIME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RULES_FIELD_NUMBER
public static final int RULES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
INHERIT_FROM_PARENT_FIELD_NUMBER
public static final int INHERIT_FROM_PARENT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RESET_FIELD_NUMBER
public static final int RESET_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getEtag
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;- Specified by:
getEtagin interfacePolicySpecOrBuilder- Returns:
- The etag.
-
getEtagBytes
public 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;- Specified by:
getEtagBytesin interfacePolicySpecOrBuilder- Returns:
- The bytes for etag.
-
hasUpdateTime
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];- Specified by:
hasUpdateTimein interfacePolicySpecOrBuilder- Returns:
- Whether the updateTime field is set.
-
getUpdateTime
public 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];- Specified by:
getUpdateTimein interfacePolicySpecOrBuilder- Returns:
- The updateTime.
-
getUpdateTimeOrBuilder
public 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];- Specified by:
getUpdateTimeOrBuilderin interfacePolicySpecOrBuilder
-
getRulesList
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;- Specified by:
getRulesListin interfacePolicySpecOrBuilder
-
getRulesOrBuilderList
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;- Specified by:
getRulesOrBuilderListin interfacePolicySpecOrBuilder
-
getRulesCount
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;- Specified by:
getRulesCountin interfacePolicySpecOrBuilder
-
getRules
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;- Specified by:
getRulesin interfacePolicySpecOrBuilder
-
getRulesOrBuilder
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;- Specified by:
getRulesOrBuilderin interfacePolicySpecOrBuilder
-
getInheritFromParent
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;- Specified by:
getInheritFromParentin interfacePolicySpecOrBuilder- Returns:
- The inheritFromParent.
-
getReset
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;- Specified by:
getResetin interfacePolicySpecOrBuilder- Returns:
- The reset.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static PolicySpec parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static PolicySpec parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static PolicySpec parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static PolicySpec parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static PolicySpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static PolicySpec parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static PolicySpec parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static PolicySpec parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static PolicySpec parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static PolicySpec parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static PolicySpec parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static PolicySpec parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public PolicySpec.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static PolicySpec.Builder newBuilder()
-
newBuilder
public static PolicySpec.Builder newBuilder(PolicySpec prototype)
-
toBuilder
public PolicySpec.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected PolicySpec.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static PolicySpec getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<PolicySpec> parser()
-
getParserForType
public com.google.protobuf.Parser<PolicySpec> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public PolicySpec getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-