"""Schema for Back Blaze S.M.A.R.T. data from 2015.
"""
from pyspark.sql.types import StructType


_json_schema = {
    "fields": [{"metadata": {}, "name": "date", "nullable": True, "type": "date"},
               {"metadata": {}, "name": "serial_number", "nullable": True, "type": "string"},
               {"metadata": {}, "name": "model", "nullable": True, "type": "string"},
               {"metadata": {}, "name": "capacity_bytes", "nullable": True, "type": "long"},
               {"metadata": {}, "name": "failure", "nullable": True, "type": "integer"},
               {"metadata": {}, "name": "smart_1_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_1_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_2_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_2_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_3_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_3_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_4_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_4_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_5_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_5_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_7_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_7_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_8_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_8_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_9_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_9_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_10_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_10_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_11_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_11_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_12_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_12_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_13_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_13_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_15_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_15_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_22_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_22_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_183_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_183_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_184_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_184_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_187_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_187_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_188_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_188_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_189_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_189_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_190_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_190_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_191_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_191_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_192_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_192_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_193_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_193_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_194_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_194_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_195_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_195_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_196_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_196_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_197_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_197_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_198_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_198_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_199_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_199_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_200_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_200_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_201_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_201_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_220_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_220_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_222_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_222_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_223_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_223_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_224_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_224_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_225_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_225_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_226_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_226_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_240_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_240_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_241_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_241_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_242_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_242_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_250_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_250_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_251_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_251_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_252_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_252_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_254_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_254_raw", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_255_normalized", "nullable": True, "type": "double"},
               {"metadata": {}, "name": "smart_255_raw", "nullable": True, "type": "double"}],
    "type": "struct"
}

schema = StructType.fromJson(_json_schema)
