Class ImmutableWorkflowsResponse

  • All Implemented Interfaces:
    WorkflowsResponse

    @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutableWorkflowsResponse
    extends Object
    implements WorkflowsResponse
    Immutable implementation of WorkflowsResponse.

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

    • Method Detail

      • id

        public int id()
        The Workflow ID.
        Specified by:
        id in interface WorkflowsResponse
        Returns:
        the int
      • withId

        public final ImmutableWorkflowsResponse withId​(int value)
        Copy the current immutable object by setting a value for the id attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for id
        Returns:
        A modified copy of the this object
      • withNodeId

        public final ImmutableWorkflowsResponse withNodeId​(String value)
        Copy the current immutable object by setting a value for the nodeId attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for nodeId
        Returns:
        A modified copy of the this object
      • withName

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

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

        public final ImmutableWorkflowsResponse withState​(WorkflowsState value)
        Copy the current immutable object by setting a value for the state attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for state
        Returns:
        A modified copy of the this object
      • withCreatedAt

        public final ImmutableWorkflowsResponse withCreatedAt​(ZonedDateTime value)
        Copy the current immutable object by setting a value for the createdAt attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for createdAt
        Returns:
        A modified copy of the this object
      • withUpdatedAt

        public final ImmutableWorkflowsResponse withUpdatedAt​(ZonedDateTime value)
        Copy the current immutable object by setting a value for the updatedAt attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for updatedAt
        Returns:
        A modified copy of the this object
      • withDeletedAt

        public final ImmutableWorkflowsResponse withDeletedAt​(@Nullable
                                                              ZonedDateTime value)
        Copy the current immutable object by setting a value for the deletedAt attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for deletedAt (can be null)
        Returns:
        A modified copy of the this object
      • withUrl

        public final ImmutableWorkflowsResponse withUrl​(String value)
        Copy the current immutable object by setting a value for the url attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for url
        Returns:
        A modified copy of the this object
      • withHtmlUrl

        public final ImmutableWorkflowsResponse withHtmlUrl​(String value)
        Copy the current immutable object by setting a value for the htmlUrl attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for htmlUrl
        Returns:
        A modified copy of the this object
      • withBadgeUrl

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

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableWorkflowsResponse 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: id, nodeId, name, path, state, createdAt, updatedAt, deletedAt, url, htmlUrl, badgeUrl.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableWorkflowsResponse copyOf​(WorkflowsResponse instance)
        Creates an immutable copy of a WorkflowsResponse 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 WorkflowsResponse instance
      • builder

        public static ImmutableWorkflowsResponse.Builder builder()
        Creates a builder for ImmutableWorkflowsResponse.
         ImmutableWorkflowsResponse.builder()
            .id(int) // required id
            .nodeId(String) // required nodeId
            .name(String) // required name
            .path(String) // required path
            .state(com.spotify.github.v3.workflows.WorkflowsState) // required state
            .createdAt(java.time.ZonedDateTime) // required createdAt
            .updatedAt(java.time.ZonedDateTime) // required updatedAt
            .deletedAt(java.time.ZonedDateTime | null) // nullable deletedAt
            .url(String) // required url
            .htmlUrl(String) // required htmlUrl
            .badgeUrl(String) // required badgeUrl
            .build();
         
        Returns:
        A new ImmutableWorkflowsResponse builder