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

com.github.seratch.jslack.api.model.User Maven / Gradle / Ivy

The newest version!
package com.github.seratch.jslack.api.model;

import com.google.gson.annotations.SerializedName;
import lombok.Data;

import java.util.List;
import java.util.Map;

/**
 * - https://api.slack.com/types/user
 * - https://api.slack.com/changelog/2017-09-the-one-about-usernames
 */
@Data
public class User {

    private String id;
    private String teamId;
    private String name;
    private boolean deleted;
    private String color;
    private String realName;
    private String tz;
    private String tzLabel;
    private Integer tzOffset;
    private Profile profile;
    @SerializedName("is_admin")
    private boolean admin;
    @SerializedName("is_owner")
    private boolean owner;
    @SerializedName("is_primary_owner")
    private boolean primaryOwner;
    /**
     * is_restricted indicates the user is a multi-channel guest.
     * see also: https://get.slack.help/hc/en-us/articles/201314026-roles-and-permissions-in-slack
     */
    @SerializedName("is_restricted")
    private boolean restricted;
    /**
     * is_ultra_restricted indicates they are a single channel guest.
     * see also: https://get.slack.help/hc/en-us/articles/201314026-roles-and-permissions-in-slack
     */
    @SerializedName("is_ultra_restricted")
    private boolean ultraRestricted;
    @SerializedName("is_bot")
    private boolean bot;
    @SerializedName("is_stranger")
    private boolean stranger;
    @SerializedName("is_app_user")
    private boolean appUser;
    private Long updated;
    @SerializedName("has_2fa")
    private boolean has2fa;
    private String presence; // away, etc
    private EnterpriseUser enterpriseUser;
    private String twoFactorType;
    private boolean hasFiles;
    private String locale;
    @SerializedName("is_workflow_bot")
    private boolean workflowBot;


    @Data
    public static class Profile {

        private String guestChannels;
        private String guestInvitedBy;
        private Long guestExpirationTs;
        private String avatarHash;
        private String statusText;
        private String statusTextCanonical;
        private String statusEmoji;
        private Long statusExpiration;

        private String displayName;
        private String displayNameNormalized;
        private String realName;
        private String realNameNormalized;
        private String botId;

        private String title;
        private String email;
        private String skype;
        private String phone;
        private String team;

        private String apiAppId;
        private boolean alwaysActive;

        private String imageOriginal;

        @SerializedName("image_24")
        private String image24;
        @SerializedName("image_32")
        private String image32;
        @SerializedName("image_48")
        private String image48;
        @SerializedName("image_72")
        private String image72;
        @SerializedName("image_192")
        private String image192;
        @SerializedName("image_512")
        private String image512;
        @SerializedName("image_1024")
        private String image1024;

        @SerializedName("is_custom_image")
        private boolean customImage;

        private Map fields;

        @Data
        public static class Field {
            private String value;
            private String alt;
            private String label;
        }

        @Deprecated
        private String firstName;
        @Deprecated
        private String lastName;
    }

    @Data
    public static class EnterpriseUser {
        private String id;
        private String enterpriseId;
        private String enterpriseName;
        @SerializedName("is_admin")
        private boolean isAdmin;
        @SerializedName("is_owner")
        private boolean isOwner;
        private List teams;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy