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

com.atlan.model.relations.GlossaryTermCategorization Maven / Gradle / Ivy

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

import com.atlan.exception.InvalidRequestException;
import com.atlan.model.assets.GlossaryCategory;
import com.atlan.model.assets.GlossaryTerm;
import com.atlan.model.assets.IGlossaryCategory;
import com.atlan.model.assets.IGlossaryTerm;
import com.atlan.model.enums.AtlasGlossaryTermRelationshipStatus;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.processing.Generated;

/**
 * Organizes terms into categories. A term may be linked with many categories and a category may have many terms linked to it. This relationship may connect terms and categories both in the same glossary or in different glossaries.
 */
@Generated("com.atlan.generators.ModelGeneratorV2")
public class GlossaryTermCategorization extends RelationshipAttributes {
    private static final long serialVersionUID = 2L;
    public static final String TYPE_NAME = "AtlasGlossaryTermCategorization";
    /**
     * Fixed typeName for GlossaryTermCategorizations.
     */
    String typeName;
    /**
     * TBC
     */
    String description;
    /**
     * TBC
     */
    AtlasGlossaryTermRelationshipStatus status;

    /**
     * {@inheritDoc}
     */
    @Override
    public Map getAll() {
        Map map = new HashMap<>();
        if (description != null) {
            map.put("description", description);
        }
        if (status != null) {
            map.put("status", status);
        }
        return map;
    }


