public static final class Policy.Builder extends GeneratedMessageV3.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.v2.Policy| Modifier and Type | Method and Description |
|---|---|
Policy.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
Object value) |
Policy |
build() |
Policy |
buildPartial() |
Policy.Builder |
clear() |
Policy.Builder |
clearAlternate()
An alternate policy configuration that will be used instead of the baseline
policy configurations as determined by the launch.
|
Policy.Builder |
clearField(Descriptors.FieldDescriptor field) |
Policy.Builder |
clearName()
Immutable.
|
Policy.Builder |
clearOneof(Descriptors.OneofDescriptor oneof) |
Policy.Builder |
clearSpec()
Basic information about the Organization Policy.
|
Policy.Builder |
clone() |
AlternatePolicySpec |
getAlternate()
An alternate policy configuration that will be used instead of the baseline
policy configurations as determined by the launch.
|
AlternatePolicySpec.Builder |
getAlternateBuilder()
An alternate policy configuration that will be used instead of the baseline
policy configurations as determined by the launch.
|
AlternatePolicySpecOrBuilder |
getAlternateOrBuilder()
An alternate policy configuration that will be used instead of the baseline
policy configurations as determined by the launch.
|
Policy |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType() |
String |
getName()
Immutable.
|
ByteString |
getNameBytes()
Immutable.
|
PolicySpec |
getSpec()
Basic information about the Organization Policy.
|
PolicySpec.Builder |
getSpecBuilder()
Basic information about the Organization Policy.
|
PolicySpecOrBuilder |
getSpecOrBuilder()
Basic information about the Organization Policy.
|
boolean |
hasAlternate()
An alternate policy configuration that will be used instead of the baseline
policy configurations as determined by the launch.
|
boolean |
hasSpec()
Basic information about the Organization Policy.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
Policy.Builder |
mergeAlternate(AlternatePolicySpec value)
An alternate policy configuration that will be used instead of the baseline
policy configurations as determined by the launch.
|
Policy.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
Policy.Builder |
mergeFrom(Message other) |
Policy.Builder |
mergeFrom(Policy other) |
Policy.Builder |
mergeSpec(PolicySpec value)
Basic information about the Organization Policy.
|
Policy.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields) |
Policy.Builder |
setAlternate(AlternatePolicySpec.Builder builderForValue)
An alternate policy configuration that will be used instead of the baseline
policy configurations as determined by the launch.
|
Policy.Builder |
setAlternate(AlternatePolicySpec value)
An alternate policy configuration that will be used instead of the baseline
policy configurations as determined by the launch.
|
Policy.Builder |
setField(Descriptors.FieldDescriptor field,
Object value) |
Policy.Builder |
setName(String value)
Immutable.
|
Policy.Builder |
setNameBytes(ByteString value)
Immutable.
|
Policy.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
Object value) |
Policy.Builder |
setSpec(PolicySpec.Builder builderForValue)
Basic information about the Organization Policy.
|
Policy.Builder |
setSpec(PolicySpec value)
Basic information about the Organization Policy.
|
Policy.Builder |
setUnknownFields(UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofmergeFrompublic static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class GeneratedMessageV3.Builder<Policy.Builder>public Policy.Builder clear()
clear in interface Message.Builderclear in interface MessageLite.Builderclear in class GeneratedMessageV3.Builder<Policy.Builder>public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface Message.BuildergetDescriptorForType in interface MessageOrBuildergetDescriptorForType in class GeneratedMessageV3.Builder<Policy.Builder>public Policy getDefaultInstanceForType()
getDefaultInstanceForType in interface MessageLiteOrBuildergetDefaultInstanceForType in interface MessageOrBuilderpublic Policy build()
build in interface Message.Builderbuild in interface MessageLite.Builderpublic Policy buildPartial()
buildPartial in interface Message.BuilderbuildPartial in interface MessageLite.Builderpublic Policy.Builder clone()
clone in interface Message.Builderclone in interface MessageLite.Builderclone in class GeneratedMessageV3.Builder<Policy.Builder>public Policy.Builder setField(Descriptors.FieldDescriptor field, Object value)
setField in interface Message.BuildersetField in class GeneratedMessageV3.Builder<Policy.Builder>public Policy.Builder clearField(Descriptors.FieldDescriptor field)
clearField in interface Message.BuilderclearField in class GeneratedMessageV3.Builder<Policy.Builder>public Policy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof in interface Message.BuilderclearOneof in class GeneratedMessageV3.Builder<Policy.Builder>public Policy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface Message.BuildersetRepeatedField in class GeneratedMessageV3.Builder<Policy.Builder>public Policy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface Message.BuilderaddRepeatedField in class GeneratedMessageV3.Builder<Policy.Builder>public Policy.Builder mergeFrom(Message other)
mergeFrom in interface Message.BuildermergeFrom in class AbstractMessage.Builder<Policy.Builder>public Policy.Builder mergeFrom(Policy other)
public final boolean isInitialized()
isInitialized in interface MessageLiteOrBuilderisInitialized in class GeneratedMessageV3.Builder<Policy.Builder>public Policy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface Message.BuildermergeFrom in interface MessageLite.BuildermergeFrom in class AbstractMessage.Builder<Policy.Builder>IOExceptionpublic String 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];getName in interface PolicyOrBuilderpublic 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];getNameBytes in interface PolicyOrBuilderpublic Policy.Builder setName(String value)
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];value - The name to set.public Policy.Builder 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];public Policy.Builder setNameBytes(ByteString value)
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];value - The bytes for name to set.public boolean hasSpec()
Basic information about the Organization Policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;hasSpec in interface PolicyOrBuilderpublic PolicySpec getSpec()
Basic information about the Organization Policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;getSpec in interface PolicyOrBuilderpublic Policy.Builder setSpec(PolicySpec value)
Basic information about the Organization Policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;public Policy.Builder setSpec(PolicySpec.Builder builderForValue)
Basic information about the Organization Policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;public Policy.Builder mergeSpec(PolicySpec value)
Basic information about the Organization Policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;public Policy.Builder clearSpec()
Basic information about the Organization Policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;public PolicySpec.Builder getSpecBuilder()
Basic information about the Organization Policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;public PolicySpecOrBuilder getSpecOrBuilder()
Basic information about the Organization Policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;getSpecOrBuilder in interface PolicyOrBuilderpublic boolean hasAlternate()
An alternate policy configuration that will be used instead of the baseline policy configurations as determined by the launch. Currently the only way the launch can trigger the alternate configuration is via dry-run/darklaunch.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3;hasAlternate in interface PolicyOrBuilderpublic AlternatePolicySpec getAlternate()
An alternate policy configuration that will be used instead of the baseline policy configurations as determined by the launch. Currently the only way the launch can trigger the alternate configuration is via dry-run/darklaunch.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3;getAlternate in interface PolicyOrBuilderpublic Policy.Builder setAlternate(AlternatePolicySpec value)
An alternate policy configuration that will be used instead of the baseline policy configurations as determined by the launch. Currently the only way the launch can trigger the alternate configuration is via dry-run/darklaunch.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3;public Policy.Builder setAlternate(AlternatePolicySpec.Builder builderForValue)
An alternate policy configuration that will be used instead of the baseline policy configurations as determined by the launch. Currently the only way the launch can trigger the alternate configuration is via dry-run/darklaunch.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3;public Policy.Builder mergeAlternate(AlternatePolicySpec value)
An alternate policy configuration that will be used instead of the baseline policy configurations as determined by the launch. Currently the only way the launch can trigger the alternate configuration is via dry-run/darklaunch.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3;public Policy.Builder clearAlternate()
An alternate policy configuration that will be used instead of the baseline policy configurations as determined by the launch. Currently the only way the launch can trigger the alternate configuration is via dry-run/darklaunch.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3;public AlternatePolicySpec.Builder getAlternateBuilder()
An alternate policy configuration that will be used instead of the baseline policy configurations as determined by the launch. Currently the only way the launch can trigger the alternate configuration is via dry-run/darklaunch.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3;public AlternatePolicySpecOrBuilder getAlternateOrBuilder()
An alternate policy configuration that will be used instead of the baseline policy configurations as determined by the launch. Currently the only way the launch can trigger the alternate configuration is via dry-run/darklaunch.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3;getAlternateOrBuilder in interface PolicyOrBuilderpublic final Policy.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields in interface Message.BuildersetUnknownFields in class GeneratedMessageV3.Builder<Policy.Builder>public final Policy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields in interface Message.BuildermergeUnknownFields in class GeneratedMessageV3.Builder<Policy.Builder>Copyright © 2021 Google LLC. All rights reserved.