Class Policy.Builder (0.8.0)

public static final class Policy.Builder extends GeneratedMessageV3.Builder<Policy.Builder> implements PolicyOrBuilder

Policy representation.

Protobuf type google.cloud.securityposture.v1.Policy

Implements

PolicyOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllComplianceStandards(Iterable<? extends Policy.ComplianceStandard> values)

public Policy.Builder addAllComplianceStandards(Iterable<? extends Policy.ComplianceStandard> values)

Optional. Contains list of mapping for a Policy to a standard and control.

repeated .google.cloud.securityposture.v1.Policy.ComplianceStandard compliance_standards = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.securityposture.v1.Policy.ComplianceStandard>
Returns
Type Description
Policy.Builder

addComplianceStandards(Policy.ComplianceStandard value)

public Policy.Builder addComplianceStandards(Policy.ComplianceStandard value)

Optional. Contains list of mapping for a Policy to a standard and control.

repeated .google.cloud.securityposture.v1.Policy.ComplianceStandard compliance_standards = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Policy.ComplianceStandard
Returns
Type Description
Policy.Builder

addComplianceStandards(Policy.ComplianceStandard.Builder builderForValue)

public Policy.Builder addComplianceStandards(Policy.ComplianceStandard.Builder builderForValue)

Optional. Contains list of mapping for a Policy to a standard and control.

repeated .google.cloud.securityposture.v1.Policy.ComplianceStandard compliance_standards = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Policy.ComplianceStandard.Builder
Returns
Type Description
Policy.Builder

addComplianceStandards(int index, Policy.ComplianceStandard value)

public Policy.Builder addComplianceStandards(int index, Policy.ComplianceStandard value)

Optional. Contains list of mapping for a Policy to a standard and control.

repeated .google.cloud.securityposture.v1.Policy.ComplianceStandard compliance_standards = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value Policy.ComplianceStandard
Returns
Type Description
Policy.Builder

addComplianceStandards(int index, Policy.ComplianceStandard.Builder builderForValue)

public Policy.Builder addComplianceStandards(int index, Policy.ComplianceStandard.Builder builderForValue)

Optional. Contains list of mapping for a Policy to a standard and control.

repeated .google.cloud.securityposture.v1.Policy.ComplianceStandard compliance_standards = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue Policy.ComplianceStandard.Builder
Returns
Type Description
Policy.Builder

addComplianceStandardsBuilder()

public Policy.ComplianceStandard.Builder addComplianceStandardsBuilder()

Optional. Contains list of mapping for a Policy to a standard and control.

repeated .google.cloud.securityposture.v1.Policy.ComplianceStandard compliance_standards = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Policy.ComplianceStandard.Builder

addComplianceStandardsBuilder(int index)

public Policy.ComplianceStandard.Builder addComplianceStandardsBuilder(int index)

Optional. Contains list of mapping for a Policy to a standard and control.

repeated .google.cloud.securityposture.v1.Policy.ComplianceStandard compliance_standards = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Policy.ComplianceStandard.Builder

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
Overrides

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
Overrides

clearComplianceStandards()

public Policy.Builder clearComplianceStandards()

Optional. Contains list of mapping for a Policy to a standard and control.

repeated .google.cloud.securityposture.v1.Policy.ComplianceStandard compliance_standards = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Policy.Builder

clearConstraint()

public Policy.Builder clearConstraint()

Required. Constraint details.

.google.cloud.securityposture.v1.Constraint constraint = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Policy.Builder

clearDescription()

public Policy.Builder clearDescription()

Optional. Description of the Policy.

