//------------------------------------------------------------------------------
// Automatically generated by the Fast Binary Encoding compiler, do not modify!
// https://github.com/chronoxor/FastBinaryEncoding
// Source: test.fbe
// FBE version: 1.15.0.0
//------------------------------------------------------------------------------

package test

import "errors"
import "../fbe"
import "../proto"

// Workaround for Go unused imports issue
var _ = errors.New
var _ = fbe.Version
var _ = proto.Version

// Fast Binary Encoding StructOptional final model
type FinalModelStructOptional struct {
    buffer *fbe.Buffer  // Final model buffer
    offset int          // Final model buffer offset

    *FinalModelStructSimple
    F100 *FinalModelOptionalBool
    F101 *FinalModelOptionalBool
    F102 *FinalModelOptionalBool
    F103 *FinalModelOptionalByte
    F104 *FinalModelOptionalByte
    F105 *FinalModelOptionalByte
    F106 *FinalModelOptionalChar
    F107 *FinalModelOptionalChar
    F108 *FinalModelOptionalChar
    F109 *FinalModelOptionalWChar
    F110 *FinalModelOptionalWChar
    F111 *FinalModelOptionalWChar
    F112 *FinalModelOptionalInt8
    F113 *FinalModelOptionalInt8
    F114 *FinalModelOptionalInt8
    F115 *FinalModelOptionalUInt8
    F116 *FinalModelOptionalUInt8
    F117 *FinalModelOptionalUInt8
    F118 *FinalModelOptionalInt16
    F119 *FinalModelOptionalInt16
    F120 *FinalModelOptionalInt16
    F121 *FinalModelOptionalUInt16
    F122 *FinalModelOptionalUInt16
    F123 *FinalModelOptionalUInt16
    F124 *FinalModelOptionalInt32
    F125 *FinalModelOptionalInt32
    F126 *FinalModelOptionalInt32
    F127 *FinalModelOptionalUInt32
    F128 *FinalModelOptionalUInt32
    F129 *FinalModelOptionalUInt32
    F130 *FinalModelOptionalInt64
    F131 *FinalModelOptionalInt64
    F132 *FinalModelOptionalInt64
    F133 *FinalModelOptionalUInt64
    F134 *FinalModelOptionalUInt64
    F135 *FinalModelOptionalUInt64
    F136 *FinalModelOptionalFloat
    F137 *FinalModelOptionalFloat
    F138 *FinalModelOptionalFloat
    F139 *FinalModelOptionalDouble
    F140 *FinalModelOptionalDouble
    F141 *FinalModelOptionalDouble
    F142 *FinalModelOptionalDecimal
    F143 *FinalModelOptionalDecimal
    F144 *FinalModelOptionalDecimal
    F145 *FinalModelOptionalString
    F146 *FinalModelOptionalString
    F147 *FinalModelOptionalString
    F148 *FinalModelOptionalTimestamp
    F149 *FinalModelOptionalTimestamp
    F150 *FinalModelOptionalTimestamp
    F151 *FinalModelOptionalUUID
    F152 *FinalModelOptionalUUID
    F153 *FinalModelOptionalUUID
    F154 *FinalModelOptionalprotoOrderSide
    F155 *FinalModelOptionalprotoOrderSide
    F156 *FinalModelOptionalprotoOrderType
    F157 *FinalModelOptionalprotoOrderType
    F158 *FinalModelOptionalprotoOrder
    F159 *FinalModelOptionalprotoOrder
    F160 *FinalModelOptionalprotoBalance
    F161 *FinalModelOptionalprotoBalance
    F162 *FinalModelOptionalprotoState
    F163 *FinalModelOptionalprotoState
    F164 *FinalModelOptionalprotoAccount
    F165 *FinalModelOptionalprotoAccount
}

// Create a new StructOptional final model
func NewFinalModelStructOptional(buffer *fbe.Buffer, offset int) *FinalModelStructOptional {
    fbeResult := FinalModelStructOptional{buffer: buffer, offset: offset}
    fbeResult.FinalModelStructSimple = NewFinalModelStructSimple(buffer, 0)
    fbeResult.F100 = NewFinalModelOptionalBool(buffer, 0)
    fbeResult.F101 = NewFinalModelOptionalBool(buffer, 0)
    fbeResult.F102 = NewFinalModelOptionalBool(buffer, 0)
    fbeResult.F103 = NewFinalModelOptionalByte(buffer, 0)
    fbeResult.F104 = NewFinalModelOptionalByte(buffer, 0)
    fbeResult.F105 = NewFinalModelOptionalByte(buffer, 0)
    fbeResult.F106 = NewFinalModelOptionalChar(buffer, 0)
    fbeResult.F107 = NewFinalModelOptionalChar(buffer, 0)
    fbeResult.F108 = NewFinalModelOptionalChar(buffer, 0)
    fbeResult.F109 = NewFinalModelOptionalWChar(buffer, 0)
    fbeResult.F110 = NewFinalModelOptionalWChar(buffer, 0)
    fbeResult.F111 = NewFinalModelOptionalWChar(buffer, 0)
    fbeResult.F112 = NewFinalModelOptionalInt8(buffer, 0)
    fbeResult.F113 = NewFinalModelOptionalInt8(buffer, 0)
    fbeResult.F114 = NewFinalModelOptionalInt8(buffer, 0)
    fbeResult.F115 = NewFinalModelOptionalUInt8(buffer, 0)
    fbeResult.F116 = NewFinalModelOptionalUInt8(buffer, 0)
    fbeResult.F117 = NewFinalModelOptionalUInt8(buffer, 0)
    fbeResult.F118 = NewFinalModelOptionalInt16(buffer, 0)
    fbeResult.F119 = NewFinalModelOptionalInt16(buffer, 0)
    fbeResult.F120 = NewFinalModelOptionalInt16(buffer, 0)
    fbeResult.F121 = NewFinalModelOptionalUInt16(buffer, 0)
    fbeResult.F122 = NewFinalModelOptionalUInt16(buffer, 0)
    fbeResult.F123 = NewFinalModelOptionalUInt16(buffer, 0)
    fbeResult.F124 = NewFinalModelOptionalInt32(buffer, 0)
    fbeResult.F125 = NewFinalModelOptionalInt32(buffer, 0)
    fbeResult.F126 = NewFinalModelOptionalInt32(buffer, 0)
    fbeResult.F127 = NewFinalModelOptionalUInt32(buffer, 0)
    fbeResult.F128 = NewFinalModelOptionalUInt32(buffer, 0)
    fbeResult.F129 = NewFinalModelOptionalUInt32(buffer, 0)
    fbeResult.F130 = NewFinalModelOptionalInt64(buffer, 0)
    fbeResult.F131 = NewFinalModelOptionalInt64(buffer, 0)
    fbeResult.F132 = NewFinalModelOptionalInt64(buffer, 0)
    fbeResult.F133 = NewFinalModelOptionalUInt64(buffer, 0)
    fbeResult.F134 = NewFinalModelOptionalUInt64(buffer, 0)
    fbeResult.F135 = NewFinalModelOptionalUInt64(buffer, 0)
    fbeResult.F136 = NewFinalModelOptionalFloat(buffer, 0)
    fbeResult.F137 = NewFinalModelOptionalFloat(buffer, 0)
    fbeResult.F138 = NewFinalModelOptionalFloat(buffer, 0)
    fbeResult.F139 = NewFinalModelOptionalDouble(buffer, 0)
    fbeResult.F140 = NewFinalModelOptionalDouble(buffer, 0)
    fbeResult.F141 = NewFinalModelOptionalDouble(buffer, 0)
    fbeResult.F142 = NewFinalModelOptionalDecimal(buffer, 0)
    fbeResult.F143 = NewFinalModelOptionalDecimal(buffer, 0)
    fbeResult.F144 = NewFinalModelOptionalDecimal(buffer, 0)
    fbeResult.F145 = NewFinalModelOptionalString(buffer, 0)
    fbeResult.F146 = NewFinalModelOptionalString(buffer, 0)
    fbeResult.F147 = NewFinalModelOptionalString(buffer, 0)
    fbeResult.F148 = NewFinalModelOptionalTimestamp(buffer, 0)
    fbeResult.F149 = NewFinalModelOptionalTimestamp(buffer, 0)
    fbeResult.F150 = NewFinalModelOptionalTimestamp(buffer, 0)
    fbeResult.F151 = NewFinalModelOptionalUUID(buffer, 0)
    fbeResult.F152 = NewFinalModelOptionalUUID(buffer, 0)
    fbeResult.F153 = NewFinalModelOptionalUUID(buffer, 0)
    fbeResult.F154 = NewFinalModelOptionalprotoOrderSide(buffer, 0)
    fbeResult.F155 = NewFinalModelOptionalprotoOrderSide(buffer, 0)
    fbeResult.F156 = NewFinalModelOptionalprotoOrderType(buffer, 0)
    fbeResult.F157 = NewFinalModelOptionalprotoOrderType(buffer, 0)
    fbeResult.F158 = NewFinalModelOptionalprotoOrder(buffer, 0)
    fbeResult.F159 = NewFinalModelOptionalprotoOrder(buffer, 0)
    fbeResult.F160 = NewFinalModelOptionalprotoBalance(buffer, 0)
    fbeResult.F161 = NewFinalModelOptionalprotoBalance(buffer, 0)
    fbeResult.F162 = NewFinalModelOptionalprotoState(buffer, 0)
    fbeResult.F163 = NewFinalModelOptionalprotoState(buffer, 0)
    fbeResult.F164 = NewFinalModelOptionalprotoAccount(buffer, 0)
    fbeResult.F165 = NewFinalModelOptionalprotoAccount(buffer, 0)
    return &fbeResult
}

// Get the allocation size
func (fm *FinalModelStructOptional) FBEAllocationSize(fbeValue *StructOptional) int {
    fbeResult := 0 +
        fm.FinalModelStructSimple.FBEAllocationSize(fbeValue.StructSimple) + 
        fm.F100.FBEAllocationSize(fbeValue.F100) +
        fm.F101.FBEAllocationSize(fbeValue.F101) +
        fm.F102.FBEAllocationSize(fbeValue.F102) +
        fm.F103.FBEAllocationSize(fbeValue.F103) +
        fm.F104.FBEAllocationSize(fbeValue.F104) +
        fm.F105.FBEAllocationSize(fbeValue.F105) +
        fm.F106.FBEAllocationSize(fbeValue.F106) +
        fm.F107.FBEAllocationSize(fbeValue.F107) +
        fm.F108.FBEAllocationSize(fbeValue.F108) +
        fm.F109.FBEAllocationSize(fbeValue.F109) +
        fm.F110.FBEAllocationSize(fbeValue.F110) +
        fm.F111.FBEAllocationSize(fbeValue.F111) +
        fm.F112.FBEAllocationSize(fbeValue.F112) +
        fm.F113.FBEAllocationSize(fbeValue.F113) +
        fm.F114.FBEAllocationSize(fbeValue.F114) +
        fm.F115.FBEAllocationSize(fbeValue.F115) +
        fm.F116.FBEAllocationSize(fbeValue.F116) +
        fm.F117.FBEAllocationSize(fbeValue.F117) +
        fm.F118.FBEAllocationSize(fbeValue.F118) +
        fm.F119.FBEAllocationSize(fbeValue.F119) +
        fm.F120.FBEAllocationSize(fbeValue.F120) +
        fm.F121.FBEAllocationSize(fbeValue.F121) +
        fm.F122.FBEAllocationSize(fbeValue.F122) +
        fm.F123.FBEAllocationSize(fbeValue.F123) +
        fm.F124.FBEAllocationSize(fbeValue.F124) +
        fm.F125.FBEAllocationSize(fbeValue.F125) +
        fm.F126.FBEAllocationSize(fbeValue.F126) +
        fm.F127.FBEAllocationSize(fbeValue.F127) +
        fm.F128.FBEAllocationSize(fbeValue.F128) +
        fm.F129.FBEAllocationSize(fbeValue.F129) +
        fm.F130.FBEAllocationSize(fbeValue.F130) +
        fm.F131.FBEAllocationSize(fbeValue.F131) +
        fm.F132.FBEAllocationSize(fbeValue.F132) +
        fm.F133.FBEAllocationSize(fbeValue.F133) +
        fm.F134.FBEAllocationSize(fbeValue.F134) +
        fm.F135.FBEAllocationSize(fbeValue.F135) +
        fm.F136.FBEAllocationSize(fbeValue.F136) +
        fm.F137.FBEAllocationSize(fbeValue.F137) +
        fm.F138.FBEAllocationSize(fbeValue.F138) +
        fm.F139.FBEAllocationSize(fbeValue.F139) +
        fm.F140.FBEAllocationSize(fbeValue.F140) +
        fm.F141.FBEAllocationSize(fbeValue.F141) +
        fm.F142.FBEAllocationSize(fbeValue.F142) +
        fm.F143.FBEAllocationSize(fbeValue.F143) +
        fm.F144.FBEAllocationSize(fbeValue.F144) +
        fm.F145.FBEAllocationSize(fbeValue.F145) +
        fm.F146.FBEAllocationSize(fbeValue.F146) +
        fm.F147.FBEAllocationSize(fbeValue.F147) +
        fm.F148.FBEAllocationSize(fbeValue.F148) +
        fm.F149.FBEAllocationSize(fbeValue.F149) +
        fm.F150.FBEAllocationSize(fbeValue.F150) +
        fm.F151.FBEAllocationSize(fbeValue.F151) +
        fm.F152.FBEAllocationSize(fbeValue.F152) +
        fm.F153.FBEAllocationSize(fbeValue.F153) +
        fm.F154.FBEAllocationSize(fbeValue.F154) +
        fm.F155.FBEAllocationSize(fbeValue.F155) +
        fm.F156.FBEAllocationSize(fbeValue.F156) +
        fm.F157.FBEAllocationSize(fbeValue.F157) +
        fm.F158.FBEAllocationSize(fbeValue.F158) +
        fm.F159.FBEAllocationSize(fbeValue.F159) +
        fm.F160.FBEAllocationSize(fbeValue.F160) +
        fm.F161.FBEAllocationSize(fbeValue.F161) +
        fm.F162.FBEAllocationSize(fbeValue.F162) +
        fm.F163.FBEAllocationSize(fbeValue.F163) +
        fm.F164.FBEAllocationSize(fbeValue.F164) +
        fm.F165.FBEAllocationSize(fbeValue.F165) +
        0
    return fbeResult
}

// Get the final size
func (fm *FinalModelStructOptional) FBESize() int { return 0 }

// Get the final extra size
func (fm *FinalModelStructOptional) FBEExtra() int { return 0 }

// Get the final type
func (fm *FinalModelStructOptional) FBEType() int { return 111 }

// Get the final offset
func (fm *FinalModelStructOptional) FBEOffset() int { return fm.offset }
// Set the final offset
func (fm *FinalModelStructOptional) SetFBEOffset(value int) { fm.offset = value }

// Shift the current final offset
func (fm *FinalModelStructOptional) FBEShift(size int) { fm.offset += size }
// Unshift the current final offset
func (fm *FinalModelStructOptional) FBEUnshift(size int) { fm.offset -= size }

// Check if the struct value is valid
func (fm *FinalModelStructOptional) Verify() int {
    fm.buffer.Shift(fm.FBEOffset())
    fbeResult := fm.VerifyFields()
    fm.buffer.Unshift(fm.FBEOffset())
    return fbeResult
}

// Check if the struct fields are valid
func (fm *FinalModelStructOptional) VerifyFields() int {
    fbeCurrentOffset := 0
    fbeFieldSize := 0


    fm.FinalModelStructSimple.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.FinalModelStructSimple.VerifyFields(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F100.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F100.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F101.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F101.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F102.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F102.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F103.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F103.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F104.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F104.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F105.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F105.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F106.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F106.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F107.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F107.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F108.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F108.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F109.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F109.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F110.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F110.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F111.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F111.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F112.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F112.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F113.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F113.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F114.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F114.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F115.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F115.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F116.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F116.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F117.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F117.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F118.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F118.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F119.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F119.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F120.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F120.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F121.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F121.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F122.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F122.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F123.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F123.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F124.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F124.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F125.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F125.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F126.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F126.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F127.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F127.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F128.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F128.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F129.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F129.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F130.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F130.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F131.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F131.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F132.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F132.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F133.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F133.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F134.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F134.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F135.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F135.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F136.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F136.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F137.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F137.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F138.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F138.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F139.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F139.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F140.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F140.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F141.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F141.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F142.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F142.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F143.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F143.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F144.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F144.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F145.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F145.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F146.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F146.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F147.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F147.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F148.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F148.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F149.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F149.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F150.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F150.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F151.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F151.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F152.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F152.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F153.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F153.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F154.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F154.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F155.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F155.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F156.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F156.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F157.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F157.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F158.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F158.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F159.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F159.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F160.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F160.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F161.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F161.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F162.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F162.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F163.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F163.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F164.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F164.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    fm.F165.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize = fm.F165.Verify(); fbeFieldSize == fbe.MaxInt {
        return fbe.MaxInt
    }
    fbeCurrentOffset += fbeFieldSize

    return fbeCurrentOffset
}

// Get the struct value
func (fm *FinalModelStructOptional) Get() (*StructOptional, int, error) {
    fbeResult := NewStructOptional()
    fbeSize, err := fm.GetValue(fbeResult)
    return fbeResult, fbeSize, err
}

// Get the struct value by the given pointer
func (fm *FinalModelStructOptional) GetValue(fbeValue *StructOptional) (int, error) {
    fm.buffer.Shift(fm.FBEOffset())
    fbeSize, err := fm.GetFields(fbeValue)
    fm.buffer.Unshift(fm.FBEOffset())
    return fbeSize, err
}

// Get the struct fields values
func (fm *FinalModelStructOptional) GetFields(fbeValue *StructOptional) (int, error) {
    var err error = nil
    fbeCurrentSize := 0
    fbeCurrentOffset := 0
    fbeFieldSize := 0

    fm.FinalModelStructSimple.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.FinalModelStructSimple.GetFields(fbeValue.StructSimple); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F100.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F100, fbeFieldSize, err = fm.F100.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F101.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F101, fbeFieldSize, err = fm.F101.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F102.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F102, fbeFieldSize, err = fm.F102.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F103.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F103, fbeFieldSize, err = fm.F103.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F104.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F104, fbeFieldSize, err = fm.F104.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F105.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F105, fbeFieldSize, err = fm.F105.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F106.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F106, fbeFieldSize, err = fm.F106.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F107.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F107, fbeFieldSize, err = fm.F107.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F108.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F108, fbeFieldSize, err = fm.F108.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F109.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F109, fbeFieldSize, err = fm.F109.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F110.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F110, fbeFieldSize, err = fm.F110.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F111.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F111, fbeFieldSize, err = fm.F111.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F112.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F112, fbeFieldSize, err = fm.F112.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F113.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F113, fbeFieldSize, err = fm.F113.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F114.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F114, fbeFieldSize, err = fm.F114.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F115.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F115, fbeFieldSize, err = fm.F115.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F116.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F116, fbeFieldSize, err = fm.F116.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F117.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F117, fbeFieldSize, err = fm.F117.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F118.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F118, fbeFieldSize, err = fm.F118.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F119.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F119, fbeFieldSize, err = fm.F119.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F120.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F120, fbeFieldSize, err = fm.F120.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F121.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F121, fbeFieldSize, err = fm.F121.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F122.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F122, fbeFieldSize, err = fm.F122.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F123.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F123, fbeFieldSize, err = fm.F123.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F124.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F124, fbeFieldSize, err = fm.F124.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F125.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F125, fbeFieldSize, err = fm.F125.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F126.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F126, fbeFieldSize, err = fm.F126.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F127.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F127, fbeFieldSize, err = fm.F127.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F128.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F128, fbeFieldSize, err = fm.F128.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F129.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F129, fbeFieldSize, err = fm.F129.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F130.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F130, fbeFieldSize, err = fm.F130.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F131.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F131, fbeFieldSize, err = fm.F131.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F132.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F132, fbeFieldSize, err = fm.F132.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F133.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F133, fbeFieldSize, err = fm.F133.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F134.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F134, fbeFieldSize, err = fm.F134.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F135.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F135, fbeFieldSize, err = fm.F135.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F136.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F136, fbeFieldSize, err = fm.F136.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F137.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F137, fbeFieldSize, err = fm.F137.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F138.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F138, fbeFieldSize, err = fm.F138.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F139.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F139, fbeFieldSize, err = fm.F139.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F140.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F140, fbeFieldSize, err = fm.F140.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F141.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F141, fbeFieldSize, err = fm.F141.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F142.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F142, fbeFieldSize, err = fm.F142.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F143.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F143, fbeFieldSize, err = fm.F143.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F144.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F144, fbeFieldSize, err = fm.F144.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F145.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F145, fbeFieldSize, err = fm.F145.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F146.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F146, fbeFieldSize, err = fm.F146.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F147.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F147, fbeFieldSize, err = fm.F147.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F148.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F148, fbeFieldSize, err = fm.F148.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F149.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F149, fbeFieldSize, err = fm.F149.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F150.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F150, fbeFieldSize, err = fm.F150.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F151.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F151, fbeFieldSize, err = fm.F151.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F152.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F152, fbeFieldSize, err = fm.F152.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F153.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F153, fbeFieldSize, err = fm.F153.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F154.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F154, fbeFieldSize, err = fm.F154.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F155.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F155, fbeFieldSize, err = fm.F155.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F156.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F156, fbeFieldSize, err = fm.F156.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F157.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F157, fbeFieldSize, err = fm.F157.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F158.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F158, fbeFieldSize, err = fm.F158.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F159.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F159, fbeFieldSize, err = fm.F159.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F160.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F160, fbeFieldSize, err = fm.F160.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F161.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F161, fbeFieldSize, err = fm.F161.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F162.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F162, fbeFieldSize, err = fm.F162.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F163.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F163, fbeFieldSize, err = fm.F163.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F164.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F164, fbeFieldSize, err = fm.F164.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F165.SetFBEOffset(fbeCurrentOffset)
    if fbeValue.F165, fbeFieldSize, err = fm.F165.Get(); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    return fbeCurrentSize, err
}

// Set the struct value
func (fm *FinalModelStructOptional) Set(fbeValue *StructOptional) (int, error) {
    fm.buffer.Shift(fm.FBEOffset())
    fbeResult, err := fm.SetFields(fbeValue)
    fm.buffer.Unshift(fm.FBEOffset())
    return fbeResult, err
}

// Set the struct fields values
func (fm *FinalModelStructOptional) SetFields(fbeValue *StructOptional) (int, error) {
    var err error = nil
    fbeCurrentSize := 0
    fbeCurrentOffset := 0
    fbeFieldSize := 0

    fm.FinalModelStructSimple.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.FinalModelStructSimple.SetFields(fbeValue.StructSimple); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F100.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F100.Set(fbeValue.F100); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F101.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F101.Set(fbeValue.F101); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F102.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F102.Set(fbeValue.F102); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F103.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F103.Set(fbeValue.F103); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F104.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F104.Set(fbeValue.F104); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F105.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F105.Set(fbeValue.F105); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F106.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F106.Set(fbeValue.F106); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F107.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F107.Set(fbeValue.F107); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F108.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F108.Set(fbeValue.F108); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F109.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F109.Set(fbeValue.F109); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F110.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F110.Set(fbeValue.F110); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F111.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F111.Set(fbeValue.F111); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F112.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F112.Set(fbeValue.F112); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F113.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F113.Set(fbeValue.F113); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F114.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F114.Set(fbeValue.F114); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F115.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F115.Set(fbeValue.F115); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F116.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F116.Set(fbeValue.F116); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F117.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F117.Set(fbeValue.F117); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F118.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F118.Set(fbeValue.F118); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F119.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F119.Set(fbeValue.F119); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F120.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F120.Set(fbeValue.F120); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F121.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F121.Set(fbeValue.F121); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F122.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F122.Set(fbeValue.F122); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F123.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F123.Set(fbeValue.F123); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F124.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F124.Set(fbeValue.F124); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F125.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F125.Set(fbeValue.F125); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F126.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F126.Set(fbeValue.F126); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F127.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F127.Set(fbeValue.F127); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F128.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F128.Set(fbeValue.F128); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F129.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F129.Set(fbeValue.F129); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F130.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F130.Set(fbeValue.F130); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F131.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F131.Set(fbeValue.F131); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F132.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F132.Set(fbeValue.F132); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F133.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F133.Set(fbeValue.F133); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F134.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F134.Set(fbeValue.F134); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F135.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F135.Set(fbeValue.F135); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F136.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F136.Set(fbeValue.F136); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F137.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F137.Set(fbeValue.F137); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F138.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F138.Set(fbeValue.F138); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F139.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F139.Set(fbeValue.F139); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F140.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F140.Set(fbeValue.F140); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F141.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F141.Set(fbeValue.F141); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F142.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F142.Set(fbeValue.F142); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F143.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F143.Set(fbeValue.F143); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F144.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F144.Set(fbeValue.F144); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F145.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F145.Set(fbeValue.F145); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F146.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F146.Set(fbeValue.F146); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F147.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F147.Set(fbeValue.F147); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F148.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F148.Set(fbeValue.F148); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F149.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F149.Set(fbeValue.F149); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F150.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F150.Set(fbeValue.F150); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F151.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F151.Set(fbeValue.F151); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F152.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F152.Set(fbeValue.F152); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F153.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F153.Set(fbeValue.F153); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F154.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F154.Set(fbeValue.F154); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F155.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F155.Set(fbeValue.F155); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F156.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F156.Set(fbeValue.F156); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F157.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F157.Set(fbeValue.F157); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F158.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F158.Set(fbeValue.F158); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F159.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F159.Set(fbeValue.F159); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F160.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F160.Set(fbeValue.F160); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F161.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F161.Set(fbeValue.F161); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F162.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F162.Set(fbeValue.F162); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F163.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F163.Set(fbeValue.F163); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F164.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F164.Set(fbeValue.F164); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    fm.F165.SetFBEOffset(fbeCurrentOffset)
    if fbeFieldSize, err = fm.F165.Set(fbeValue.F165); err != nil {
        return fbeCurrentSize, err
    }
    fbeCurrentOffset += fbeFieldSize
    fbeCurrentSize += fbeFieldSize

    return fbeCurrentSize, err
}
