-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmodel_application.go
1085 lines (926 loc) · 30.7 KB
/
model_application.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
/*
Qovery API
- Qovery is the fastest way to deploy your full-stack apps on any Cloud provider. - ℹ️ The API is stable and still in development.
API version: 1.0.3
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package qovery
import (
"encoding/json"
"fmt"
"time"
)
// checks if the Application type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Application{}
// Application struct for Application
type Application struct {
Id string `json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
Storage []ServiceStorageStorageInner `json:"storage,omitempty"`
Environment ReferenceObject `json:"environment"`
GitRepository *ApplicationGitRepository `json:"git_repository,omitempty"`
// Maximum cpu that can be allocated to the application based on organization cluster configuration. unit is millicores (m). 1000m = 1 cpu
MaximumCpu *int32 `json:"maximum_cpu,omitempty"`
// Maximum memory that can be allocated to the application based on organization cluster configuration. unit is MB. 1024 MB = 1GB
MaximumMemory *int32 `json:"maximum_memory,omitempty"`
// name is case insensitive
Name string `json:"name"`
// give a description to this application
Description *string `json:"description,omitempty"`
BuildMode *BuildModeEnum `json:"build_mode,omitempty"`
// The path of the associated Dockerfile. Only if you are using build_mode = DOCKER
DockerfilePath NullableString `json:"dockerfile_path,omitempty"`
// unit is millicores (m). 1000m = 1 cpu
Cpu *int32 `json:"cpu,omitempty"`
// unit is MB. 1024 MB = 1GB
Memory *int32 `json:"memory,omitempty"`
// Minimum number of instances running. This resource auto-scale based on the CPU and Memory consumption. Note: 0 means that there is no application running.
MinRunningInstances *int32 `json:"min_running_instances,omitempty"`
// Maximum number of instances running. This resource auto-scale based on the CPU and Memory consumption. Note: -1 means that there is no limit.
MaxRunningInstances *int32 `json:"max_running_instances,omitempty"`
Healthchecks Healthcheck `json:"healthchecks"`
// Specify if the environment preview option is activated or not for this application. If activated, a preview environment will be automatically cloned at each pull request. If not specified, it takes the value of the `auto_preview` property from the associated environment.
AutoPreview *bool `json:"auto_preview,omitempty"`
Ports []ServicePort `json:"ports,omitempty"`
Arguments []string `json:"arguments,omitempty"`
// optional entrypoint when launching container
Entrypoint *string `json:"entrypoint,omitempty"`
// Specify if the application will be automatically updated after receiving a new commit.
AutoDeploy *bool `json:"auto_deploy,omitempty"`
AnnotationsGroups []OrganizationAnnotationsGroupResponse `json:"annotations_groups,omitempty"`
LabelsGroups []OrganizationLabelsGroupResponse `json:"labels_groups,omitempty"`
// Icon URI representing the application.
IconUri string `json:"icon_uri"`
ServiceType ServiceTypeEnum `json:"service_type"`
AdditionalProperties map[string]interface{}
}
type _Application Application
// NewApplication instantiates a new Application object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewApplication(id string, createdAt time.Time, environment ReferenceObject, name string, healthchecks Healthcheck, iconUri string, serviceType ServiceTypeEnum) *Application {
this := Application{}
this.Id = id
this.CreatedAt = createdAt
this.Environment = environment
this.Name = name
var buildMode BuildModeEnum = BUILDMODEENUM_DOCKER
this.BuildMode = &buildMode
var minRunningInstances int32 = 1
this.MinRunningInstances = &minRunningInstances
var maxRunningInstances int32 = 1
this.MaxRunningInstances = &maxRunningInstances
this.Healthchecks = healthchecks
var autoPreview bool = true
this.AutoPreview = &autoPreview
this.IconUri = iconUri
this.ServiceType = serviceType
return &this
}
// NewApplicationWithDefaults instantiates a new Application object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewApplicationWithDefaults() *Application {
this := Application{}
var buildMode BuildModeEnum = BUILDMODEENUM_DOCKER
this.BuildMode = &buildMode
var minRunningInstances int32 = 1
this.MinRunningInstances = &minRunningInstances
var maxRunningInstances int32 = 1
this.MaxRunningInstances = &maxRunningInstances
var autoPreview bool = true
this.AutoPreview = &autoPreview
return &this
}
// GetId returns the Id field value
func (o *Application) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *Application) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *Application) SetId(v string) {
o.Id = v
}
// GetCreatedAt returns the CreatedAt field value
func (o *Application) GetCreatedAt() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value
// and a boolean to check if the value has been set.
func (o *Application) GetCreatedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.CreatedAt, true
}
// SetCreatedAt sets field value
func (o *Application) SetCreatedAt(v time.Time) {
o.CreatedAt = v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *Application) GetUpdatedAt() time.Time {
if o == nil || IsNil(o.UpdatedAt) {
var ret time.Time
return ret
}
return *o.UpdatedAt
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetUpdatedAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.UpdatedAt) {
return nil, false
}
return o.UpdatedAt, true
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *Application) HasUpdatedAt() bool {
if o != nil && !IsNil(o.UpdatedAt) {
return true
}
return false
}
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
func (o *Application) SetUpdatedAt(v time.Time) {
o.UpdatedAt = &v
}
// GetStorage returns the Storage field value if set, zero value otherwise.
func (o *Application) GetStorage() []ServiceStorageStorageInner {
if o == nil || IsNil(o.Storage) {
var ret []ServiceStorageStorageInner
return ret
}
return o.Storage
}
// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetStorageOk() ([]ServiceStorageStorageInner, bool) {
if o == nil || IsNil(o.Storage) {
return nil, false
}
return o.Storage, true
}
// HasStorage returns a boolean if a field has been set.
func (o *Application) HasStorage() bool {
if o != nil && !IsNil(o.Storage) {
return true
}
return false
}
// SetStorage gets a reference to the given []ServiceStorageStorageInner and assigns it to the Storage field.
func (o *Application) SetStorage(v []ServiceStorageStorageInner) {
o.Storage = v
}
// GetEnvironment returns the Environment field value
func (o *Application) GetEnvironment() ReferenceObject {
if o == nil {
var ret ReferenceObject
return ret
}
return o.Environment
}
// GetEnvironmentOk returns a tuple with the Environment field value
// and a boolean to check if the value has been set.
func (o *Application) GetEnvironmentOk() (*ReferenceObject, bool) {
if o == nil {
return nil, false
}
return &o.Environment, true
}
// SetEnvironment sets field value
func (o *Application) SetEnvironment(v ReferenceObject) {
o.Environment = v
}
// GetGitRepository returns the GitRepository field value if set, zero value otherwise.
func (o *Application) GetGitRepository() ApplicationGitRepository {
if o == nil || IsNil(o.GitRepository) {
var ret ApplicationGitRepository
return ret
}
return *o.GitRepository
}
// GetGitRepositoryOk returns a tuple with the GitRepository field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetGitRepositoryOk() (*ApplicationGitRepository, bool) {
if o == nil || IsNil(o.GitRepository) {
return nil, false
}
return o.GitRepository, true
}
// HasGitRepository returns a boolean if a field has been set.
func (o *Application) HasGitRepository() bool {
if o != nil && !IsNil(o.GitRepository) {
return true
}
return false
}
// SetGitRepository gets a reference to the given ApplicationGitRepository and assigns it to the GitRepository field.
func (o *Application) SetGitRepository(v ApplicationGitRepository) {
o.GitRepository = &v
}
// GetMaximumCpu returns the MaximumCpu field value if set, zero value otherwise.
func (o *Application) GetMaximumCpu() int32 {
if o == nil || IsNil(o.MaximumCpu) {
var ret int32
return ret
}
return *o.MaximumCpu
}
// GetMaximumCpuOk returns a tuple with the MaximumCpu field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetMaximumCpuOk() (*int32, bool) {
if o == nil || IsNil(o.MaximumCpu) {
return nil, false
}
return o.MaximumCpu, true
}
// HasMaximumCpu returns a boolean if a field has been set.
func (o *Application) HasMaximumCpu() bool {
if o != nil && !IsNil(o.MaximumCpu) {
return true
}
return false
}
// SetMaximumCpu gets a reference to the given int32 and assigns it to the MaximumCpu field.
func (o *Application) SetMaximumCpu(v int32) {
o.MaximumCpu = &v
}
// GetMaximumMemory returns the MaximumMemory field value if set, zero value otherwise.
func (o *Application) GetMaximumMemory() int32 {
if o == nil || IsNil(o.MaximumMemory) {
var ret int32
return ret
}
return *o.MaximumMemory
}
// GetMaximumMemoryOk returns a tuple with the MaximumMemory field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetMaximumMemoryOk() (*int32, bool) {
if o == nil || IsNil(o.MaximumMemory) {
return nil, false
}
return o.MaximumMemory, true
}
// HasMaximumMemory returns a boolean if a field has been set.
func (o *Application) HasMaximumMemory() bool {
if o != nil && !IsNil(o.MaximumMemory) {
return true
}
return false
}
// SetMaximumMemory gets a reference to the given int32 and assigns it to the MaximumMemory field.
func (o *Application) SetMaximumMemory(v int32) {
o.MaximumMemory = &v
}
// GetName returns the Name field value
func (o *Application) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *Application) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *Application) SetName(v string) {
o.Name = v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *Application) GetDescription() string {
if o == nil || IsNil(o.Description) {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetDescriptionOk() (*string, bool) {
if o == nil || IsNil(o.Description) {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *Application) HasDescription() bool {
if o != nil && !IsNil(o.Description) {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *Application) SetDescription(v string) {
o.Description = &v
}
// GetBuildMode returns the BuildMode field value if set, zero value otherwise.
func (o *Application) GetBuildMode() BuildModeEnum {
if o == nil || IsNil(o.BuildMode) {
var ret BuildModeEnum
return ret
}
return *o.BuildMode
}
// GetBuildModeOk returns a tuple with the BuildMode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetBuildModeOk() (*BuildModeEnum, bool) {
if o == nil || IsNil(o.BuildMode) {
return nil, false
}
return o.BuildMode, true
}
// HasBuildMode returns a boolean if a field has been set.
func (o *Application) HasBuildMode() bool {
if o != nil && !IsNil(o.BuildMode) {
return true
}
return false
}
// SetBuildMode gets a reference to the given BuildModeEnum and assigns it to the BuildMode field.
func (o *Application) SetBuildMode(v BuildModeEnum) {
o.BuildMode = &v
}
// GetDockerfilePath returns the DockerfilePath field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Application) GetDockerfilePath() string {
if o == nil || IsNil(o.DockerfilePath.Get()) {
var ret string
return ret
}
return *o.DockerfilePath.Get()
}
// GetDockerfilePathOk returns a tuple with the DockerfilePath field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *Application) GetDockerfilePathOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.DockerfilePath.Get(), o.DockerfilePath.IsSet()
}
// HasDockerfilePath returns a boolean if a field has been set.
func (o *Application) HasDockerfilePath() bool {
if o != nil && o.DockerfilePath.IsSet() {
return true
}
return false
}
// SetDockerfilePath gets a reference to the given NullableString and assigns it to the DockerfilePath field.
func (o *Application) SetDockerfilePath(v string) {
o.DockerfilePath.Set(&v)
}
// SetDockerfilePathNil sets the value for DockerfilePath to be an explicit nil
func (o *Application) SetDockerfilePathNil() {
o.DockerfilePath.Set(nil)
}
// UnsetDockerfilePath ensures that no value is present for DockerfilePath, not even an explicit nil
func (o *Application) UnsetDockerfilePath() {
o.DockerfilePath.Unset()
}
// GetCpu returns the Cpu field value if set, zero value otherwise.
func (o *Application) GetCpu() int32 {
if o == nil || IsNil(o.Cpu) {
var ret int32
return ret
}
return *o.Cpu
}
// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetCpuOk() (*int32, bool) {
if o == nil || IsNil(o.Cpu) {
return nil, false
}
return o.Cpu, true
}
// HasCpu returns a boolean if a field has been set.
func (o *Application) HasCpu() bool {
if o != nil && !IsNil(o.Cpu) {
return true
}
return false
}
// SetCpu gets a reference to the given int32 and assigns it to the Cpu field.
func (o *Application) SetCpu(v int32) {
o.Cpu = &v
}
// GetMemory returns the Memory field value if set, zero value otherwise.
func (o *Application) GetMemory() int32 {
if o == nil || IsNil(o.Memory) {
var ret int32
return ret
}
return *o.Memory
}
// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetMemoryOk() (*int32, bool) {
if o == nil || IsNil(o.Memory) {
return nil, false
}
return o.Memory, true
}
// HasMemory returns a boolean if a field has been set.
func (o *Application) HasMemory() bool {
if o != nil && !IsNil(o.Memory) {
return true
}
return false
}
// SetMemory gets a reference to the given int32 and assigns it to the Memory field.
func (o *Application) SetMemory(v int32) {
o.Memory = &v
}
// GetMinRunningInstances returns the MinRunningInstances field value if set, zero value otherwise.
func (o *Application) GetMinRunningInstances() int32 {
if o == nil || IsNil(o.MinRunningInstances) {
var ret int32
return ret
}
return *o.MinRunningInstances
}
// GetMinRunningInstancesOk returns a tuple with the MinRunningInstances field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetMinRunningInstancesOk() (*int32, bool) {
if o == nil || IsNil(o.MinRunningInstances) {
return nil, false
}
return o.MinRunningInstances, true
}
// HasMinRunningInstances returns a boolean if a field has been set.
func (o *Application) HasMinRunningInstances() bool {
if o != nil && !IsNil(o.MinRunningInstances) {
return true
}
return false
}
// SetMinRunningInstances gets a reference to the given int32 and assigns it to the MinRunningInstances field.
func (o *Application) SetMinRunningInstances(v int32) {
o.MinRunningInstances = &v
}
// GetMaxRunningInstances returns the MaxRunningInstances field value if set, zero value otherwise.
func (o *Application) GetMaxRunningInstances() int32 {
if o == nil || IsNil(o.MaxRunningInstances) {
var ret int32
return ret
}
return *o.MaxRunningInstances
}
// GetMaxRunningInstancesOk returns a tuple with the MaxRunningInstances field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetMaxRunningInstancesOk() (*int32, bool) {
if o == nil || IsNil(o.MaxRunningInstances) {
return nil, false
}
return o.MaxRunningInstances, true
}
// HasMaxRunningInstances returns a boolean if a field has been set.
func (o *Application) HasMaxRunningInstances() bool {
if o != nil && !IsNil(o.MaxRunningInstances) {
return true
}
return false
}
// SetMaxRunningInstances gets a reference to the given int32 and assigns it to the MaxRunningInstances field.
func (o *Application) SetMaxRunningInstances(v int32) {
o.MaxRunningInstances = &v
}
// GetHealthchecks returns the Healthchecks field value
func (o *Application) GetHealthchecks() Healthcheck {
if o == nil {
var ret Healthcheck
return ret
}
return o.Healthchecks
}
// GetHealthchecksOk returns a tuple with the Healthchecks field value
// and a boolean to check if the value has been set.
func (o *Application) GetHealthchecksOk() (*Healthcheck, bool) {
if o == nil {
return nil, false
}
return &o.Healthchecks, true
}
// SetHealthchecks sets field value
func (o *Application) SetHealthchecks(v Healthcheck) {
o.Healthchecks = v
}
// GetAutoPreview returns the AutoPreview field value if set, zero value otherwise.
func (o *Application) GetAutoPreview() bool {
if o == nil || IsNil(o.AutoPreview) {
var ret bool
return ret
}
return *o.AutoPreview
}
// GetAutoPreviewOk returns a tuple with the AutoPreview field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetAutoPreviewOk() (*bool, bool) {
if o == nil || IsNil(o.AutoPreview) {
return nil, false
}
return o.AutoPreview, true
}
// HasAutoPreview returns a boolean if a field has been set.
func (o *Application) HasAutoPreview() bool {
if o != nil && !IsNil(o.AutoPreview) {
return true
}
return false
}
// SetAutoPreview gets a reference to the given bool and assigns it to the AutoPreview field.
func (o *Application) SetAutoPreview(v bool) {
o.AutoPreview = &v
}
// GetPorts returns the Ports field value if set, zero value otherwise.
func (o *Application) GetPorts() []ServicePort {
if o == nil || IsNil(o.Ports) {
var ret []ServicePort
return ret
}
return o.Ports
}
// GetPortsOk returns a tuple with the Ports field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetPortsOk() ([]ServicePort, bool) {
if o == nil || IsNil(o.Ports) {
return nil, false
}
return o.Ports, true
}
// HasPorts returns a boolean if a field has been set.
func (o *Application) HasPorts() bool {
if o != nil && !IsNil(o.Ports) {
return true
}
return false
}
// SetPorts gets a reference to the given []ServicePort and assigns it to the Ports field.
func (o *Application) SetPorts(v []ServicePort) {
o.Ports = v
}
// GetArguments returns the Arguments field value if set, zero value otherwise.
func (o *Application) GetArguments() []string {
if o == nil || IsNil(o.Arguments) {
var ret []string
return ret
}
return o.Arguments
}
// GetArgumentsOk returns a tuple with the Arguments field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetArgumentsOk() ([]string, bool) {
if o == nil || IsNil(o.Arguments) {
return nil, false
}
return o.Arguments, true
}
// HasArguments returns a boolean if a field has been set.
func (o *Application) HasArguments() bool {
if o != nil && !IsNil(o.Arguments) {
return true
}
return false
}
// SetArguments gets a reference to the given []string and assigns it to the Arguments field.
func (o *Application) SetArguments(v []string) {
o.Arguments = v
}
// GetEntrypoint returns the Entrypoint field value if set, zero value otherwise.
func (o *Application) GetEntrypoint() string {
if o == nil || IsNil(o.Entrypoint) {
var ret string
return ret
}
return *o.Entrypoint
}
// GetEntrypointOk returns a tuple with the Entrypoint field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetEntrypointOk() (*string, bool) {
if o == nil || IsNil(o.Entrypoint) {
return nil, false
}
return o.Entrypoint, true
}
// HasEntrypoint returns a boolean if a field has been set.
func (o *Application) HasEntrypoint() bool {
if o != nil && !IsNil(o.Entrypoint) {
return true
}
return false
}
// SetEntrypoint gets a reference to the given string and assigns it to the Entrypoint field.
func (o *Application) SetEntrypoint(v string) {
o.Entrypoint = &v
}
// GetAutoDeploy returns the AutoDeploy field value if set, zero value otherwise.
func (o *Application) GetAutoDeploy() bool {
if o == nil || IsNil(o.AutoDeploy) {
var ret bool
return ret
}
return *o.AutoDeploy
}
// GetAutoDeployOk returns a tuple with the AutoDeploy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetAutoDeployOk() (*bool, bool) {
if o == nil || IsNil(o.AutoDeploy) {
return nil, false
}
return o.AutoDeploy, true
}
// HasAutoDeploy returns a boolean if a field has been set.
func (o *Application) HasAutoDeploy() bool {
if o != nil && !IsNil(o.AutoDeploy) {
return true
}
return false
}
// SetAutoDeploy gets a reference to the given bool and assigns it to the AutoDeploy field.
func (o *Application) SetAutoDeploy(v bool) {
o.AutoDeploy = &v
}
// GetAnnotationsGroups returns the AnnotationsGroups field value if set, zero value otherwise.
func (o *Application) GetAnnotationsGroups() []OrganizationAnnotationsGroupResponse {
if o == nil || IsNil(o.AnnotationsGroups) {
var ret []OrganizationAnnotationsGroupResponse
return ret
}
return o.AnnotationsGroups
}
// GetAnnotationsGroupsOk returns a tuple with the AnnotationsGroups field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetAnnotationsGroupsOk() ([]OrganizationAnnotationsGroupResponse, bool) {
if o == nil || IsNil(o.AnnotationsGroups) {
return nil, false
}
return o.AnnotationsGroups, true
}
// HasAnnotationsGroups returns a boolean if a field has been set.
func (o *Application) HasAnnotationsGroups() bool {
if o != nil && !IsNil(o.AnnotationsGroups) {
return true
}
return false
}
// SetAnnotationsGroups gets a reference to the given []OrganizationAnnotationsGroupResponse and assigns it to the AnnotationsGroups field.
func (o *Application) SetAnnotationsGroups(v []OrganizationAnnotationsGroupResponse) {
o.AnnotationsGroups = v
}
// GetLabelsGroups returns the LabelsGroups field value if set, zero value otherwise.
func (o *Application) GetLabelsGroups() []OrganizationLabelsGroupResponse {
if o == nil || IsNil(o.LabelsGroups) {
var ret []OrganizationLabelsGroupResponse
return ret
}
return o.LabelsGroups
}
// GetLabelsGroupsOk returns a tuple with the LabelsGroups field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Application) GetLabelsGroupsOk() ([]OrganizationLabelsGroupResponse, bool) {
if o == nil || IsNil(o.LabelsGroups) {
return nil, false
}
return o.LabelsGroups, true
}
// HasLabelsGroups returns a boolean if a field has been set.
func (o *Application) HasLabelsGroups() bool {
if o != nil && !IsNil(o.LabelsGroups) {
return true
}
return false
}
// SetLabelsGroups gets a reference to the given []OrganizationLabelsGroupResponse and assigns it to the LabelsGroups field.
func (o *Application) SetLabelsGroups(v []OrganizationLabelsGroupResponse) {
o.LabelsGroups = v
}
// GetIconUri returns the IconUri field value
func (o *Application) GetIconUri() string {
if o == nil {
var ret string
return ret
}
return o.IconUri
}
// GetIconUriOk returns a tuple with the IconUri field value
// and a boolean to check if the value has been set.
func (o *Application) GetIconUriOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.IconUri, true
}
// SetIconUri sets field value
func (o *Application) SetIconUri(v string) {
o.IconUri = v
}
// GetServiceType returns the ServiceType field value
func (o *Application) GetServiceType() ServiceTypeEnum {
if o == nil {
var ret ServiceTypeEnum
return ret
}
return o.ServiceType
}
// GetServiceTypeOk returns a tuple with the ServiceType field value
// and a boolean to check if the value has been set.
func (o *Application) GetServiceTypeOk() (*ServiceTypeEnum, bool) {
if o == nil {
return nil, false
}
return &o.ServiceType, true
}
// SetServiceType sets field value
func (o *Application) SetServiceType(v ServiceTypeEnum) {
o.ServiceType = v
}
func (o Application) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Application) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["id"] = o.Id
toSerialize["created_at"] = o.CreatedAt
if !IsNil(o.UpdatedAt) {
toSerialize["updated_at"] = o.UpdatedAt
}
if !IsNil(o.Storage) {
toSerialize["storage"] = o.Storage
}
toSerialize["environment"] = o.Environment
if !IsNil(o.GitRepository) {
toSerialize["git_repository"] = o.GitRepository
}
if !IsNil(o.MaximumCpu) {
toSerialize["maximum_cpu"] = o.MaximumCpu
}
if !IsNil(o.MaximumMemory) {
toSerialize["maximum_memory"] = o.MaximumMemory
}
toSerialize["name"] = o.Name
if !IsNil(o.Description) {
toSerialize["description"] = o.Description
}
if !IsNil(o.BuildMode) {
toSerialize["build_mode"] = o.BuildMode
}
if o.DockerfilePath.IsSet() {
toSerialize["dockerfile_path"] = o.DockerfilePath.Get()
}
if !IsNil(o.Cpu) {
toSerialize["cpu"] = o.Cpu
}
if !IsNil(o.Memory) {
toSerialize["memory"] = o.Memory
}
if !IsNil(o.MinRunningInstances) {
toSerialize["min_running_instances"] = o.MinRunningInstances
}
if !IsNil(o.MaxRunningInstances) {
toSerialize["max_running_instances"] = o.MaxRunningInstances
}
toSerialize["healthchecks"] = o.Healthchecks
if !IsNil(o.AutoPreview) {
toSerialize["auto_preview"] = o.AutoPreview
}
if !IsNil(o.Ports) {
toSerialize["ports"] = o.Ports
}
if !IsNil(o.Arguments) {
toSerialize["arguments"] = o.Arguments
}
if !IsNil(o.Entrypoint) {
toSerialize["entrypoint"] = o.Entrypoint
}
if !IsNil(o.AutoDeploy) {
toSerialize["auto_deploy"] = o.AutoDeploy
}
if !IsNil(o.AnnotationsGroups) {
toSerialize["annotations_groups"] = o.AnnotationsGroups
}
if !IsNil(o.LabelsGroups) {
toSerialize["labels_groups"] = o.LabelsGroups
}
toSerialize["icon_uri"] = o.IconUri
toSerialize["service_type"] = o.ServiceType
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *Application) UnmarshalJSON(data []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"id",
"created_at",
"environment",
"name",
"healthchecks",
"icon_uri",
"service_type",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(data, &allProperties)
if err != nil {
return err
}
for _, requiredProperty := range requiredProperties {