-
Notifications
You must be signed in to change notification settings - Fork 37
/
zz_generated.conversion.go
executable file
·1365 lines (1361 loc) · 60.8 KB
/
zz_generated.conversion.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by github.com/jmattheis/goverter, DO NOT EDIT.
//go:build !ignore_autogenerated
package applications
import (
v1alpha1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
common "github.com/argoproj/gitops-engine/pkg/sync/common"
v1alpha11 "github.com/crossplane-contrib/provider-argocd/apis/applications/v1alpha1"
v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
v11 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
intstr "k8s.io/apimachinery/pkg/util/intstr"
"time"
)
// +k8s:deepcopy-gen=false
type ConverterImpl struct{}
func (c *ConverterImpl) FromArgoApplicationStatus(source *v1alpha1.ApplicationStatus) *v1alpha11.ArgoApplicationStatus {
var pV1alpha1ArgoApplicationStatus *v1alpha11.ArgoApplicationStatus
if source != nil {
var v1alpha1ArgoApplicationStatus v1alpha11.ArgoApplicationStatus
var v1alpha1ResourceStatusList []v1alpha11.ResourceStatus
if (*source).Resources != nil {
v1alpha1ResourceStatusList = make([]v1alpha11.ResourceStatus, len((*source).Resources))
for i := 0; i < len((*source).Resources); i++ {
v1alpha1ResourceStatusList[i] = c.v1alpha1ResourceStatusToV1alpha1ResourceStatus((*source).Resources[i])
}
}
v1alpha1ArgoApplicationStatus.Resources = v1alpha1ResourceStatusList
v1alpha1ArgoApplicationStatus.Sync = c.v1alpha1SyncStatusToV1alpha1SyncStatus((*source).Sync)
v1alpha1ArgoApplicationStatus.Health = c.v1alpha1HealthStatusToV1alpha1HealthStatus((*source).Health)
v1alpha1ArgoApplicationStatus.History = c.v1alpha1RevisionHistoriesToV1alpha1RevisionHistories((*source).History)
var v1alpha1ApplicationConditionList []v1alpha11.ApplicationCondition
if (*source).Conditions != nil {
v1alpha1ApplicationConditionList = make([]v1alpha11.ApplicationCondition, len((*source).Conditions))
for j := 0; j < len((*source).Conditions); j++ {
v1alpha1ApplicationConditionList[j] = c.v1alpha1ApplicationConditionToV1alpha1ApplicationCondition((*source).Conditions[j])
}
}
v1alpha1ArgoApplicationStatus.Conditions = v1alpha1ApplicationConditionList
v1alpha1ArgoApplicationStatus.ReconciledAt = c.pV1TimeToPV1Time((*source).ReconciledAt)
v1alpha1ArgoApplicationStatus.OperationState = c.pV1alpha1OperationStateToPV1alpha1OperationState((*source).OperationState)
v1alpha1ArgoApplicationStatus.ObservedAt = c.pV1TimeToPV1Time((*source).ObservedAt)
v1alpha1ArgoApplicationStatus.SourceType = c.v1alpha1ApplicationSourceTypeToV1alpha1ApplicationSourceType((*source).SourceType)
v1alpha1ArgoApplicationStatus.Summary = c.v1alpha1ApplicationSummaryToV1alpha1ApplicationSummary((*source).Summary)
v1alpha1ArgoApplicationStatus.ResourceHealthSource = string((*source).ResourceHealthSource)
var v1alpha1ApplicationSourceTypeList []v1alpha11.ApplicationSourceType
if (*source).SourceTypes != nil {
v1alpha1ApplicationSourceTypeList = make([]v1alpha11.ApplicationSourceType, len((*source).SourceTypes))
for k := 0; k < len((*source).SourceTypes); k++ {
v1alpha1ApplicationSourceTypeList[k] = c.v1alpha1ApplicationSourceTypeToV1alpha1ApplicationSourceType((*source).SourceTypes[k])
}
}
v1alpha1ArgoApplicationStatus.SourceTypes = v1alpha1ApplicationSourceTypeList
pV1alpha1ArgoApplicationStatus = &v1alpha1ArgoApplicationStatus
}
return pV1alpha1ArgoApplicationStatus
}
func (c *ConverterImpl) FromArgoDestination(source v1alpha1.ApplicationDestination) v1alpha11.ApplicationDestination {
var v1alpha1ApplicationDestination v1alpha11.ApplicationDestination
pString := source.Server
v1alpha1ApplicationDestination.Server = &pString
pString2 := source.Namespace
v1alpha1ApplicationDestination.Namespace = &pString2
pString3 := source.Name
v1alpha1ApplicationDestination.Name = &pString3
return v1alpha1ApplicationDestination
}
func (c *ConverterImpl) ToArgoApplicationSpec(source *v1alpha11.ApplicationParameters) *v1alpha1.ApplicationSpec {
var pV1alpha1ApplicationSpec *v1alpha1.ApplicationSpec
if source != nil {
var v1alpha1ApplicationSpec v1alpha1.ApplicationSpec
v1alpha1ApplicationSpec.Source = c.pV1alpha1ApplicationSourceToPV1alpha1ApplicationSource2((*source).Source)
v1alpha1ApplicationSpec.Destination = c.ToArgoDestination((*source).Destination)
v1alpha1ApplicationSpec.Project = (*source).Project
v1alpha1ApplicationSpec.SyncPolicy = c.pV1alpha1SyncPolicyToPV1alpha1SyncPolicy((*source).SyncPolicy)
v1alpha1ApplicationSpec.IgnoreDifferences = c.v1alpha1ResourceIgnoreDifferencesListToV1alpha1IgnoreDifferences((*source).IgnoreDifferences)
var v1alpha1InfoList []v1alpha1.Info
if (*source).Info != nil {
v1alpha1InfoList = make([]v1alpha1.Info, len((*source).Info))
for i := 0; i < len((*source).Info); i++ {
v1alpha1InfoList[i] = c.v1alpha1InfoToV1alpha1Info((*source).Info[i])
}
}
v1alpha1ApplicationSpec.Info = v1alpha1InfoList
var pInt64 *int64
if (*source).RevisionHistoryLimit != nil {
xint64 := *(*source).RevisionHistoryLimit
pInt64 = &xint64
}
v1alpha1ApplicationSpec.RevisionHistoryLimit = pInt64
v1alpha1ApplicationSpec.Sources = c.v1alpha1ApplicationSourcesToV1alpha1ApplicationSources2((*source).Sources)
pV1alpha1ApplicationSpec = &v1alpha1ApplicationSpec
}
return pV1alpha1ApplicationSpec
}
func (c *ConverterImpl) ToArgoDestination(source v1alpha11.ApplicationDestination) v1alpha1.ApplicationDestination {
var v1alpha1ApplicationDestination v1alpha1.ApplicationDestination
var xstring string
if source.Server != nil {
xstring = *source.Server
}
v1alpha1ApplicationDestination.Server = xstring
var xstring2 string
if source.Namespace != nil {
xstring2 = *source.Namespace
}
v1alpha1ApplicationDestination.Namespace = xstring2
var xstring3 string
if source.Name != nil {
xstring3 = *source.Name
}
v1alpha1ApplicationDestination.Name = xstring3
return v1alpha1ApplicationDestination
}
func (c *ConverterImpl) commonHookTypeToString(source common.HookType) string {
return string(source)
}
func (c *ConverterImpl) commonResultCodeToString(source common.ResultCode) string {
return string(source)
}
func (c *ConverterImpl) commonSyncPhaseToString(source common.SyncPhase) string {
return string(source)
}
func (c *ConverterImpl) intstrIntOrStringToIntstrIntOrString(source intstr.IntOrString) intstr.IntOrString {
var intstrIntOrString intstr.IntOrString
intstrIntOrString.Type = intstr.Type(source.Type)
intstrIntOrString.IntVal = source.IntVal
intstrIntOrString.StrVal = source.StrVal
return intstrIntOrString
}
func (c *ConverterImpl) pRuntimeRawExtensionToV1JSON(source *runtime.RawExtension) v1.JSON {
var v1JSON v1.JSON
if source != nil {
var v1JSON2 v1.JSON
var byteList []uint8
if (*source).Raw != nil {
byteList = make([]uint8, len((*source).Raw))
for i := 0; i < len((*source).Raw); i++ {
byteList[i] = (*source).Raw[i]
}
}
v1JSON2.Raw = byteList
v1JSON = v1JSON2
}
return v1JSON
}
func (c *ConverterImpl) pV1TimeToPV1Time(source *v11.Time) *v11.Time {
var pV1Time *v11.Time
if source != nil {
var v1Time v11.Time
v1Time.Time = c.timeTimeToTimeTime((*source).Time)
pV1Time = &v1Time
}
return pV1Time
}
func (c *ConverterImpl) pV1alpha1ApplicationSourceDirectoryToPV1alpha1ApplicationSourceDirectory(source *v1alpha1.ApplicationSourceDirectory) *v1alpha11.ApplicationSourceDirectory {
var pV1alpha1ApplicationSourceDirectory *v1alpha11.ApplicationSourceDirectory
if source != nil {
var v1alpha1ApplicationSourceDirectory v1alpha11.ApplicationSourceDirectory
pBool := (*source).Recurse
v1alpha1ApplicationSourceDirectory.Recurse = &pBool
v1alpha1ApplicationSourceDirectory.Jsonnet = c.v1alpha1ApplicationSourceJsonnetToV1alpha1ApplicationSourceJsonnet((*source).Jsonnet)
pString := (*source).Exclude
v1alpha1ApplicationSourceDirectory.Exclude = &pString
pString2 := (*source).Include
v1alpha1ApplicationSourceDirectory.Include = &pString2
pV1alpha1ApplicationSourceDirectory = &v1alpha1ApplicationSourceDirectory
}
return pV1alpha1ApplicationSourceDirectory
}
func (c *ConverterImpl) pV1alpha1ApplicationSourceDirectoryToPV1alpha1ApplicationSourceDirectory2(source *v1alpha11.ApplicationSourceDirectory) *v1alpha1.ApplicationSourceDirectory {
var pV1alpha1ApplicationSourceDirectory *v1alpha1.ApplicationSourceDirectory
if source != nil {
var v1alpha1ApplicationSourceDirectory v1alpha1.ApplicationSourceDirectory
var xbool bool
if (*source).Recurse != nil {
xbool = *(*source).Recurse
}
v1alpha1ApplicationSourceDirectory.Recurse = xbool
v1alpha1ApplicationSourceDirectory.Jsonnet = c.v1alpha1ApplicationSourceJsonnetToV1alpha1ApplicationSourceJsonnet2((*source).Jsonnet)
var xstring string
if (*source).Exclude != nil {
xstring = *(*source).Exclude
}
v1alpha1ApplicationSourceDirectory.Exclude = xstring
var xstring2 string
if (*source).Include != nil {
xstring2 = *(*source).Include
}
v1alpha1ApplicationSourceDirectory.Include = xstring2
pV1alpha1ApplicationSourceDirectory = &v1alpha1ApplicationSourceDirectory
}
return pV1alpha1ApplicationSourceDirectory
}
func (c *ConverterImpl) pV1alpha1ApplicationSourceHelmToPV1alpha1ApplicationSourceHelm(source *v1alpha1.ApplicationSourceHelm) *v1alpha11.ApplicationSourceHelm {
var pV1alpha1ApplicationSourceHelm *v1alpha11.ApplicationSourceHelm
if source != nil {
var v1alpha1ApplicationSourceHelm v1alpha11.ApplicationSourceHelm
var stringList []string
if (*source).ValueFiles != nil {
stringList = make([]string, len((*source).ValueFiles))
for i := 0; i < len((*source).ValueFiles); i++ {
stringList[i] = (*source).ValueFiles[i]
}
}
v1alpha1ApplicationSourceHelm.ValueFiles = stringList
var v1alpha1HelmParameterList []v1alpha11.HelmParameter
if (*source).Parameters != nil {
v1alpha1HelmParameterList = make([]v1alpha11.HelmParameter, len((*source).Parameters))
for j := 0; j < len((*source).Parameters); j++ {
v1alpha1HelmParameterList[j] = c.v1alpha1HelmParameterToV1alpha1HelmParameter((*source).Parameters[j])
}
}
v1alpha1ApplicationSourceHelm.Parameters = v1alpha1HelmParameterList
pString := (*source).ReleaseName
v1alpha1ApplicationSourceHelm.ReleaseName = &pString
pString2 := (*source).Values
v1alpha1ApplicationSourceHelm.Values = &pString2
var v1alpha1HelmFileParameterList []v1alpha11.HelmFileParameter
if (*source).FileParameters != nil {
v1alpha1HelmFileParameterList = make([]v1alpha11.HelmFileParameter, len((*source).FileParameters))
for k := 0; k < len((*source).FileParameters); k++ {
v1alpha1HelmFileParameterList[k] = c.v1alpha1HelmFileParameterToV1alpha1HelmFileParameter((*source).FileParameters[k])
}
}
v1alpha1ApplicationSourceHelm.FileParameters = v1alpha1HelmFileParameterList
pString3 := (*source).Version
v1alpha1ApplicationSourceHelm.Version = &pString3
pBool := (*source).PassCredentials
v1alpha1ApplicationSourceHelm.PassCredentials = &pBool
pBool2 := (*source).IgnoreMissingValueFiles
v1alpha1ApplicationSourceHelm.IgnoreMissingValueFiles = &pBool2
pBool3 := (*source).SkipCrds
v1alpha1ApplicationSourceHelm.SkipCrds = &pBool3
v1alpha1ApplicationSourceHelm.ValuesObject = c.pRuntimeRawExtensionToV1JSON((*source).ValuesObject)
pV1alpha1ApplicationSourceHelm = &v1alpha1ApplicationSourceHelm
}
return pV1alpha1ApplicationSourceHelm
}
func (c *ConverterImpl) pV1alpha1ApplicationSourceHelmToPV1alpha1ApplicationSourceHelm2(source *v1alpha11.ApplicationSourceHelm) *v1alpha1.ApplicationSourceHelm {
var pV1alpha1ApplicationSourceHelm *v1alpha1.ApplicationSourceHelm
if source != nil {
var v1alpha1ApplicationSourceHelm v1alpha1.ApplicationSourceHelm
var stringList []string
if (*source).ValueFiles != nil {
stringList = make([]string, len((*source).ValueFiles))
for i := 0; i < len((*source).ValueFiles); i++ {
stringList[i] = (*source).ValueFiles[i]
}
}
v1alpha1ApplicationSourceHelm.ValueFiles = stringList
var v1alpha1HelmParameterList []v1alpha1.HelmParameter
if (*source).Parameters != nil {
v1alpha1HelmParameterList = make([]v1alpha1.HelmParameter, len((*source).Parameters))
for j := 0; j < len((*source).Parameters); j++ {
v1alpha1HelmParameterList[j] = c.v1alpha1HelmParameterToV1alpha1HelmParameter2((*source).Parameters[j])
}
}
v1alpha1ApplicationSourceHelm.Parameters = v1alpha1HelmParameterList
var xstring string
if (*source).ReleaseName != nil {
xstring = *(*source).ReleaseName
}
v1alpha1ApplicationSourceHelm.ReleaseName = xstring
var xstring2 string
if (*source).Values != nil {
xstring2 = *(*source).Values
}
v1alpha1ApplicationSourceHelm.Values = xstring2
var v1alpha1HelmFileParameterList []v1alpha1.HelmFileParameter
if (*source).FileParameters != nil {
v1alpha1HelmFileParameterList = make([]v1alpha1.HelmFileParameter, len((*source).FileParameters))
for k := 0; k < len((*source).FileParameters); k++ {
v1alpha1HelmFileParameterList[k] = c.v1alpha1HelmFileParameterToV1alpha1HelmFileParameter2((*source).FileParameters[k])
}
}
v1alpha1ApplicationSourceHelm.FileParameters = v1alpha1HelmFileParameterList
var xstring3 string
if (*source).Version != nil {
xstring3 = *(*source).Version
}
v1alpha1ApplicationSourceHelm.Version = xstring3
var xbool bool
if (*source).PassCredentials != nil {
xbool = *(*source).PassCredentials
}
v1alpha1ApplicationSourceHelm.PassCredentials = xbool
var xbool2 bool
if (*source).IgnoreMissingValueFiles != nil {
xbool2 = *(*source).IgnoreMissingValueFiles
}
v1alpha1ApplicationSourceHelm.IgnoreMissingValueFiles = xbool2
var xbool3 bool
if (*source).SkipCrds != nil {
xbool3 = *(*source).SkipCrds
}
v1alpha1ApplicationSourceHelm.SkipCrds = xbool3
v1alpha1ApplicationSourceHelm.ValuesObject = ExtV1JSONToRuntimeRawExtension((*source).ValuesObject)
pV1alpha1ApplicationSourceHelm = &v1alpha1ApplicationSourceHelm
}
return pV1alpha1ApplicationSourceHelm
}
func (c *ConverterImpl) pV1alpha1ApplicationSourceKustomizeToPV1alpha1ApplicationSourceKustomize(source *v1alpha1.ApplicationSourceKustomize) *v1alpha11.ApplicationSourceKustomize {
var pV1alpha1ApplicationSourceKustomize *v1alpha11.ApplicationSourceKustomize
if source != nil {
var v1alpha1ApplicationSourceKustomize v1alpha11.ApplicationSourceKustomize
pString := (*source).NamePrefix
v1alpha1ApplicationSourceKustomize.NamePrefix = &pString
pString2 := (*source).NameSuffix
v1alpha1ApplicationSourceKustomize.NameSuffix = &pString2
v1alpha1ApplicationSourceKustomize.Images = c.v1alpha1KustomizeImagesToV1alpha1KustomizeImages((*source).Images)
mapStringString := make(map[string]string, len((*source).CommonLabels))
for key, value := range (*source).CommonLabels {
mapStringString[key] = value
}
v1alpha1ApplicationSourceKustomize.CommonLabels = mapStringString
pString3 := (*source).Version
v1alpha1ApplicationSourceKustomize.Version = &pString3
mapStringString2 := make(map[string]string, len((*source).CommonAnnotations))
for key2, value2 := range (*source).CommonAnnotations {
mapStringString2[key2] = value2
}
v1alpha1ApplicationSourceKustomize.CommonAnnotations = mapStringString2
pBool := (*source).ForceCommonLabels
v1alpha1ApplicationSourceKustomize.ForceCommonLabels = &pBool
pBool2 := (*source).ForceCommonAnnotations
v1alpha1ApplicationSourceKustomize.ForceCommonAnnotations = &pBool2
pString4 := (*source).Namespace
v1alpha1ApplicationSourceKustomize.Namespace = &pString4
pBool3 := (*source).CommonAnnotationsEnvsubst
v1alpha1ApplicationSourceKustomize.CommonAnnotationsEnvsubst = &pBool3
v1alpha1ApplicationSourceKustomize.Replicas = c.v1alpha1KustomizeReplicasToV1alpha1KustomizeReplicas((*source).Replicas)
pV1alpha1ApplicationSourceKustomize = &v1alpha1ApplicationSourceKustomize
}
return pV1alpha1ApplicationSourceKustomize
}
func (c *ConverterImpl) pV1alpha1ApplicationSourceKustomizeToPV1alpha1ApplicationSourceKustomize2(source *v1alpha11.ApplicationSourceKustomize) *v1alpha1.ApplicationSourceKustomize {
var pV1alpha1ApplicationSourceKustomize *v1alpha1.ApplicationSourceKustomize
if source != nil {
var v1alpha1ApplicationSourceKustomize v1alpha1.ApplicationSourceKustomize
var xstring string
if (*source).NamePrefix != nil {
xstring = *(*source).NamePrefix
}
v1alpha1ApplicationSourceKustomize.NamePrefix = xstring
var xstring2 string
if (*source).NameSuffix != nil {
xstring2 = *(*source).NameSuffix
}
v1alpha1ApplicationSourceKustomize.NameSuffix = xstring2
v1alpha1ApplicationSourceKustomize.Images = c.v1alpha1KustomizeImagesToV1alpha1KustomizeImages2((*source).Images)
mapStringString := make(map[string]string, len((*source).CommonLabels))
for key, value := range (*source).CommonLabels {
mapStringString[key] = value
}
v1alpha1ApplicationSourceKustomize.CommonLabels = mapStringString
var xstring3 string
if (*source).Version != nil {
xstring3 = *(*source).Version
}
v1alpha1ApplicationSourceKustomize.Version = xstring3
mapStringString2 := make(map[string]string, len((*source).CommonAnnotations))
for key2, value2 := range (*source).CommonAnnotations {
mapStringString2[key2] = value2
}
v1alpha1ApplicationSourceKustomize.CommonAnnotations = mapStringString2
var xbool bool
if (*source).ForceCommonLabels != nil {
xbool = *(*source).ForceCommonLabels
}
v1alpha1ApplicationSourceKustomize.ForceCommonLabels = xbool
var xbool2 bool
if (*source).ForceCommonAnnotations != nil {
xbool2 = *(*source).ForceCommonAnnotations
}
v1alpha1ApplicationSourceKustomize.ForceCommonAnnotations = xbool2
var xstring4 string
if (*source).Namespace != nil {
xstring4 = *(*source).Namespace
}
v1alpha1ApplicationSourceKustomize.Namespace = xstring4
var xbool3 bool
if (*source).CommonAnnotationsEnvsubst != nil {
xbool3 = *(*source).CommonAnnotationsEnvsubst
}
v1alpha1ApplicationSourceKustomize.CommonAnnotationsEnvsubst = xbool3
v1alpha1ApplicationSourceKustomize.Replicas = c.v1alpha1KustomizeReplicasToV1alpha1KustomizeReplicas2((*source).Replicas)
pV1alpha1ApplicationSourceKustomize = &v1alpha1ApplicationSourceKustomize
}
return pV1alpha1ApplicationSourceKustomize
}
func (c *ConverterImpl) pV1alpha1ApplicationSourcePluginToPV1alpha1ApplicationSourcePlugin(source *v1alpha1.ApplicationSourcePlugin) *v1alpha11.ApplicationSourcePlugin {
var pV1alpha1ApplicationSourcePlugin *v1alpha11.ApplicationSourcePlugin
if source != nil {
var v1alpha1ApplicationSourcePlugin v1alpha11.ApplicationSourcePlugin
pString := (*source).Name
v1alpha1ApplicationSourcePlugin.Name = &pString
v1alpha1ApplicationSourcePlugin.Env = c.v1alpha1EnvToV1alpha1Env((*source).Env)
v1alpha1ApplicationSourcePlugin.Parameters = c.v1alpha1ApplicationSourcePluginParametersToV1alpha1ApplicationSourcePluginParameters((*source).Parameters)
pV1alpha1ApplicationSourcePlugin = &v1alpha1ApplicationSourcePlugin
}
return pV1alpha1ApplicationSourcePlugin
}
func (c *ConverterImpl) pV1alpha1ApplicationSourcePluginToPV1alpha1ApplicationSourcePlugin2(source *v1alpha11.ApplicationSourcePlugin) *v1alpha1.ApplicationSourcePlugin {
var pV1alpha1ApplicationSourcePlugin *v1alpha1.ApplicationSourcePlugin
if source != nil {
var v1alpha1ApplicationSourcePlugin v1alpha1.ApplicationSourcePlugin
var xstring string
if (*source).Name != nil {
xstring = *(*source).Name
}
v1alpha1ApplicationSourcePlugin.Name = xstring
v1alpha1ApplicationSourcePlugin.Env = c.v1alpha1EnvToV1alpha1Env2((*source).Env)
v1alpha1ApplicationSourcePlugin.Parameters = c.v1alpha1ApplicationSourcePluginParametersToV1alpha1ApplicationSourcePluginParameters2((*source).Parameters)
pV1alpha1ApplicationSourcePlugin = &v1alpha1ApplicationSourcePlugin
}
return pV1alpha1ApplicationSourcePlugin
}
func (c *ConverterImpl) pV1alpha1ApplicationSourceToPV1alpha1ApplicationSource(source *v1alpha1.ApplicationSource) *v1alpha11.ApplicationSource {
var pV1alpha1ApplicationSource *v1alpha11.ApplicationSource
if source != nil {
v1alpha1ApplicationSource := c.v1alpha1ApplicationSourceToV1alpha1ApplicationSource((*source))
pV1alpha1ApplicationSource = &v1alpha1ApplicationSource
}
return pV1alpha1ApplicationSource
}
func (c *ConverterImpl) pV1alpha1ApplicationSourceToPV1alpha1ApplicationSource2(source *v1alpha11.ApplicationSource) *v1alpha1.ApplicationSource {
var pV1alpha1ApplicationSource *v1alpha1.ApplicationSource
if source != nil {
var v1alpha1ApplicationSource v1alpha1.ApplicationSource
v1alpha1ApplicationSource.RepoURL = (*source).RepoURL
var xstring string
if (*source).Path != nil {
xstring = *(*source).Path
}
v1alpha1ApplicationSource.Path = xstring
var xstring2 string
if (*source).TargetRevision != nil {
xstring2 = *(*source).TargetRevision
}
v1alpha1ApplicationSource.TargetRevision = xstring2
v1alpha1ApplicationSource.Helm = c.pV1alpha1ApplicationSourceHelmToPV1alpha1ApplicationSourceHelm2((*source).Helm)
v1alpha1ApplicationSource.Kustomize = c.pV1alpha1ApplicationSourceKustomizeToPV1alpha1ApplicationSourceKustomize2((*source).Kustomize)
v1alpha1ApplicationSource.Directory = c.pV1alpha1ApplicationSourceDirectoryToPV1alpha1ApplicationSourceDirectory2((*source).Directory)
v1alpha1ApplicationSource.Plugin = c.pV1alpha1ApplicationSourcePluginToPV1alpha1ApplicationSourcePlugin2((*source).Plugin)
var xstring3 string
if (*source).Chart != nil {
xstring3 = *(*source).Chart
}
v1alpha1ApplicationSource.Chart = xstring3
var xstring4 string
if (*source).Ref != nil {
xstring4 = *(*source).Ref
}
v1alpha1ApplicationSource.Ref = xstring4
pV1alpha1ApplicationSource = &v1alpha1ApplicationSource
}
return pV1alpha1ApplicationSource
}
func (c *ConverterImpl) pV1alpha1BackoffToPV1alpha1Backoff(source *v1alpha1.Backoff) *v1alpha11.Backoff {
var pV1alpha1Backoff *v1alpha11.Backoff
if source != nil {
var v1alpha1Backoff v1alpha11.Backoff
pString := (*source).Duration
v1alpha1Backoff.Duration = &pString
var pInt64 *int64
if (*source).Factor != nil {
xint64 := *(*source).Factor
pInt64 = &xint64
}
v1alpha1Backoff.Factor = pInt64
pString2 := (*source).MaxDuration
v1alpha1Backoff.MaxDuration = &pString2
pV1alpha1Backoff = &v1alpha1Backoff
}
return pV1alpha1Backoff
}
func (c *ConverterImpl) pV1alpha1BackoffToPV1alpha1Backoff2(source *v1alpha11.Backoff) *v1alpha1.Backoff {
var pV1alpha1Backoff *v1alpha1.Backoff
if source != nil {
var v1alpha1Backoff v1alpha1.Backoff
var xstring string
if (*source).Duration != nil {
xstring = *(*source).Duration
}
v1alpha1Backoff.Duration = xstring
var pInt64 *int64
if (*source).Factor != nil {
xint64 := *(*source).Factor
pInt64 = &xint64
}
v1alpha1Backoff.Factor = pInt64
var xstring2 string
if (*source).MaxDuration != nil {
xstring2 = *(*source).MaxDuration
}
v1alpha1Backoff.MaxDuration = xstring2
pV1alpha1Backoff = &v1alpha1Backoff
}
return pV1alpha1Backoff
}
func (c *ConverterImpl) pV1alpha1EnvEntryToPV1alpha1EnvEntry(source *v1alpha1.EnvEntry) *v1alpha11.EnvEntry {
var pV1alpha1EnvEntry *v1alpha11.EnvEntry
if source != nil {
var v1alpha1EnvEntry v1alpha11.EnvEntry
v1alpha1EnvEntry.Name = (*source).Name
v1alpha1EnvEntry.Value = (*source).Value
pV1alpha1EnvEntry = &v1alpha1EnvEntry
}
return pV1alpha1EnvEntry
}
func (c *ConverterImpl) pV1alpha1EnvEntryToPV1alpha1EnvEntry2(source *v1alpha11.EnvEntry) *v1alpha1.EnvEntry {
var pV1alpha1EnvEntry *v1alpha1.EnvEntry
if source != nil {
var v1alpha1EnvEntry v1alpha1.EnvEntry
v1alpha1EnvEntry.Name = (*source).Name
v1alpha1EnvEntry.Value = (*source).Value
pV1alpha1EnvEntry = &v1alpha1EnvEntry
}
return pV1alpha1EnvEntry
}
func (c *ConverterImpl) pV1alpha1HealthStatusToPV1alpha1HealthStatus(source *v1alpha1.HealthStatus) *v1alpha11.HealthStatus {
var pV1alpha1HealthStatus *v1alpha11.HealthStatus
if source != nil {
var v1alpha1HealthStatus v1alpha11.HealthStatus
v1alpha1HealthStatus.Status = string((*source).Status)
pString := (*source).Message
v1alpha1HealthStatus.Message = &pString
pV1alpha1HealthStatus = &v1alpha1HealthStatus
}
return pV1alpha1HealthStatus
}
func (c *ConverterImpl) pV1alpha1InfoToPV1alpha1Info(source *v1alpha1.Info) *v1alpha11.Info {
var pV1alpha1Info *v1alpha11.Info
if source != nil {
var v1alpha1Info v1alpha11.Info
v1alpha1Info.Name = (*source).Name
v1alpha1Info.Value = (*source).Value
pV1alpha1Info = &v1alpha1Info
}
return pV1alpha1Info
}
func (c *ConverterImpl) pV1alpha1ManagedNamespaceMetadataToPV1alpha1ManagedNamespaceMetadata(source *v1alpha11.ManagedNamespaceMetadata) *v1alpha1.ManagedNamespaceMetadata {
var pV1alpha1ManagedNamespaceMetadata *v1alpha1.ManagedNamespaceMetadata
if source != nil {
var v1alpha1ManagedNamespaceMetadata v1alpha1.ManagedNamespaceMetadata
mapStringString := make(map[string]string, len((*source).Labels))
for key, value := range (*source).Labels {
mapStringString[key] = value
}
v1alpha1ManagedNamespaceMetadata.Labels = mapStringString
mapStringString2 := make(map[string]string, len((*source).Annotations))
for key2, value2 := range (*source).Annotations {
mapStringString2[key2] = value2
}
v1alpha1ManagedNamespaceMetadata.Annotations = mapStringString2
pV1alpha1ManagedNamespaceMetadata = &v1alpha1ManagedNamespaceMetadata
}
return pV1alpha1ManagedNamespaceMetadata
}
func (c *ConverterImpl) pV1alpha1OperationStateToPV1alpha1OperationState(source *v1alpha1.OperationState) *v1alpha11.OperationState {
var pV1alpha1OperationState *v1alpha11.OperationState
if source != nil {
var v1alpha1OperationState v1alpha11.OperationState
v1alpha1OperationState.Operation = c.v1alpha1OperationToV1alpha1Operation((*source).Operation)
v1alpha1OperationState.Phase = v1alpha11.OperationPhase((*source).Phase)
pString := (*source).Message
v1alpha1OperationState.Message = &pString
v1alpha1OperationState.SyncResult = c.pV1alpha1SyncOperationResultToPV1alpha1SyncOperationResult((*source).SyncResult)
v1alpha1OperationState.StartedAt = c.v1TimeToPV1Time((*source).StartedAt)
v1alpha1OperationState.FinishedAt = c.pV1TimeToPV1Time((*source).FinishedAt)
pInt64 := (*source).RetryCount
v1alpha1OperationState.RetryCount = &pInt64
pV1alpha1OperationState = &v1alpha1OperationState
}
return pV1alpha1OperationState
}
func (c *ConverterImpl) pV1alpha1OptionalArrayToPV1alpha1OptionalArray(source *v1alpha1.OptionalArray) *v1alpha11.OptionalArray {
var pV1alpha1OptionalArray *v1alpha11.OptionalArray
if source != nil {
var v1alpha1OptionalArray v1alpha11.OptionalArray
var stringList []string
if (*source).Array != nil {
stringList = make([]string, len((*source).Array))
for i := 0; i < len((*source).Array); i++ {
stringList[i] = (*source).Array[i]
}
}
v1alpha1OptionalArray.Array = stringList
pV1alpha1OptionalArray = &v1alpha1OptionalArray
}
return pV1alpha1OptionalArray
}
func (c *ConverterImpl) pV1alpha1OptionalArrayToPV1alpha1OptionalArray2(source *v1alpha11.OptionalArray) *v1alpha1.OptionalArray {
var pV1alpha1OptionalArray *v1alpha1.OptionalArray
if source != nil {
var v1alpha1OptionalArray v1alpha1.OptionalArray
var stringList []string
if (*source).Array != nil {
stringList = make([]string, len((*source).Array))
for i := 0; i < len((*source).Array); i++ {
stringList[i] = (*source).Array[i]
}
}
v1alpha1OptionalArray.Array = stringList
pV1alpha1OptionalArray = &v1alpha1OptionalArray
}
return pV1alpha1OptionalArray
}
func (c *ConverterImpl) pV1alpha1OptionalMapToPV1alpha1OptionalMap(source *v1alpha1.OptionalMap) *v1alpha11.OptionalMap {
var pV1alpha1OptionalMap *v1alpha11.OptionalMap
if source != nil {
var v1alpha1OptionalMap v1alpha11.OptionalMap
mapStringString := make(map[string]string, len((*source).Map))
for key, value := range (*source).Map {
mapStringString[key] = value
}
v1alpha1OptionalMap.Map = mapStringString
pV1alpha1OptionalMap = &v1alpha1OptionalMap
}
return pV1alpha1OptionalMap
}
func (c *ConverterImpl) pV1alpha1OptionalMapToPV1alpha1OptionalMap2(source *v1alpha11.OptionalMap) *v1alpha1.OptionalMap {
var pV1alpha1OptionalMap *v1alpha1.OptionalMap
if source != nil {
var v1alpha1OptionalMap v1alpha1.OptionalMap
mapStringString := make(map[string]string, len((*source).Map))
for key, value := range (*source).Map {
mapStringString[key] = value
}
v1alpha1OptionalMap.Map = mapStringString
pV1alpha1OptionalMap = &v1alpha1OptionalMap
}
return pV1alpha1OptionalMap
}
func (c *ConverterImpl) pV1alpha1ResourceResultToPV1alpha1ResourceResult(source *v1alpha1.ResourceResult) *v1alpha11.ResourceResult {
var pV1alpha1ResourceResult *v1alpha11.ResourceResult
if source != nil {
var v1alpha1ResourceResult v1alpha11.ResourceResult
v1alpha1ResourceResult.Group = (*source).Group
v1alpha1ResourceResult.Version = (*source).Version
v1alpha1ResourceResult.Kind = (*source).Kind
v1alpha1ResourceResult.Namespace = (*source).Namespace
v1alpha1ResourceResult.Name = (*source).Name
pString := c.commonResultCodeToString((*source).Status)
v1alpha1ResourceResult.Status = &pString
pString2 := (*source).Message
v1alpha1ResourceResult.Message = &pString2
pString3 := c.commonHookTypeToString((*source).HookType)
v1alpha1ResourceResult.HookType = &pString3
v1alpha1ResourceResult.HookPhase = v1alpha11.OperationPhase((*source).HookPhase)
pString4 := c.commonSyncPhaseToString((*source).SyncPhase)
v1alpha1ResourceResult.SyncPhase = &pString4
pV1alpha1ResourceResult = &v1alpha1ResourceResult
}
return pV1alpha1ResourceResult
}
func (c *ConverterImpl) pV1alpha1RetryStrategyToPV1alpha1RetryStrategy(source *v1alpha11.RetryStrategy) *v1alpha1.RetryStrategy {
var pV1alpha1RetryStrategy *v1alpha1.RetryStrategy
if source != nil {
var v1alpha1RetryStrategy v1alpha1.RetryStrategy
var xint64 int64
if (*source).Limit != nil {
xint64 = *(*source).Limit
}
v1alpha1RetryStrategy.Limit = xint64
v1alpha1RetryStrategy.Backoff = c.pV1alpha1BackoffToPV1alpha1Backoff2((*source).Backoff)
pV1alpha1RetryStrategy = &v1alpha1RetryStrategy
}
return pV1alpha1RetryStrategy
}
func (c *ConverterImpl) pV1alpha1SyncOperationResultToPV1alpha1SyncOperationResult(source *v1alpha1.SyncOperationResult) *v1alpha11.SyncOperationResult {
var pV1alpha1SyncOperationResult *v1alpha11.SyncOperationResult
if source != nil {
var v1alpha1SyncOperationResult v1alpha11.SyncOperationResult
v1alpha1SyncOperationResult.Resources = c.v1alpha1ResourceResultsToV1alpha1ResourceResults((*source).Resources)
v1alpha1SyncOperationResult.Revision = (*source).Revision
v1alpha1SyncOperationResult.Source = c.v1alpha1ApplicationSourceToV1alpha1ApplicationSource((*source).Source)
v1alpha1SyncOperationResult.Sources = c.v1alpha1ApplicationSourcesToV1alpha1ApplicationSources((*source).Sources)
var stringList []string
if (*source).Revisions != nil {
stringList = make([]string, len((*source).Revisions))
for i := 0; i < len((*source).Revisions); i++ {
stringList[i] = (*source).Revisions[i]
}
}
v1alpha1SyncOperationResult.Revisions = stringList
pV1alpha1SyncOperationResult = &v1alpha1SyncOperationResult
}
return pV1alpha1SyncOperationResult
}
func (c *ConverterImpl) pV1alpha1SyncOperationToPV1alpha1SyncOperation(source *v1alpha1.SyncOperation) *v1alpha11.SyncOperation {
var pV1alpha1SyncOperation *v1alpha11.SyncOperation
if source != nil {
var v1alpha1SyncOperation v1alpha11.SyncOperation
pString := (*source).Revision
v1alpha1SyncOperation.Revision = &pString
pBool := (*source).Prune
v1alpha1SyncOperation.Prune = &pBool
pBool2 := (*source).DryRun
v1alpha1SyncOperation.DryRun = &pBool2
v1alpha1SyncOperation.SyncStrategy = c.pV1alpha1SyncStrategyToPV1alpha1SyncStrategy((*source).SyncStrategy)
var v1alpha1SyncOperationResourceList []v1alpha11.SyncOperationResource
if (*source).Resources != nil {
v1alpha1SyncOperationResourceList = make([]v1alpha11.SyncOperationResource, len((*source).Resources))
for i := 0; i < len((*source).Resources); i++ {
v1alpha1SyncOperationResourceList[i] = c.v1alpha1SyncOperationResourceToV1alpha1SyncOperationResource((*source).Resources[i])
}
}
v1alpha1SyncOperation.Resources = v1alpha1SyncOperationResourceList
v1alpha1SyncOperation.Source = c.pV1alpha1ApplicationSourceToPV1alpha1ApplicationSource((*source).Source)
var stringList []string
if (*source).Manifests != nil {
stringList = make([]string, len((*source).Manifests))
for j := 0; j < len((*source).Manifests); j++ {
stringList[j] = (*source).Manifests[j]
}
}
v1alpha1SyncOperation.Manifests = stringList
v1alpha1SyncOperation.SyncOptions = c.v1alpha1SyncOptionsToV1alpha1SyncOptions((*source).SyncOptions)
v1alpha1SyncOperation.Sources = c.v1alpha1ApplicationSourcesToV1alpha1ApplicationSources((*source).Sources)
var stringList2 []string
if (*source).Revisions != nil {
stringList2 = make([]string, len((*source).Revisions))
for k := 0; k < len((*source).Revisions); k++ {
stringList2[k] = (*source).Revisions[k]
}
}
v1alpha1SyncOperation.Revisions = stringList2
pV1alpha1SyncOperation = &v1alpha1SyncOperation
}
return pV1alpha1SyncOperation
}
func (c *ConverterImpl) pV1alpha1SyncPolicyAutomatedToPV1alpha1SyncPolicyAutomated(source *v1alpha11.SyncPolicyAutomated) *v1alpha1.SyncPolicyAutomated {
var pV1alpha1SyncPolicyAutomated *v1alpha1.SyncPolicyAutomated
if source != nil {
var v1alpha1SyncPolicyAutomated v1alpha1.SyncPolicyAutomated
var xbool bool
if (*source).Prune != nil {
xbool = *(*source).Prune
}
v1alpha1SyncPolicyAutomated.Prune = xbool
var xbool2 bool
if (*source).SelfHeal != nil {
xbool2 = *(*source).SelfHeal
}
v1alpha1SyncPolicyAutomated.SelfHeal = xbool2
var xbool3 bool
if (*source).AllowEmpty != nil {
xbool3 = *(*source).AllowEmpty
}
v1alpha1SyncPolicyAutomated.AllowEmpty = xbool3
pV1alpha1SyncPolicyAutomated = &v1alpha1SyncPolicyAutomated
}
return pV1alpha1SyncPolicyAutomated
}
func (c *ConverterImpl) pV1alpha1SyncPolicyToPV1alpha1SyncPolicy(source *v1alpha11.SyncPolicy) *v1alpha1.SyncPolicy {
var pV1alpha1SyncPolicy *v1alpha1.SyncPolicy
if source != nil {
var v1alpha1SyncPolicy v1alpha1.SyncPolicy
v1alpha1SyncPolicy.Automated = c.pV1alpha1SyncPolicyAutomatedToPV1alpha1SyncPolicyAutomated((*source).Automated)
v1alpha1SyncPolicy.SyncOptions = c.v1alpha1SyncOptionsToV1alpha1SyncOptions2((*source).SyncOptions)
v1alpha1SyncPolicy.Retry = c.pV1alpha1RetryStrategyToPV1alpha1RetryStrategy((*source).Retry)
v1alpha1SyncPolicy.ManagedNamespaceMetadata = c.pV1alpha1ManagedNamespaceMetadataToPV1alpha1ManagedNamespaceMetadata((*source).ManagedNamespaceMetadata)
pV1alpha1SyncPolicy = &v1alpha1SyncPolicy
}
return pV1alpha1SyncPolicy
}
func (c *ConverterImpl) pV1alpha1SyncStrategyApplyToPV1alpha1SyncStrategyApply(source *v1alpha1.SyncStrategyApply) *v1alpha11.SyncStrategyApply {
var pV1alpha1SyncStrategyApply *v1alpha11.SyncStrategyApply
if source != nil {
var v1alpha1SyncStrategyApply v1alpha11.SyncStrategyApply
pBool := (*source).Force
v1alpha1SyncStrategyApply.Force = &pBool
pV1alpha1SyncStrategyApply = &v1alpha1SyncStrategyApply
}
return pV1alpha1SyncStrategyApply
}
func (c *ConverterImpl) pV1alpha1SyncStrategyHookToPV1alpha1SyncStrategyHook(source *v1alpha1.SyncStrategyHook) *v1alpha11.SyncStrategyHook {
var pV1alpha1SyncStrategyHook *v1alpha11.SyncStrategyHook
if source != nil {
var v1alpha1SyncStrategyHook v1alpha11.SyncStrategyHook
v1alpha1SyncStrategyHook.SyncStrategyApply = c.v1alpha1SyncStrategyApplyToV1alpha1SyncStrategyApply((*source).SyncStrategyApply)
pV1alpha1SyncStrategyHook = &v1alpha1SyncStrategyHook
}
return pV1alpha1SyncStrategyHook
}
func (c *ConverterImpl) pV1alpha1SyncStrategyToPV1alpha1SyncStrategy(source *v1alpha1.SyncStrategy) *v1alpha11.SyncStrategy {
var pV1alpha1SyncStrategy *v1alpha11.SyncStrategy
if source != nil {
var v1alpha1SyncStrategy v1alpha11.SyncStrategy
v1alpha1SyncStrategy.Apply = c.pV1alpha1SyncStrategyApplyToPV1alpha1SyncStrategyApply((*source).Apply)
v1alpha1SyncStrategy.Hook = c.pV1alpha1SyncStrategyHookToPV1alpha1SyncStrategyHook((*source).Hook)
pV1alpha1SyncStrategy = &v1alpha1SyncStrategy
}
return pV1alpha1SyncStrategy
}
func (c *ConverterImpl) timeTimeToTimeTime(source time.Time) time.Time {
var timeTime time.Time
_ = source
return timeTime
}
func (c *ConverterImpl) v1TimeToPV1Time(source v11.Time) *v11.Time {
var v1Time v11.Time
v1Time.Time = c.timeTimeToTimeTime(source.Time)
return &v1Time
}
func (c *ConverterImpl) v1alpha1ApplicationConditionToV1alpha1ApplicationCondition(source v1alpha1.ApplicationCondition) v1alpha11.ApplicationCondition {
var v1alpha1ApplicationCondition v1alpha11.ApplicationCondition
v1alpha1ApplicationCondition.Type = source.Type
v1alpha1ApplicationCondition.Message = source.Message
v1alpha1ApplicationCondition.LastTransitionTime = c.pV1TimeToPV1Time(source.LastTransitionTime)
return v1alpha1ApplicationCondition
}
func (c *ConverterImpl) v1alpha1ApplicationSourceJsonnetToV1alpha1ApplicationSourceJsonnet(source v1alpha1.ApplicationSourceJsonnet) v1alpha11.ApplicationSourceJsonnet {
var v1alpha1ApplicationSourceJsonnet v1alpha11.ApplicationSourceJsonnet
var v1alpha1JsonnetVarList []v1alpha11.JsonnetVar
if source.ExtVars != nil {
v1alpha1JsonnetVarList = make([]v1alpha11.JsonnetVar, len(source.ExtVars))
for i := 0; i < len(source.ExtVars); i++ {
v1alpha1JsonnetVarList[i] = c.v1alpha1JsonnetVarToV1alpha1JsonnetVar(source.ExtVars[i])
}
}
v1alpha1ApplicationSourceJsonnet.ExtVars = v1alpha1JsonnetVarList
var v1alpha1JsonnetVarList2 []v1alpha11.JsonnetVar
if source.TLAs != nil {
v1alpha1JsonnetVarList2 = make([]v1alpha11.JsonnetVar, len(source.TLAs))
for j := 0; j < len(source.TLAs); j++ {
v1alpha1JsonnetVarList2[j] = c.v1alpha1JsonnetVarToV1alpha1JsonnetVar(source.TLAs[j])
}
}
v1alpha1ApplicationSourceJsonnet.TLAs = v1alpha1JsonnetVarList2
var stringList []string
if source.Libs != nil {
stringList = make([]string, len(source.Libs))
for k := 0; k < len(source.Libs); k++ {
stringList[k] = source.Libs[k]
}
}
v1alpha1ApplicationSourceJsonnet.Libs = stringList
return v1alpha1ApplicationSourceJsonnet
}
func (c *ConverterImpl) v1alpha1ApplicationSourceJsonnetToV1alpha1ApplicationSourceJsonnet2(source v1alpha11.ApplicationSourceJsonnet) v1alpha1.ApplicationSourceJsonnet {
var v1alpha1ApplicationSourceJsonnet v1alpha1.ApplicationSourceJsonnet
var v1alpha1JsonnetVarList []v1alpha1.JsonnetVar
if source.ExtVars != nil {
v1alpha1JsonnetVarList = make([]v1alpha1.JsonnetVar, len(source.ExtVars))
for i := 0; i < len(source.ExtVars); i++ {
v1alpha1JsonnetVarList[i] = c.v1alpha1JsonnetVarToV1alpha1JsonnetVar2(source.ExtVars[i])
}
}
v1alpha1ApplicationSourceJsonnet.ExtVars = v1alpha1JsonnetVarList
var v1alpha1JsonnetVarList2 []v1alpha1.JsonnetVar
if source.TLAs != nil {
v1alpha1JsonnetVarList2 = make([]v1alpha1.JsonnetVar, len(source.TLAs))
for j := 0; j < len(source.TLAs); j++ {
v1alpha1JsonnetVarList2[j] = c.v1alpha1JsonnetVarToV1alpha1JsonnetVar2(source.TLAs[j])
}
}
v1alpha1ApplicationSourceJsonnet.TLAs = v1alpha1JsonnetVarList2
var stringList []string
if source.Libs != nil {
stringList = make([]string, len(source.Libs))
for k := 0; k < len(source.Libs); k++ {
stringList[k] = source.Libs[k]
}
}
v1alpha1ApplicationSourceJsonnet.Libs = stringList
return v1alpha1ApplicationSourceJsonnet
}
func (c *ConverterImpl) v1alpha1ApplicationSourcePluginParameterToV1alpha1ApplicationSourcePluginParameter(source v1alpha1.ApplicationSourcePluginParameter) v1alpha11.ApplicationSourcePluginParameter {
var v1alpha1ApplicationSourcePluginParameter v1alpha11.ApplicationSourcePluginParameter
pString := source.Name
v1alpha1ApplicationSourcePluginParameter.Name = &pString
var pString2 *string
if source.String_ != nil {
xstring := *source.String_
pString2 = &xstring
}
v1alpha1ApplicationSourcePluginParameter.String_ = pString2
v1alpha1ApplicationSourcePluginParameter.OptionalMap = c.pV1alpha1OptionalMapToPV1alpha1OptionalMap(source.OptionalMap)
v1alpha1ApplicationSourcePluginParameter.OptionalArray = c.pV1alpha1OptionalArrayToPV1alpha1OptionalArray(source.OptionalArray)
return v1alpha1ApplicationSourcePluginParameter
}
func (c *ConverterImpl) v1alpha1ApplicationSourcePluginParameterToV1alpha1ApplicationSourcePluginParameter2(source v1alpha11.ApplicationSourcePluginParameter) v1alpha1.ApplicationSourcePluginParameter {
var v1alpha1ApplicationSourcePluginParameter v1alpha1.ApplicationSourcePluginParameter
var xstring string
if source.Name != nil {
xstring = *source.Name
}
v1alpha1ApplicationSourcePluginParameter.Name = xstring
var pString *string
if source.String_ != nil {
xstring2 := *source.String_
pString = &xstring2
}
v1alpha1ApplicationSourcePluginParameter.String_ = pString
v1alpha1ApplicationSourcePluginParameter.OptionalMap = c.pV1alpha1OptionalMapToPV1alpha1OptionalMap2(source.OptionalMap)
v1alpha1ApplicationSourcePluginParameter.OptionalArray = c.pV1alpha1OptionalArrayToPV1alpha1OptionalArray2(source.OptionalArray)
return v1alpha1ApplicationSourcePluginParameter
}
func (c *ConverterImpl) v1alpha1ApplicationSourcePluginParametersToV1alpha1ApplicationSourcePluginParameters(source v1alpha1.ApplicationSourcePluginParameters) v1alpha11.ApplicationSourcePluginParameters {
var v1alpha1ApplicationSourcePluginParameters v1alpha11.ApplicationSourcePluginParameters
if source != nil {
v1alpha1ApplicationSourcePluginParameters = make(v1alpha11.ApplicationSourcePluginParameters, len(source))
for i := 0; i < len(source); i++ {
v1alpha1ApplicationSourcePluginParameters[i] = c.v1alpha1ApplicationSourcePluginParameterToV1alpha1ApplicationSourcePluginParameter(source[i])
}
}
return v1alpha1ApplicationSourcePluginParameters
}
func (c *ConverterImpl) v1alpha1ApplicationSourcePluginParametersToV1alpha1ApplicationSourcePluginParameters2(source v1alpha11.ApplicationSourcePluginParameters) v1alpha1.ApplicationSourcePluginParameters {
var v1alpha1ApplicationSourcePluginParameters v1alpha1.ApplicationSourcePluginParameters
if source != nil {
v1alpha1ApplicationSourcePluginParameters = make(v1alpha1.ApplicationSourcePluginParameters, len(source))
for i := 0; i < len(source); i++ {
v1alpha1ApplicationSourcePluginParameters[i] = c.v1alpha1ApplicationSourcePluginParameterToV1alpha1ApplicationSourcePluginParameter2(source[i])
}
}
return v1alpha1ApplicationSourcePluginParameters
}
func (c *ConverterImpl) v1alpha1ApplicationSourceToV1alpha1ApplicationSource(source v1alpha1.ApplicationSource) v1alpha11.ApplicationSource {
var v1alpha1ApplicationSource v1alpha11.ApplicationSource
v1alpha1ApplicationSource.RepoURL = source.RepoURL
pString := source.Path
v1alpha1ApplicationSource.Path = &pString
pString2 := source.TargetRevision
v1alpha1ApplicationSource.TargetRevision = &pString2
v1alpha1ApplicationSource.Helm = c.pV1alpha1ApplicationSourceHelmToPV1alpha1ApplicationSourceHelm(source.Helm)
v1alpha1ApplicationSource.Kustomize = c.pV1alpha1ApplicationSourceKustomizeToPV1alpha1ApplicationSourceKustomize(source.Kustomize)
v1alpha1ApplicationSource.Directory = c.pV1alpha1ApplicationSourceDirectoryToPV1alpha1ApplicationSourceDirectory(source.Directory)
v1alpha1ApplicationSource.Plugin = c.pV1alpha1ApplicationSourcePluginToPV1alpha1ApplicationSourcePlugin(source.Plugin)
pString3 := source.Chart
v1alpha1ApplicationSource.Chart = &pString3
pString4 := source.Ref
v1alpha1ApplicationSource.Ref = &pString4
return v1alpha1ApplicationSource
}
func (c *ConverterImpl) v1alpha1ApplicationSourceToV1alpha1ApplicationSource2(source v1alpha11.ApplicationSource) v1alpha1.ApplicationSource {
var v1alpha1ApplicationSource v1alpha1.ApplicationSource
v1alpha1ApplicationSource.RepoURL = source.RepoURL
var xstring string
if source.Path != nil {
xstring = *source.Path
}
v1alpha1ApplicationSource.Path = xstring
var xstring2 string
if source.TargetRevision != nil {
xstring2 = *source.TargetRevision
}
v1alpha1ApplicationSource.TargetRevision = xstring2
v1alpha1ApplicationSource.Helm = c.pV1alpha1ApplicationSourceHelmToPV1alpha1ApplicationSourceHelm2(source.Helm)
v1alpha1ApplicationSource.Kustomize = c.pV1alpha1ApplicationSourceKustomizeToPV1alpha1ApplicationSourceKustomize2(source.Kustomize)
v1alpha1ApplicationSource.Directory = c.pV1alpha1ApplicationSourceDirectoryToPV1alpha1ApplicationSourceDirectory2(source.Directory)
v1alpha1ApplicationSource.Plugin = c.pV1alpha1ApplicationSourcePluginToPV1alpha1ApplicationSourcePlugin2(source.Plugin)
var xstring3 string
if source.Chart != nil {
xstring3 = *source.Chart
}
v1alpha1ApplicationSource.Chart = xstring3
var xstring4 string
if source.Ref != nil {
xstring4 = *source.Ref
}
v1alpha1ApplicationSource.Ref = xstring4
return v1alpha1ApplicationSource
}
func (c *ConverterImpl) v1alpha1ApplicationSourceTypeToV1alpha1ApplicationSourceType(source v1alpha1.ApplicationSourceType) v1alpha11.ApplicationSourceType {
return v1alpha11.ApplicationSourceType(source)
}
func (c *ConverterImpl) v1alpha1ApplicationSourcesToV1alpha1ApplicationSources(source v1alpha1.ApplicationSources) v1alpha11.ApplicationSources {
var v1alpha1ApplicationSources v1alpha11.ApplicationSources
if source != nil {
v1alpha1ApplicationSources = make(v1alpha11.ApplicationSources, len(source))
for i := 0; i < len(source); i++ {
v1alpha1ApplicationSources[i] = c.v1alpha1ApplicationSourceToV1alpha1ApplicationSource(source[i])
}
}
return v1alpha1ApplicationSources
}
func (c *ConverterImpl) v1alpha1ApplicationSourcesToV1alpha1ApplicationSources2(source v1alpha11.ApplicationSources) v1alpha1.ApplicationSources {
var v1alpha1ApplicationSources v1alpha1.ApplicationSources
if source != nil {
v1alpha1ApplicationSources = make(v1alpha1.ApplicationSources, len(source))
for i := 0; i < len(source); i++ {
v1alpha1ApplicationSources[i] = c.v1alpha1ApplicationSourceToV1alpha1ApplicationSource2(source[i])
}
}
return v1alpha1ApplicationSources
}
func (c *ConverterImpl) v1alpha1ApplicationSummaryToV1alpha1ApplicationSummary(source v1alpha1.ApplicationSummary) v1alpha11.ApplicationSummary {
var v1alpha1ApplicationSummary v1alpha11.ApplicationSummary
var stringList []string
if source.ExternalURLs != nil {
stringList = make([]string, len(source.ExternalURLs))
for i := 0; i < len(source.ExternalURLs); i++ {
stringList[i] = source.ExternalURLs[i]