-
Notifications
You must be signed in to change notification settings - Fork 19
/
spec_definition_external.go
61 lines (50 loc) · 1.31 KB
/
spec_definition_external.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
49
50
51
52
53
54
55
56
57
58
59
60
61
package vega
// Add any additional types related External Data sources specifications here.
func (x DataSourceDefinitionExternal_Oracle) DeepClone() *DataSourceDefinitionExternal_Oracle {
cpy := &DataSourceDefinitionExternal_Oracle{}
if x.Oracle != nil {
cpy.Oracle = x.Oracle.DeepClone()
}
return cpy
}
func (x DataSourceDefinitionExternal) DeepClone() *DataSourceDefinitionExternal {
cpy := &DataSourceDefinitionExternal{}
if x.GetSourceType() != nil {
switch t := x.GetSourceType().(type) {
case *DataSourceDefinitionExternal_Oracle:
cpy.SourceType = t.DeepClone()
}
}
return cpy
}
func (s DataSourceDefinition_External) DeepClone() *DataSourceDefinition_External {
ds := &DataSourceDefinition_External{}
if s.External != nil {
ds.External = s.External.DeepClone()
}
return ds
}
func (s DataSourceSpec) DeepClone() *DataSourceSpec {
data := &DataSourceDefinition{}
if s.Data != nil {
data = s.Data.DeepClone()
}
return &DataSourceSpec{
Id: s.Id,
CreatedAt: s.CreatedAt,
UpdatedAt: s.UpdatedAt,
Data: data,
Status: s.Status,
}
}
func (s ExternalDataSourceSpec) DeepClone() *ExternalDataSourceSpec {
if s.Spec != nil {
spec := s.Spec.DeepClone()
return &ExternalDataSourceSpec{
Spec: spec,
}
}
return &ExternalDataSourceSpec{
Spec: &DataSourceSpec{},
}
}