| // Copyright 2015 The Vanadium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| |
| // This file was auto-generated by the vanadium vdl tool. |
| // Source: perf_test.vdl |
| |
| package internal |
| |
| import ( |
| // VDL system imports |
| "fmt" |
| "v.io/v23/vdl" |
| ) |
| |
| type AddressInfo struct { |
| Street string |
| City string |
| State string |
| Zip string |
| } |
| |
| func (AddressInfo) __VDLReflect(struct { |
| Name string `vdl:"src/v.io/x/mojo/transcoder/internal.AddressInfo"` |
| }) { |
| } |
| |
| func (m *AddressInfo) FillVDLTarget(t vdl.Target, tt *vdl.Type) error { |
| |
| if __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_AddressInfo == nil || __VDLTypeperf_test0 == nil { |
| panic("Initialization order error: types generated for FillVDLTarget not initialized. Consider moving caller to an init() block.") |
| } |
| fieldsTarget1, err := t.StartFields(tt) |
| if err != nil { |
| return err |
| } |
| |
| var2 := (m.Street == "") |
| if !var2 { |
| keyTarget3, fieldTarget4, err := fieldsTarget1.StartField("Street") |
| if err != vdl.ErrFieldNoExist && err != nil { |
| return err |
| } |
| if err != vdl.ErrFieldNoExist { |
| if err := fieldTarget4.FromString(string(m.Street), vdl.StringType); err != nil { |
| return err |
| } |
| if err := fieldsTarget1.FinishField(keyTarget3, fieldTarget4); err != nil { |
| return err |
| } |
| } |
| } |
| var5 := (m.City == "") |
| if !var5 { |
| keyTarget6, fieldTarget7, err := fieldsTarget1.StartField("City") |
| if err != vdl.ErrFieldNoExist && err != nil { |
| return err |
| } |
| if err != vdl.ErrFieldNoExist { |
| if err := fieldTarget7.FromString(string(m.City), vdl.StringType); err != nil { |
| return err |
| } |
| if err := fieldsTarget1.FinishField(keyTarget6, fieldTarget7); err != nil { |
| return err |
| } |
| } |
| } |
| var8 := (m.State == "") |
| if !var8 { |
| keyTarget9, fieldTarget10, err := fieldsTarget1.StartField("State") |
| if err != vdl.ErrFieldNoExist && err != nil { |
| return err |
| } |
| if err != vdl.ErrFieldNoExist { |
| if err := fieldTarget10.FromString(string(m.State), vdl.StringType); err != nil { |
| return err |
| } |
| if err := fieldsTarget1.FinishField(keyTarget9, fieldTarget10); err != nil { |
| return err |
| } |
| } |
| } |
| var11 := (m.Zip == "") |
| if !var11 { |
| keyTarget12, fieldTarget13, err := fieldsTarget1.StartField("Zip") |
| if err != vdl.ErrFieldNoExist && err != nil { |
| return err |
| } |
| if err != vdl.ErrFieldNoExist { |
| if err := fieldTarget13.FromString(string(m.Zip), vdl.StringType); err != nil { |
| return err |
| } |
| if err := fieldsTarget1.FinishField(keyTarget12, fieldTarget13); err != nil { |
| return err |
| } |
| } |
| } |
| if err := t.FinishFields(fieldsTarget1); err != nil { |
| return err |
| } |
| return nil |
| } |
| |
| func (m *AddressInfo) MakeVDLTarget() vdl.Target { |
| return nil |
| } |
| |
| func (m *AddressInfo) IsZero() bool { |
| |
| var1 := (*m == AddressInfo{}) |
| return var1 |
| } |
| |
| type CreditAgency int |
| |
| const ( |
| CreditAgencyEquifax CreditAgency = iota |
| CreditAgencyExperian |
| CreditAgencyTransUnion |
| ) |
| |
| // CreditAgencyAll holds all labels for CreditAgency. |
| var CreditAgencyAll = [...]CreditAgency{CreditAgencyEquifax, CreditAgencyExperian, CreditAgencyTransUnion} |
| |
| // CreditAgencyFromString creates a CreditAgency from a string label. |
| func CreditAgencyFromString(label string) (x CreditAgency, err error) { |
| err = x.Set(label) |
| return |
| } |
| |
| // Set assigns label to x. |
| func (x *CreditAgency) Set(label string) error { |
| switch label { |
| case "Equifax", "equifax": |
| *x = CreditAgencyEquifax |
| return nil |
| case "Experian", "experian": |
| *x = CreditAgencyExperian |
| return nil |
| case "TransUnion", "transunion": |
| *x = CreditAgencyTransUnion |
| return nil |
| } |
| *x = -1 |
| return fmt.Errorf("unknown label %q in internal.CreditAgency", label) |
| } |
| |
| // String returns the string label of x. |
| func (x CreditAgency) String() string { |
| switch x { |
| case CreditAgencyEquifax: |
| return "Equifax" |
| case CreditAgencyExperian: |
| return "Experian" |
| case CreditAgencyTransUnion: |
| return "TransUnion" |
| } |
| return "" |
| } |
| |
| func (CreditAgency) __VDLReflect(struct { |
| Name string `vdl:"src/v.io/x/mojo/transcoder/internal.CreditAgency"` |
| Enum struct{ Equifax, Experian, TransUnion string } |
| }) { |
| } |
| |
| func (m CreditAgency) FillVDLTarget(t vdl.Target, tt *vdl.Type) error { |
| if err := t.FromEnumLabel(m.String(), __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_CreditAgency); err != nil { |
| return err |
| } |
| return nil |
| } |
| |
| func (m CreditAgency) MakeVDLTarget() vdl.Target { |
| return nil |
| } |
| |
| func (m CreditAgency) IsZero() bool { |
| |
| var1 := (m == CreditAgencyEquifax) |
| return var1 |
| } |
| |
| type ExperianRating int |
| |
| const ( |
| ExperianRatingGood ExperianRating = iota |
| ExperianRatingBad |
| ) |
| |
| // ExperianRatingAll holds all labels for ExperianRating. |
| var ExperianRatingAll = [...]ExperianRating{ExperianRatingGood, ExperianRatingBad} |
| |
| // ExperianRatingFromString creates a ExperianRating from a string label. |
| func ExperianRatingFromString(label string) (x ExperianRating, err error) { |
| err = x.Set(label) |
| return |
| } |
| |
| // Set assigns label to x. |
| func (x *ExperianRating) Set(label string) error { |
| switch label { |
| case "Good", "good": |
| *x = ExperianRatingGood |
| return nil |
| case "Bad", "bad": |
| *x = ExperianRatingBad |
| return nil |
| } |
| *x = -1 |
| return fmt.Errorf("unknown label %q in internal.ExperianRating", label) |
| } |
| |
| // String returns the string label of x. |
| func (x ExperianRating) String() string { |
| switch x { |
| case ExperianRatingGood: |
| return "Good" |
| case ExperianRatingBad: |
| return "Bad" |
| } |
| return "" |
| } |
| |
| func (ExperianRating) __VDLReflect(struct { |
| Name string `vdl:"src/v.io/x/mojo/transcoder/internal.ExperianRating"` |
| Enum struct{ Good, Bad string } |
| }) { |
| } |
| |
| func (m ExperianRating) FillVDLTarget(t vdl.Target, tt *vdl.Type) error { |
| if err := t.FromEnumLabel(m.String(), __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_ExperianRating); err != nil { |
| return err |
| } |
| return nil |
| } |
| |
| func (m ExperianRating) MakeVDLTarget() vdl.Target { |
| return nil |
| } |
| |
| func (m ExperianRating) IsZero() bool { |
| |
| var1 := (m == ExperianRatingGood) |
| return var1 |
| } |
| |
| type EquifaxCreditReport struct { |
| Rating byte |
| } |
| |
| func (EquifaxCreditReport) __VDLReflect(struct { |
| Name string `vdl:"src/v.io/x/mojo/transcoder/internal.EquifaxCreditReport"` |
| }) { |
| } |
| |
| func (m *EquifaxCreditReport) FillVDLTarget(t vdl.Target, tt *vdl.Type) error { |
| |
| if __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_EquifaxCreditReport == nil || __VDLTypeperf_test1 == nil { |
| panic("Initialization order error: types generated for FillVDLTarget not initialized. Consider moving caller to an init() block.") |
| } |
| fieldsTarget1, err := t.StartFields(tt) |
| if err != nil { |
| return err |
| } |
| |
| var2 := (m.Rating == byte(0)) |
| if !var2 { |
| keyTarget3, fieldTarget4, err := fieldsTarget1.StartField("Rating") |
| if err != vdl.ErrFieldNoExist && err != nil { |
| return err |
| } |
| if err != vdl.ErrFieldNoExist { |
| if err := fieldTarget4.FromUint(uint64(m.Rating), vdl.ByteType); err != nil { |
| return err |
| } |
| if err := fieldsTarget1.FinishField(keyTarget3, fieldTarget4); err != nil { |
| return err |
| } |
| } |
| } |
| if err := t.FinishFields(fieldsTarget1); err != nil { |
| return err |
| } |
| return nil |
| } |
| |
| func (m *EquifaxCreditReport) MakeVDLTarget() vdl.Target { |
| return nil |
| } |
| |
| func (m *EquifaxCreditReport) IsZero() bool { |
| |
| var1 := (*m == EquifaxCreditReport{}) |
| return var1 |
| } |
| |
| type ExperianCreditReport struct { |
| Rating ExperianRating |
| } |
| |
| func (ExperianCreditReport) __VDLReflect(struct { |
| Name string `vdl:"src/v.io/x/mojo/transcoder/internal.ExperianCreditReport"` |
| }) { |
| } |
| |
| func (m *ExperianCreditReport) FillVDLTarget(t vdl.Target, tt *vdl.Type) error { |
| |
| if __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_ExperianCreditReport == nil || __VDLTypeperf_test2 == nil { |
| panic("Initialization order error: types generated for FillVDLTarget not initialized. Consider moving caller to an init() block.") |
| } |
| fieldsTarget1, err := t.StartFields(tt) |
| if err != nil { |
| return err |
| } |
| |
| var2 := m.Rating.IsZero() |
| if !var2 { |
| keyTarget3, fieldTarget4, err := fieldsTarget1.StartField("Rating") |
| if err != vdl.ErrFieldNoExist && err != nil { |
| return err |
| } |
| if err != vdl.ErrFieldNoExist { |
| |
| if err := m.Rating.FillVDLTarget(fieldTarget4, __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_ExperianRating); err != nil { |
| return err |
| } |
| if err := fieldsTarget1.FinishField(keyTarget3, fieldTarget4); err != nil { |
| return err |
| } |
| } |
| } |
| if err := t.FinishFields(fieldsTarget1); err != nil { |
| return err |
| } |
| return nil |
| } |
| |
| func (m *ExperianCreditReport) MakeVDLTarget() vdl.Target { |
| return nil |
| } |
| |
| func (m *ExperianCreditReport) IsZero() bool { |
| |
| var1 := (*m == ExperianCreditReport{}) |
| return var1 |
| } |
| |
| type TransUnionCreditReport struct { |
| Rating int16 |
| } |
| |
| func (TransUnionCreditReport) __VDLReflect(struct { |
| Name string `vdl:"src/v.io/x/mojo/transcoder/internal.TransUnionCreditReport"` |
| }) { |
| } |
| |
| func (m *TransUnionCreditReport) FillVDLTarget(t vdl.Target, tt *vdl.Type) error { |
| |
| if __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_TransUnionCreditReport == nil || __VDLTypeperf_test3 == nil { |
| panic("Initialization order error: types generated for FillVDLTarget not initialized. Consider moving caller to an init() block.") |
| } |
| fieldsTarget1, err := t.StartFields(tt) |
| if err != nil { |
| return err |
| } |
| |
| var2 := (m.Rating == int16(0)) |
| if !var2 { |
| keyTarget3, fieldTarget4, err := fieldsTarget1.StartField("Rating") |
| if err != vdl.ErrFieldNoExist && err != nil { |
| return err |
| } |
| if err != vdl.ErrFieldNoExist { |
| if err := fieldTarget4.FromInt(int64(m.Rating), vdl.Int16Type); err != nil { |
| return err |
| } |
| if err := fieldsTarget1.FinishField(keyTarget3, fieldTarget4); err != nil { |
| return err |
| } |
| } |
| } |
| if err := t.FinishFields(fieldsTarget1); err != nil { |
| return err |
| } |
| return nil |
| } |
| |
| func (m *TransUnionCreditReport) MakeVDLTarget() vdl.Target { |
| return nil |
| } |
| |
| func (m *TransUnionCreditReport) IsZero() bool { |
| |
| var1 := (*m == TransUnionCreditReport{}) |
| return var1 |
| } |
| |
| type ( |
| // AgencyReport represents any single field of the AgencyReport union type. |
| AgencyReport interface { |
| // Index returns the field index. |
| Index() int |
| // Interface returns the field value as an interface. |
| Interface() interface{} |
| // Name returns the field name. |
| Name() string |
| // __VDLReflect describes the AgencyReport union type. |
| __VDLReflect(__AgencyReportReflect) |
| FillVDLTarget(vdl.Target, *vdl.Type) error |
| IsZero() bool |
| } |
| // AgencyReportEquifaxReport represents field EquifaxReport of the AgencyReport union type. |
| AgencyReportEquifaxReport struct{ Value EquifaxCreditReport } |
| // AgencyReportExperianReport represents field ExperianReport of the AgencyReport union type. |
| AgencyReportExperianReport struct{ Value ExperianCreditReport } |
| // AgencyReportTransUnionReport represents field TransUnionReport of the AgencyReport union type. |
| AgencyReportTransUnionReport struct{ Value TransUnionCreditReport } |
| // __AgencyReportReflect describes the AgencyReport union type. |
| __AgencyReportReflect struct { |
| Name string `vdl:"src/v.io/x/mojo/transcoder/internal.AgencyReport"` |
| Type AgencyReport |
| Union struct { |
| EquifaxReport AgencyReportEquifaxReport |
| ExperianReport AgencyReportExperianReport |
| TransUnionReport AgencyReportTransUnionReport |
| } |
| } |
| ) |
| |
| func (x AgencyReportEquifaxReport) Index() int { return 0 } |
| func (x AgencyReportEquifaxReport) Interface() interface{} { return x.Value } |
| func (x AgencyReportEquifaxReport) Name() string { return "EquifaxReport" } |
| func (x AgencyReportEquifaxReport) __VDLReflect(__AgencyReportReflect) {} |
| |
| func (m AgencyReportEquifaxReport) FillVDLTarget(t vdl.Target, tt *vdl.Type) error { |
| |
| fieldsTarget1, err := t.StartFields(__VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_AgencyReport) |
| if err != nil { |
| return err |
| } |
| keyTarget2, fieldTarget3, err := fieldsTarget1.StartField("EquifaxReport") |
| if err != nil { |
| return err |
| } |
| |
| if err := m.Value.FillVDLTarget(fieldTarget3, __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_EquifaxCreditReport); err != nil { |
| return err |
| } |
| if err := fieldsTarget1.FinishField(keyTarget2, fieldTarget3); err != nil { |
| return err |
| } |
| if err := t.FinishFields(fieldsTarget1); err != nil { |
| return err |
| } |
| |
| return nil |
| } |
| |
| func (m AgencyReportEquifaxReport) MakeVDLTarget() vdl.Target { |
| return nil |
| } |
| |
| func (m AgencyReportEquifaxReport) IsZero() bool { |
| |
| var1 := (m == AgencyReport(AgencyReportEquifaxReport{})) |
| return var1 |
| } |
| |
| func (x AgencyReportExperianReport) Index() int { return 1 } |
| func (x AgencyReportExperianReport) Interface() interface{} { return x.Value } |
| func (x AgencyReportExperianReport) Name() string { return "ExperianReport" } |
| func (x AgencyReportExperianReport) __VDLReflect(__AgencyReportReflect) {} |
| |
| func (m AgencyReportExperianReport) FillVDLTarget(t vdl.Target, tt *vdl.Type) error { |
| |
| fieldsTarget1, err := t.StartFields(__VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_AgencyReport) |
| if err != nil { |
| return err |
| } |
| keyTarget2, fieldTarget3, err := fieldsTarget1.StartField("ExperianReport") |
| if err != nil { |
| return err |
| } |
| |
| if err := m.Value.FillVDLTarget(fieldTarget3, __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_ExperianCreditReport); err != nil { |
| return err |
| } |
| if err := fieldsTarget1.FinishField(keyTarget2, fieldTarget3); err != nil { |
| return err |
| } |
| if err := t.FinishFields(fieldsTarget1); err != nil { |
| return err |
| } |
| |
| return nil |
| } |
| |
| func (m AgencyReportExperianReport) MakeVDLTarget() vdl.Target { |
| return nil |
| } |
| |
| func (m AgencyReportExperianReport) IsZero() bool { |
| |
| var1 := (m == AgencyReport(AgencyReportEquifaxReport{})) |
| return var1 |
| } |
| |
| func (x AgencyReportTransUnionReport) Index() int { return 2 } |
| func (x AgencyReportTransUnionReport) Interface() interface{} { return x.Value } |
| func (x AgencyReportTransUnionReport) Name() string { return "TransUnionReport" } |
| func (x AgencyReportTransUnionReport) __VDLReflect(__AgencyReportReflect) {} |
| |
| func (m AgencyReportTransUnionReport) FillVDLTarget(t vdl.Target, tt *vdl.Type) error { |
| |
| fieldsTarget1, err := t.StartFields(__VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_AgencyReport) |
| if err != nil { |
| return err |
| } |
| keyTarget2, fieldTarget3, err := fieldsTarget1.StartField("TransUnionReport") |
| if err != nil { |
| return err |
| } |
| |
| if err := m.Value.FillVDLTarget(fieldTarget3, __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_TransUnionCreditReport); err != nil { |
| return err |
| } |
| if err := fieldsTarget1.FinishField(keyTarget2, fieldTarget3); err != nil { |
| return err |
| } |
| if err := t.FinishFields(fieldsTarget1); err != nil { |
| return err |
| } |
| |
| return nil |
| } |
| |
| func (m AgencyReportTransUnionReport) MakeVDLTarget() vdl.Target { |
| return nil |
| } |
| |
| func (m AgencyReportTransUnionReport) IsZero() bool { |
| |
| var1 := (m == AgencyReport(AgencyReportEquifaxReport{})) |
| return var1 |
| } |
| |
| type CreditReport struct { |
| Agency CreditAgency |
| Report AgencyReport |
| } |
| |
| func (CreditReport) __VDLReflect(struct { |
| Name string `vdl:"src/v.io/x/mojo/transcoder/internal.CreditReport"` |
| }) { |
| } |
| |
| func (m *CreditReport) FillVDLTarget(t vdl.Target, tt *vdl.Type) error { |
| |
| if __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_CreditReport == nil || __VDLTypeperf_test4 == nil { |
| panic("Initialization order error: types generated for FillVDLTarget not initialized. Consider moving caller to an init() block.") |
| } |
| fieldsTarget1, err := t.StartFields(tt) |
| if err != nil { |
| return err |
| } |
| |
| var2 := m.Agency.IsZero() |
| if !var2 { |
| keyTarget3, fieldTarget4, err := fieldsTarget1.StartField("Agency") |
| if err != vdl.ErrFieldNoExist && err != nil { |
| return err |
| } |
| if err != vdl.ErrFieldNoExist { |
| |
| if err := m.Agency.FillVDLTarget(fieldTarget4, __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_CreditAgency); err != nil { |
| return err |
| } |
| if err := fieldsTarget1.FinishField(keyTarget3, fieldTarget4); err != nil { |
| return err |
| } |
| } |
| } |
| var5 := m.Report.IsZero() |
| if !var5 { |
| keyTarget6, fieldTarget7, err := fieldsTarget1.StartField("Report") |
| if err != vdl.ErrFieldNoExist && err != nil { |
| return err |
| } |
| if err != vdl.ErrFieldNoExist { |
| |
| unionValue8 := m.Report |
| if unionValue8 == nil { |
| unionValue8 = AgencyReportEquifaxReport{} |
| } |
| if err := unionValue8.FillVDLTarget(fieldTarget7, __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_AgencyReport); err != nil { |
| return err |
| } |
| if err := fieldsTarget1.FinishField(keyTarget6, fieldTarget7); err != nil { |
| return err |
| } |
| } |
| } |
| if err := t.FinishFields(fieldsTarget1); err != nil { |
| return err |
| } |
| return nil |
| } |
| |
| func (m *CreditReport) MakeVDLTarget() vdl.Target { |
| return nil |
| } |
| |
| func (m *CreditReport) IsZero() bool { |
| |
| var1 := (*m == CreditReport{ |
| Report: AgencyReportEquifaxReport{}, |
| }) |
| return var1 |
| } |
| |
| type Customer struct { |
| Name string |
| Id int64 |
| Active bool |
| Address AddressInfo |
| Credit CreditReport |
| } |
| |
| func (Customer) __VDLReflect(struct { |
| Name string `vdl:"src/v.io/x/mojo/transcoder/internal.Customer"` |
| }) { |
| } |
| |
| func (m *Customer) FillVDLTarget(t vdl.Target, tt *vdl.Type) error { |
| |
| if __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_Customer == nil || __VDLTypeperf_test5 == nil { |
| panic("Initialization order error: types generated for FillVDLTarget not initialized. Consider moving caller to an init() block.") |
| } |
| fieldsTarget1, err := t.StartFields(tt) |
| if err != nil { |
| return err |
| } |
| |
| var2 := (m.Name == "") |
| if !var2 { |
| keyTarget3, fieldTarget4, err := fieldsTarget1.StartField("Name") |
| if err != vdl.ErrFieldNoExist && err != nil { |
| return err |
| } |
| if err != vdl.ErrFieldNoExist { |
| if err := fieldTarget4.FromString(string(m.Name), vdl.StringType); err != nil { |
| return err |
| } |
| if err := fieldsTarget1.FinishField(keyTarget3, fieldTarget4); err != nil { |
| return err |
| } |
| } |
| } |
| var5 := (m.Id == int64(0)) |
| if !var5 { |
| keyTarget6, fieldTarget7, err := fieldsTarget1.StartField("Id") |
| if err != vdl.ErrFieldNoExist && err != nil { |
| return err |
| } |
| if err != vdl.ErrFieldNoExist { |
| if err := fieldTarget7.FromInt(int64(m.Id), vdl.Int64Type); err != nil { |
| return err |
| } |
| if err := fieldsTarget1.FinishField(keyTarget6, fieldTarget7); err != nil { |
| return err |
| } |
| } |
| } |
| var8 := (m.Active == false) |
| if !var8 { |
| keyTarget9, fieldTarget10, err := fieldsTarget1.StartField("Active") |
| if err != vdl.ErrFieldNoExist && err != nil { |
| return err |
| } |
| if err != vdl.ErrFieldNoExist { |
| if err := fieldTarget10.FromBool(bool(m.Active), vdl.BoolType); err != nil { |
| return err |
| } |
| if err := fieldsTarget1.FinishField(keyTarget9, fieldTarget10); err != nil { |
| return err |
| } |
| } |
| } |
| var11 := m.Address.IsZero() |
| if !var11 { |
| keyTarget12, fieldTarget13, err := fieldsTarget1.StartField("Address") |
| if err != vdl.ErrFieldNoExist && err != nil { |
| return err |
| } |
| if err != vdl.ErrFieldNoExist { |
| |
| if err := m.Address.FillVDLTarget(fieldTarget13, __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_AddressInfo); err != nil { |
| return err |
| } |
| if err := fieldsTarget1.FinishField(keyTarget12, fieldTarget13); err != nil { |
| return err |
| } |
| } |
| } |
| var14 := m.Credit.IsZero() |
| if !var14 { |
| keyTarget15, fieldTarget16, err := fieldsTarget1.StartField("Credit") |
| if err != vdl.ErrFieldNoExist && err != nil { |
| return err |
| } |
| if err != vdl.ErrFieldNoExist { |
| |
| if err := m.Credit.FillVDLTarget(fieldTarget16, __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_CreditReport); err != nil { |
| return err |
| } |
| if err := fieldsTarget1.FinishField(keyTarget15, fieldTarget16); err != nil { |
| return err |
| } |
| } |
| } |
| if err := t.FinishFields(fieldsTarget1); err != nil { |
| return err |
| } |
| return nil |
| } |
| |
| func (m *Customer) MakeVDLTarget() vdl.Target { |
| return nil |
| } |
| |
| func (m *Customer) IsZero() bool { |
| |
| var1 := (*m == Customer{ |
| Credit: CreditReport{ |
| Report: AgencyReportEquifaxReport{}, |
| }, |
| }) |
| return var1 |
| } |
| |
| func init() { |
| vdl.Register((*AddressInfo)(nil)) |
| vdl.Register((*CreditAgency)(nil)) |
| vdl.Register((*ExperianRating)(nil)) |
| vdl.Register((*EquifaxCreditReport)(nil)) |
| vdl.Register((*ExperianCreditReport)(nil)) |
| vdl.Register((*TransUnionCreditReport)(nil)) |
| vdl.Register((*AgencyReport)(nil)) |
| vdl.Register((*CreditReport)(nil)) |
| vdl.Register((*Customer)(nil)) |
| } |
| |
| var __VDLTypeperf_test0 *vdl.Type = vdl.TypeOf((*AddressInfo)(nil)) |
| var __VDLTypeperf_test4 *vdl.Type = vdl.TypeOf((*CreditReport)(nil)) |
| var __VDLTypeperf_test5 *vdl.Type = vdl.TypeOf((*Customer)(nil)) |
| var __VDLTypeperf_test1 *vdl.Type = vdl.TypeOf((*EquifaxCreditReport)(nil)) |
| var __VDLTypeperf_test2 *vdl.Type = vdl.TypeOf((*ExperianCreditReport)(nil)) |
| var __VDLTypeperf_test3 *vdl.Type = vdl.TypeOf((*TransUnionCreditReport)(nil)) |
| var __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_AddressInfo *vdl.Type = vdl.TypeOf(AddressInfo{}) |
| var __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_AgencyReport *vdl.Type = vdl.TypeOf(AgencyReport(AgencyReportEquifaxReport{})) |
| var __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_CreditAgency *vdl.Type = vdl.TypeOf(CreditAgencyEquifax) |
| var __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_CreditReport *vdl.Type = vdl.TypeOf(CreditReport{ |
| Report: AgencyReportEquifaxReport{}, |
| }) |
| var __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_Customer *vdl.Type = vdl.TypeOf(Customer{ |
| Credit: CreditReport{ |
| Report: AgencyReportEquifaxReport{}, |
| }, |
| }) |
| var __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_EquifaxCreditReport *vdl.Type = vdl.TypeOf(EquifaxCreditReport{}) |
| var __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_ExperianCreditReport *vdl.Type = vdl.TypeOf(ExperianCreditReport{}) |
| var __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_ExperianRating *vdl.Type = vdl.TypeOf(ExperianRatingGood) |
| var __VDLType_perf_test_src_v_io_x_mojo_transcoder_internal_TransUnionCreditReport *vdl.Type = vdl.TypeOf(TransUnionCreditReport{}) |
| |
| func __VDLEnsureNativeBuilt_perf_test() { |
| } |