Package com.google.cloud.orgpolicy.v2
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.v2.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 an organization policy which is used to specify constraints for configurations of Google Cloud resources.Protobuf type
google.cloud.orgpolicy.v2.Policy-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Deprecated.Dry-run policy.Optional.Immutable.Basic information about the organization policy.Deprecated.google.cloud.orgpolicy.v2.Policy.alternate is deprecated.Deprecated.Deprecated.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorDry-run policy.Dry-run policy.Dry-run policy.getEtag()Optional.com.google.protobuf.ByteStringOptional.getName()Immutable.com.google.protobuf.ByteStringImmutable.getSpec()Basic information about the organization policy.Basic information about the organization policy.Basic information about the organization policy.booleanDeprecated.google.cloud.orgpolicy.v2.Policy.alternate is deprecated.booleanDry-run policy.booleanhasSpec()Basic information about the organization policy.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanDeprecated.mergeDryRunSpec(PolicySpec value) Dry-run policy.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeSpec(PolicySpec value) Basic information about the organization policy.setAlternate(AlternatePolicySpec value) Deprecated.setAlternate(AlternatePolicySpec.Builder builderForValue) Deprecated.setDryRunSpec(PolicySpec value) Dry-run policy.setDryRunSpec(PolicySpec.Builder builderForValue) Dry-run policy.Optional.setEtagBytes(com.google.protobuf.ByteString value) Optional.Immutable.setNameBytes(com.google.protobuf.ByteString value) Immutable.setSpec(PolicySpec value) Basic information about the organization policy.setSpec(PolicySpec.Builder builderForValue) Basic information about the organization 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
-
getName
Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.string name = 1 [(.google.api.field_behavior) = IMMUTABLE];- Specified by:
getNamein interfacePolicyOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.string name = 1 [(.google.api.field_behavior) = IMMUTABLE];- Specified by:
getNameBytesin interfacePolicyOrBuilder- Returns:
- The bytes for name.
-
setName
Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.string name = 1 [(.google.api.field_behavior) = IMMUTABLE];- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.string name = 1 [(.google.api.field_behavior) = IMMUTABLE];- Returns:
- This builder for chaining.
-
setNameBytes
Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.string name = 1 [(.google.api.field_behavior) = IMMUTABLE];- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
hasSpec
public boolean hasSpec()Basic information about the organization policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;- Specified by:
hasSpecin interfacePolicyOrBuilder- Returns:
- Whether the spec field is set.
-
getSpec
Basic information about the organization policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;- Specified by:
getSpecin interfacePolicyOrBuilder- Returns:
- The spec.
-
setSpec
Basic information about the organization policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2; -
setSpec
Basic information about the organization policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2; -
mergeSpec
Basic information about the organization policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2; -
clearSpec
Basic information about the organization policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2; -
getSpecBuilder
Basic information about the organization policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2; -
getSpecOrBuilder
Basic information about the organization policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;- Specified by:
getSpecOrBuilderin interfacePolicyOrBuilder
-
hasAlternate
Deprecated.google.cloud.orgpolicy.v2.Policy.alternate is deprecated. See google/cloud/orgpolicy/v2/orgpolicy.proto;l=271Deprecated.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true];- Specified by:
hasAlternatein interfacePolicyOrBuilder- Returns:
- Whether the alternate field is set.
-
getAlternate
Deprecated.google.cloud.orgpolicy.v2.Policy.alternate is deprecated. See google/cloud/orgpolicy/v2/orgpolicy.proto;l=271Deprecated.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true];- Specified by:
getAlternatein interfacePolicyOrBuilder- Returns:
- The alternate.
-
setAlternate
Deprecated.Deprecated.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true]; -
setAlternate
Deprecated.Deprecated.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true]; -
mergeAlternate
Deprecated.Deprecated.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true]; -
clearAlternate
Deprecated.Deprecated.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true]; -
getAlternateBuilder
Deprecated.Deprecated.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true]; -
getAlternateOrBuilder
Deprecated.Deprecated.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true];- Specified by:
getAlternateOrBuilderin interfacePolicyOrBuilder
-
hasDryRunSpec
public boolean hasDryRunSpec()Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it's enforced.
.google.cloud.orgpolicy.v2.PolicySpec dry_run_spec = 4;- Specified by:
hasDryRunSpecin interfacePolicyOrBuilder- Returns:
- Whether the dryRunSpec field is set.
-
getDryRunSpec
Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it's enforced.
.google.cloud.orgpolicy.v2.PolicySpec dry_run_spec = 4;- Specified by:
getDryRunSpecin interfacePolicyOrBuilder- Returns:
- The dryRunSpec.
-
setDryRunSpec
Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it's enforced.
.google.cloud.orgpolicy.v2.PolicySpec dry_run_spec = 4; -
setDryRunSpec
Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it's enforced.
.google.cloud.orgpolicy.v2.PolicySpec dry_run_spec = 4; -
mergeDryRunSpec
Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it's enforced.
.google.cloud.orgpolicy.v2.PolicySpec dry_run_spec = 4; -
clearDryRunSpec
Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it's enforced.
.google.cloud.orgpolicy.v2.PolicySpec dry_run_spec = 4; -
getDryRunSpecBuilder
Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it's enforced.
.google.cloud.orgpolicy.v2.PolicySpec dry_run_spec = 4; -
getDryRunSpecOrBuilder
Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it's enforced.
.google.cloud.orgpolicy.v2.PolicySpec dry_run_spec = 4;- Specified by:
getDryRunSpecOrBuilderin interfacePolicyOrBuilder
-
getEtag
Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This 'etag' is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
string etag = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getEtagin interfacePolicyOrBuilder- Returns:
- The etag.
-
getEtagBytes
public com.google.protobuf.ByteString getEtagBytes()Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This 'etag' is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
string etag = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getEtagBytesin interfacePolicyOrBuilder- Returns:
- The bytes for etag.
-
setEtag
Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This 'etag' is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
string etag = 5 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The etag to set.- Returns:
- This builder for chaining.
-
clearEtag
Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This 'etag' is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
string etag = 5 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setEtagBytes
Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This 'etag' is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
string etag = 5 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes for etag to set.- Returns:
- This builder for chaining.
-