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

com.atlan.model.workflow.WorkflowParameters Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
// Generated by delombok at Thu Oct 10 18:56:32 UTC 2024
/* SPDX-License-Identifier: Apache-2.0
   Copyright 2022 Atlan Pte. Ltd. */
package com.atlan.model.workflow;

import com.atlan.model.core.AtlanObject;
import java.util.List;

/**
 * Definition of the parameters used when running a task.
 */
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = WorkflowParameters.WorkflowParametersBuilderImpl.class)
public class WorkflowParameters extends AtlanObject {
    private static final long serialVersionUID = 2L;
    /**
     * List of parameters used when running a task.
     */
    List parameters;


    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public static abstract class WorkflowParametersBuilder> extends AtlanObject.AtlanObjectBuilder {
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private java.util.ArrayList parameters;

        @java.lang.Override
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        protected B $fillValuesFrom(final C instance) {
            super.$fillValuesFrom(instance);
            WorkflowParameters.WorkflowParametersBuilder.$fillValuesFromInstanceIntoBuilder(instance, this);
            return self();
        }

        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private static void $fillValuesFromInstanceIntoBuilder(final WorkflowParameters instance, final WorkflowParameters.WorkflowParametersBuilder b) {
            b.parameters(instance.parameters == null ? java.util.Collections.emptyList() : instance.parameters);
        }

        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B parameter(final NameValuePair parameter) {
            if (this.parameters == null) this.parameters = new java.util.ArrayList();
            this.parameters.add(parameter);
            return self();
        }

        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B parameters(final java.util.Collection parameters) {
            if (parameters == null) {
                throw new java.lang.NullPointerException("parameters cannot be null");
            }
            if (this.parameters == null) this.parameters = new java.util.ArrayList();
            this.parameters.addAll(parameters);
            return self();
        }

        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B clearParameters() {
            if (this.parameters != null) this.parameters.clear();
            return self();
        }

        @java.lang.Override
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        protected abstract B self();

        @java.lang.Override
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public abstract C build();

        @java.lang.Override
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public java.lang.String toString() {
            return "WorkflowParameters.WorkflowParametersBuilder(super=" + super.toString() + ", parameters=" + this.parameters + ")";
        }
    }


    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "", buildMethodName = "build")
    static final class WorkflowParametersBuilderImpl extends WorkflowParameters.WorkflowParametersBuilder {
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private WorkflowParametersBuilderImpl() {
        }

        @java.lang.Override
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        protected WorkflowParameters.WorkflowParametersBuilderImpl self() {
            return this;
        }

        @java.lang.Override
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public WorkflowParameters build() {
            return new WorkflowParameters(this);
        }
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    protected WorkflowParameters(final WorkflowParameters.WorkflowParametersBuilder b) {
        super(b);
        java.util.List parameters;
        switch (b.parameters == null ? 0 : b.parameters.size()) {
        case 0: 
            parameters = java.util.Collections.emptyList();
            break;
        case 1: 
            parameters = java.util.Collections.singletonList(b.parameters.get(0));
            break;
        default: 
            parameters = java.util.Collections.unmodifiableList(new java.util.ArrayList(b.parameters));
        }
        this.parameters = parameters;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public static WorkflowParameters.WorkflowParametersBuilder builder() {
        return new WorkflowParameters.WorkflowParametersBuilderImpl();
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public WorkflowParameters.WorkflowParametersBuilder toBuilder() {
        return new WorkflowParameters.WorkflowParametersBuilderImpl().$fillValuesFrom(this);
    }

    /**
     * List of parameters used when running a task.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public List getParameters() {
        return this.parameters;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public boolean equals(final java.lang.Object o) {
        if (o == this) return true;
        if (!(o instanceof WorkflowParameters)) return false;
        final WorkflowParameters other = (WorkflowParameters) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        if (!super.equals(o)) return false;
        final java.lang.Object this$parameters = this.getParameters();
        final java.lang.Object other$parameters = other.getParameters();
        if (this$parameters == null ? other$parameters != null : !this$parameters.equals(other$parameters)) return false;
        return true;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    protected boolean canEqual(final java.lang.Object other) {
        return other instanceof WorkflowParameters;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public int hashCode() {
        final int PRIME = 59;
        int result = super.hashCode();
        final java.lang.Object $parameters = this.getParameters();
        result = result * PRIME + ($parameters == null ? 43 : $parameters.hashCode());
        return result;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "WorkflowParameters(super=" + super.toString() + ", parameters=" + this.getParameters() + ")";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy