Class Policy.Builder (0.6.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.securityposture.v1.Policy.ComplianceStandard>
Returns
TypeDescription
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
NameDescription
valuePolicy.ComplianceStandard
Returns
TypeDescription
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
NameDescription
builderForValuePolicy.ComplianceStandard.Builder
Returns
TypeDescription
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
NameDescription
indexint
valuePolicy.ComplianceStandard
Returns
TypeDescription
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
NameDescription
indexint
builderForValuePolicy.ComplianceStandard.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
Policy.ComplianceStandard.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Policy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Policy.Builder
Overrides

build()

public Policy build()
Returns
TypeDescription
Policy

buildPartial()

public Policy buildPartial()
Returns
TypeDescription
Policy

clear()

public Policy.Builder clear()
Returns
TypeDescription
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
TypeDescription
Policy.Builder

clearConstraint()

public Policy.Builder clearConstraint()

Required. Constraint details.

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

Returns
TypeDescription
Policy.Builder

clearDescription()

public Policy.Builder clearDescription()

Optional. Description of the Policy.

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

Returns
TypeDescription
Policy.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Policy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Policy.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Policy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
Policy.Builder

This builder for chaining.

clone()

public Policy.Builder clone()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Constraint

The constraint.

getConstraintBuilder()

public Constraint.Builder getConstraintBuilder()

Required. Constraint details.

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

Returns
TypeDescription
Constraint.Builder

getConstraintOrBuilder()

public ConstraintOrBuilder getConstraintOrBuilder()

Required. Constraint details.

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

Returns
TypeDescription
ConstraintOrBuilder

getDefaultInstanceForType()

public Policy getDefaultInstanceForType()
Returns
TypeDescription
Policy

getDescription()

public String getDescription()

Optional. Description of the Policy.

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

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. Description of the Policy.

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

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the constraint field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueConstraint
Returns
TypeDescription
Policy.Builder

mergeFrom(Policy other)

public Policy.Builder mergeFrom(Policy other)
Parameter
NameDescription
otherPolicy
Returns
TypeDescription
Policy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Policy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Policy.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Policy.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Policy.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Policy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
valuePolicy.ComplianceStandard
Returns
TypeDescription
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
NameDescription
indexint
builderForValuePolicy.ComplianceStandard.Builder
Returns
TypeDescription
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
NameDescription
valueConstraint
Returns
TypeDescription
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
NameDescription
builderForValueConstraint.Builder
Returns
TypeDescription
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
NameDescription
valueString

The description to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
Policy.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Policy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The policyId to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for policyId to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Policy.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Policy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Policy.Builder
Overrides