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

com.atlan.model.admin.Session Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
// Generated by delombok at Thu Oct 10 18:56:32 UTC 2024
/* SPDX-License-Identifier: Apache-2.0
   Copyright 2022 Atlan Pte. Ltd. */
package com.atlan.model.admin;

import com.atlan.model.core.AtlanObject;
import java.util.Map;

@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Session.SessionBuilderImpl.class)
public class Session extends AtlanObject {
    private static final long serialVersionUID = 2L;
    /**
     * Map of clientId (GUIDs) to client names.
     */
    Map clients;
    /**
     * Unique identifier (GUID) for the session.
     */
    String id;
    /**
     * IP address from which the session originated.
     */
    String ipAddress;
    /**
     * Time (epoch) at which the session was last used, in nanoseconds.
     */
    Long lastAccess;
    /**
     * Time (epoch) at which the session was created, in nanoseconds.
     */
    Long start;
    /**
     * Unique identifier (GUID) of the user that started the session.
     */
    String userId;
    /**
     * Username of the user that started the session.
     */
    String username;


    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public static abstract class SessionBuilder> extends AtlanObject.AtlanObjectBuilder {
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private Map clients;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private String id;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private String ipAddress;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private Long lastAccess;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private Long start;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private String userId;
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private String username;

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

        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        private static void $fillValuesFromInstanceIntoBuilder(final Session instance, final Session.SessionBuilder b) {
            b.clients(instance.clients);
            b.id(instance.id);
            b.ipAddress(instance.ipAddress);
            b.lastAccess(instance.lastAccess);
            b.start(instance.start);
            b.userId(instance.userId);
            b.username(instance.username);
        }

        /**
         * Map of clientId (GUIDs) to client names.
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B clients(final Map clients) {
            this.clients = clients;
            return self();
        }

        /**
         * Unique identifier (GUID) for the session.
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B id(final String id) {
            this.id = id;
            return self();
        }

        /**
         * IP address from which the session originated.
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B ipAddress(final String ipAddress) {
            this.ipAddress = ipAddress;
            return self();
        }

        /**
         * Time (epoch) at which the session was last used, in nanoseconds.
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B lastAccess(final Long lastAccess) {
            this.lastAccess = lastAccess;
            return self();
        }

        /**
         * Time (epoch) at which the session was created, in nanoseconds.
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B start(final Long start) {
            this.start = start;
            return self();
        }

        /**
         * Unique identifier (GUID) of the user that started the session.
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B userId(final String userId) {
            this.userId = userId;
            return self();
        }

        /**
         * Username of the user that started the session.
         * @return {@code this}.
         */
        @java.lang.SuppressWarnings("all")
        @lombok.Generated
        public B username(final String username) {
            this.username = username;
            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 "Session.SessionBuilder(super=" + super.toString() + ", clients=" + this.clients + ", id=" + this.id + ", ipAddress=" + this.ipAddress + ", lastAccess=" + this.lastAccess + ", start=" + this.start + ", userId=" + this.userId + ", username=" + this.username + ")";
        }
    }


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

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

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

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    protected Session(final Session.SessionBuilder b) {
        super(b);
        this.clients = b.clients;
        this.id = b.id;
        this.ipAddress = b.ipAddress;
        this.lastAccess = b.lastAccess;
        this.start = b.start;
        this.userId = b.userId;
        this.username = b.username;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public static Session.SessionBuilder builder() {
        return new Session.SessionBuilderImpl();
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Session.SessionBuilder toBuilder() {
        return new Session.SessionBuilderImpl().$fillValuesFrom(this);
    }

    /**
     * Map of clientId (GUIDs) to client names.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Map getClients() {
        return this.clients;
    }

    /**
     * Unique identifier (GUID) for the session.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getId() {
        return this.id;
    }

    /**
     * IP address from which the session originated.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getIpAddress() {
        return this.ipAddress;
    }

    /**
     * Time (epoch) at which the session was last used, in nanoseconds.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Long getLastAccess() {
        return this.lastAccess;
    }

    /**
     * Time (epoch) at which the session was created, in nanoseconds.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Long getStart() {
        return this.start;
    }

    /**
     * Unique identifier (GUID) of the user that started the session.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getUserId() {
        return this.userId;
    }

    /**
     * Username of the user that started the session.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getUsername() {
        return this.username;
    }

    @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 Session)) return false;
        final Session other = (Session) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        if (!super.equals(o)) return false;
        final java.lang.Object this$lastAccess = this.getLastAccess();
        final java.lang.Object other$lastAccess = other.getLastAccess();
        if (this$lastAccess == null ? other$lastAccess != null : !this$lastAccess.equals(other$lastAccess)) return false;
        final java.lang.Object this$start = this.getStart();
        final java.lang.Object other$start = other.getStart();
        if (this$start == null ? other$start != null : !this$start.equals(other$start)) return false;
        final java.lang.Object this$clients = this.getClients();
        final java.lang.Object other$clients = other.getClients();
        if (this$clients == null ? other$clients != null : !this$clients.equals(other$clients)) return false;
        final java.lang.Object this$id = this.getId();
        final java.lang.Object other$id = other.getId();
        if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
        final java.lang.Object this$ipAddress = this.getIpAddress();
        final java.lang.Object other$ipAddress = other.getIpAddress();
        if (this$ipAddress == null ? other$ipAddress != null : !this$ipAddress.equals(other$ipAddress)) return false;
        final java.lang.Object this$userId = this.getUserId();
        final java.lang.Object other$userId = other.getUserId();
        if (this$userId == null ? other$userId != null : !this$userId.equals(other$userId)) return false;
        final java.lang.Object this$username = this.getUsername();
        final java.lang.Object other$username = other.getUsername();
        if (this$username == null ? other$username != null : !this$username.equals(other$username)) return false;
        return true;
    }

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

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public int hashCode() {
        final int PRIME = 59;
        int result = super.hashCode();
        final java.lang.Object $lastAccess = this.getLastAccess();
        result = result * PRIME + ($lastAccess == null ? 43 : $lastAccess.hashCode());
        final java.lang.Object $start = this.getStart();
        result = result * PRIME + ($start == null ? 43 : $start.hashCode());
        final java.lang.Object $clients = this.getClients();
        result = result * PRIME + ($clients == null ? 43 : $clients.hashCode());
        final java.lang.Object $id = this.getId();
        result = result * PRIME + ($id == null ? 43 : $id.hashCode());
        final java.lang.Object $ipAddress = this.getIpAddress();
        result = result * PRIME + ($ipAddress == null ? 43 : $ipAddress.hashCode());
        final java.lang.Object $userId = this.getUserId();
        result = result * PRIME + ($userId == null ? 43 : $userId.hashCode());
        final java.lang.Object $username = this.getUsername();
        result = result * PRIME + ($username == null ? 43 : $username.hashCode());
        return result;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "Session(super=" + super.toString() + ", clients=" + this.getClients() + ", id=" + this.getId() + ", ipAddress=" + this.getIpAddress() + ", lastAccess=" + this.getLastAccess() + ", start=" + this.getStart() + ", userId=" + this.getUserId() + ", username=" + this.getUsername() + ")";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy