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

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.List;

/**
 * @author chenrj
 * @email 1412736935@qq.com
 * @since 2021/7/29
 */

public class S2iBuildersResponse extends KubeSphereResponse implements Serializable {
    @SerializedName("apiVersion")
    private String apiVersion;
    @SerializedName("kind")
    private String kind;
    @SerializedName("metadata")
    private MetadataDTO metadata;
    @SerializedName("spec")
    private SpecDTO spec;

    public String getApiVersion() {
        return apiVersion;
    }

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

    public String getKind() {
        return kind;
    }

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

    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 static class MetadataDTO {
        @SerializedName("annotations")
        private AnnotationsDTO annotations;
        @SerializedName("creationTimestamp")
        private String creationTimestamp;
        @SerializedName("generation")
        private int generation;
        @SerializedName("labels")
        private LabelsDTO labels;
        @SerializedName("name")
        private String name;
        @SerializedName("namespace")
        private String namespace;
        @SerializedName("resourceVersion")
        private String resourceVersion;
        @SerializedName("uid")
        private String uid;
        @SerializedName("managedFields")
        private List<ManagedFieldsDTO> managedFields;

        public AnnotationsDTO getAnnotations() {
            return annotations;
        }

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

        public String getCreationTimestamp() {
            return creationTimestamp;
        }

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

        public int getGeneration() {
            return generation;
        }

        public void setGeneration(int generation) {
            this.generation = generation;
        }

        public LabelsDTO getLabels() {
            return labels;
        }

        public void setLabels(LabelsDTO labels) {
            this.labels = labels;
        }

        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 getResourceVersion() {
            return resourceVersion;
        }

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

        public String getUid() {
            return uid;
        }

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

        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 _$KubesphereIoCreator208; // FIXME check this code
            @SerializedName("kubesphere.io/file")
            private String _$KubesphereIoFile325; // FIXME check this code
            @SerializedName("kubesphere.io/repoUrl")
            private String _$KubesphereIoRepoUrl149; // FIXME check this code
            @SerializedName("languageType")
            private String languageType;

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

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

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

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

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

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

            public String getLanguageType() {
                return languageType;
            }

            public void setLanguageType(String languageType) {
                this.languageType = languageType;
            }
        }

        public static class LabelsDTO {
            @SerializedName("controller-tools.k8s.io")
            private String _$ControllertoolsK8sIo14; // FIXME check this code
            @SerializedName("s2i-type.kubesphere.io")
            private String _$S2itypeKubesphereIo196; // FIXME check this code

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

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

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

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

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

            public String getApiVersion() {
                return apiVersion;
            }

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

            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 getTime() {
                return time;
            }

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

    public static class SpecDTO {
        @SerializedName("config")
        private ConfigDTO config;

        public ConfigDTO getConfig() {
            return config;
        }

        public void setConfig(ConfigDTO config) {
            this.config = config;
        }

        public static class ConfigDTO {
            @SerializedName("builderImage")
            private String builderImage;
            @SerializedName("builderPullPolicy")
            private String builderPullPolicy;
            @SerializedName("export")
            private boolean export;
            @SerializedName("imageName")
            private String imageName;
            @SerializedName("isBinaryURL")
            private boolean isBinaryURL;
            @SerializedName("outputBuildResult")
            private boolean outputBuildResult;
            @SerializedName("pushAuthentication")
            private PushAuthenticationDTO pushAuthentication;
            @SerializedName("revisionId")
            private String revisionId;
            @SerializedName("runtimeImage")
            private String runtimeImage;
            @SerializedName("sourceUrl")
            private String sourceUrl;
            @SerializedName("tag")
            private String tag;
            @SerializedName("buildVolumes")
            private List<String> buildVolumes;
            @SerializedName("runtimeArtifacts")
            private List<RuntimeArtifactsDTO> runtimeArtifacts;

            public String getBuilderImage() {
                return builderImage;
            }

            public void setBuilderImage(String builderImage) {
                this.builderImage = builderImage;
            }

            public String getBuilderPullPolicy() {
                return builderPullPolicy;
            }

            public void setBuilderPullPolicy(String builderPullPolicy) {
                this.builderPullPolicy = builderPullPolicy;
            }

            public boolean isExport() {
                return export;
            }

            public void setExport(boolean export) {
                this.export = export;
            }

            public String getImageName() {
                return imageName;
            }

            public void setImageName(String imageName) {
                this.imageName = imageName;
            }

            public boolean isIsBinaryURL() {
                return isBinaryURL;
            }

            public void setIsBinaryURL(boolean isBinaryURL) {
                this.isBinaryURL = isBinaryURL;
            }

            public boolean isOutputBuildResult() {
                return outputBuildResult;
            }

            public void setOutputBuildResult(boolean outputBuildResult) {
                this.outputBuildResult = outputBuildResult;
            }

            public PushAuthenticationDTO getPushAuthentication() {
                return pushAuthentication;
            }

            public void setPushAuthentication(PushAuthenticationDTO pushAuthentication) {
                this.pushAuthentication = pushAuthentication;
            }

            public String getRevisionId() {
                return revisionId;
            }

            public void setRevisionId(String revisionId) {
                this.revisionId = revisionId;
            }

            public String getRuntimeImage() {
                return runtimeImage;
            }

            public void setRuntimeImage(String runtimeImage) {
                this.runtimeImage = runtimeImage;
            }

            public String getSourceUrl() {
                return sourceUrl;
            }

            public void setSourceUrl(String sourceUrl) {
                this.sourceUrl = sourceUrl;
            }

            public String getTag() {
                return tag;
            }

            public void setTag(String tag) {
                this.tag = tag;
            }

            public List<String> getBuildVolumes() {
                return buildVolumes;
            }

            public void setBuildVolumes(List<String> buildVolumes) {
                this.buildVolumes = buildVolumes;
            }

            public List<RuntimeArtifactsDTO> getRuntimeArtifacts() {
                return runtimeArtifacts;
            }

            public void setRuntimeArtifacts(List<RuntimeArtifactsDTO> runtimeArtifacts) {
                this.runtimeArtifacts = runtimeArtifacts;
            }

            public static class PushAuthenticationDTO {
                @SerializedName("secretRef")
                private SecretRefDTO secretRef;

                public SecretRefDTO getSecretRef() {
                    return secretRef;
                }

                public void setSecretRef(SecretRefDTO secretRef) {
                    this.secretRef = secretRef;
                }

                public static class SecretRefDTO {
                    @SerializedName("name")
                    private String name;

                    public String getName() {
                        return name;
                    }

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

            public static class RuntimeArtifactsDTO {
                @SerializedName("source")
                private String source;

                public String getSource() {
                    return source;
                }

                public void setSource(String source) {
                    this.source = source;
                }
            }
        }
    }
}
