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

com.atlan.model.events.CustomMetadataUpdatePayload 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 2023 Atlan Pte. Ltd. */
package com.atlan.model.events;

import com.atlan.model.core.CustomMetadataAttributes;
import com.atlan.serde.CustomMetadataMapDeserializer;
import com.atlan.serde.CustomMetadataMapSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.util.Map;

@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = CustomMetadataUpdatePayload.CustomMetadataUpdatePayloadBuilderImpl.class)
public class CustomMetadataUpdatePayload extends AtlanEventPayload {
    private static final long serialVersionUID = 2L;
    public static final String TYPE_NAME = "BUSINESS_ATTRIBUTE_UPDATE";
    /**
     * Fixed type for asset-related events.
     */
    String type;
    /**
     * Fixed operation for custom metadata update payloads.
     */
    String operationType;
    /**
     * Map of custom metadata attributes and values defined on the asset. The map is keyed by the human-readable
     * name of the custom metadata set, and the values are a further mapping from human-readable attribute name
     * to the value for that attribute as provided when updating this asset.
     */
    @JsonDeserialize(using = CustomMetadataMapDeserializer.class)
    @JsonSerialize(using = CustomMetadataMapSerializer.class)
    Map mutatedDetails;

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

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


    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public static abstract class CustomMetadataUpdatePayloadBuilder> extends AtlanEventPayload.AtlanEventPayloadBuilder {
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private boolean type$set;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private String type$value;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private boolean operationType$set;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private String operationType$value;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private Map mutatedDetails;

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

        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private static void $fillValuesFromInstanceIntoBuilder(final CustomMetadataUpdatePayload instance, final CustomMetadataUpdatePayload.CustomMetadataUpdatePayloadBuilder b) {
            b.type(instance.type);
            b.operationType(instance.operationType);
            b.mutatedDetails(instance.mutatedDetails);
        }

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

        /**
         * Fixed operation for custom metadata update payloads.
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B operationType(final String operationType) {
            this.operationType$value = operationType;
            operationType$set = true;
            return self();
        }

        /**
         * Map of custom metadata attributes and values defined on the asset. The map is keyed by the human-readable
         * name of the custom metadata set, and the values are a further mapping from human-readable attribute name
         * to the value for that attribute as provided when updating this asset.
         * @return {@code this}.
         */
        @JsonDeserialize(using = CustomMetadataMapDeserializer.class)
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B mutatedDetails(final Map mutatedDetails) {
            this.mutatedDetails = mutatedDetails;
            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 "CustomMetadataUpdatePayload.CustomMetadataUpdatePayloadBuilder(super=" + super.toString() + ", type$value=" + this.type$value + ", operationType$value=" + this.operationType$value + ", mutatedDetails=" + this.mutatedDetails + ")";
        }
    }


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

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

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

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    protected CustomMetadataUpdatePayload(final CustomMetadataUpdatePayload.CustomMetadataUpdatePayloadBuilder b) {
        super(b);
        if (b.type$set) this.type = b.type$value;
         else this.type = CustomMetadataUpdatePayload.$default$type();
        if (b.operationType$set) this.operationType = b.operationType$value;
         else this.operationType = CustomMetadataUpdatePayload.$default$operationType();
        this.mutatedDetails = b.mutatedDetails;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public static CustomMetadataUpdatePayload.CustomMetadataUpdatePayloadBuilder builder() {
        return new CustomMetadataUpdatePayload.CustomMetadataUpdatePayloadBuilderImpl();
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public CustomMetadataUpdatePayload.CustomMetadataUpdatePayloadBuilder toBuilder() {
        return new CustomMetadataUpdatePayload.CustomMetadataUpdatePayloadBuilderImpl().$fillValuesFrom(this);
    }

    /**
     * Map of custom metadata attributes and values defined on the asset. The map is keyed by the human-readable
     * name of the custom metadata set, and the values are a further mapping from human-readable attribute name
     * to the value for that attribute as provided when updating this asset.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Map getMutatedDetails() {
        return this.mutatedDetails;
    }

    @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 CustomMetadataUpdatePayload)) return false;
        final CustomMetadataUpdatePayload other = (CustomMetadataUpdatePayload) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        if (!super.equals(o)) return false;
        final java.lang.Object this$type = this.getType();
        final java.lang.Object other$type = other.getType();
        if (this$type == null ? other$type != null : !this$type.equals(other$type)) return false;
        final java.lang.Object this$operationType = this.getOperationType();
        final java.lang.Object other$operationType = other.getOperationType();
        if (this$operationType == null ? other$operationType != null : !this$operationType.equals(other$operationType)) return false;
        final java.lang.Object this$mutatedDetails = this.getMutatedDetails();
        final java.lang.Object other$mutatedDetails = other.getMutatedDetails();
        if (this$mutatedDetails == null ? other$mutatedDetails != null : !this$mutatedDetails.equals(other$mutatedDetails)) return false;
        return true;
    }

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

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

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "CustomMetadataUpdatePayload(super=" + super.toString() + ", type=" + this.getType() + ", operationType=" + this.getOperationType() + ", mutatedDetails=" + this.getMutatedDetails() + ")";
    }

    /**
     * Fixed type for asset-related events.
     */
    @Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getType() {
        return this.type;
    }

    /**
     * Fixed operation for custom metadata update payloads.
     */
    @Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getOperationType() {
        return this.operationType;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy