package io.renren.modules.kubesphere.module.response;

import com.google.gson.annotations.SerializedName;

import java.util.List;

/**
 * @author chenrj
 * @email 1412736935@qq.com
 * @since 2021/8/10
 */
public class CreateStoreVolumesResponse extends KubeSphereResponse {
    @SerializedName("kind")
    private String kind;
    @SerializedName("apiVersion")
    private String apiVersion;
    @SerializedName("metadata")
    private MetadataDTO metadata;
    @SerializedName("spec")
    private SpecDTO spec;
    @SerializedName("status")
    private StatusDTO status;

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    public String getApiVersion() {
        return apiVersion;
    }

    public void setApiVersion(String apiVersion) {
        this.apiVersion = apiVersion;
    }

    public MetadataDTO getMetadata() {
        return metadata;
    }

    public void setMetadata(MetadataDTO metadata) {
        this.metadata = metadata;
    }

    public SpecDTO getSpec() {
        return spec;
    }

    public void setSpec(SpecDTO spec) {
        this.spec = spec;
    }

    public StatusDTO getStatus() {
        return status;
    }

    public void setStatus(StatusDTO status) {
        this.status = status;
    }

    public static class MetadataDTO {
        @SerializedName("name")
        private String name;
        @SerializedName("namespace")
        private String namespace;
        @SerializedName("uid")
        private String uid;
        @SerializedName("resourceVersion")
        private String resourceVersion;
        @SerializedName("creationTimestamp")
        private String creationTimestamp;
        @SerializedName("annotations")
        private AnnotationsDTO annotations;
        @SerializedName("finalizers")
        private List<String> finalizers;
        @SerializedName("managedFields")
        private List<ManagedFieldsDTO> managedFields;

        public String getName() {
            return name;
        }

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

        public String getNamespace() {
            return namespace;
        }

        public void setNamespace(String namespace) {
            this.namespace = namespace;
        }

        public String getUid() {
            return uid;
        }

        public void setUid(String uid) {
            this.uid = uid;
        }

        public String getResourceVersion() {
            return resourceVersion;
        }

        public void setResourceVersion(String resourceVersion) {
            this.resourceVersion = resourceVersion;
        }

        public String getCreationTimestamp() {
            return creationTimestamp;
        }

        public void setCreationTimestamp(String creationTimestamp) {
            this.creationTimestamp = creationTimestamp;
        }

        public AnnotationsDTO getAnnotations() {
            return annotations;
        }

        public void setAnnotations(AnnotationsDTO annotations) {
            this.annotations = annotations;
        }

        public List<String> getFinalizers() {
            return finalizers;
        }

        public void setFinalizers(List<String> finalizers) {
            this.finalizers = finalizers;
        }

        public List<ManagedFieldsDTO> getManagedFields() {
            return managedFields;
        }

        public void setManagedFields(List<ManagedFieldsDTO> managedFields) {
            this.managedFields = managedFields;
        }

        public static class AnnotationsDTO {
            @SerializedName("kubesphere.io/creator")
            private String _$KubesphereIoCreator66; // FIXME check this code

            public String get_$KubesphereIoCreator66() {
                return _$KubesphereIoCreator66;
            }

            public void set_$KubesphereIoCreator66(String _$KubesphereIoCreator66) {
                this._$KubesphereIoCreator66 = _$KubesphereIoCreator66;
            }
        }

        public static class ManagedFieldsDTO {
            @SerializedName("manager")
            private String manager;
            @SerializedName("operation")
            private String operation;
            @SerializedName("apiVersion")
            private String apiVersion;
            @SerializedName("time")
            private String time;

            public String getManager() {
                return manager;
            }

            public void setManager(String manager) {
                this.manager = manager;
            }

            public String getOperation() {
                return operation;
            }

            public void setOperation(String operation) {
                this.operation = operation;
            }

            public String getApiVersion() {
                return apiVersion;
            }

            public void setApiVersion(String apiVersion) {
                this.apiVersion = apiVersion;
            }

            public String getTime() {
                return time;
            }

            public void setTime(String time) {
                this.time = time;
            }
        }
    }

    public static class SpecDTO {
        @SerializedName("resources")
        private ResourcesDTO resources;
        @SerializedName("storageClassName")
        private String storageClassName;
        @SerializedName("volumeMode")
        private String volumeMode;
        @SerializedName("accessModes")
        private List<String> accessModes;

        public ResourcesDTO getResources() {
            return resources;
        }

        public void setResources(ResourcesDTO resources) {
            this.resources = resources;
        }

        public String getStorageClassName() {
            return storageClassName;
        }

        public void setStorageClassName(String storageClassName) {
            this.storageClassName = storageClassName;
        }

        public String getVolumeMode() {
            return volumeMode;
        }

        public void setVolumeMode(String volumeMode) {
            this.volumeMode = volumeMode;
        }

        public List<String> getAccessModes() {
            return accessModes;
        }

        public void setAccessModes(List<String> accessModes) {
            this.accessModes = accessModes;
        }

        public static class ResourcesDTO {
            @SerializedName("requests")
            private RequestsDTO requests;

            public RequestsDTO getRequests() {
                return requests;
            }

            public void setRequests(RequestsDTO requests) {
                this.requests = requests;
            }

            public static class RequestsDTO {
                @SerializedName("storage")
                private String storage;

                public String getStorage() {
                    return storage;
                }

                public void setStorage(String storage) {
                    this.storage = storage;
                }
            }
        }
    }

    public static class StatusDTO {
        @SerializedName("phase")
        private String phase;

        public String getPhase() {
            return phase;
        }

        public void setPhase(String phase) {
            this.phase = phase;
        }
    }
}