    /**
     * Organizes terms into categories. A term may be linked with many categories and a category may have many terms linked to it. This relationship may connect terms and categories both in the same glossary or in different glossaries.
     */
    @Generated("com.atlan.generators.ModelGeneratorV2")
    public static final class Category extends GlossaryCategory {
        private static final long serialVersionUID = 2L;
        /**
         * Fixed typeName for GlossaryTermCategorization.
         */
        String relationshipType;
        /**
         * Relationship attributes specific to GlossaryTermCategorization.
         */
        GlossaryTermCategorization relationshipAttributes;

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


        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public static abstract class CategoryBuilder> extends GlossaryCategory.GlossaryCategoryBuilder {
            @java.lang.SuppressWarnings("all")
            @lombok.Generated
            private boolean relationshipType$set;
            @java.lang.SuppressWarnings("all")
            @lombok.Generated
            private String relationshipType$value;
            @java.lang.SuppressWarnings("all")
            @lombok.Generated
            private GlossaryTermCategorization relationshipAttributes;

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

            @java.lang.SuppressWarnings("all")
            @lombok.Generated
            private static void $fillValuesFromInstanceIntoBuilder(final GlossaryTermCategorization.Category instance, final GlossaryTermCategorization.Category.CategoryBuilder b) {
                b.relationshipType(instance.relationshipType);
                b.relationshipAttributes(instance.relationshipAttributes);
            }

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

            /**
             * Relationship attributes specific to GlossaryTermCategorization.
             * @return {@code this}.
             */
            @java.lang.SuppressWarnings("all")
            @lombok.Generated
            public B relationshipAttributes(final GlossaryTermCategorization relationshipAttributes) {
                this.relationshipAttributes = relationshipAttributes;
                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 "GlossaryTermCategorization.Category.CategoryBuilder(super=" + super.toString() + ", relationshipType$value=" + this.relationshipType$value + ", relationshipAttributes=" + this.relationshipAttributes + ")";
            }
        }


        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private static final class CategoryBuilderImpl extends GlossaryTermCategorization.Category.CategoryBuilder {
            @java.lang.SuppressWarnings("all")
            @lombok.Generated
            private CategoryBuilderImpl() {
            }

            @java.lang.Override
            @java.lang.SuppressWarnings("all")
            @lombok.Generated
            protected GlossaryTermCategorization.Category.CategoryBuilderImpl self() {
                return this;
            }

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

        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        protected Category(final GlossaryTermCategorization.Category.CategoryBuilder b) {
            super(b);
            if (b.relationshipType$set) this.relationshipType = b.relationshipType$value;
             else this.relationshipType = GlossaryTermCategorization.Category.$default$relationshipType();
            this.relationshipAttributes = b.relationshipAttributes;
        }

        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public static GlossaryTermCategorization.Category.CategoryBuilder _internal() {
            return new GlossaryTermCategorization.Category.CategoryBuilderImpl();
        }

        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public GlossaryTermCategorization.Category.CategoryBuilder toBuilder() {
            return new GlossaryTermCategorization.Category.CategoryBuilderImpl().$fillValuesFrom(this);
        }

        /**
         * Relationship attributes specific to GlossaryTermCategorization.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public GlossaryTermCategorization getRelationshipAttributes() {
            return this.relationshipAttributes;
        }

        @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 GlossaryTermCategorization.Category)) return false;
            final GlossaryTermCategorization.Category other = (GlossaryTermCategorization.Category) o;
            if (!other.canEqual((java.lang.Object) this)) return false;
            if (!super.equals(o)) return false;
            final java.lang.Object this$relationshipType = this.getRelationshipType();
            final java.lang.Object other$relationshipType = other.getRelationshipType();
            if (this$relationshipType == null ? other$relationshipType != null : !this$relationshipType.equals(other$relationshipType)) return false;
            final java.lang.Object this$relationshipAttributes = this.getRelationshipAttributes();
            final java.lang.Object other$relationshipAttributes = other.getRelationshipAttributes();
            if (this$relationshipAttributes == null ? other$relationshipAttributes != null : !this$relationshipAttributes.equals(other$relationshipAttributes)) return false;
            return true;
        }

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

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

        @java.lang.Override
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public java.lang.String toString() {
            return "GlossaryTermCategorization.Category(super=" + super.toString() + ", relationshipType=" + this.getRelationshipType() + ", relationshipAttributes=" + this.getRelationshipAttributes() + ")";
        }

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


    /**
     * Organizes terms into categories. A term may be linked with many categories and a category may have many terms linked to it. This relationship may connect terms and categories both in the same glossary or in different glossaries.
     */
    @Generated("com.atlan.generators.ModelGeneratorV2")
    public static final class Term extends GlossaryTerm {
        private static final long serialVersionUID = 2L;
        /**
         * Fixed typeName for GlossaryTermCategorization.
         */
        String relationshipType;
        /**
         * Relationship attributes specific to GlossaryTermCategorization.
         */
        GlossaryTermCategorization relationshipAttributes;

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


        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public static abstract class TermBuilder> extends GlossaryTerm.GlossaryTermBuilder {
            @java.lang.SuppressWarnings("all")
            @lombok.Generated
            private boolean relationshipType$set;
            @java.lang.SuppressWarnings("all")
            @lombok.Generated
            private String relationshipType$value;
            @java.lang.SuppressWarnings("all")
            @lombok.Generated
            private GlossaryTermCategorization relationshipAttributes;

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

            @java.lang.SuppressWarnings("all")
            @lombok.Generated
            private static void $fillValuesFromInstanceIntoBuilder(final GlossaryTermCategorization.Term instance, final GlossaryTermCategorization.Term.TermBuilder b) {
                b.relationshipType(instance.relationshipType);
                b.relationshipAttributes(instance.relationshipAttributes);
            }

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

            /**
             * Relationship attributes specific to GlossaryTermCategorization.
             * @return {@code this}.
             */
            @java.lang.SuppressWarnings("all")
            @lombok.Generated
            public B relationshipAttributes(final GlossaryTermCategorization relationshipAttributes) {
                this.relationshipAttributes = relationshipAttributes;
                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 "GlossaryTermCategorization.Term.TermBuilder(super=" + super.toString() + ", relationshipType$value=" + this.relationshipType$value + ", relationshipAttributes=" + this.relationshipAttributes + ")";
            }
        }


        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private static final class TermBuilderImpl extends GlossaryTermCategorization.Term.TermBuilder {
            @java.lang.SuppressWarnings("all")
            @lombok.Generated
            private TermBuilderImpl() {
            }

            @java.lang.Override
            @java.lang.SuppressWarnings("all")
            @lombok.Generated
            protected GlossaryTermCategorization.Term.TermBuilderImpl self() {
                return this;
            }

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

        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        protected Term(final GlossaryTermCategorization.Term.TermBuilder b) {
            super(b);
            if (b.relationshipType$set) this.relationshipType = b.relationshipType$value;
             else this.relationshipType = GlossaryTermCategorization.Term.$default$relationshipType();
            this.relationshipAttributes = b.relationshipAttributes;
        }

        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public static GlossaryTermCategorization.Term.TermBuilder _internal() {
            return new GlossaryTermCategorization.Term.TermBuilderImpl();
        }

        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public GlossaryTermCategorization.Term.TermBuilder toBuilder() {
            return new GlossaryTermCategorization.Term.TermBuilderImpl().$fillValuesFrom(this);
        }

        /**
         * Relationship attributes specific to GlossaryTermCategorization.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public GlossaryTermCategorization getRelationshipAttributes() {
            return this.relationshipAttributes;
        }

        @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 GlossaryTermCategorization.Term)) return false;
            final GlossaryTermCategorization.Term other = (GlossaryTermCategorization.Term) o;
            if (!other.canEqual((java.lang.Object) this)) return false;
            if (!super.equals(o)) return false;
            final java.lang.Object this$relationshipType = this.getRelationshipType();
            final java.lang.Object other$relationshipType = other.getRelationshipType();
            if (this$relationshipType == null ? other$relationshipType != null : !this$relationshipType.equals(other$relationshipType)) return false;
            final java.lang.Object this$relationshipAttributes = this.getRelationshipAttributes();
            final java.lang.Object other$relationshipAttributes = other.getRelationshipAttributes();
            if (this$relationshipAttributes == null ? other$relationshipAttributes != null : !this$relationshipAttributes.equals(other$relationshipAttributes)) return false;
            return true;
        }

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

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

        @java.lang.Override
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public java.lang.String toString() {
            return "GlossaryTermCategorization.Term(super=" + super.toString() + ", relationshipType=" + this.getRelationshipType() + ", relationshipAttributes=" + this.getRelationshipAttributes() + ")";
        }

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


    public static abstract class GlossaryTermCategorizationBuilder> extends RelationshipAttributes.RelationshipAttributesBuilder {
        @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 description;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private AtlasGlossaryTermRelationshipStatus status;

        /**
         * Build the GlossaryTermCategorization relationship (with attributes) into a related object.
         *
         * @param related the related asset to which to build the detailed relationship
         * @return a detailed Atlan relationship that conforms to the necessary interface for a related asset
         * @throws InvalidRequestException if the asset provided is without a GUID or qualifiedName
         */
        public IGlossaryCategory category(IGlossaryCategory related) throws InvalidRequestException {
            GlossaryTermCategorization attributes = build();
            if (related.getGuid() != null && !related.getGuid().isBlank()) {
                return Category._internal().guid(related.getGuid()).relationshipAttributes(attributes).build();
            } else {
                return Category._internal().uniqueAttributes(UniqueAttributes.builder().qualifiedName(related.getQualifiedName()).build()).relationshipAttributes(attributes).build();
            }
        }

        /**
         * Build the GlossaryTermCategorization relationship (with attributes) into a related object.
         *
         * @param related the related asset to which to build the detailed relationship
         * @return a detailed Atlan relationship that conforms to the necessary interface for a related asset
         * @throws InvalidRequestException if the asset provided is without a GUID or qualifiedName
         */
        public IGlossaryTerm term(IGlossaryTerm related) throws InvalidRequestException {
            GlossaryTermCategorization attributes = build();
            if (related.getGuid() != null && !related.getGuid().isBlank()) {
                return Term._internal().guid(related.getGuid()).relationshipAttributes(attributes).build();
            } else {
                return Term._internal().uniqueAttributes(UniqueAttributes.builder().qualifiedName(related.getQualifiedName()).build()).relationshipAttributes(attributes).build();
            }
        }

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

        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private static void $fillValuesFromInstanceIntoBuilder(final GlossaryTermCategorization instance, final GlossaryTermCategorization.GlossaryTermCategorizationBuilder b) {
            b.typeName(instance.typeName);
            b.description(instance.description);
            b.status(instance.status);
        }

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

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

        /**
         * TBC
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B status(final AtlasGlossaryTermRelationshipStatus status) {
            this.status = status;
            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 "GlossaryTermCategorization.GlossaryTermCategorizationBuilder(super=" + super.toString() + ", typeName$value=" + this.typeName$value + ", description=" + this.description + ", status=" + this.status + ")";
        }
    }

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


    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    private static final class GlossaryTermCategorizationBuilderImpl extends GlossaryTermCategorization.GlossaryTermCategorizationBuilder {
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private GlossaryTermCategorizationBuilderImpl() {
        }

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

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

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    protected GlossaryTermCategorization(final GlossaryTermCategorization.GlossaryTermCategorizationBuilder b) {
        super(b);
        if (b.typeName$set) this.typeName = b.typeName$value;
         else this.typeName = GlossaryTermCategorization.$default$typeName();
        this.description = b.description;
        this.status = b.status;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public static GlossaryTermCategorization.GlossaryTermCategorizationBuilder builder() {
        return new GlossaryTermCategorization.GlossaryTermCategorizationBuilderImpl();
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public GlossaryTermCategorization.GlossaryTermCategorizationBuilder toBuilder() {
        return new GlossaryTermCategorization.GlossaryTermCategorizationBuilderImpl().$fillValuesFrom(this);
    }

    /**
     * TBC
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getDescription() {
        return this.description;
    }

    /**
     * TBC
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public AtlasGlossaryTermRelationshipStatus getStatus() {
        return this.status;
    }

    @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 GlossaryTermCategorization)) return false;
        final GlossaryTermCategorization other = (GlossaryTermCategorization) 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$description = this.getDescription();
        final java.lang.Object other$description = other.getDescription();
        if (this$description == null ? other$description != null : !this$description.equals(other$description)) return false;
        final java.lang.Object this$status = this.getStatus();
        final java.lang.Object other$status = other.getStatus();
        if (this$status == null ? other$status != null : !this$status.equals(other$status)) return false;
        return true;
    }

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

    @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 $description = this.getDescription();
        result = result * PRIME + ($description == null ? 43 : $description.hashCode());
        final java.lang.Object $status = this.getStatus();
        result = result * PRIME + ($status == null ? 43 : $status.hashCode());
        return result;
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy