Class TerraformVariableValidation.Builder (0.3.0)

public static final class TerraformVariableValidation.Builder extends GeneratedMessage.Builder<TerraformVariableValidation.Builder> implements TerraformVariableValidationOrBuilder

Represents a custom validation rule defined on a Terraform input variable.

Protobuf type google.cloud.designcenter.v1.TerraformVariableValidation

Static Methods

getDescriptor()

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

Methods

build()

public TerraformVariableValidation build()
Returns
Type Description
TerraformVariableValidation

buildPartial()

public TerraformVariableValidation buildPartial()
Returns
Type Description
TerraformVariableValidation

clear()

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

clearCondition()

public TerraformVariableValidation.Builder clearCondition()

Optional. The HCL expression for the validation condition (e.g., "length(var.image_id) > 4").

string condition = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TerraformVariableValidation.Builder

This builder for chaining.

clearErrorMessage()

public TerraformVariableValidation.Builder clearErrorMessage()

Optional. The error message displayed when the condition is false.

string error_message = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TerraformVariableValidation.Builder

This builder for chaining.

getCondition()

public String getCondition()

Optional. The HCL expression for the validation condition (e.g., "length(var.image_id) > 4").

string condition = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The condition.

getConditionBytes()

public ByteString getConditionBytes()

Optional. The HCL expression for the validation condition (e.g., "length(var.image_id) > 4").

string condition = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for condition.

getDefaultInstanceForType()

public TerraformVariableValidation getDefaultInstanceForType()
Returns
Type Description
TerraformVariableValidation

getDescriptorForType()

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

getErrorMessage()

public String getErrorMessage()

Optional. The error message displayed when the condition is false.

string error_message = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The errorMessage.

getErrorMessageBytes()

public ByteString getErrorMessageBytes()

Optional. The error message displayed when the condition is false.

string error_message = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for errorMessage.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(TerraformVariableValidation other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setCondition(String value)

public TerraformVariableValidation.Builder setCondition(String value)

Optional. The HCL expression for the validation condition (e.g., "length(var.image_id) > 4").

string condition = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The condition to set.

Returns
Type Description
TerraformVariableValidation.Builder

This builder for chaining.

setConditionBytes(ByteString value)

public TerraformVariableValidation.Builder setConditionBytes(ByteString value)

Optional. The HCL expression for the validation condition (e.g., "length(var.image_id) > 4").

string condition = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for condition to set.

Returns
Type Description
TerraformVariableValidation.Builder

This builder for chaining.

setErrorMessage(String value)

public TerraformVariableValidation.Builder setErrorMessage(String value)

Optional. The error message displayed when the condition is false.

string error_message = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The errorMessage to set.

Returns
Type Description
TerraformVariableValidation.Builder

This builder for chaining.

setErrorMessageBytes(ByteString value)

public TerraformVariableValidation.Builder setErrorMessageBytes(ByteString value)

Optional. The error message displayed when the condition is false.

string error_message = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for errorMessage to set.

Returns
Type Description
TerraformVariableValidation.Builder

This builder for chaining.