- 2.53.0 (latest)
- 2.52.0
- 2.51.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.7-SNAPSHOT
- 2.2.1
- 2.1.2
- 2.0.10
public static final class Policy.Builder extends GeneratedMessageV3.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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Policy.BuilderImplements
PolicyOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Policy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
Policy.Builder |
build()
public Policy build()
Returns | |
---|---|
Type | Description |
Policy |
buildPartial()
public Policy buildPartial()
Returns | |
---|---|
Type | Description |
Policy |
clear()
public Policy.Builder clear()
Returns | |
---|---|
Type | Description |
Policy.Builder |
clearAlternate() (deprecated)
public Policy.Builder clearAlternate()
Deprecated.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true];
Returns | |
---|---|
Type | Description |
Policy.Builder |
clearDryRunSpec()
public Policy.Builder 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;
Returns | |
---|---|
Type | Description |
Policy.Builder |
clearEtag()
public Policy.Builder 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 | |
---|---|
Type | Description |
Policy.Builder |
This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public Policy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field |
FieldDescriptor |
Returns | |
---|---|
Type | Description |
Policy.Builder |
clearName()
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];
Returns | |
---|---|
Type | Description |
Policy.Builder |
This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public Policy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof |
OneofDescriptor |
Returns | |
---|---|
Type | Description |
Policy.Builder |
clearSpec()
public Policy.Builder clearSpec()
Basic information about the Organization Policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;
Returns | |
---|---|
Type | Description |
Policy.Builder |
clone()
public Policy.Builder clone()
Returns | |
---|---|
Type | Description |
Policy.Builder |
getAlternate() (deprecated)
public AlternatePolicySpec getAlternate()
Deprecated. google.cloud.orgpolicy.v2.Policy.alternate is deprecated. See google/cloud/orgpolicy/v2/orgpolicy.proto;l=270
Deprecated.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true];
Returns | |
---|---|
Type | Description |
AlternatePolicySpec |
The alternate. |
getAlternateBuilder() (deprecated)
public AlternatePolicySpec.Builder getAlternateBuilder()
Deprecated.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true];
Returns | |
---|---|
Type | Description |
AlternatePolicySpec.Builder |
getAlternateOrBuilder() (deprecated)
public AlternatePolicySpecOrBuilder getAlternateOrBuilder()
Deprecated.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true];
Returns | |
---|---|
Type | Description |
AlternatePolicySpecOrBuilder |
getDefaultInstanceForType()
public Policy getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
Policy |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getDryRunSpec()
public PolicySpec 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;
Returns | |
---|---|
Type | Description |
PolicySpec |
The dryRunSpec. |
getDryRunSpecBuilder()
public PolicySpec.Builder 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;
Returns | |
---|---|
Type | Description |
PolicySpec.Builder |
getDryRunSpecOrBuilder()
public PolicySpecOrBuilder 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;
Returns | |
---|---|
Type | Description |
PolicySpecOrBuilder |
getEtag()
public String 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];
Returns | |
---|---|
Type | Description |
String |
The etag. |
getEtagBytes()
public 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];
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for etag. |
getName()
public 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];
Returns | |
---|---|
Type | Description |
String |
The name. |
getNameBytes()
public 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];
Returns | |
---|---|
Type | Description |
ByteString |
The bytes for name. |
getSpec()
public PolicySpec getSpec()
Basic information about the Organization Policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;
Returns | |
---|---|
Type | Description |
PolicySpec |
The spec. |
getSpecBuilder()
public PolicySpec.Builder getSpecBuilder()
Basic information about the Organization Policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;
Returns | |
---|---|
Type | Description |
PolicySpec.Builder |
getSpecOrBuilder()
public PolicySpecOrBuilder getSpecOrBuilder()
Basic information about the Organization Policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;
Returns | |
---|---|
Type | Description |
PolicySpecOrBuilder |
hasAlternate() (deprecated)
public boolean hasAlternate()
Deprecated. google.cloud.orgpolicy.v2.Policy.alternate is deprecated. See google/cloud/orgpolicy/v2/orgpolicy.proto;l=270
Deprecated.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true];
Returns | |
---|---|
Type | Description |
boolean |
Whether the alternate field is set. |
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;
Returns | |
---|---|
Type | Description |
boolean |
Whether the dryRunSpec field is set. |
hasSpec()
public boolean hasSpec()
Basic information about the Organization Policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;
Returns | |
---|---|
Type | Description |
boolean |
Whether the spec field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeAlternate(AlternatePolicySpec value) (deprecated)
public Policy.Builder mergeAlternate(AlternatePolicySpec value)
Deprecated.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true];
Parameter | |
---|---|
Name | Description |
value |
AlternatePolicySpec |
Returns | |
---|---|
Type | Description |
Policy.Builder |
mergeDryRunSpec(PolicySpec value)
public Policy.Builder mergeDryRunSpec(PolicySpec value)
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;
Parameter | |
---|---|
Name | Description |
value |
PolicySpec |
Returns | |
---|---|
Type | Description |
Policy.Builder |
mergeFrom(Policy other)
public Policy.Builder mergeFrom(Policy other)
Parameter | |
---|---|
Name | Description |
other |
Policy |
Returns | |
---|---|
Type | Description |
Policy.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Policy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Policy.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public Policy.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other |
Message |
Returns | |
---|---|
Type | Description |
Policy.Builder |
mergeSpec(PolicySpec value)
public Policy.Builder mergeSpec(PolicySpec value)
Basic information about the Organization Policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;
Parameter | |
---|---|
Name | Description |
value |
PolicySpec |
Returns | |
---|---|
Type | Description |
Policy.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Policy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
Policy.Builder |
setAlternate(AlternatePolicySpec value) (deprecated)
public Policy.Builder setAlternate(AlternatePolicySpec value)
Deprecated.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true];
Parameter | |
---|---|
Name | Description |
value |
AlternatePolicySpec |
Returns | |
---|---|
Type | Description |
Policy.Builder |
setAlternate(AlternatePolicySpec.Builder builderForValue) (deprecated)
public Policy.Builder setAlternate(AlternatePolicySpec.Builder builderForValue)
Deprecated.
.google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true];
Parameter | |
---|---|
Name | Description |
builderForValue |
AlternatePolicySpec.Builder |
Returns | |
---|---|
Type | Description |
Policy.Builder |
setDryRunSpec(PolicySpec value)
public Policy.Builder setDryRunSpec(PolicySpec value)
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;
Parameter | |
---|---|
Name | Description |
value |
PolicySpec |
Returns | |
---|---|
Type | Description |
Policy.Builder |
setDryRunSpec(PolicySpec.Builder builderForValue)
public Policy.Builder setDryRunSpec(PolicySpec.Builder builderForValue)
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;
Parameter | |
---|---|
Name | Description |
builderForValue |
PolicySpec.Builder |
Returns | |
---|---|
Type | Description |
Policy.Builder |
setEtag(String value)
public Policy.Builder setEtag(String value)
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];
Parameter | |
---|---|
Name | Description |
value |
String The etag to set. |
Returns | |
---|---|
Type | Description |
Policy.Builder |
This builder for chaining. |
setEtagBytes(ByteString value)
public Policy.Builder setEtagBytes(ByteString value)
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];
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for etag to set. |
Returns | |
---|---|
Type | Description |
Policy.Builder |
This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public Policy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
value |
Object |
Returns | |
---|---|
Type | Description |
Policy.Builder |
setName(String value)
public 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];
Parameter | |
---|---|
Name | Description |
value |
String The name to set. |
Returns | |
---|---|
Type | Description |
Policy.Builder |
This builder for chaining. |
setNameBytes(ByteString value)
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];
Parameter | |
---|---|
Name | Description |
value |
ByteString The bytes for name to set. |
Returns | |
---|---|
Type | Description |
Policy.Builder |
This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Policy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
Returns | |
---|---|
Type | Description |
Policy.Builder |
setSpec(PolicySpec value)
public Policy.Builder setSpec(PolicySpec value)
Basic information about the Organization Policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;
Parameter | |
---|---|
Name | Description |
value |
PolicySpec |
Returns | |
---|---|
Type | Description |
Policy.Builder |
setSpec(PolicySpec.Builder builderForValue)
public Policy.Builder setSpec(PolicySpec.Builder builderForValue)
Basic information about the Organization Policy.
.google.cloud.orgpolicy.v2.PolicySpec spec = 2;
Parameter | |
---|---|
Name | Description |
builderForValue |
PolicySpec.Builder |
Returns | |
---|---|
Type | Description |
Policy.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final Policy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields |
UnknownFieldSet |
Returns | |
---|---|
Type | Description |
Policy.Builder |