string description = 4 [(.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
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Policy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Policy.Builder
Overrides

clearPolicyId()

public Policy.Builder clearPolicyId()

Required. ID of the Policy that is user generated, immutable and unique within the scope of a policy set.

string policy_id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Policy.Builder

This builder for chaining.

clone()

public Policy.Builder clone()
Returns
Type Description
Policy.Builder
Overrides

getComplianceStandards(int index)

public Policy.ComplianceStandard getComplianceStandards(int index)

Optional. Contains list of mapping for a Policy to a standard and control.

repeated .google.cloud.securityposture.v1.Policy.ComplianceStandard compliance_standards = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Policy.ComplianceStandard

getComplianceStandardsBuilder(int index)

public Policy.ComplianceStandard.Builder getComplianceStandardsBuilder(int index)

Optional. Contains list of mapping for a Policy to a standard and control.

repeated .google.cloud.securityposture.v1.Policy.ComplianceStandard compliance_standards = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Policy.ComplianceStandard.Builder

getComplianceStandardsBuilderList()

public List<Policy.ComplianceStandard.Builder> getComplianceStandardsBuilderList()

Optional. Contains list of mapping for a Policy to a standard and control.

repeated .google.cloud.securityposture.v1.Policy.ComplianceStandard compliance_standards = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getComplianceStandardsCount()

public int getComplianceStandardsCount()

Optional. Contains list of mapping for a Policy to a standard and control.

repeated .google.cloud.securityposture.v1.Policy.ComplianceStandard compliance_standards = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getComplianceStandardsList()

public List<Policy.ComplianceStandard> getComplianceStandardsList()

Optional. Contains list of mapping for a Policy to a standard and control.

repeated .google.cloud.securityposture.v1.Policy.ComplianceStandard compliance_standards = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<ComplianceStandard>

getComplianceStandardsOrBuilder(int index)

public Policy.ComplianceStandardOrBuilder getComplianceStandardsOrBuilder(int index)

Optional. Contains list of mapping for a Policy to a standard and control.

repeated .google.cloud.securityposture.v1.Policy.ComplianceStandard compliance_standards = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Policy.ComplianceStandardOrBuilder

getComplianceStandardsOrBuilderList()

public List<? extends Policy.ComplianceStandardOrBuilder> getComplianceStandardsOrBuilderList()

Optional. Contains list of mapping for a Policy to a standard and control.

repeated .google.cloud.securityposture.v1.Policy.ComplianceStandard compliance_standards = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.securityposture.v1.Policy.ComplianceStandardOrBuilder>

getConstraint()

public Constraint getConstraint()

Required. Constraint details.

.google.cloud.securityposture.v1.Constraint constraint = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Constraint

The constraint.

getConstraintBuilder()

public Constraint.Builder getConstraintBuilder()

Required. Constraint details.

.google.cloud.securityposture.v1.Constraint constraint = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Constraint.Builder

getConstraintOrBuilder()

public ConstraintOrBuilder getConstraintOrBuilder()

Required. Constraint details.

.google.cloud.securityposture.v1.Constraint constraint = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ConstraintOrBuilder

getDefaultInstanceForType()

public Policy getDefaultInstanceForType()
Returns
Type Description
Policy

getDescription()

public String getDescription()

Optional. Description of the Policy.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. Description of the Policy.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getPolicyId()

public String getPolicyId()

Required. ID of the Policy that is user generated, immutable and unique within the scope of a policy set.

string policy_id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The policyId.

getPolicyIdBytes()

public ByteString getPolicyIdBytes()

Required. ID of the Policy that is user generated, immutable and unique within the scope of a policy set.

string policy_id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for policyId.

hasConstraint()

public boolean hasConstraint()

Required. Constraint details.

.google.cloud.securityposture.v1.Constraint constraint = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the constraint field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeConstraint(Constraint value)

public Policy.Builder mergeConstraint(Constraint value)

Required. Constraint details.

.google.cloud.securityposture.v1.Constraint constraint = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Constraint
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
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Policy.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Policy.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Policy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Policy.Builder
Overrides

removeComplianceStandards(int index)

public Policy.Builder removeComplianceStandards(int index)

Optional. Contains list of mapping for a Policy to a standard and control.

repeated .google.cloud.securityposture.v1.Policy.ComplianceStandard compliance_standards = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Policy.Builder

setComplianceStandards(int index, Policy.ComplianceStandard value)

public Policy.Builder setComplianceStandards(int index, Policy.ComplianceStandard value)

Optional. Contains list of mapping for a Policy to a standard and control.

repeated .google.cloud.securityposture.v1.Policy.ComplianceStandard compliance_standards = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value Policy.ComplianceStandard
Returns
Type Description
Policy.Builder

setComplianceStandards(int index, Policy.ComplianceStandard.Builder builderForValue)

public Policy.Builder setComplianceStandards(int index, Policy.ComplianceStandard.Builder builderForValue)

Optional. Contains list of mapping for a Policy to a standard and control.

repeated .google.cloud.securityposture.v1.Policy.ComplianceStandard compliance_standards = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue Policy.ComplianceStandard.Builder
Returns
Type Description
Policy.Builder

setConstraint(Constraint value)

public Policy.Builder setConstraint(Constraint value)

Required. Constraint details.

.google.cloud.securityposture.v1.Constraint constraint = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Constraint
Returns
Type Description
Policy.Builder

setConstraint(Constraint.Builder builderForValue)

public Policy.Builder setConstraint(Constraint.Builder builderForValue)

Required. Constraint details.

.google.cloud.securityposture.v1.Constraint constraint = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Constraint.Builder
Returns
Type Description
Policy.Builder

setDescription(String value)

public Policy.Builder setDescription(String value)

Optional. Description of the Policy.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Policy.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Policy.Builder setDescriptionBytes(ByteString value)

Optional. Description of the Policy.

string description = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for description 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
Overrides

setPolicyId(String value)

public Policy.Builder setPolicyId(String value)

Required. ID of the Policy that is user generated, immutable and unique within the scope of a policy set.

string policy_id = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The policyId to set.

Returns
Type Description
Policy.Builder

This builder for chaining.

setPolicyIdBytes(ByteString value)

public Policy.Builder setPolicyIdBytes(ByteString value)

Required. ID of the Policy that is user generated, immutable and unique within the scope of a policy set.

string policy_id = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for policyId 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
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Policy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Policy.Builder
Overrides