Class ImmutableParameter.Builder

java.lang.Object
dk.mada.jaxrs.model.api.ImmutableParameter.Builder
Enclosing class:
ImmutableParameter

@Generated(from="Parameter", generator="Immutables") public static final class ImmutableParameter.Builder extends Object
Builds instances of type ImmutableParameter. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      public final ImmutableParameter.Builder from(Parameter instance)
      Fill a builder with attribute values from the provided Parameter instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • name

      public final ImmutableParameter.Builder name(String name)
      Initializes the value for the name attribute.
      Parameters:
      name - The value for name
      Returns:
      this builder for use in a chained invocation
    • reference

      public final ImmutableParameter.Builder reference(Reference reference)
      Initializes the value for the reference attribute.
      Parameters:
      reference - The value for reference
      Returns:
      this builder for use in a chained invocation
    • description

      public final ImmutableParameter.Builder description(String description)
      Initializes the optional value description to description.
      Parameters:
      description - The value for description
      Returns:
      this builder for chained invocation
    • description

      public final ImmutableParameter.Builder description(Optional<String> description)
      Initializes the optional value description to description.
      Parameters:
      description - The value for description
      Returns:
      this builder for use in a chained invocation
    • isHeaderParam

      public final ImmutableParameter.Builder isHeaderParam(boolean isHeaderParam)
      Initializes the value for the isHeaderParam attribute.
      Parameters:
      isHeaderParam - The value for isHeaderParam
      Returns:
      this builder for use in a chained invocation
    • isPathParam

      public final ImmutableParameter.Builder isPathParam(boolean isPathParam)
      Initializes the value for the isPathParam attribute.
      Parameters:
      isPathParam - The value for isPathParam
      Returns:
      this builder for use in a chained invocation
    • isQueryParam

      public final ImmutableParameter.Builder isQueryParam(boolean isQueryParam)
      Initializes the value for the isQueryParam attribute.
      Parameters:
      isQueryParam - The value for isQueryParam
      Returns:
      this builder for use in a chained invocation
    • isFormParam

      public final ImmutableParameter.Builder isFormParam(boolean isFormParam)
      Initializes the value for the isFormParam attribute.
      Parameters:
      isFormParam - The value for isFormParam
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableParameter build()
      Builds a new ImmutableParameter.
      Returns:
      An immutable instance of Parameter
      Throws:
      IllegalStateException - if any required attributes are missing