Class PolicyViolation.Builder (1.51.0)

public static final class PolicyViolation.Builder extends GeneratedMessageV3.Builder<PolicyViolation.Builder> implements PolicyViolationOrBuilder

Returned from an action if one or more policies were violated, and therefore the action was prevented. Contains information about what policies were violated and why.

Protobuf type google.cloud.deploy.v1.PolicyViolation

Static Methods

getDescriptor()

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

Methods

addAllPolicyViolationDetails(Iterable<? extends PolicyViolationDetails> values)

public PolicyViolation.Builder addAllPolicyViolationDetails(Iterable<? extends PolicyViolationDetails> values)

Policy violation details.

repeated .google.cloud.deploy.v1.PolicyViolationDetails policy_violation_details = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.deploy.v1.PolicyViolationDetails>
Returns
Type Description
PolicyViolation.Builder

addPolicyViolationDetails(PolicyViolationDetails value)

public PolicyViolation.Builder addPolicyViolationDetails(PolicyViolationDetails value)

Policy violation details.

repeated .google.cloud.deploy.v1.PolicyViolationDetails policy_violation_details = 1;

Parameter
Name Description
value PolicyViolationDetails
Returns
Type Description
PolicyViolation.Builder

addPolicyViolationDetails(PolicyViolationDetails.Builder builderForValue)

public PolicyViolation.Builder addPolicyViolationDetails(PolicyViolationDetails.Builder builderForValue)

Policy violation details.

repeated .google.cloud.deploy.v1.PolicyViolationDetails policy_violation_details = 1;

Parameter
Name Description
builderForValue PolicyViolationDetails.Builder
Returns
Type Description
PolicyViolation.Builder

addPolicyViolationDetails(int index, PolicyViolationDetails value)

public PolicyViolation.Builder addPolicyViolationDetails(int index, PolicyViolationDetails value)

Policy violation details.

repeated .google.cloud.deploy.v1.PolicyViolationDetails policy_violation_details = 1;

Parameters
Name Description
index int
value PolicyViolationDetails
Returns
Type Description
PolicyViolation.Builder

addPolicyViolationDetails(int index, PolicyViolationDetails.Builder builderForValue)

public PolicyViolation.Builder addPolicyViolationDetails(int index, PolicyViolationDetails.Builder builderForValue)

Policy violation details.

repeated .google.cloud.deploy.v1.PolicyViolationDetails policy_violation_details = 1;

Parameters
Name Description
index int
builderForValue PolicyViolationDetails.Builder
Returns
Type Description
PolicyViolation.Builder

addPolicyViolationDetailsBuilder()

public PolicyViolationDetails.Builder addPolicyViolationDetailsBuilder()

Policy violation details.

repeated .google.cloud.deploy.v1.PolicyViolationDetails policy_violation_details = 1;

Returns
Type Description
PolicyViolationDetails.Builder

addPolicyViolationDetailsBuilder(int index)

public PolicyViolationDetails.Builder addPolicyViolationDetailsBuilder(int index)

Policy violation details.

repeated .google.cloud.deploy.v1.PolicyViolationDetails policy_violation_details = 1;

Parameter
Name Description
index int
Returns
Type Description
PolicyViolationDetails.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public PolicyViolation build()
Returns
Type Description
PolicyViolation

buildPartial()

public PolicyViolation buildPartial()
Returns
Type Description
PolicyViolation

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPolicyViolationDetails()

public PolicyViolation.Builder clearPolicyViolationDetails()

Policy violation details.

repeated .google.cloud.deploy.v1.PolicyViolationDetails policy_violation_details = 1;

Returns
Type Description
PolicyViolation.Builder

clone()

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

getDefaultInstanceForType()

public PolicyViolation getDefaultInstanceForType()
Returns
Type Description
PolicyViolation

getDescriptorForType()

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

getPolicyViolationDetails(int index)

public PolicyViolationDetails getPolicyViolationDetails(int index)

Policy violation details.

repeated .google.cloud.deploy.v1.PolicyViolationDetails policy_violation_details = 1;

Parameter
Name Description
index int
Returns
Type Description
PolicyViolationDetails

getPolicyViolationDetailsBuilder(int index)

public PolicyViolationDetails.Builder getPolicyViolationDetailsBuilder(int index)

Policy violation details.

repeated .google.cloud.deploy.v1.PolicyViolationDetails policy_violation_details = 1;

Parameter
Name Description
index int
Returns
Type Description
PolicyViolationDetails.Builder

getPolicyViolationDetailsBuilderList()

public List<PolicyViolationDetails.Builder> getPolicyViolationDetailsBuilderList()

Policy violation details.

repeated .google.cloud.deploy.v1.PolicyViolationDetails policy_violation_details = 1;

Returns
Type Description
List<Builder>

getPolicyViolationDetailsCount()

public int getPolicyViolationDetailsCount()

Policy violation details.

repeated .google.cloud.deploy.v1.PolicyViolationDetails policy_violation_details = 1;

Returns
Type Description
int

getPolicyViolationDetailsList()

public List<PolicyViolationDetails> getPolicyViolationDetailsList()

Policy violation details.

repeated .google.cloud.deploy.v1.PolicyViolationDetails policy_violation_details = 1;

Returns
Type Description
List<PolicyViolationDetails>

getPolicyViolationDetailsOrBuilder(int index)

public PolicyViolationDetailsOrBuilder getPolicyViolationDetailsOrBuilder(int index)

Policy violation details.

repeated .google.cloud.deploy.v1.PolicyViolationDetails policy_violation_details = 1;

Parameter
Name Description
index int
Returns
Type Description
PolicyViolationDetailsOrBuilder

getPolicyViolationDetailsOrBuilderList()

public List<? extends PolicyViolationDetailsOrBuilder> getPolicyViolationDetailsOrBuilderList()

Policy violation details.

repeated .google.cloud.deploy.v1.PolicyViolationDetails policy_violation_details = 1;

Returns
Type Description
List<? extends com.google.cloud.deploy.v1.PolicyViolationDetailsOrBuilder>

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(PolicyViolation other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removePolicyViolationDetails(int index)

public PolicyViolation.Builder removePolicyViolationDetails(int index)

Policy violation details.

repeated .google.cloud.deploy.v1.PolicyViolationDetails policy_violation_details = 1;

Parameter
Name Description
index int
Returns
Type Description
PolicyViolation.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setPolicyViolationDetails(int index, PolicyViolationDetails value)

public PolicyViolation.Builder setPolicyViolationDetails(int index, PolicyViolationDetails value)

Policy violation details.

repeated .google.cloud.deploy.v1.PolicyViolationDetails policy_violation_details = 1;

Parameters
Name Description
index int
value PolicyViolationDetails
Returns
Type Description
PolicyViolation.Builder

setPolicyViolationDetails(int index, PolicyViolationDetails.Builder builderForValue)

public PolicyViolation.Builder setPolicyViolationDetails(int index, PolicyViolationDetails.Builder builderForValue)

Policy violation details.

repeated .google.cloud.deploy.v1.PolicyViolationDetails policy_violation_details = 1;

Parameters
Name Description
index int
builderForValue PolicyViolationDetails.Builder
Returns
Type Description
PolicyViolation.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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