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

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

// Generated by delombok at Wed Oct 16 22:16:02 UTC 2024
/* SPDX-License-Identifier: Apache-2.0
   Copyright 2023 Atlan Pte. Ltd. */
package com.atlan.model.workflow;

import com.atlan.model.core.AtlanObject;
import com.fasterxml.jackson.annotation.JsonProperty;
// TODO: split this class into different subclasses with custom serde,
//  - metadata updates (first 4 properties)
//  - bulk Atlan tags (atlanTagsConfig property)
//  - others?
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = PlaybookActionConfig.PlaybookActionConfigBuilderImpl.class)
public class PlaybookActionConfig extends AtlanObject {
    private static final long serialVersionUID = 2L;
    /**
     * Whether to replace all Atlan tags (true) or none (false).
     */
    @JsonProperty("replace_classifications")
    Boolean replaceAtlanTags;
    /**
     * Whether to replace all custom metadata (true) or none (false).
     */
    @JsonProperty("replace_bms")
    Boolean replaceCustomMetadata;
    /**
     * Filename for the template being output.
     */
    @JsonProperty("output_filename")
    String outputFilename;
    /**
     * Base64-encoded jinja template detailing the action.
     */
    String template;
    // TODO: further (de)serialize this stringified value
    /**
     * Details of the Atlan tag(s) to apply, for bulk-Atlan tag actions.
     */
    @JsonProperty("classifications-config")
    String atlanTagsConfig;


    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public static abstract class PlaybookActionConfigBuilder> extends AtlanObject.AtlanObjectBuilder {
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private Boolean replaceAtlanTags;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private Boolean replaceCustomMetadata;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private String outputFilename;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private String template;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private String atlanTagsConfig;

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

        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private static void $fillValuesFromInstanceIntoBuilder(final PlaybookActionConfig instance, final PlaybookActionConfig.PlaybookActionConfigBuilder b) {
            b.replaceAtlanTags(instance.replaceAtlanTags);
            b.replaceCustomMetadata(instance.replaceCustomMetadata);
            b.outputFilename(instance.outputFilename);
            b.template(instance.template);
            b.atlanTagsConfig(instance.atlanTagsConfig);
        }

        /**
         * Whether to replace all Atlan tags (true) or none (false).
         * @return {@code this}.
         */
        @JsonProperty("replace_classifications")
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B replaceAtlanTags(final Boolean replaceAtlanTags) {
            this.replaceAtlanTags = replaceAtlanTags;
            return self();
        }

        /**
         * Whether to replace all custom metadata (true) or none (false).
         * @return {@code this}.
         */
        @JsonProperty("replace_bms")
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B replaceCustomMetadata(final Boolean replaceCustomMetadata) {
            this.replaceCustomMetadata = replaceCustomMetadata;
            return self();
        }

        /**
         * Filename for the template being output.
         * @return {@code this}.
         */
        @JsonProperty("output_filename")
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B outputFilename(final String outputFilename) {
            this.outputFilename = outputFilename;
            return self();
        }

        /**
         * Base64-encoded jinja template detailing the action.
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B template(final String template) {
            this.template = template;
            return self();
        }

        /**
         * Details of the Atlan tag(s) to apply, for bulk-Atlan tag actions.
         * @return {@code this}.
         */
        @JsonProperty("classifications-config")
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B atlanTagsConfig(final String atlanTagsConfig) {
            this.atlanTagsConfig = atlanTagsConfig;
            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 "PlaybookActionConfig.PlaybookActionConfigBuilder(super=" + super.toString() + ", replaceAtlanTags=" + this.replaceAtlanTags + ", replaceCustomMetadata=" + this.replaceCustomMetadata + ", outputFilename=" + this.outputFilename + ", template=" + this.template + ", atlanTagsConfig=" + this.atlanTagsConfig + ")";
        }
    }


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

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

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

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    protected PlaybookActionConfig(final PlaybookActionConfig.PlaybookActionConfigBuilder b) {
        super(b);
        this.replaceAtlanTags = b.replaceAtlanTags;
        this.replaceCustomMetadata = b.replaceCustomMetadata;
        this.outputFilename = b.outputFilename;
        this.template = b.template;
        this.atlanTagsConfig = b.atlanTagsConfig;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public static PlaybookActionConfig.PlaybookActionConfigBuilder builder() {
        return new PlaybookActionConfig.PlaybookActionConfigBuilderImpl();
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public PlaybookActionConfig.PlaybookActionConfigBuilder toBuilder() {
        return new PlaybookActionConfig.PlaybookActionConfigBuilderImpl().$fillValuesFrom(this);
    }

    /**
     * Whether to replace all Atlan tags (true) or none (false).
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Boolean getReplaceAtlanTags() {
        return this.replaceAtlanTags;
    }

    /**
     * Whether to replace all custom metadata (true) or none (false).
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Boolean getReplaceCustomMetadata() {
        return this.replaceCustomMetadata;
    }

    /**
     * Filename for the template being output.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getOutputFilename() {
        return this.outputFilename;
    }

    /**
     * Base64-encoded jinja template detailing the action.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getTemplate() {
        return this.template;
    }

    /**
     * Details of the Atlan tag(s) to apply, for bulk-Atlan tag actions.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getAtlanTagsConfig() {
        return this.atlanTagsConfig;
    }

    @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 PlaybookActionConfig)) return false;
        final PlaybookActionConfig other = (PlaybookActionConfig) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        if (!super.equals(o)) return false;
        final java.lang.Object this$replaceAtlanTags = this.getReplaceAtlanTags();
        final java.lang.Object other$replaceAtlanTags = other.getReplaceAtlanTags();
        if (this$replaceAtlanTags == null ? other$replaceAtlanTags != null : !this$replaceAtlanTags.equals(other$replaceAtlanTags)) return false;
        final java.lang.Object this$replaceCustomMetadata = this.getReplaceCustomMetadata();
        final java.lang.Object other$replaceCustomMetadata = other.getReplaceCustomMetadata();
        if (this$replaceCustomMetadata == null ? other$replaceCustomMetadata != null : !this$replaceCustomMetadata.equals(other$replaceCustomMetadata)) return false;
        final java.lang.Object this$outputFilename = this.getOutputFilename();
        final java.lang.Object other$outputFilename = other.getOutputFilename();
        if (this$outputFilename == null ? other$outputFilename != null : !this$outputFilename.equals(other$outputFilename)) return false;
        final java.lang.Object this$template = this.getTemplate();
        final java.lang.Object other$template = other.getTemplate();
        if (this$template == null ? other$template != null : !this$template.equals(other$template)) return false;
        final java.lang.Object this$atlanTagsConfig = this.getAtlanTagsConfig();
        final java.lang.Object other$atlanTagsConfig = other.getAtlanTagsConfig();
        if (this$atlanTagsConfig == null ? other$atlanTagsConfig != null : !this$atlanTagsConfig.equals(other$atlanTagsConfig)) return false;
        return true;
    }

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

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public int hashCode() {
        final int PRIME = 59;
        int result = super.hashCode();
        final java.lang.Object $replaceAtlanTags = this.getReplaceAtlanTags();
        result = result * PRIME + ($replaceAtlanTags == null ? 43 : $replaceAtlanTags.hashCode());
        final java.lang.Object $replaceCustomMetadata = this.getReplaceCustomMetadata();
        result = result * PRIME + ($replaceCustomMetadata == null ? 43 : $replaceCustomMetadata.hashCode());
        final java.lang.Object $outputFilename = this.getOutputFilename();
        result = result * PRIME + ($outputFilename == null ? 43 : $outputFilename.hashCode());
        final java.lang.Object $template = this.getTemplate();
        result = result * PRIME + ($template == null ? 43 : $template.hashCode());
        final java.lang.Object $atlanTagsConfig = this.getAtlanTagsConfig();
        result = result * PRIME + ($atlanTagsConfig == null ? 43 : $atlanTagsConfig.hashCode());
        return result;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "PlaybookActionConfig(super=" + super.toString() + ", replaceAtlanTags=" + this.getReplaceAtlanTags() + ", replaceCustomMetadata=" + this.getReplaceCustomMetadata() + ", outputFilename=" + this.getOutputFilename() + ", template=" + this.getTemplate() + ", atlanTagsConfig=" + this.getAtlanTagsConfig() + ")";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy