Class OrgPolicyConstraint.Builder (0.4.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.securityposture.v1.PolicyRule>
Returns
TypeDescription
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
NameDescription
valuePolicyRule
Returns
TypeDescription
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
NameDescription
builderForValuePolicyRule.Builder
Returns
TypeDescription
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
NameDescription
indexint
valuePolicyRule
Returns
TypeDescription
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
NameDescription
indexint
builderForValuePolicyRule.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
PolicyRule.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public OrgPolicyConstraint build()
Returns
TypeDescription
OrgPolicyConstraint

buildPartial()

public OrgPolicyConstraint buildPartial()
Returns
TypeDescription
OrgPolicyConstraint

clear()

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

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public OrgPolicyConstraint.Builder clone()
Returns
TypeDescription
OrgPolicyConstraint.Builder
Overrides

getCannedConstraintId()

public String getCannedConstraintId()

Required. Org Policy Canned Constraint id.

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

Returns
TypeDescription
String

The cannedConstraintId.

getCannedConstraintIdBytes()

public ByteString getCannedConstraintIdBytes()

Required. Org Policy Canned Constraint id.

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

Returns
TypeDescription
ByteString

The bytes for cannedConstraintId.

getDefaultInstanceForType()

public OrgPolicyConstraint getDefaultInstanceForType()
Returns
TypeDescription
OrgPolicyConstraint

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.cloud.securityposture.v1.PolicyRuleOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(OrgPolicyConstraint other)

public OrgPolicyConstraint.Builder mergeFrom(OrgPolicyConstraint other)
Parameter
NameDescription
otherOrgPolicyConstraint
Returns
TypeDescription
OrgPolicyConstraint.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final OrgPolicyConstraint.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueString

The cannedConstraintId to set.

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

The bytes for cannedConstraintId to set.

Returns
TypeDescription
OrgPolicyConstraint.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

public OrgPolicyConstraint.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
OrgPolicyConstraint.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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