code.vegaprotocol.io/vega@v0.79.0/protos/vega/spec_definition_internal.go (about) 1 package vega 2 3 import datapb "code.vegaprotocol.io/vega/protos/vega/data/v1" 4 5 // Add any additional types related Internal Data sources specifications here. 6 7 func (x DataSourceSpecConfigurationTime) DeepClone() *DataSourceSpecConfigurationTime { 8 cpy := &DataSourceSpecConfigurationTime{ 9 Conditions: []*datapb.Condition{}, 10 } 11 12 for _, c := range x.Conditions { 13 cpy.Conditions = append(cpy.Conditions, c.DeepClone()) 14 } 15 16 return cpy 17 } 18 19 func (x DataSourceDefinitionInternal_Time) DeepClone() *DataSourceDefinitionInternal_Time { 20 cpy := &DataSourceDefinitionInternal_Time{} 21 if x.Time != nil { 22 cpy.Time = x.Time.DeepClone() 23 } 24 25 return cpy 26 } 27 28 func (x DataSourceDefinitionInternal) DeepClone() *DataSourceDefinitionInternal { 29 cpy := &DataSourceDefinitionInternal{} 30 31 if x.GetSourceType() != nil { 32 switch t := x.GetSourceType().(type) { 33 case *DataSourceDefinitionInternal_Time: 34 cpy.SourceType = t.DeepClone() 35 } 36 } 37 38 return cpy 39 } 40 41 func (s DataSourceDefinition_Internal) DeepClone() *DataSourceDefinition_Internal { 42 ds := &DataSourceDefinition_Internal{} 43 if s.Internal != nil { 44 ds.Internal = s.Internal.DeepClone() 45 } 46 47 return ds 48 }