Class OrgPolicyConstraint.Builder (0.8.0)

public static final class OrgPolicyConstraint.Builder extends GeneratedMessageV3.Builder<OrgPolicyConstraint.Builder> implements OrgPolicyConstraintOrBuilder

Message for Org Policy Canned Constraint.

Protobuf type google.cloud.securityposture.v1.OrgPolicyConstraint

Static Methods

getDescriptor()

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

Methods

addAllPolicyRules(Iterable<? extends PolicyRule> values)

public OrgPolicyConstraint.Builder addAllPolicyRules(Iterable<? extends PolicyRule> values)

Required. Org PolicySpec rules.

repeated .google.cloud.securityposture.v1.PolicyRule policy_rules = 2 [(.google.api.field_behavior) = REQUIRED];

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

addPolicyRules(PolicyRule value)

public OrgPolicyConstraint.Builder addPolicyRules(PolicyRule value)

Required. Org PolicySpec rules.

repeated .google.cloud.securityposture.v1.PolicyRule policy_rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value PolicyRule
Returns
Type Description
OrgPolicyConstraint.Builder

addPolicyRules(PolicyRule.Builder builderForValue)

public OrgPolicyConstraint.Builder addPolicyRules(PolicyRule.Builder builderForValue)

Required. Org PolicySpec rules.

repeated .google.cloud.securityposture.v1.PolicyRule policy_rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue PolicyRule.Builder
Returns
Type Description
OrgPolicyConstraint.Builder

addPolicyRules(int index, PolicyRule value)

public OrgPolicyConstraint.Builder addPolicyRules(int index, PolicyRule value)

Required. Org PolicySpec rules.

repeated .google.cloud.securityposture.v1.PolicyRule policy_rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
value PolicyRule
Returns
Type Description
OrgPolicyConstraint.Builder

addPolicyRules(int index, PolicyRule.Builder builderForValue)

public OrgPolicyConstraint.Builder addPolicyRules(int index, PolicyRule.Builder builderForValue)

Required. Org PolicySpec rules.

repeated .google.cloud.securityposture.v1.PolicyRule policy_rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
builderForValue PolicyRule.Builder
Returns
Type Description
OrgPolicyConstraint.Builder

addPolicyRulesBuilder()

public PolicyRule.Builder addPolicyRulesBuilder()

Required. Org PolicySpec rules.

repeated .google.cloud.securityposture.v1.PolicyRule policy_rules = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
PolicyRule.Builder

addPolicyRulesBuilder(int index)

public PolicyRule.Builder addPolicyRulesBuilder(int index)

Required. Org PolicySpec rules.

repeated .google.cloud.securityposture.v1.PolicyRule policy_rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
PolicyRule.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public OrgPolicyConstraint.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
OrgPolicyConstraint.Builder
Overrides

build()

public OrgPolicyConstraint build()
Returns
Type Description
OrgPolicyConstraint

buildPartial()

public OrgPolicyConstraint buildPartial()
Returns
Type Description
OrgPolicyConstraint

clear()

public OrgPolicyConstraint.Builder clear()
Returns
Type Description
OrgPolicyConstraint.Builder
Overrides

clearCannedConstraintId()

public OrgPolicyConstraint.Builder clearCannedConstraintId()

Required. Org Policy Canned Constraint id.

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

Returns
Type Description
OrgPolicyConstraint.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public OrgPolicyConstraint.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
OrgPolicyConstraint.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPolicyRules()

public OrgPolicyConstraint.Builder clearPolicyRules()

Required. Org PolicySpec rules.

repeated .google.cloud.securityposture.v1.PolicyRule policy_rules = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
OrgPolicyConstraint.Builder

clone()

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

getCannedConstraintId()

public String getCannedConstraintId()

Required. Org Policy Canned Constraint id.

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

Returns
Type Description
String

The cannedConstraintId.

getCannedConstraintIdBytes()

public ByteString getCannedConstraintIdBytes()

Required. Org Policy Canned Constraint id.

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

Returns
Type Description
ByteString

The bytes for cannedConstraintId.

getDefaultInstanceForType()

public OrgPolicyConstraint getDefaultInstanceForType()
Returns
Type Description
OrgPolicyConstraint

getDescriptorForType()

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

getPolicyRules(int index)

public PolicyRule getPolicyRules(int index)

Required. Org PolicySpec rules.

repeated .google.cloud.securityposture.v1.PolicyRule policy_rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
PolicyRule

getPolicyRulesBuilder(int index)

public PolicyRule.Builder getPolicyRulesBuilder(int index)

Required. Org PolicySpec rules.

repeated .google.cloud.securityposture.v1.PolicyRule policy_rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
PolicyRule.Builder

getPolicyRulesBuilderList()

public List<PolicyRule.Builder> getPolicyRulesBuilderList()

Required. Org PolicySpec rules.

repeated .google.cloud.securityposture.v1.PolicyRule policy_rules = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Builder>

getPolicyRulesCount()

public int getPolicyRulesCount()

Required. Org PolicySpec rules.

repeated .google.cloud.securityposture.v1.PolicyRule policy_rules = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

getPolicyRulesList()

public List<PolicyRule> getPolicyRulesList()

Required. Org PolicySpec rules.

repeated .google.cloud.securityposture.v1.PolicyRule policy_rules = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<PolicyRule>

getPolicyRulesOrBuilder(int index)

public PolicyRuleOrBuilder getPolicyRulesOrBuilder(int index)

Required. Org PolicySpec rules.

repeated .google.cloud.securityposture.v1.PolicyRule policy_rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
PolicyRuleOrBuilder

getPolicyRulesOrBuilderList()

public List<? extends PolicyRuleOrBuilder> getPolicyRulesOrBuilderList()

Required. Org PolicySpec rules.

repeated .google.cloud.securityposture.v1.PolicyRule policy_rules = 2 [(.google.api.field_behavior) = REQUIRED];

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

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(OrgPolicyConstraint other)

public OrgPolicyConstraint.Builder mergeFrom(OrgPolicyConstraint other)
Parameter
Name Description
other OrgPolicyConstraint
Returns
Type Description
OrgPolicyConstraint.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public OrgPolicyConstraint.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OrgPolicyConstraint.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removePolicyRules(int index)

public OrgPolicyConstraint.Builder removePolicyRules(int index)

Required. Org PolicySpec rules.

repeated .google.cloud.securityposture.v1.PolicyRule policy_rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
OrgPolicyConstraint.Builder

setCannedConstraintId(String value)

public OrgPolicyConstraint.Builder setCannedConstraintId(String value)

Required. Org Policy Canned Constraint id.

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

Parameter
Name Description
value String

The cannedConstraintId to set.

Returns
Type Description
OrgPolicyConstraint.Builder

This builder for chaining.

setCannedConstraintIdBytes(ByteString value)

public OrgPolicyConstraint.Builder setCannedConstraintIdBytes(ByteString value)

Required. Org Policy Canned Constraint id.

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

Parameter
Name Description
value ByteString

The bytes for cannedConstraintId to set.

Returns
Type Description
OrgPolicyConstraint.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public OrgPolicyConstraint.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
OrgPolicyConstraint.Builder
Overrides

setPolicyRules(int index, PolicyRule value)

public OrgPolicyConstraint.Builder setPolicyRules(int index, PolicyRule value)

Required. Org PolicySpec rules.

repeated .google.cloud.securityposture.v1.PolicyRule policy_rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
value PolicyRule
Returns
Type Description
OrgPolicyConstraint.Builder

setPolicyRules(int index, PolicyRule.Builder builderForValue)

public OrgPolicyConstraint.Builder setPolicyRules(int index, PolicyRule.Builder builderForValue)

Required. Org PolicySpec rules.

repeated .google.cloud.securityposture.v1.PolicyRule policy_rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
builderForValue PolicyRule.Builder
Returns
Type Description
OrgPolicyConstraint.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public OrgPolicyConstraint.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
OrgPolicyConstraint.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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