Class ImmutableCtxApiOp

java.lang.Object
dk.mada.jaxrs.generator.mpclient.api.tmpl.ImmutableCtxApiOp
All Implemented Interfaces:
CtxApiOp

@Generated(from="CtxApiOp", generator="Immutables") @Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableCtxApiOp extends Object implements CtxApiOp
Immutable implementation of CtxApiOp.

Use the builder to create immutable instances: ImmutableCtxApiOp.builder().

  • Method Details

    • returnType

      public String returnType()
      Returns the operation return type.
      Specified by:
      returnType in interface CtxApiOp
      Returns:
      the operation return type
    • nickname

      public String nickname()
      Returns the operation nickname.
      Specified by:
      nickname in interface CtxApiOp
      Returns:
      the operation nickname
    • httpMethod

      public String httpMethod()
      Returns the operation http method.
      Specified by:
      httpMethod in interface CtxApiOp
      Returns:
      the operation http method
    • path

      public Optional<String> path()
      Returns the operation path.
      Specified by:
      path in interface CtxApiOp
      Returns:
      the operation path
    • summary

      public Optional<String> summary()
      Returns the optional operation summary.
      Specified by:
      summary in interface CtxApiOp
      Returns:
      the optional operation summary
    • notes

      public Optional<String> notes()
      Returns the optional operation notes.
      Specified by:
      notes in interface CtxApiOp
      Returns:
      the optional operation notes
    • allParams

      public List<CtxApiParam> allParams()
      Returns all parameters of the operation.
      Specified by:
      allParams in interface CtxApiOp
      Returns:
      all parameters of the operation
    • responses

      public List<CtxApiResponse> responses()
      Returns all responses of the operation.
      Specified by:
      responses in interface CtxApiOp
      Returns:
      all responses of the operation
    • madaOp

      public CtxApiOpExt madaOp()
      Returns additional custom template data for the operation.
      Specified by:
      madaOp in interface CtxApiOp
      Returns:
      additional custom template data for the operation
    • withReturnType

      public final ImmutableCtxApiOp withReturnType(String value)
      Copy the current immutable object by setting a value for the returnType attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for returnType
      Returns:
      A modified copy or the this object
    • withNickname

      public final ImmutableCtxApiOp withNickname(String value)
      Copy the current immutable object by setting a value for the nickname attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for nickname
      Returns:
      A modified copy or the this object
    • withHttpMethod

      public final ImmutableCtxApiOp withHttpMethod(String value)
      Copy the current immutable object by setting a value for the httpMethod attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for httpMethod
      Returns:
      A modified copy or the this object
    • withPath

      public final ImmutableCtxApiOp withPath(String value)
      Copy the current immutable object by setting a present value for the optional path attribute.
      Parameters:
      value - The value for path
      Returns:
      A modified copy or this if not changed
    • withPath

      public final ImmutableCtxApiOp withPath(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the path attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for path
      Returns:
      A modified copy or this if not changed
    • withSummary

      public final ImmutableCtxApiOp withSummary(String value)
      Copy the current immutable object by setting a present value for the optional summary attribute.
      Parameters:
      value - The value for summary
      Returns:
      A modified copy or this if not changed
    • withSummary

      public final ImmutableCtxApiOp withSummary(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the summary attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for summary
      Returns:
      A modified copy or this if not changed
    • withNotes

      public final ImmutableCtxApiOp withNotes(String value)
      Copy the current immutable object by setting a present value for the optional notes attribute.
      Parameters:
      value - The value for notes
      Returns:
      A modified copy or this if not changed
    • withNotes

      public final ImmutableCtxApiOp withNotes(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the notes attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for notes
      Returns:
      A modified copy or this if not changed
    • withAllParams

      public final ImmutableCtxApiOp withAllParams(CtxApiParam... elements)
      Copy the current immutable object with elements that replace the content of allParams.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAllParams

      public final ImmutableCtxApiOp withAllParams(Iterable<? extends CtxApiParam> elements)
      Copy the current immutable object with elements that replace the content of allParams. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of allParams elements to set
      Returns:
      A modified copy or this if not changed
    • withResponses

      public final ImmutableCtxApiOp withResponses(CtxApiResponse... elements)
      Copy the current immutable object with elements that replace the content of responses.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withResponses

      public final ImmutableCtxApiOp withResponses(Iterable<? extends CtxApiResponse> elements)
      Copy the current immutable object with elements that replace the content of responses. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of responses elements to set
      Returns:
      A modified copy or this if not changed
    • withMadaOp

      public final ImmutableCtxApiOp withMadaOp(CtxApiOpExt value)
      Copy the current immutable object by setting a value for the madaOp attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for madaOp
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableCtxApiOp that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: returnType, nickname, httpMethod, path, summary, notes, allParams, responses, madaOp.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value CtxApiOp with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableCtxApiOp copyOf(CtxApiOp instance)
      Creates an immutable copy of a CtxApiOp value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable CtxApiOp instance
    • builder

      public static ImmutableCtxApiOp.Builder builder()
      Creates a builder for ImmutableCtxApiOp.
       ImmutableCtxApiOp.builder()
          .returnType(String) // required returnType
          .nickname(String) // required nickname
          .httpMethod(String) // required httpMethod
          .path(Optional<String>) // optional path
          .summary(Optional<String>) // optional summary
          .notes(Optional<String>) // optional notes
          .addAllParams|addAllAllParams(dk.mada.jaxrs.generator.mpclient.api.tmpl.CtxApiParam) // allParams elements
          .addResponses|addAllResponses(dk.mada.jaxrs.generator.mpclient.api.tmpl.CtxApiResponse) // responses elements
          .madaOp(dk.mada.jaxrs.generator.mpclient.api.tmpl.CtxApiOpExt) // required madaOp
          .build();
       
      Returns:
      A new ImmutableCtxApiOp builder