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

com.atlan.model.structs.Action Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
// Generated by delombok at Wed Oct 16 22:16:04 UTC 2024
/* SPDX-License-Identifier: Apache-2.0
   Copyright 2022 Atlan Pte. Ltd. */
package com.atlan.model.structs;

import com.fasterxml.jackson.annotation.JsonIgnore;
import javax.annotation.processing.Generated;
import lombok.*;

/**
 * Action for the task
 */
@Generated("com.atlan.generators.ModelGeneratorV2")
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Action.ActionBuilderImpl.class)
public class Action extends AtlanStruct {
    private static final long serialVersionUID = 2L;
    public static final String TYPE_NAME = "Action";
    /**
     * Fixed typeName for Action.
     */
    @JsonIgnore
    String typeName;
    /**
     * url to call to take action
     */
    String taskActionFulfillmentUrl;
    /**
     * method to call to take action
     */
    String taskActionFulfillmentMethod;
    /**
     * payload to send to the fulfillment endpoint
     */
    String taskActionFulfillmentPayload;
    /**
     * Display text for the UI component
     */
    String taskActionDisplayText;

    /**
     * Quickly create a new Action.
     * @param taskActionFulfillmentUrl url to call to take action
     * @param taskActionFulfillmentMethod method to call to take action
     * @param taskActionFulfillmentPayload payload to send to the fulfillment endpoint
     * @param taskActionDisplayText Display text for the UI component
     * @return a Action with the provided information
     */
    public static Action of(String taskActionFulfillmentUrl, String taskActionFulfillmentMethod, String taskActionFulfillmentPayload, String taskActionDisplayText) {
        return Action.builder().taskActionFulfillmentUrl(taskActionFulfillmentUrl).taskActionFulfillmentMethod(taskActionFulfillmentMethod).taskActionFulfillmentPayload(taskActionFulfillmentPayload).taskActionDisplayText(taskActionDisplayText).build();
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    private static String $default$typeName() {
        return TYPE_NAME;
    }


    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public static abstract class ActionBuilder> extends AtlanStruct.AtlanStructBuilder {
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private boolean typeName$set;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private String typeName$value;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private String taskActionFulfillmentUrl;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private String taskActionFulfillmentMethod;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private String taskActionFulfillmentPayload;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private String taskActionDisplayText;

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

        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private static void $fillValuesFromInstanceIntoBuilder(final Action instance, final Action.ActionBuilder b) {
            b.typeName(instance.typeName);
            b.taskActionFulfillmentUrl(instance.taskActionFulfillmentUrl);
            b.taskActionFulfillmentMethod(instance.taskActionFulfillmentMethod);
            b.taskActionFulfillmentPayload(instance.taskActionFulfillmentPayload);
            b.taskActionDisplayText(instance.taskActionDisplayText);
        }

        /**
         * Fixed typeName for Action.
         * @return {@code this}.
         */
        @JsonIgnore
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B typeName(final String typeName) {
            this.typeName$value = typeName;
            typeName$set = true;
            return self();
        }

        /**
         * url to call to take action
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B taskActionFulfillmentUrl(final String taskActionFulfillmentUrl) {
            this.taskActionFulfillmentUrl = taskActionFulfillmentUrl;
            return self();
        }

        /**
         * method to call to take action
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B taskActionFulfillmentMethod(final String taskActionFulfillmentMethod) {
            this.taskActionFulfillmentMethod = taskActionFulfillmentMethod;
            return self();
        }

        /**
         * payload to send to the fulfillment endpoint
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B taskActionFulfillmentPayload(final String taskActionFulfillmentPayload) {
            this.taskActionFulfillmentPayload = taskActionFulfillmentPayload;
            return self();
        }

        /**
         * Display text for the UI component
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B taskActionDisplayText(final String taskActionDisplayText) {
            this.taskActionDisplayText = taskActionDisplayText;
            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 "Action.ActionBuilder(super=" + super.toString() + ", typeName$value=" + this.typeName$value + ", taskActionFulfillmentUrl=" + this.taskActionFulfillmentUrl + ", taskActionFulfillmentMethod=" + this.taskActionFulfillmentMethod + ", taskActionFulfillmentPayload=" + this.taskActionFulfillmentPayload + ", taskActionDisplayText=" + this.taskActionDisplayText + ")";
        }
    }


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

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

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

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    protected Action(final Action.ActionBuilder b) {
        super(b);
        if (b.typeName$set) this.typeName = b.typeName$value;
         else this.typeName = Action.$default$typeName();
        this.taskActionFulfillmentUrl = b.taskActionFulfillmentUrl;
        this.taskActionFulfillmentMethod = b.taskActionFulfillmentMethod;
        this.taskActionFulfillmentPayload = b.taskActionFulfillmentPayload;
        this.taskActionDisplayText = b.taskActionDisplayText;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public static Action.ActionBuilder builder() {
        return new Action.ActionBuilderImpl();
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Action.ActionBuilder toBuilder() {
        return new Action.ActionBuilderImpl().$fillValuesFrom(this);
    }

    /**
     * url to call to take action
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getTaskActionFulfillmentUrl() {
        return this.taskActionFulfillmentUrl;
    }

    /**
     * method to call to take action
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getTaskActionFulfillmentMethod() {
        return this.taskActionFulfillmentMethod;
    }

    /**
     * payload to send to the fulfillment endpoint
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getTaskActionFulfillmentPayload() {
        return this.taskActionFulfillmentPayload;
    }

    /**
     * Display text for the UI component
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getTaskActionDisplayText() {
        return this.taskActionDisplayText;
    }

    @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 Action)) return false;
        final Action other = (Action) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        if (!super.equals(o)) return false;
        final java.lang.Object this$typeName = this.getTypeName();
        final java.lang.Object other$typeName = other.getTypeName();
        if (this$typeName == null ? other$typeName != null : !this$typeName.equals(other$typeName)) return false;
        final java.lang.Object this$taskActionFulfillmentUrl = this.getTaskActionFulfillmentUrl();
        final java.lang.Object other$taskActionFulfillmentUrl = other.getTaskActionFulfillmentUrl();
        if (this$taskActionFulfillmentUrl == null ? other$taskActionFulfillmentUrl != null : !this$taskActionFulfillmentUrl.equals(other$taskActionFulfillmentUrl)) return false;
        final java.lang.Object this$taskActionFulfillmentMethod = this.getTaskActionFulfillmentMethod();
        final java.lang.Object other$taskActionFulfillmentMethod = other.getTaskActionFulfillmentMethod();
        if (this$taskActionFulfillmentMethod == null ? other$taskActionFulfillmentMethod != null : !this$taskActionFulfillmentMethod.equals(other$taskActionFulfillmentMethod)) return false;
        final java.lang.Object this$taskActionFulfillmentPayload = this.getTaskActionFulfillmentPayload();
        final java.lang.Object other$taskActionFulfillmentPayload = other.getTaskActionFulfillmentPayload();
        if (this$taskActionFulfillmentPayload == null ? other$taskActionFulfillmentPayload != null : !this$taskActionFulfillmentPayload.equals(other$taskActionFulfillmentPayload)) return false;
        final java.lang.Object this$taskActionDisplayText = this.getTaskActionDisplayText();
        final java.lang.Object other$taskActionDisplayText = other.getTaskActionDisplayText();
        if (this$taskActionDisplayText == null ? other$taskActionDisplayText != null : !this$taskActionDisplayText.equals(other$taskActionDisplayText)) return false;
        return true;
    }

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

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public int hashCode() {
        final int PRIME = 59;
        int result = super.hashCode();
        final java.lang.Object $typeName = this.getTypeName();
        result = result * PRIME + ($typeName == null ? 43 : $typeName.hashCode());
        final java.lang.Object $taskActionFulfillmentUrl = this.getTaskActionFulfillmentUrl();
        result = result * PRIME + ($taskActionFulfillmentUrl == null ? 43 : $taskActionFulfillmentUrl.hashCode());
        final java.lang.Object $taskActionFulfillmentMethod = this.getTaskActionFulfillmentMethod();
        result = result * PRIME + ($taskActionFulfillmentMethod == null ? 43 : $taskActionFulfillmentMethod.hashCode());
        final java.lang.Object $taskActionFulfillmentPayload = this.getTaskActionFulfillmentPayload();
        result = result * PRIME + ($taskActionFulfillmentPayload == null ? 43 : $taskActionFulfillmentPayload.hashCode());
        final java.lang.Object $taskActionDisplayText = this.getTaskActionDisplayText();
        result = result * PRIME + ($taskActionDisplayText == null ? 43 : $taskActionDisplayText.hashCode());
        return result;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "Action(super=" + super.toString() + ", typeName=" + this.getTypeName() + ", taskActionFulfillmentUrl=" + this.getTaskActionFulfillmentUrl() + ", taskActionFulfillmentMethod=" + this.getTaskActionFulfillmentMethod() + ", taskActionFulfillmentPayload=" + this.getTaskActionFulfillmentPayload() + ", taskActionDisplayText=" + this.getTaskActionDisplayText() + ")";
    }

    /**
     * Fixed typeName for Action.
     */
    @Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getTypeName() {
        return this.typeName;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy