// 
// Decompiled by Procyon v0.6.0
// 

package io.sentry.protocol;

import java.util.HashMap;
import io.sentry.vendor.gson.stream.JsonToken;
import io.sentry.ObjectReader;
import io.sentry.JsonDeserializer;
import java.io.IOException;
import java.util.Iterator;
import io.sentry.ILogger;
import org.jetbrains.annotations.NotNull;
import io.sentry.ObjectWriter;
import java.util.Map;
import org.jetbrains.annotations.Nullable;
import io.sentry.JsonSerializable;
import io.sentry.JsonUnknown;

public final class DebugImage implements JsonUnknown, JsonSerializable
{
    public static final String PROGUARD = "proguard";
    public static final String JVM = "jvm";
    @Nullable
    private String uuid;
    @Nullable
    private String type;
    @Nullable
    private String debugId;
    @Nullable
    private String debugFile;
    @Nullable
    private String codeId;
    @Nullable
    private String codeFile;
    @Nullable
    private String imageAddr;
    @Nullable
    private Long imageSize;
    @Nullable
    private String arch;
    @Nullable
    private Map<String, Object> unknown;
    
    @Nullable
    public String getUuid() {
        return this.uuid;
    }
    
    public void setUuid(@Nullable final String uuid) {
        this.uuid = uuid;
    }
    
    @Nullable
    public String getType() {
        return this.type;
    }
    
    public void setType(@Nullable final String type) {
        this.type = type;
    }
    
    @Nullable
    public String getDebugId() {
        return this.debugId;
    }
    
    public void setDebugId(@Nullable final String debugId) {
        this.debugId = debugId;
    }
    
    @Nullable
    public String getDebugFile() {
        return this.debugFile;
    }
    
    public void setDebugFile(@Nullable final String debugFile) {
        this.debugFile = debugFile;
    }
    
    @Nullable
    public String getCodeFile() {
        return this.codeFile;
    }
    
    public void setCodeFile(@Nullable final String codeFile) {
        this.codeFile = codeFile;
    }
    
    @Nullable
    public String getImageAddr() {
        return this.imageAddr;
    }
    
    public void setImageAddr(@Nullable final String imageAddr) {
        this.imageAddr = imageAddr;
    }
    
    @Nullable
    public Long getImageSize() {
        return this.imageSize;
    }
    
    public void setImageSize(@Nullable final Long imageSize) {
        this.imageSize = imageSize;
    }
    
    public void setImageSize(final long imageSize) {
        this.imageSize = imageSize;
    }
    
    @Nullable
    public String getArch() {
        return this.arch;
    }
    
    public void setArch(@Nullable final String arch) {
        this.arch = arch;
    }
    
    @Nullable
    public String getCodeId() {
        return this.codeId;
    }
    
    public void setCodeId(@Nullable final String codeId) {
        this.codeId = codeId;
    }
    
    @Nullable
    @Override
    public Map<String, Object> getUnknown() {
        return this.unknown;
    }
    
    @Override
    public void setUnknown(@Nullable final Map<String, Object> unknown) {
        this.unknown = unknown;
    }
    
    @Override
    public void serialize(@NotNull final ObjectWriter writer, @NotNull final ILogger logger) throws IOException {
        writer.beginObject();
        if (this.uuid != null) {
            writer.name("uuid").value(this.uuid);
        }
        if (this.type != null) {
            writer.name("type").value(this.type);
        }
        if (this.debugId != null) {
            writer.name("debug_id").value(this.debugId);
        }
        if (this.debugFile != null) {
            writer.name("debug_file").value(this.debugFile);
        }
        if (this.codeId != null) {
            writer.name("code_id").value(this.codeId);
        }
        if (this.codeFile != null) {
            writer.name("code_file").value(this.codeFile);
        }
        if (this.imageAddr != null) {
            writer.name("image_addr").value(this.imageAddr);
        }
        if (this.imageSize != null) {
            writer.name("image_size").value(this.imageSize);
        }
        if (this.arch != null) {
            writer.name("arch").value(this.arch);
        }
        if (this.unknown != null) {
            for (final String key : this.unknown.keySet()) {
                final Object value = this.unknown.get(key);
                writer.name(key).value(logger, value);
            }
        }
        writer.endObject();
    }
    
    public static final class JsonKeys
    {
        public static final String UUID = "uuid";
        public static final String TYPE = "type";
        public static final String DEBUG_ID = "debug_id";
        public static final String DEBUG_FILE = "debug_file";
        public static final String CODE_ID = "code_id";
        public static final String CODE_FILE = "code_file";
        public static final String IMAGE_ADDR = "image_addr";
        public static final String IMAGE_SIZE = "image_size";
        public static final String ARCH = "arch";
    }
    
    public static final class Deserializer implements JsonDeserializer<DebugImage>
    {
        @NotNull
        @Override
        public DebugImage deserialize(@NotNull final ObjectReader reader, @NotNull final ILogger logger) throws Exception {
            final DebugImage debugImage = new DebugImage();
            Map<String, Object> unknown = null;
            reader.beginObject();
            while (reader.peek() == JsonToken.NAME) {
                final String nextName2;
                final String nextName = nextName2 = reader.nextName();
                switch (nextName2) {
                    case "uuid": {
                        debugImage.uuid = reader.nextStringOrNull();
                        continue;
                    }
                    case "type": {
                        debugImage.type = reader.nextStringOrNull();
                        continue;
                    }
                    case "debug_id": {
                        debugImage.debugId = reader.nextStringOrNull();
                        continue;
                    }
                    case "debug_file": {
                        debugImage.debugFile = reader.nextStringOrNull();
                        continue;
                    }
                    case "code_id": {
                        debugImage.codeId = reader.nextStringOrNull();
                        continue;
                    }
                    case "code_file": {
                        debugImage.codeFile = reader.nextStringOrNull();
                        continue;
                    }
                    case "image_addr": {
                        debugImage.imageAddr = reader.nextStringOrNull();
                        continue;
                    }
                    case "image_size": {
                        debugImage.imageSize = reader.nextLongOrNull();
                        continue;
                    }
                    case "arch": {
                        debugImage.arch = reader.nextStringOrNull();
                        continue;
                    }
                    default: {
                        if (unknown == null) {
                            unknown = new HashMap<String, Object>();
                        }
                        reader.nextUnknown(logger, unknown, nextName);
                        continue;
                    }
                }
            }
            reader.endObject();
            debugImage.setUnknown(unknown);
            return debugImage;
        }
    }
}
