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

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

There is a newer version: 3.0.0
Show newest version
// Generated by delombok at Thu Oct 10 18:56:33 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.*;

/**
 * Detailed information about the comparison logic of a Monte Carlo rule.
 */
@Generated("com.atlan.generators.ModelGeneratorV2")
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = MCRuleComparison.MCRuleComparisonBuilderImpl.class)
public class MCRuleComparison extends AtlanStruct {
    private static final long serialVersionUID = 2L;
    public static final String TYPE_NAME = "MCRuleComparison";
    /**
     * Fixed typeName for MCRuleComparison.
     */
    @JsonIgnore
    String typeName;
    /**
     * Type of comparison, for example threshold.
     */
    String mcRuleComparisonType;
    /**
     * Field being compared.
     */
    String mcRuleComparisonField;
    /**
     * Metric being compared.
     */
    String mcRuleComparisonMetric;
    /**
     * Operator used for the comparison, for example greater than (GT).
     */
    String mcRuleComparisonOperator;
    /**
     * Threshold being compared.
     */
    Double mcRuleComparisonThreshold;
    /**
     * Whether the threshold comparison is relative (true) or absolute (false).
     */
    Boolean mcRuleComparisonIsThresholdRelative;

    /**
     * Quickly create a new MCRuleComparison.
     * @param mcRuleComparisonType Type of comparison, for example threshold.
     * @param mcRuleComparisonField Field being compared.
     * @param mcRuleComparisonMetric Metric being compared.
     * @param mcRuleComparisonOperator Operator used for the comparison, for example greater than (GT).
     * @param mcRuleComparisonThreshold Threshold being compared.
     * @param mcRuleComparisonIsThresholdRelative Whether the threshold comparison is relative (true) or absolute (false).
     * @return a MCRuleComparison with the provided information
     */
    public static MCRuleComparison of(String mcRuleComparisonType, String mcRuleComparisonField, String mcRuleComparisonMetric, String mcRuleComparisonOperator, Double mcRuleComparisonThreshold, Boolean mcRuleComparisonIsThresholdRelative) {
        return MCRuleComparison.builder().mcRuleComparisonType(mcRuleComparisonType).mcRuleComparisonField(mcRuleComparisonField).mcRuleComparisonMetric(mcRuleComparisonMetric).mcRuleComparisonOperator(mcRuleComparisonOperator).mcRuleComparisonThreshold(mcRuleComparisonThreshold).mcRuleComparisonIsThresholdRelative(mcRuleComparisonIsThresholdRelative).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 MCRuleComparisonBuilder> 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 mcRuleComparisonType;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private String mcRuleComparisonField;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private String mcRuleComparisonMetric;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private String mcRuleComparisonOperator;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private Double mcRuleComparisonThreshold;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private Boolean mcRuleComparisonIsThresholdRelative;

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

        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private static void $fillValuesFromInstanceIntoBuilder(final MCRuleComparison instance, final MCRuleComparison.MCRuleComparisonBuilder b) {
            b.typeName(instance.typeName);
            b.mcRuleComparisonType(instance.mcRuleComparisonType);
            b.mcRuleComparisonField(instance.mcRuleComparisonField);
            b.mcRuleComparisonMetric(instance.mcRuleComparisonMetric);
            b.mcRuleComparisonOperator(instance.mcRuleComparisonOperator);
            b.mcRuleComparisonThreshold(instance.mcRuleComparisonThreshold);
            b.mcRuleComparisonIsThresholdRelative(instance.mcRuleComparisonIsThresholdRelative);
        }

        /**
         * Fixed typeName for MCRuleComparison.
         * @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();
        }

        /**
         * Type of comparison, for example threshold.
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B mcRuleComparisonType(final String mcRuleComparisonType) {
            this.mcRuleComparisonType = mcRuleComparisonType;
            return self();
        }

        /**
         * Field being compared.
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B mcRuleComparisonField(final String mcRuleComparisonField) {
            this.mcRuleComparisonField = mcRuleComparisonField;
            return self();
        }

        /**
         * Metric being compared.
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B mcRuleComparisonMetric(final String mcRuleComparisonMetric) {
            this.mcRuleComparisonMetric = mcRuleComparisonMetric;
            return self();
        }

        /**
         * Operator used for the comparison, for example greater than (GT).
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B mcRuleComparisonOperator(final String mcRuleComparisonOperator) {
            this.mcRuleComparisonOperator = mcRuleComparisonOperator;
            return self();
        }

        /**
         * Threshold being compared.
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B mcRuleComparisonThreshold(final Double mcRuleComparisonThreshold) {
            this.mcRuleComparisonThreshold = mcRuleComparisonThreshold;
            return self();
        }

        /**
         * Whether the threshold comparison is relative (true) or absolute (false).
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B mcRuleComparisonIsThresholdRelative(final Boolean mcRuleComparisonIsThresholdRelative) {
            this.mcRuleComparisonIsThresholdRelative = mcRuleComparisonIsThresholdRelative;
            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 "MCRuleComparison.MCRuleComparisonBuilder(super=" + super.toString() + ", typeName$value=" + this.typeName$value + ", mcRuleComparisonType=" + this.mcRuleComparisonType + ", mcRuleComparisonField=" + this.mcRuleComparisonField + ", mcRuleComparisonMetric=" + this.mcRuleComparisonMetric + ", mcRuleComparisonOperator=" + this.mcRuleComparisonOperator + ", mcRuleComparisonThreshold=" + this.mcRuleComparisonThreshold + ", mcRuleComparisonIsThresholdRelative=" + this.mcRuleComparisonIsThresholdRelative + ")";
        }
    }


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

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

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

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    protected MCRuleComparison(final MCRuleComparison.MCRuleComparisonBuilder b) {
        super(b);
        if (b.typeName$set) this.typeName = b.typeName$value;
         else this.typeName = MCRuleComparison.$default$typeName();
        this.mcRuleComparisonType = b.mcRuleComparisonType;
        this.mcRuleComparisonField = b.mcRuleComparisonField;
        this.mcRuleComparisonMetric = b.mcRuleComparisonMetric;
        this.mcRuleComparisonOperator = b.mcRuleComparisonOperator;
        this.mcRuleComparisonThreshold = b.mcRuleComparisonThreshold;
        this.mcRuleComparisonIsThresholdRelative = b.mcRuleComparisonIsThresholdRelative;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public static MCRuleComparison.MCRuleComparisonBuilder builder() {
        return new MCRuleComparison.MCRuleComparisonBuilderImpl();
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public MCRuleComparison.MCRuleComparisonBuilder toBuilder() {
        return new MCRuleComparison.MCRuleComparisonBuilderImpl().$fillValuesFrom(this);
    }

    /**
     * Type of comparison, for example threshold.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getMcRuleComparisonType() {
        return this.mcRuleComparisonType;
    }

    /**
     * Field being compared.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getMcRuleComparisonField() {
        return this.mcRuleComparisonField;
    }

    /**
     * Metric being compared.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getMcRuleComparisonMetric() {
        return this.mcRuleComparisonMetric;
    }

    /**
     * Operator used for the comparison, for example greater than (GT).
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getMcRuleComparisonOperator() {
        return this.mcRuleComparisonOperator;
    }

    /**
     * Threshold being compared.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Double getMcRuleComparisonThreshold() {
        return this.mcRuleComparisonThreshold;
    }

    /**
     * Whether the threshold comparison is relative (true) or absolute (false).
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Boolean getMcRuleComparisonIsThresholdRelative() {
        return this.mcRuleComparisonIsThresholdRelative;
    }

    @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 MCRuleComparison)) return false;
        final MCRuleComparison other = (MCRuleComparison) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        if (!super.equals(o)) return false;
        final java.lang.Object this$mcRuleComparisonThreshold = this.getMcRuleComparisonThreshold();
        final java.lang.Object other$mcRuleComparisonThreshold = other.getMcRuleComparisonThreshold();
        if (this$mcRuleComparisonThreshold == null ? other$mcRuleComparisonThreshold != null : !this$mcRuleComparisonThreshold.equals(other$mcRuleComparisonThreshold)) return false;
        final java.lang.Object this$mcRuleComparisonIsThresholdRelative = this.getMcRuleComparisonIsThresholdRelative();
        final java.lang.Object other$mcRuleComparisonIsThresholdRelative = other.getMcRuleComparisonIsThresholdRelative();
        if (this$mcRuleComparisonIsThresholdRelative == null ? other$mcRuleComparisonIsThresholdRelative != null : !this$mcRuleComparisonIsThresholdRelative.equals(other$mcRuleComparisonIsThresholdRelative)) 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$mcRuleComparisonType = this.getMcRuleComparisonType();
        final java.lang.Object other$mcRuleComparisonType = other.getMcRuleComparisonType();
        if (this$mcRuleComparisonType == null ? other$mcRuleComparisonType != null : !this$mcRuleComparisonType.equals(other$mcRuleComparisonType)) return false;
        final java.lang.Object this$mcRuleComparisonField = this.getMcRuleComparisonField();
        final java.lang.Object other$mcRuleComparisonField = other.getMcRuleComparisonField();
        if (this$mcRuleComparisonField == null ? other$mcRuleComparisonField != null : !this$mcRuleComparisonField.equals(other$mcRuleComparisonField)) return false;
        final java.lang.Object this$mcRuleComparisonMetric = this.getMcRuleComparisonMetric();
        final java.lang.Object other$mcRuleComparisonMetric = other.getMcRuleComparisonMetric();
        if (this$mcRuleComparisonMetric == null ? other$mcRuleComparisonMetric != null : !this$mcRuleComparisonMetric.equals(other$mcRuleComparisonMetric)) return false;
        final java.lang.Object this$mcRuleComparisonOperator = this.getMcRuleComparisonOperator();
        final java.lang.Object other$mcRuleComparisonOperator = other.getMcRuleComparisonOperator();
        if (this$mcRuleComparisonOperator == null ? other$mcRuleComparisonOperator != null : !this$mcRuleComparisonOperator.equals(other$mcRuleComparisonOperator)) return false;
        return true;
    }

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

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public int hashCode() {
        final int PRIME = 59;
        int result = super.hashCode();
        final java.lang.Object $mcRuleComparisonThreshold = this.getMcRuleComparisonThreshold();
        result = result * PRIME + ($mcRuleComparisonThreshold == null ? 43 : $mcRuleComparisonThreshold.hashCode());
        final java.lang.Object $mcRuleComparisonIsThresholdRelative = this.getMcRuleComparisonIsThresholdRelative();
        result = result * PRIME + ($mcRuleComparisonIsThresholdRelative == null ? 43 : $mcRuleComparisonIsThresholdRelative.hashCode());
        final java.lang.Object $typeName = this.getTypeName();
        result = result * PRIME + ($typeName == null ? 43 : $typeName.hashCode());
        final java.lang.Object $mcRuleComparisonType = this.getMcRuleComparisonType();
        result = result * PRIME + ($mcRuleComparisonType == null ? 43 : $mcRuleComparisonType.hashCode());
        final java.lang.Object $mcRuleComparisonField = this.getMcRuleComparisonField();
        result = result * PRIME + ($mcRuleComparisonField == null ? 43 : $mcRuleComparisonField.hashCode());
        final java.lang.Object $mcRuleComparisonMetric = this.getMcRuleComparisonMetric();
        result = result * PRIME + ($mcRuleComparisonMetric == null ? 43 : $mcRuleComparisonMetric.hashCode());
        final java.lang.Object $mcRuleComparisonOperator = this.getMcRuleComparisonOperator();
        result = result * PRIME + ($mcRuleComparisonOperator == null ? 43 : $mcRuleComparisonOperator.hashCode());
        return result;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "MCRuleComparison(super=" + super.toString() + ", typeName=" + this.getTypeName() + ", mcRuleComparisonType=" + this.getMcRuleComparisonType() + ", mcRuleComparisonField=" + this.getMcRuleComparisonField() + ", mcRuleComparisonMetric=" + this.getMcRuleComparisonMetric() + ", mcRuleComparisonOperator=" + this.getMcRuleComparisonOperator() + ", mcRuleComparisonThreshold=" + this.getMcRuleComparisonThreshold() + ", mcRuleComparisonIsThresholdRelative=" + this.getMcRuleComparisonIsThresholdRelative() + ")";
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy