|
|
@@ -33,6 +33,9 @@ const (
|
|
|
)
|
|
|
|
|
|
const (
|
|
|
+ // AssetsCodecVersion is used for any resources listed in the Assets version set
|
|
|
+ AssetsCodecVersion uint8 = 17
|
|
|
+
|
|
|
// AllocationCodecVersion is used for any resources listed in the Allocation version set
|
|
|
AllocationCodecVersion uint8 = 15
|
|
|
|
|
|
@@ -41,9 +44,6 @@ const (
|
|
|
|
|
|
// DefaultCodecVersion is used for any resources listed in the Default version set
|
|
|
DefaultCodecVersion uint8 = 15
|
|
|
-
|
|
|
- // AssetsCodecVersion is used for any resources listed in the Assets version set
|
|
|
- AssetsCodecVersion uint8 = 17
|
|
|
)
|
|
|
|
|
|
//--------------------------------------------------------------------------
|
|
|
@@ -4887,14 +4887,14 @@ func (target *Disk) MarshalBinaryWithContext(ctx *EncodingContext) (err error) {
|
|
|
buff.WriteUInt8(AssetsCodecVersion) // version
|
|
|
|
|
|
// --- [begin][write][alias](AssetLabels) ---
|
|
|
- if map[string]string(target.labels) == nil {
|
|
|
+ if map[string]string(target.Labels) == nil {
|
|
|
buff.WriteUInt8(uint8(0)) // write nil byte
|
|
|
} else {
|
|
|
buff.WriteUInt8(uint8(1)) // write non-nil byte
|
|
|
|
|
|
// --- [begin][write][map](map[string]string) ---
|
|
|
- buff.WriteInt(len(map[string]string(target.labels))) // map length
|
|
|
- for v, z := range map[string]string(target.labels) {
|
|
|
+ buff.WriteInt(len(map[string]string(target.Labels))) // map length
|
|
|
+ for v, z := range map[string]string(target.Labels) {
|
|
|
if ctx.IsStringTable() {
|
|
|
a := ctx.Table.AddOrGet(v)
|
|
|
buff.WriteInt(a) // write table index
|
|
|
@@ -4913,14 +4913,14 @@ func (target *Disk) MarshalBinaryWithContext(ctx *EncodingContext) (err error) {
|
|
|
}
|
|
|
// --- [end][write][alias](AssetLabels) ---
|
|
|
|
|
|
- if target.properties == nil {
|
|
|
+ if target.Properties == nil {
|
|
|
buff.WriteUInt8(uint8(0)) // write nil byte
|
|
|
} else {
|
|
|
buff.WriteUInt8(uint8(1)) // write non-nil byte
|
|
|
|
|
|
// --- [begin][write][struct](AssetProperties) ---
|
|
|
buff.WriteInt(0) // [compatibility, unused]
|
|
|
- errA := target.properties.MarshalBinaryWithContext(ctx)
|
|
|
+ errA := target.Properties.MarshalBinaryWithContext(ctx)
|
|
|
if errA != nil {
|
|
|
return errA
|
|
|
}
|
|
|
@@ -4928,7 +4928,7 @@ func (target *Disk) MarshalBinaryWithContext(ctx *EncodingContext) (err error) {
|
|
|
|
|
|
}
|
|
|
// --- [begin][write][reference](time.Time) ---
|
|
|
- c, errB := target.start.MarshalBinary()
|
|
|
+ c, errB := target.Start.MarshalBinary()
|
|
|
if errB != nil {
|
|
|
return errB
|
|
|
}
|
|
|
@@ -4937,7 +4937,7 @@ func (target *Disk) MarshalBinaryWithContext(ctx *EncodingContext) (err error) {
|
|
|
// --- [end][write][reference](time.Time) ---
|
|
|
|
|
|
// --- [begin][write][reference](time.Time) ---
|
|
|
- d, errC := target.end.MarshalBinary()
|
|
|
+ d, errC := target.End.MarshalBinary()
|
|
|
if errC != nil {
|
|
|
return errC
|
|
|
}
|
|
|
@@ -4947,13 +4947,13 @@ func (target *Disk) MarshalBinaryWithContext(ctx *EncodingContext) (err error) {
|
|
|
|
|
|
// --- [begin][write][struct](Window) ---
|
|
|
buff.WriteInt(0) // [compatibility, unused]
|
|
|
- errD := target.window.MarshalBinaryWithContext(ctx)
|
|
|
+ errD := target.Window.MarshalBinaryWithContext(ctx)
|
|
|
if errD != nil {
|
|
|
return errD
|
|
|
}
|
|
|
// --- [end][write][struct](Window) ---
|
|
|
|
|
|
- buff.WriteFloat64(target.adjustment) // write float64
|
|
|
+ buff.WriteFloat64(target.Adjustment) // write float64
|
|
|
buff.WriteFloat64(target.Cost) // write float64
|
|
|
buff.WriteFloat64(target.ByteHours) // write float64
|
|
|
buff.WriteFloat64(target.Local) // write float64
|
|
|
@@ -5071,11 +5071,11 @@ func (target *Disk) UnmarshalBinaryWithContext(ctx *DecodingContext) (err error)
|
|
|
// --- [end][read][map](map[string]string) ---
|
|
|
|
|
|
}
|
|
|
- target.labels = AssetLabels(a)
|
|
|
+ target.Labels = AssetLabels(a)
|
|
|
// --- [end][read][alias](AssetLabels) ---
|
|
|
|
|
|
if buff.ReadUInt8() == uint8(0) {
|
|
|
- target.properties = nil
|
|
|
+ target.Properties = nil
|
|
|
} else {
|
|
|
// --- [begin][read][struct](AssetProperties) ---
|
|
|
l := &AssetProperties{}
|
|
|
@@ -5084,7 +5084,7 @@ func (target *Disk) UnmarshalBinaryWithContext(ctx *DecodingContext) (err error)
|
|
|
if errA != nil {
|
|
|
return errA
|
|
|
}
|
|
|
- target.properties = l
|
|
|
+ target.Properties = l
|
|
|
// --- [end][read][struct](AssetProperties) ---
|
|
|
|
|
|
}
|
|
|
@@ -5096,7 +5096,7 @@ func (target *Disk) UnmarshalBinaryWithContext(ctx *DecodingContext) (err error)
|
|
|
if errB != nil {
|
|
|
return errB
|
|
|
}
|
|
|
- target.start = *m
|
|
|
+ target.Start = *m
|
|
|
// --- [end][read][reference](time.Time) ---
|
|
|
|
|
|
// --- [begin][read][reference](time.Time) ---
|
|
|
@@ -5107,7 +5107,7 @@ func (target *Disk) UnmarshalBinaryWithContext(ctx *DecodingContext) (err error)
|
|
|
if errC != nil {
|
|
|
return errC
|
|
|
}
|
|
|
- target.end = *p
|
|
|
+ target.End = *p
|
|
|
// --- [end][read][reference](time.Time) ---
|
|
|
|
|
|
// --- [begin][read][struct](Window) ---
|
|
|
@@ -5117,11 +5117,11 @@ func (target *Disk) UnmarshalBinaryWithContext(ctx *DecodingContext) (err error)
|
|
|
if errD != nil {
|
|
|
return errD
|
|
|
}
|
|
|
- target.window = *s
|
|
|
+ target.Window = *s
|
|
|
// --- [end][read][struct](Window) ---
|
|
|
|
|
|
t := buff.ReadFloat64() // read float64
|
|
|
- target.adjustment = t
|
|
|
+ target.Adjustment = t
|
|
|
|
|
|
u := buff.ReadFloat64() // read float64
|
|
|
target.Cost = u
|