- 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 a Cloud Organization Policy
which is used to specify Constraints
for configurations of Cloud Platform resources.
Protobuf type google.cloud.orgpolicy.v1.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 |
clearBooleanPolicy()
public Policy.Builder clearBooleanPolicy()
For boolean Constraints
, whether to enforce the Constraint
or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6;
Returns | |
---|---|
Type | Description |
Policy.Builder |
clearConstraint()
public Policy.Builder clearConstraint()
The name of the Constraint
the Policy
is configuring, for example,
constraints/serviceuser.services
.
Immutable after creation.
string constraint = 2;
Returns | |
---|---|
Type | Description |
Policy.Builder | This builder for chaining. |
clearEtag()
public Policy.Builder 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 | |
---|---|
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 |
clearListPolicy()
public Policy.Builder clearListPolicy()
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;
Returns | |
---|---|
Type | Description |
Policy.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public Policy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof | OneofDescriptor |
Returns | |
---|---|
Type | Description |
Policy.Builder |
clearPolicyType()
public Policy.Builder clearPolicyType()
Returns | |
---|---|
Type | Description |
Policy.Builder |
clearRestoreDefault()
public Policy.Builder clearRestoreDefault()
Restores the default behavior of the constraint; independent of
Constraint
type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7;
Returns | |
---|---|
Type | Description |
Policy.Builder |
clearUpdateTime()
public Policy.Builder 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;
Returns | |
---|---|
Type | Description |
Policy.Builder |
clearVersion()
public Policy.Builder clearVersion()
Version of the Policy
. Default version is 0;
int32 version = 1;
Returns | |
---|---|
Type | Description |
Policy.Builder | This builder for chaining. |
clone()
public Policy.Builder clone()
Returns | |
---|---|
Type | Description |
Policy.Builder |
getBooleanPolicy()
public Policy.BooleanPolicy getBooleanPolicy()
For boolean Constraints
, whether to enforce the Constraint
or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6;
Returns | |
---|---|
Type | Description |
Policy.BooleanPolicy | The booleanPolicy. |
getBooleanPolicyBuilder()
public Policy.BooleanPolicy.Builder getBooleanPolicyBuilder()
For boolean Constraints
, whether to enforce the Constraint
or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6;
Returns | |
---|---|
Type | Description |
Policy.BooleanPolicy.Builder |
getBooleanPolicyOrBuilder()
public Policy.BooleanPolicyOrBuilder getBooleanPolicyOrBuilder()
For boolean Constraints
, whether to enforce the Constraint
or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6;
Returns | |
---|---|
Type | Description |
Policy.BooleanPolicyOrBuilder |
getConstraint()
public String getConstraint()
The name of the Constraint
the Policy
is configuring, for example,
constraints/serviceuser.services
.
Immutable after creation.
string constraint = 2;
Returns | |
---|---|
Type | Description |
String | The constraint. |
getConstraintBytes()
public ByteString getConstraintBytes()
The name of the Constraint
the Policy
is configuring, for example,
constraints/serviceuser.services
.
Immutable after creation.
string constraint = 2;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for constraint. |
getDefaultInstanceForType()
public Policy getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
Policy |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getEtag()
public 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;
Returns | |
---|---|
Type | Description |
ByteString | The etag. |
getListPolicy()
public Policy.ListPolicy getListPolicy()
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;
Returns | |
---|---|
Type | Description |
Policy.ListPolicy | The listPolicy. |
getListPolicyBuilder()
public Policy.ListPolicy.Builder getListPolicyBuilder()
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;
Returns | |
---|---|
Type | Description |
Policy.ListPolicy.Builder |
getListPolicyOrBuilder()
public Policy.ListPolicyOrBuilder getListPolicyOrBuilder()
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;
Returns | |
---|---|
Type | Description |
Policy.ListPolicyOrBuilder |
getPolicyTypeCase()
public Policy.PolicyTypeCase getPolicyTypeCase()
Returns | |
---|---|
Type | Description |
Policy.PolicyTypeCase |
getRestoreDefault()
public Policy.RestoreDefault getRestoreDefault()
Restores the default behavior of the constraint; independent of
Constraint
type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7;
Returns | |
---|---|
Type | Description |
Policy.RestoreDefault | The restoreDefault. |
getRestoreDefaultBuilder()
public Policy.RestoreDefault.Builder getRestoreDefaultBuilder()
Restores the default behavior of the constraint; independent of
Constraint
type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7;
Returns | |
---|---|
Type | Description |
Policy.RestoreDefault.Builder |
getRestoreDefaultOrBuilder()
public Policy.RestoreDefaultOrBuilder getRestoreDefaultOrBuilder()
Restores the default behavior of the constraint; independent of
Constraint
type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7;
Returns | |
---|---|
Type | Description |
Policy.RestoreDefaultOrBuilder |
getUpdateTime()
public 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;
Returns | |
---|---|
Type | Description |
Timestamp | The updateTime. |
getUpdateTimeBuilder()
public 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;
Returns | |
---|---|
Type | Description |
Builder |
getUpdateTimeOrBuilder()
public 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;
Returns | |
---|---|
Type | Description |
TimestampOrBuilder |
getVersion()
public int getVersion()
Version of the Policy
. Default version is 0;
int32 version = 1;
Returns | |
---|---|
Type | Description |
int | The version. |
hasBooleanPolicy()
public boolean hasBooleanPolicy()
For boolean Constraints
, whether to enforce the Constraint
or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6;
Returns | |
---|---|
Type | Description |
boolean | Whether the booleanPolicy field is set. |
hasListPolicy()
public boolean hasListPolicy()
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;
Returns | |
---|---|
Type | Description |
boolean | Whether the listPolicy field is set. |
hasRestoreDefault()
public boolean hasRestoreDefault()
Restores the default behavior of the constraint; independent of
Constraint
type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7;
Returns | |
---|---|
Type | Description |
boolean | Whether the restoreDefault field is set. |
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;
Returns | |
---|---|
Type | Description |
boolean | Whether the updateTime field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeBooleanPolicy(Policy.BooleanPolicy value)
public Policy.Builder mergeBooleanPolicy(Policy.BooleanPolicy value)
For boolean Constraints
, whether to enforce the Constraint
or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6;
Parameter | |
---|---|
Name | Description |
value | Policy.BooleanPolicy |
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 |
mergeListPolicy(Policy.ListPolicy value)
public Policy.Builder mergeListPolicy(Policy.ListPolicy value)
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;
Parameter | |
---|---|
Name | Description |
value | Policy.ListPolicy |
Returns | |
---|---|
Type | Description |
Policy.Builder |
mergeRestoreDefault(Policy.RestoreDefault value)
public Policy.Builder mergeRestoreDefault(Policy.RestoreDefault value)
Restores the default behavior of the constraint; independent of
Constraint
type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7;
Parameter | |
---|---|
Name | Description |
value | Policy.RestoreDefault |
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 |
mergeUpdateTime(Timestamp value)
public Policy.Builder mergeUpdateTime(Timestamp value)
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;
Parameter | |
---|---|
Name | Description |
value | Timestamp |
Returns | |
---|---|
Type | Description |
Policy.Builder |
setBooleanPolicy(Policy.BooleanPolicy value)
public Policy.Builder setBooleanPolicy(Policy.BooleanPolicy value)
For boolean Constraints
, whether to enforce the Constraint
or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6;
Parameter | |
---|---|
Name | Description |
value | Policy.BooleanPolicy |
Returns | |
---|---|
Type | Description |
Policy.Builder |
setBooleanPolicy(Policy.BooleanPolicy.Builder builderForValue)
public Policy.Builder setBooleanPolicy(Policy.BooleanPolicy.Builder builderForValue)
For boolean Constraints
, whether to enforce the Constraint
or not.
.google.cloud.orgpolicy.v1.Policy.BooleanPolicy boolean_policy = 6;
Parameter | |
---|---|
Name | Description |
builderForValue | Policy.BooleanPolicy.Builder |
Returns | |
---|---|
Type | Description |
Policy.Builder |
setConstraint(String value)
public Policy.Builder setConstraint(String value)
The name of the Constraint
the Policy
is configuring, for example,
constraints/serviceuser.services
.
Immutable after creation.
string constraint = 2;
Parameter | |
---|---|
Name | Description |
value | String The constraint to set. |
Returns | |
---|---|
Type | Description |
Policy.Builder | This builder for chaining. |
setConstraintBytes(ByteString value)
public Policy.Builder setConstraintBytes(ByteString value)
The name of the Constraint
the Policy
is configuring, for example,
constraints/serviceuser.services
.
Immutable after creation.
string constraint = 2;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for constraint to set. |
Returns | |
---|---|
Type | Description |
Policy.Builder | This builder for chaining. |
setEtag(ByteString value)
public Policy.Builder setEtag(ByteString value)
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;
Parameter | |
---|---|
Name | Description |
value | ByteString The 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 |
setListPolicy(Policy.ListPolicy value)
public Policy.Builder setListPolicy(Policy.ListPolicy value)
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;
Parameter | |
---|---|
Name | Description |
value | Policy.ListPolicy |
Returns | |
---|---|
Type | Description |
Policy.Builder |
setListPolicy(Policy.ListPolicy.Builder builderForValue)
public Policy.Builder setListPolicy(Policy.ListPolicy.Builder builderForValue)
List of values either allowed or disallowed.
.google.cloud.orgpolicy.v1.Policy.ListPolicy list_policy = 5;
Parameter | |
---|---|
Name | Description |
builderForValue | Policy.ListPolicy.Builder |
Returns | |
---|---|
Type | Description |
Policy.Builder |
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 |
setRestoreDefault(Policy.RestoreDefault value)
public Policy.Builder setRestoreDefault(Policy.RestoreDefault value)
Restores the default behavior of the constraint; independent of
Constraint
type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7;
Parameter | |
---|---|
Name | Description |
value | Policy.RestoreDefault |
Returns | |
---|---|
Type | Description |
Policy.Builder |
setRestoreDefault(Policy.RestoreDefault.Builder builderForValue)
public Policy.Builder setRestoreDefault(Policy.RestoreDefault.Builder builderForValue)
Restores the default behavior of the constraint; independent of
Constraint
type.
.google.cloud.orgpolicy.v1.Policy.RestoreDefault restore_default = 7;
Parameter | |
---|---|
Name | Description |
builderForValue | Policy.RestoreDefault.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 |
setUpdateTime(Timestamp value)
public Policy.Builder setUpdateTime(Timestamp value)
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;
Parameter | |
---|---|
Name | Description |
value | Timestamp |
Returns | |
---|---|
Type | Description |
Policy.Builder |
setUpdateTime(Timestamp.Builder builderForValue)
public Policy.Builder setUpdateTime(Timestamp.Builder builderForValue)
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;
Parameter | |
---|---|
Name | Description |
builderForValue | Builder |
Returns | |
---|---|
Type | Description |
Policy.Builder |
setVersion(int value)
public Policy.Builder setVersion(int value)
Version of the Policy
. Default version is 0;
int32 version = 1;
Parameter | |
---|---|
Name | Description |
value | int The version to set. |
Returns | |
---|---|
Type | Description |
Policy.Builder | This builder for chaining. |