- 2.55.0 (latest)
- 2.54.0
- 2.53.0
- 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 a Cloud Organization Policy
which is used to specify Constraints
for configurations of Cloud Platform 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 |
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=204
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 |
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=204
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 |
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 |