All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.syndesis.integration.component.proxy.ImmutableProperty Maven / Gradle / Ivy

The newest version!
package io.syndesis.integration.component.proxy;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
import java.util.Optional;
import org.immutables.value.Generated;

/**
 * Immutable implementation of {@link ComponentDefinition.Property}.
 * 

* Use the builder to create immutable instances: * {@code new ImmutableProperty.Builder()}. */ @Generated(from = "ComponentDefinition.Property", generator = "Immutables") @SuppressWarnings({"all"}) @javax.annotation.processing.Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableProperty implements ComponentDefinition.Property { private final String displayName; private final String kind; private final String group; private final String required; private final String type; private final String javaType; private final String deprecated; private final String secret; private final String description; private final String controlHint; private final String labelHint; private final String placeholder; private final String name; private final String defaultValue; private final String enums; private final String prefix; private final String multiValue; private final String enumValues; private ImmutableProperty( String displayName, String kind, String group, String required, String type, String javaType, String deprecated, String secret, String description, String controlHint, String labelHint, String placeholder, String name, String defaultValue, String enums, String prefix, String multiValue, String enumValues) { this.displayName = displayName; this.kind = kind; this.group = group; this.required = required; this.type = type; this.javaType = javaType; this.deprecated = deprecated; this.secret = secret; this.description = description; this.controlHint = controlHint; this.labelHint = labelHint; this.placeholder = placeholder; this.name = name; this.defaultValue = defaultValue; this.enums = enums; this.prefix = prefix; this.multiValue = multiValue; this.enumValues = enumValues; } /** * @return The value of the {@code displayName} attribute */ @JsonProperty("displayName") @Override public Optional getDisplayName() { return Optional.ofNullable(displayName); } /** * @return The value of the {@code kind} attribute */ @JsonProperty("kind") @Override public Optional getKind() { return Optional.ofNullable(kind); } /** * @return The value of the {@code group} attribute */ @JsonProperty("group") @Override public Optional getGroup() { return Optional.ofNullable(group); } /** * @return The value of the {@code required} attribute */ @JsonProperty("required") @Override public Optional getRequired() { return Optional.ofNullable(required); } /** * @return The value of the {@code type} attribute */ @JsonProperty("type") @Override public Optional getType() { return Optional.ofNullable(type); } /** * @return The value of the {@code javaType} attribute */ @JsonProperty("javaType") @Override public Optional getJavaType() { return Optional.ofNullable(javaType); } /** * @return The value of the {@code deprecated} attribute */ @JsonProperty("deprecated") @Override public Optional getDeprecated() { return Optional.ofNullable(deprecated); } /** * @return The value of the {@code secret} attribute */ @JsonProperty("secret") @Override public Optional getSecret() { return Optional.ofNullable(secret); } /** * @return The value of the {@code description} attribute */ @JsonProperty("description") @Override public Optional getDescription() { return Optional.ofNullable(description); } /** * @return The value of the {@code controlHint} attribute */ @JsonProperty("controlHint") @Override public Optional getControlHint() { return Optional.ofNullable(controlHint); } /** * @return The value of the {@code labelHint} attribute */ @JsonProperty("labelHint") @Override public Optional getLabelHint() { return Optional.ofNullable(labelHint); } /** * @return The value of the {@code placeholder} attribute */ @JsonProperty("placeholder") @Override public Optional getPlaceholder() { return Optional.ofNullable(placeholder); } /** * @return The value of the {@code name} attribute */ @JsonProperty("name") @Override public Optional getName() { return Optional.ofNullable(name); } /** * @return The value of the {@code defaultValue} attribute */ @JsonProperty("defaultValue") @Override public Optional getDefaultValue() { return Optional.ofNullable(defaultValue); } /** * @return The value of the {@code enums} attribute */ @JsonProperty("enums") @Override public Optional getEnums() { return Optional.ofNullable(enums); } /** * @return The value of the {@code prefix} attribute */ @JsonProperty("prefix") @Override public Optional getPrefix() { return Optional.ofNullable(prefix); } /** * @return The value of the {@code multiValue} attribute */ @JsonProperty("multiValue") @Override public Optional getMultiValue() { return Optional.ofNullable(multiValue); } /** * @return The value of the {@code enumValues} attribute */ @JsonProperty("enumValues") @Override public Optional getEnumValues() { return Optional.ofNullable(enumValues); } /** * Copy the current immutable object by setting a present value for the optional {@link ComponentDefinition.Property#getDisplayName() displayName} attribute. * @param value The value for displayName * @return A modified copy of {@code this} object */ public final ImmutableProperty withDisplayName(String value) { String newValue = Objects.requireNonNull(value, "displayName"); if (Objects.equals(this.displayName, newValue)) return this; return new ImmutableProperty( newValue, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting an optional value for the {@link ComponentDefinition.Property#getDisplayName() displayName} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for displayName * @return A modified copy of {@code this} object */ public final ImmutableProperty withDisplayName(Optional optional) { String value = optional.orElse(null); if (Objects.equals(this.displayName, value)) return this; return new ImmutableProperty( value, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting a present value for the optional {@link ComponentDefinition.Property#getKind() kind} attribute. * @param value The value for kind * @return A modified copy of {@code this} object */ public final ImmutableProperty withKind(String value) { String newValue = Objects.requireNonNull(value, "kind"); if (Objects.equals(this.kind, newValue)) return this; return new ImmutableProperty( this.displayName, newValue, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting an optional value for the {@link ComponentDefinition.Property#getKind() kind} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for kind * @return A modified copy of {@code this} object */ public final ImmutableProperty withKind(Optional optional) { String value = optional.orElse(null); if (Objects.equals(this.kind, value)) return this; return new ImmutableProperty( this.displayName, value, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting a present value for the optional {@link ComponentDefinition.Property#getGroup() group} attribute. * @param value The value for group * @return A modified copy of {@code this} object */ public final ImmutableProperty withGroup(String value) { String newValue = Objects.requireNonNull(value, "group"); if (Objects.equals(this.group, newValue)) return this; return new ImmutableProperty( this.displayName, this.kind, newValue, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting an optional value for the {@link ComponentDefinition.Property#getGroup() group} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for group * @return A modified copy of {@code this} object */ public final ImmutableProperty withGroup(Optional optional) { String value = optional.orElse(null); if (Objects.equals(this.group, value)) return this; return new ImmutableProperty( this.displayName, this.kind, value, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting a present value for the optional {@link ComponentDefinition.Property#getRequired() required} attribute. * @param value The value for required * @return A modified copy of {@code this} object */ public final ImmutableProperty withRequired(String value) { String newValue = Objects.requireNonNull(value, "required"); if (Objects.equals(this.required, newValue)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, newValue, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting an optional value for the {@link ComponentDefinition.Property#getRequired() required} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for required * @return A modified copy of {@code this} object */ public final ImmutableProperty withRequired(Optional optional) { String value = optional.orElse(null); if (Objects.equals(this.required, value)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, value, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting a present value for the optional {@link ComponentDefinition.Property#getType() type} attribute. * @param value The value for type * @return A modified copy of {@code this} object */ public final ImmutableProperty withType(String value) { String newValue = Objects.requireNonNull(value, "type"); if (Objects.equals(this.type, newValue)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, newValue, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting an optional value for the {@link ComponentDefinition.Property#getType() type} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for type * @return A modified copy of {@code this} object */ public final ImmutableProperty withType(Optional optional) { String value = optional.orElse(null); if (Objects.equals(this.type, value)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, value, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting a present value for the optional {@link ComponentDefinition.Property#getJavaType() javaType} attribute. * @param value The value for javaType * @return A modified copy of {@code this} object */ public final ImmutableProperty withJavaType(String value) { String newValue = Objects.requireNonNull(value, "javaType"); if (Objects.equals(this.javaType, newValue)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, newValue, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting an optional value for the {@link ComponentDefinition.Property#getJavaType() javaType} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for javaType * @return A modified copy of {@code this} object */ public final ImmutableProperty withJavaType(Optional optional) { String value = optional.orElse(null); if (Objects.equals(this.javaType, value)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, value, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting a present value for the optional {@link ComponentDefinition.Property#getDeprecated() deprecated} attribute. * @param value The value for deprecated * @return A modified copy of {@code this} object */ public final ImmutableProperty withDeprecated(String value) { String newValue = Objects.requireNonNull(value, "deprecated"); if (Objects.equals(this.deprecated, newValue)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, newValue, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting an optional value for the {@link ComponentDefinition.Property#getDeprecated() deprecated} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for deprecated * @return A modified copy of {@code this} object */ public final ImmutableProperty withDeprecated(Optional optional) { String value = optional.orElse(null); if (Objects.equals(this.deprecated, value)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, value, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting a present value for the optional {@link ComponentDefinition.Property#getSecret() secret} attribute. * @param value The value for secret * @return A modified copy of {@code this} object */ public final ImmutableProperty withSecret(String value) { String newValue = Objects.requireNonNull(value, "secret"); if (Objects.equals(this.secret, newValue)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, newValue, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting an optional value for the {@link ComponentDefinition.Property#getSecret() secret} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for secret * @return A modified copy of {@code this} object */ public final ImmutableProperty withSecret(Optional optional) { String value = optional.orElse(null); if (Objects.equals(this.secret, value)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, value, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting a present value for the optional {@link ComponentDefinition.Property#getDescription() description} attribute. * @param value The value for description * @return A modified copy of {@code this} object */ public final ImmutableProperty withDescription(String value) { String newValue = Objects.requireNonNull(value, "description"); if (Objects.equals(this.description, newValue)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, newValue, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting an optional value for the {@link ComponentDefinition.Property#getDescription() description} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for description * @return A modified copy of {@code this} object */ public final ImmutableProperty withDescription(Optional optional) { String value = optional.orElse(null); if (Objects.equals(this.description, value)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, value, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting a present value for the optional {@link ComponentDefinition.Property#getControlHint() controlHint} attribute. * @param value The value for controlHint * @return A modified copy of {@code this} object */ public final ImmutableProperty withControlHint(String value) { String newValue = Objects.requireNonNull(value, "controlHint"); if (Objects.equals(this.controlHint, newValue)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, newValue, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting an optional value for the {@link ComponentDefinition.Property#getControlHint() controlHint} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for controlHint * @return A modified copy of {@code this} object */ public final ImmutableProperty withControlHint(Optional optional) { String value = optional.orElse(null); if (Objects.equals(this.controlHint, value)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, value, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting a present value for the optional {@link ComponentDefinition.Property#getLabelHint() labelHint} attribute. * @param value The value for labelHint * @return A modified copy of {@code this} object */ public final ImmutableProperty withLabelHint(String value) { String newValue = Objects.requireNonNull(value, "labelHint"); if (Objects.equals(this.labelHint, newValue)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, newValue, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting an optional value for the {@link ComponentDefinition.Property#getLabelHint() labelHint} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for labelHint * @return A modified copy of {@code this} object */ public final ImmutableProperty withLabelHint(Optional optional) { String value = optional.orElse(null); if (Objects.equals(this.labelHint, value)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, value, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting a present value for the optional {@link ComponentDefinition.Property#getPlaceholder() placeholder} attribute. * @param value The value for placeholder * @return A modified copy of {@code this} object */ public final ImmutableProperty withPlaceholder(String value) { String newValue = Objects.requireNonNull(value, "placeholder"); if (Objects.equals(this.placeholder, newValue)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, newValue, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting an optional value for the {@link ComponentDefinition.Property#getPlaceholder() placeholder} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for placeholder * @return A modified copy of {@code this} object */ public final ImmutableProperty withPlaceholder(Optional optional) { String value = optional.orElse(null); if (Objects.equals(this.placeholder, value)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, value, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting a present value for the optional {@link ComponentDefinition.Property#getName() name} attribute. * @param value The value for name * @return A modified copy of {@code this} object */ public final ImmutableProperty withName(String value) { String newValue = Objects.requireNonNull(value, "name"); if (Objects.equals(this.name, newValue)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, newValue, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting an optional value for the {@link ComponentDefinition.Property#getName() name} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for name * @return A modified copy of {@code this} object */ public final ImmutableProperty withName(Optional optional) { String value = optional.orElse(null); if (Objects.equals(this.name, value)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, value, this.defaultValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting a present value for the optional {@link ComponentDefinition.Property#getDefaultValue() defaultValue} attribute. * @param value The value for defaultValue * @return A modified copy of {@code this} object */ public final ImmutableProperty withDefaultValue(String value) { String newValue = Objects.requireNonNull(value, "defaultValue"); if (Objects.equals(this.defaultValue, newValue)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, newValue, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting an optional value for the {@link ComponentDefinition.Property#getDefaultValue() defaultValue} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for defaultValue * @return A modified copy of {@code this} object */ public final ImmutableProperty withDefaultValue(Optional optional) { String value = optional.orElse(null); if (Objects.equals(this.defaultValue, value)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, value, this.enums, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting a present value for the optional {@link ComponentDefinition.Property#getEnums() enums} attribute. * @param value The value for enums * @return A modified copy of {@code this} object */ public final ImmutableProperty withEnums(String value) { String newValue = Objects.requireNonNull(value, "enums"); if (Objects.equals(this.enums, newValue)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, newValue, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting an optional value for the {@link ComponentDefinition.Property#getEnums() enums} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for enums * @return A modified copy of {@code this} object */ public final ImmutableProperty withEnums(Optional optional) { String value = optional.orElse(null); if (Objects.equals(this.enums, value)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, value, this.prefix, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting a present value for the optional {@link ComponentDefinition.Property#getPrefix() prefix} attribute. * @param value The value for prefix * @return A modified copy of {@code this} object */ public final ImmutableProperty withPrefix(String value) { String newValue = Objects.requireNonNull(value, "prefix"); if (Objects.equals(this.prefix, newValue)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, newValue, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting an optional value for the {@link ComponentDefinition.Property#getPrefix() prefix} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for prefix * @return A modified copy of {@code this} object */ public final ImmutableProperty withPrefix(Optional optional) { String value = optional.orElse(null); if (Objects.equals(this.prefix, value)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, value, this.multiValue, this.enumValues); } /** * Copy the current immutable object by setting a present value for the optional {@link ComponentDefinition.Property#getMultiValue() multiValue} attribute. * @param value The value for multiValue * @return A modified copy of {@code this} object */ public final ImmutableProperty withMultiValue(String value) { String newValue = Objects.requireNonNull(value, "multiValue"); if (Objects.equals(this.multiValue, newValue)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, newValue, this.enumValues); } /** * Copy the current immutable object by setting an optional value for the {@link ComponentDefinition.Property#getMultiValue() multiValue} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for multiValue * @return A modified copy of {@code this} object */ public final ImmutableProperty withMultiValue(Optional optional) { String value = optional.orElse(null); if (Objects.equals(this.multiValue, value)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, value, this.enumValues); } /** * Copy the current immutable object by setting a present value for the optional {@link ComponentDefinition.Property#getEnumValues() enumValues} attribute. * @param value The value for enumValues * @return A modified copy of {@code this} object */ public final ImmutableProperty withEnumValues(String value) { String newValue = Objects.requireNonNull(value, "enumValues"); if (Objects.equals(this.enumValues, newValue)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, newValue); } /** * Copy the current immutable object by setting an optional value for the {@link ComponentDefinition.Property#getEnumValues() enumValues} attribute. * An equality check is used on inner nullable value to prevent copying of the same value by returning {@code this}. * @param optional A value for enumValues * @return A modified copy of {@code this} object */ public final ImmutableProperty withEnumValues(Optional optional) { String value = optional.orElse(null); if (Objects.equals(this.enumValues, value)) return this; return new ImmutableProperty( this.displayName, this.kind, this.group, this.required, this.type, this.javaType, this.deprecated, this.secret, this.description, this.controlHint, this.labelHint, this.placeholder, this.name, this.defaultValue, this.enums, this.prefix, this.multiValue, value); } /** * This instance is equal to all instances of {@code ImmutableProperty} that have equal attribute values. * @return {@code true} if {@code this} is equal to {@code another} instance */ @Override public boolean equals(Object another) { if (this == another) return true; return another instanceof ImmutableProperty && equalTo((ImmutableProperty) another); } private boolean equalTo(ImmutableProperty another) { return Objects.equals(displayName, another.displayName) && Objects.equals(kind, another.kind) && Objects.equals(group, another.group) && Objects.equals(required, another.required) && Objects.equals(type, another.type) && Objects.equals(javaType, another.javaType) && Objects.equals(deprecated, another.deprecated) && Objects.equals(secret, another.secret) && Objects.equals(description, another.description) && Objects.equals(controlHint, another.controlHint) && Objects.equals(labelHint, another.labelHint) && Objects.equals(placeholder, another.placeholder) && Objects.equals(name, another.name) && Objects.equals(defaultValue, another.defaultValue) && Objects.equals(enums, another.enums) && Objects.equals(prefix, another.prefix) && Objects.equals(multiValue, another.multiValue) && Objects.equals(enumValues, another.enumValues); } /** * Computes a hash code from attributes: {@code displayName}, {@code kind}, {@code group}, {@code required}, {@code type}, {@code javaType}, {@code deprecated}, {@code secret}, {@code description}, {@code controlHint}, {@code labelHint}, {@code placeholder}, {@code name}, {@code defaultValue}, {@code enums}, {@code prefix}, {@code multiValue}, {@code enumValues}. * @return hashCode value */ @Override public int hashCode() { int h = 5381; h += (h << 5) + Objects.hashCode(displayName); h += (h << 5) + Objects.hashCode(kind); h += (h << 5) + Objects.hashCode(group); h += (h << 5) + Objects.hashCode(required); h += (h << 5) + Objects.hashCode(type); h += (h << 5) + Objects.hashCode(javaType); h += (h << 5) + Objects.hashCode(deprecated); h += (h << 5) + Objects.hashCode(secret); h += (h << 5) + Objects.hashCode(description); h += (h << 5) + Objects.hashCode(controlHint); h += (h << 5) + Objects.hashCode(labelHint); h += (h << 5) + Objects.hashCode(placeholder); h += (h << 5) + Objects.hashCode(name); h += (h << 5) + Objects.hashCode(defaultValue); h += (h << 5) + Objects.hashCode(enums); h += (h << 5) + Objects.hashCode(prefix); h += (h << 5) + Objects.hashCode(multiValue); h += (h << 5) + Objects.hashCode(enumValues); return h; } /** * Prints the immutable value {@code Property} with attribute values. * @return A string representation of the value */ @Override public String toString() { StringBuilder builder = new StringBuilder("Property{"); if (displayName != null) { builder.append("displayName=").append(displayName); } if (kind != null) { if (builder.length() > 9) builder.append(", "); builder.append("kind=").append(kind); } if (group != null) { if (builder.length() > 9) builder.append(", "); builder.append("group=").append(group); } if (required != null) { if (builder.length() > 9) builder.append(", "); builder.append("required=").append(required); } if (type != null) { if (builder.length() > 9) builder.append(", "); builder.append("type=").append(type); } if (javaType != null) { if (builder.length() > 9) builder.append(", "); builder.append("javaType=").append(javaType); } if (deprecated != null) { if (builder.length() > 9) builder.append(", "); builder.append("deprecated=").append(deprecated); } if (secret != null) { if (builder.length() > 9) builder.append(", "); builder.append("secret=").append(secret); } if (description != null) { if (builder.length() > 9) builder.append(", "); builder.append("description=").append(description); } if (controlHint != null) { if (builder.length() > 9) builder.append(", "); builder.append("controlHint=").append(controlHint); } if (labelHint != null) { if (builder.length() > 9) builder.append(", "); builder.append("labelHint=").append(labelHint); } if (placeholder != null) { if (builder.length() > 9) builder.append(", "); builder.append("placeholder=").append(placeholder); } if (name != null) { if (builder.length() > 9) builder.append(", "); builder.append("name=").append(name); } if (defaultValue != null) { if (builder.length() > 9) builder.append(", "); builder.append("defaultValue=").append(defaultValue); } if (enums != null) { if (builder.length() > 9) builder.append(", "); builder.append("enums=").append(enums); } if (prefix != null) { if (builder.length() > 9) builder.append(", "); builder.append("prefix=").append(prefix); } if (multiValue != null) { if (builder.length() > 9) builder.append(", "); builder.append("multiValue=").append(multiValue); } if (enumValues != null) { if (builder.length() > 9) builder.append(", "); builder.append("enumValues=").append(enumValues); } return builder.append("}").toString(); } /** * Creates an immutable copy of a {@link ComponentDefinition.Property} value. * Uses accessors to get values to initialize the new immutable instance. * If an instance is already immutable, it is returned as is. * @param instance The instance to copy * @return A copied immutable Property instance */ public static ImmutableProperty copyOf(ComponentDefinition.Property instance) { if (instance instanceof ImmutableProperty) { return (ImmutableProperty) instance; } return new ImmutableProperty.Builder() .from(instance) .build(); } /** * Builds instances of type {@link ImmutableProperty ImmutableProperty}. * Initialize attributes and then invoke the {@link #build()} method to create an * immutable instance. *

{@code Builder} is not thread-safe and generally should not be stored in a field or collection, * but instead used immediately to create instances. */ @Generated(from = "ComponentDefinition.Property", generator = "Immutables") public static final class Builder { private String displayName; private String kind; private String group; private String required; private String type; private String javaType; private String deprecated; private String secret; private String description; private String controlHint; private String labelHint; private String placeholder; private String name; private String defaultValue; private String enums; private String prefix; private String multiValue; private String enumValues; /** * Creates a builder for {@link ImmutableProperty ImmutableProperty} instances. *

     * new ImmutableProperty.Builder()
     *    .displayName(String) // optional {@link ComponentDefinition.Property#getDisplayName() displayName}
     *    .kind(String) // optional {@link ComponentDefinition.Property#getKind() kind}
     *    .group(String) // optional {@link ComponentDefinition.Property#getGroup() group}
     *    .required(String) // optional {@link ComponentDefinition.Property#getRequired() required}
     *    .type(String) // optional {@link ComponentDefinition.Property#getType() type}
     *    .javaType(String) // optional {@link ComponentDefinition.Property#getJavaType() javaType}
     *    .deprecated(String) // optional {@link ComponentDefinition.Property#getDeprecated() deprecated}
     *    .secret(String) // optional {@link ComponentDefinition.Property#getSecret() secret}
     *    .description(String) // optional {@link ComponentDefinition.Property#getDescription() description}
     *    .controlHint(String) // optional {@link ComponentDefinition.Property#getControlHint() controlHint}
     *    .labelHint(String) // optional {@link ComponentDefinition.Property#getLabelHint() labelHint}
     *    .placeholder(String) // optional {@link ComponentDefinition.Property#getPlaceholder() placeholder}
     *    .name(String) // optional {@link ComponentDefinition.Property#getName() name}
     *    .defaultValue(String) // optional {@link ComponentDefinition.Property#getDefaultValue() defaultValue}
     *    .enums(String) // optional {@link ComponentDefinition.Property#getEnums() enums}
     *    .prefix(String) // optional {@link ComponentDefinition.Property#getPrefix() prefix}
     *    .multiValue(String) // optional {@link ComponentDefinition.Property#getMultiValue() multiValue}
     *    .enumValues(String) // optional {@link ComponentDefinition.Property#getEnumValues() enumValues}
     *    .build();
     * 
*/ public Builder() { } /** * Fill a builder with attribute values from the provided {@code Property} instance. * Regular attribute values will be replaced with those from the given instance. * Absent optional values will not replace present values. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ public final Builder from(ComponentDefinition.Property instance) { Objects.requireNonNull(instance, "instance"); Optional displayNameOptional = instance.getDisplayName(); if (displayNameOptional.isPresent()) { displayName(displayNameOptional); } Optional kindOptional = instance.getKind(); if (kindOptional.isPresent()) { kind(kindOptional); } Optional groupOptional = instance.getGroup(); if (groupOptional.isPresent()) { group(groupOptional); } Optional requiredOptional = instance.getRequired(); if (requiredOptional.isPresent()) { required(requiredOptional); } Optional typeOptional = instance.getType(); if (typeOptional.isPresent()) { type(typeOptional); } Optional javaTypeOptional = instance.getJavaType(); if (javaTypeOptional.isPresent()) { javaType(javaTypeOptional); } Optional deprecatedOptional = instance.getDeprecated(); if (deprecatedOptional.isPresent()) { deprecated(deprecatedOptional); } Optional secretOptional = instance.getSecret(); if (secretOptional.isPresent()) { secret(secretOptional); } Optional descriptionOptional = instance.getDescription(); if (descriptionOptional.isPresent()) { description(descriptionOptional); } Optional controlHintOptional = instance.getControlHint(); if (controlHintOptional.isPresent()) { controlHint(controlHintOptional); } Optional labelHintOptional = instance.getLabelHint(); if (labelHintOptional.isPresent()) { labelHint(labelHintOptional); } Optional placeholderOptional = instance.getPlaceholder(); if (placeholderOptional.isPresent()) { placeholder(placeholderOptional); } Optional nameOptional = instance.getName(); if (nameOptional.isPresent()) { name(nameOptional); } Optional defaultValueOptional = instance.getDefaultValue(); if (defaultValueOptional.isPresent()) { defaultValue(defaultValueOptional); } Optional enumsOptional = instance.getEnums(); if (enumsOptional.isPresent()) { enums(enumsOptional); } Optional prefixOptional = instance.getPrefix(); if (prefixOptional.isPresent()) { prefix(prefixOptional); } Optional multiValueOptional = instance.getMultiValue(); if (multiValueOptional.isPresent()) { multiValue(multiValueOptional); } Optional enumValuesOptional = instance.getEnumValues(); if (enumValuesOptional.isPresent()) { enumValues(enumValuesOptional); } return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getDisplayName() displayName} to displayName. * @param displayName The value for displayName * @return {@code this} builder for chained invocation */ public final Builder displayName(String displayName) { this.displayName = Objects.requireNonNull(displayName, "displayName"); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getDisplayName() displayName} to displayName. * @param displayName The value for displayName * @return {@code this} builder for use in a chained invocation */ @JsonProperty("displayName") public final Builder displayName(Optional displayName) { this.displayName = displayName.orElse(null); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getKind() kind} to kind. * @param kind The value for kind * @return {@code this} builder for chained invocation */ public final Builder kind(String kind) { this.kind = Objects.requireNonNull(kind, "kind"); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getKind() kind} to kind. * @param kind The value for kind * @return {@code this} builder for use in a chained invocation */ @JsonProperty("kind") public final Builder kind(Optional kind) { this.kind = kind.orElse(null); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getGroup() group} to group. * @param group The value for group * @return {@code this} builder for chained invocation */ public final Builder group(String group) { this.group = Objects.requireNonNull(group, "group"); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getGroup() group} to group. * @param group The value for group * @return {@code this} builder for use in a chained invocation */ @JsonProperty("group") public final Builder group(Optional group) { this.group = group.orElse(null); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getRequired() required} to required. * @param required The value for required * @return {@code this} builder for chained invocation */ public final Builder required(String required) { this.required = Objects.requireNonNull(required, "required"); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getRequired() required} to required. * @param required The value for required * @return {@code this} builder for use in a chained invocation */ @JsonProperty("required") public final Builder required(Optional required) { this.required = required.orElse(null); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getType() type} to type. * @param type The value for type * @return {@code this} builder for chained invocation */ public final Builder type(String type) { this.type = Objects.requireNonNull(type, "type"); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getType() type} to type. * @param type The value for type * @return {@code this} builder for use in a chained invocation */ @JsonProperty("type") public final Builder type(Optional type) { this.type = type.orElse(null); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getJavaType() javaType} to javaType. * @param javaType The value for javaType * @return {@code this} builder for chained invocation */ public final Builder javaType(String javaType) { this.javaType = Objects.requireNonNull(javaType, "javaType"); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getJavaType() javaType} to javaType. * @param javaType The value for javaType * @return {@code this} builder for use in a chained invocation */ @JsonProperty("javaType") public final Builder javaType(Optional javaType) { this.javaType = javaType.orElse(null); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getDeprecated() deprecated} to deprecated. * @param deprecated The value for deprecated * @return {@code this} builder for chained invocation */ public final Builder deprecated(String deprecated) { this.deprecated = Objects.requireNonNull(deprecated, "deprecated"); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getDeprecated() deprecated} to deprecated. * @param deprecated The value for deprecated * @return {@code this} builder for use in a chained invocation */ @JsonProperty("deprecated") public final Builder deprecated(Optional deprecated) { this.deprecated = deprecated.orElse(null); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getSecret() secret} to secret. * @param secret The value for secret * @return {@code this} builder for chained invocation */ public final Builder secret(String secret) { this.secret = Objects.requireNonNull(secret, "secret"); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getSecret() secret} to secret. * @param secret The value for secret * @return {@code this} builder for use in a chained invocation */ @JsonProperty("secret") public final Builder secret(Optional secret) { this.secret = secret.orElse(null); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getDescription() description} to description. * @param description The value for description * @return {@code this} builder for chained invocation */ public final Builder description(String description) { this.description = Objects.requireNonNull(description, "description"); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getDescription() description} to description. * @param description The value for description * @return {@code this} builder for use in a chained invocation */ @JsonProperty("description") public final Builder description(Optional description) { this.description = description.orElse(null); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getControlHint() controlHint} to controlHint. * @param controlHint The value for controlHint * @return {@code this} builder for chained invocation */ public final Builder controlHint(String controlHint) { this.controlHint = Objects.requireNonNull(controlHint, "controlHint"); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getControlHint() controlHint} to controlHint. * @param controlHint The value for controlHint * @return {@code this} builder for use in a chained invocation */ @JsonProperty("controlHint") public final Builder controlHint(Optional controlHint) { this.controlHint = controlHint.orElse(null); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getLabelHint() labelHint} to labelHint. * @param labelHint The value for labelHint * @return {@code this} builder for chained invocation */ public final Builder labelHint(String labelHint) { this.labelHint = Objects.requireNonNull(labelHint, "labelHint"); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getLabelHint() labelHint} to labelHint. * @param labelHint The value for labelHint * @return {@code this} builder for use in a chained invocation */ @JsonProperty("labelHint") public final Builder labelHint(Optional labelHint) { this.labelHint = labelHint.orElse(null); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getPlaceholder() placeholder} to placeholder. * @param placeholder The value for placeholder * @return {@code this} builder for chained invocation */ public final Builder placeholder(String placeholder) { this.placeholder = Objects.requireNonNull(placeholder, "placeholder"); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getPlaceholder() placeholder} to placeholder. * @param placeholder The value for placeholder * @return {@code this} builder for use in a chained invocation */ @JsonProperty("placeholder") public final Builder placeholder(Optional placeholder) { this.placeholder = placeholder.orElse(null); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getName() name} to name. * @param name The value for name * @return {@code this} builder for chained invocation */ public final Builder name(String name) { this.name = Objects.requireNonNull(name, "name"); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getName() name} to name. * @param name The value for name * @return {@code this} builder for use in a chained invocation */ @JsonProperty("name") public final Builder name(Optional name) { this.name = name.orElse(null); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getDefaultValue() defaultValue} to defaultValue. * @param defaultValue The value for defaultValue * @return {@code this} builder for chained invocation */ public final Builder defaultValue(String defaultValue) { this.defaultValue = Objects.requireNonNull(defaultValue, "defaultValue"); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getDefaultValue() defaultValue} to defaultValue. * @param defaultValue The value for defaultValue * @return {@code this} builder for use in a chained invocation */ @JsonProperty("defaultValue") public final Builder defaultValue(Optional defaultValue) { this.defaultValue = defaultValue.orElse(null); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getEnums() enums} to enums. * @param enums The value for enums * @return {@code this} builder for chained invocation */ public final Builder enums(String enums) { this.enums = Objects.requireNonNull(enums, "enums"); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getEnums() enums} to enums. * @param enums The value for enums * @return {@code this} builder for use in a chained invocation */ @JsonProperty("enums") public final Builder enums(Optional enums) { this.enums = enums.orElse(null); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getPrefix() prefix} to prefix. * @param prefix The value for prefix * @return {@code this} builder for chained invocation */ public final Builder prefix(String prefix) { this.prefix = Objects.requireNonNull(prefix, "prefix"); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getPrefix() prefix} to prefix. * @param prefix The value for prefix * @return {@code this} builder for use in a chained invocation */ @JsonProperty("prefix") public final Builder prefix(Optional prefix) { this.prefix = prefix.orElse(null); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getMultiValue() multiValue} to multiValue. * @param multiValue The value for multiValue * @return {@code this} builder for chained invocation */ public final Builder multiValue(String multiValue) { this.multiValue = Objects.requireNonNull(multiValue, "multiValue"); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getMultiValue() multiValue} to multiValue. * @param multiValue The value for multiValue * @return {@code this} builder for use in a chained invocation */ @JsonProperty("multiValue") public final Builder multiValue(Optional multiValue) { this.multiValue = multiValue.orElse(null); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getEnumValues() enumValues} to enumValues. * @param enumValues The value for enumValues * @return {@code this} builder for chained invocation */ public final Builder enumValues(String enumValues) { this.enumValues = Objects.requireNonNull(enumValues, "enumValues"); return this; } /** * Initializes the optional value {@link ComponentDefinition.Property#getEnumValues() enumValues} to enumValues. * @param enumValues The value for enumValues * @return {@code this} builder for use in a chained invocation */ @JsonProperty("enumValues") public final Builder enumValues(Optional enumValues) { this.enumValues = enumValues.orElse(null); return this; } /** * Builds a new {@link ImmutableProperty ImmutableProperty}. * @return An immutable instance of Property * @throws java.lang.IllegalStateException if any required attributes are missing */ public ImmutableProperty build() { return new ImmutableProperty( displayName, kind, group, required, type, javaType, deprecated, secret, description, controlHint, labelHint, placeholder, name, defaultValue, enums, prefix, multiValue, enumValues); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy