Package com.google.cloud.orgpolicy.v1
Class Policy.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Policy.Builder>
com.google.cloud.orgpolicy.v1.Policy.Builder
- All Implemented Interfaces:
PolicyOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Policy
public static final class Policy.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Policy.Builder>
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-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()For boolean `Constraints`, whether to enforce the `Constraint` or not.The name of the `Constraint` the `Policy` is configuring, for example, `constraints/serviceuser.services`.An opaque tag indicating the current version of the `Policy`, used for concurrency control.List of values either allowed or disallowed.Restores the default behavior of the constraint; independent of `Constraint` type.The time stamp the `Policy` was previously updated.Version of the `Policy`.For boolean `Constraints`, whether to enforce the `Constraint` or not.For boolean `Constraints`, whether to enforce the `Constraint` or not.For boolean `Constraints`, whether to enforce the `Constraint` or not.The name of the `Constraint` the `Policy` is configuring, for example, `constraints/serviceuser.services`.com.google.protobuf.ByteStringThe name of the `Constraint` the `Policy` is configuring, for example, `constraints/serviceuser.services`.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.Descriptorcom.google.protobuf.ByteStringgetEtag()An opaque tag indicating the current version of the `Policy`, used for concurrency control.List of values either allowed or disallowed.List of values either allowed or disallowed.List of values either allowed or disallowed.Restores the default behavior of the constraint; independent of `Constraint` type.Restores the default behavior of the constraint; independent of `Constraint` type.Restores the default behavior of the constraint; independent of `Constraint` type.com.google.protobuf.TimestampThe time stamp the `Policy` was previously updated.com.google.protobuf.Timestamp.BuilderThe time stamp the `Policy` was previously updated.com.google.protobuf.TimestampOrBuilderThe time stamp the `Policy` was previously updated.intVersion of the `Policy`.booleanFor boolean `Constraints`, whether to enforce the `Constraint` or not.booleanList of values either allowed or disallowed.booleanRestores the default behavior of the constraint; independent of `Constraint` type.booleanThe time stamp the `Policy` was previously updated.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanFor boolean `Constraints`, whether to enforce the `Constraint` or not.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeListPolicy(Policy.ListPolicy value) List of values either allowed or disallowed.Restores the default behavior of the constraint; independent of `Constraint` type.mergeUpdateTime(com.google.protobuf.Timestamp value) The time stamp the `Policy` was previously updated.For boolean `Constraints`, whether to enforce the `Constraint` or not.setBooleanPolicy(Policy.BooleanPolicy.Builder builderForValue) For boolean `Constraints`, whether to enforce the `Constraint` or not.setConstraint(String value) The name of the `Constraint` the `Policy` is configuring, for example, `constraints/serviceuser.services`.setConstraintBytes(com.google.protobuf.ByteString value) The name of the `Constraint` the `Policy` is configuring, for example, `constraints/serviceuser.services`.setEtag(com.google.protobuf.ByteString value) An opaque tag indicating the current version of the `Policy`, used for concurrency control.setListPolicy(Policy.ListPolicy value) List of values either allowed or disallowed.setListPolicy(Policy.ListPolicy.Builder builderForValue) List of values either allowed or disallowed.Restores the default behavior of the constraint; independent of `Constraint` type.setRestoreDefault(Policy.RestoreDefault.Builder builderForValue) Restores the default behavior of the constraint; independent of `Constraint` type.setUpdateTime(com.google.protobuf.Timestamp value) The time stamp the `Policy` was previously updated.setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) The time stamp the `Policy` was previously updated.setVersion(int value) Version of the `Policy`.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Policy.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Policy.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Policy.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Policy.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Policy.Builder>
-
mergeFrom
public Policy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Policy.Builder>- Throws:
IOException
-
getPolicyTypeCase
- Specified by:
getPolicyTypeCasein interfacePolicyOrBuilder
-
clearPolicyType
-
getVersion
public int getVersion()Version of the `Policy`. Default version is 0;
int32 version = 1;- Specified by:
getVersionin interfacePolicyOrBuilder- Returns:
- The version.
-
setVersion
Version of the `Policy`. Default version is 0;
int32 version = 1;- Parameters:
value- The version to set.- Returns:
- This builder for chaining.
-
clearVersion
Version of the `Policy`. Default version is 0;
int32 version = 1;- Returns:
- This builder for chaining.
-
getConstraint
The name of the `Constraint` the `Policy` is configuring, for example, `constraints/serviceuser.services`. Immutable after creation.
string constraint = 2;- Specified by:
getConstraintin interfacePolicyOrBuilder- Returns:
- The constraint.
-
getConstraintBytes
public com.google.protobuf.ByteString getConstraintBytes()The name of the `Constraint` the `Policy` is configuring, for example, `constraints/serviceuser.services`. Immutable after creation.
string constraint = 2;- Specified by:
getConstraintBytesin interfacePolicyOrBuilder- Returns:
- The bytes for constraint.
-
setConstraint
The name of the `Constraint` the `Policy` is configuring, for example, `constraints/serviceuser.services`. Immutable after creation.
string constraint = 2;- Parameters:
value- The constraint to set.- Returns:
- This builder for chaining.
-
clearConstraint
The name of the `Constraint` the `Policy` is configuring, for example, `constraints/serviceuser.services`. Immutable after creation.
string constraint = 2;- Returns:
- This builder for chaining.
-
setConstraintBytes
The name of the `Constraint` the `Policy` is configuring, for example, `constraints/serviceuser.services`. Immutable after creation.
string constraint = 2;- Parameters:
value- The bytes for constraint to set.- Returns:
- This builder for chaining.
-
getEtag
public com.google.protobuf.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;- Specified by:
getEtagin interfacePolicyOrBuilder- Returns:
- The etag.
-
setEtag
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;- Parameters:
value- The etag to set.- Returns:
- This builder for chaining.
-
clearEtag
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:
- This builder for chaining.
-
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;- Specified by:
hasUpdateTimein interfacePolicyOrBuilder- Returns:
- Whether the updateTime field is set.
-
getUpdateTime
public com.google.protobuf.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;- Specified by:
getUpdateTimein interfacePolicyOrBuilder- Returns:
- The updateTime.
-
setUpdateTime
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; -
setUpdateTime
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; -
mergeUpdateTime
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; -
clearUpdateTime
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; -
getUpdateTimeBuilder
public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()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; -
getUpdateTimeOrBuilder
public com.google.protobuf.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;- Specified by:
getUpdateTimeOrBuilderin interfacePolicyOrBuilder
-
hasListPolicy
public boolean hasListPolicy()List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;- Specified by:
hasListPolicyin interfacePolicyOrBuilder- Returns:
- Whether the listPolicy field is set.
-
getListPolicy
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;- Specified by:
getListPolicyin interfacePolicyOrBuilder- Returns:
- The listPolicy.
-
setListPolicy
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5; -
setListPolicy
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5; -
mergeListPolicy
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5; -
clearListPolicy
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5; -
getListPolicyBuilder
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5; -
getListPolicyOrBuilder
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;- Specified by:
getListPolicyOrBuilderin interfacePolicyOrBuilder
-
hasBooleanPolicy
public boolean hasBooleanPolicy()For boolean `Constraints`, whether to enforce the `Constraint` or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6;- Specified by:
hasBooleanPolicyin interfacePolicyOrBuilder- Returns:
- Whether the booleanPolicy field is set.
-
getBooleanPolicy
For boolean `Constraints`, whether to enforce the `Constraint` or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6;- Specified by:
getBooleanPolicyin interfacePolicyOrBuilder- Returns:
- The booleanPolicy.
-
setBooleanPolicy
For boolean `Constraints`, whether to enforce the `Constraint` or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6; -
setBooleanPolicy
For boolean `Constraints`, whether to enforce the `Constraint` or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6; -
mergeBooleanPolicy
For boolean `Constraints`, whether to enforce the `Constraint` or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6; -
clearBooleanPolicy
For boolean `Constraints`, whether to enforce the `Constraint` or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6; -
getBooleanPolicyBuilder
For boolean `Constraints`, whether to enforce the `Constraint` or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6; -
getBooleanPolicyOrBuilder
For boolean `Constraints`, whether to enforce the `Constraint` or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6;- Specified by:
getBooleanPolicyOrBuilderin interfacePolicyOrBuilder
-
hasRestoreDefault
public boolean hasRestoreDefault()Restores the default behavior of the constraint; independent of `Constraint` type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7;- Specified by:
hasRestoreDefaultin interfacePolicyOrBuilder- Returns:
- Whether the restoreDefault field is set.
-
getRestoreDefault
Restores the default behavior of the constraint; independent of `Constraint` type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7;- Specified by:
getRestoreDefaultin interfacePolicyOrBuilder- Returns:
- The restoreDefault.
-
setRestoreDefault
Restores the default behavior of the constraint; independent of `Constraint` type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7; -
setRestoreDefault
Restores the default behavior of the constraint; independent of `Constraint` type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7; -
mergeRestoreDefault
Restores the default behavior of the constraint; independent of `Constraint` type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7; -
clearRestoreDefault
Restores the default behavior of the constraint; independent of `Constraint` type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7; -
getRestoreDefaultBuilder
Restores the default behavior of the constraint; independent of `Constraint` type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7; -
getRestoreDefaultOrBuilder
Restores the default behavior of the constraint; independent of `Constraint` type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7;- Specified by:
getRestoreDefaultOrBuilderin interfacePolicyOrBuilder
-