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