/*
 * Copyright (C) 2025 Velocity Contributors
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

package cn.hamster3.mc.auth.data;

import com.velocitypowered.api.util.GameProfile;

import java.util.List;

@SuppressWarnings("unused")
public class NeteaseAuthResponse {
    private int code;
    private String message;
    private String details;
    private ResponseEntity entity;

    public NeteaseAuthResponse(int code, String message, String details, ResponseEntity entity) {
        this.code = code;
        this.message = message;
        this.details = details;
        this.entity = entity;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getDetails() {
        return details;
    }

    public void setDetails(String details) {
        this.details = details;
    }

    public ResponseEntity getEntity() {
        return entity;
    }

    public void setEntity(ResponseEntity entity) {
        this.entity = entity;
    }

    public static class ResponseEntity {
        private String id;
        private String name;
        private List<GameProfile.Property> properties;

        public ResponseEntity(String id, String name, List<GameProfile.Property> properties) {
            this.id = id;
            this.name = name;
            this.properties = properties;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public List<GameProfile.Property> getProperties() {
            return properties;
        }

        public void setProperties(List<GameProfile.Property> properties) {
            this.properties = properties;
        }

        @Override
        public String toString() {
            return "ResponseEntity{" +
                    "id='" + id + '\'' +
                    ", name='" + name + '\'' +
                    ", properties=" + properties +
                    '}';
        }
    }

    @Override
    public String toString() {
        return "NeteaseAuthResponse{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", details='" + details + '\'' +
                ", entity=" + entity +
                '}';
    }
}