/
os_policy.pb.go
executable file
·3124 lines (2769 loc) · 130 KB
/
os_policy.pb.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
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.32.0
// protoc v4.25.2
// source: google/cloud/osconfig/v1alpha/os_policy.proto
package osconfigpb
import (
reflect "reflect"
sync "sync"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Policy mode
type OSPolicy_Mode int32
const (
// Invalid mode
OSPolicy_MODE_UNSPECIFIED OSPolicy_Mode = 0
// This mode checks if the configuration resources in the policy are in
// their desired state. No actions are performed if they are not in the
// desired state. This mode is used for reporting purposes.
OSPolicy_VALIDATION OSPolicy_Mode = 1
// This mode checks if the configuration resources in the policy are in
// their desired state, and if not, enforces the desired state.
OSPolicy_ENFORCEMENT OSPolicy_Mode = 2
)
// Enum value maps for OSPolicy_Mode.
var (
OSPolicy_Mode_name = map[int32]string{
0: "MODE_UNSPECIFIED",
1: "VALIDATION",
2: "ENFORCEMENT",
}
OSPolicy_Mode_value = map[string]int32{
"MODE_UNSPECIFIED": 0,
"VALIDATION": 1,
"ENFORCEMENT": 2,
}
)
func (x OSPolicy_Mode) Enum() *OSPolicy_Mode {
p := new(OSPolicy_Mode)
*p = x
return p
}
func (x OSPolicy_Mode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (OSPolicy_Mode) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_osconfig_v1alpha_os_policy_proto_enumTypes[0].Descriptor()
}
func (OSPolicy_Mode) Type() protoreflect.EnumType {
return &file_google_cloud_osconfig_v1alpha_os_policy_proto_enumTypes[0]
}
func (x OSPolicy_Mode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use OSPolicy_Mode.Descriptor instead.
func (OSPolicy_Mode) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_osconfig_v1alpha_os_policy_proto_rawDescGZIP(), []int{0, 0}
}
// The desired state that the OS Config agent maintains on the VM.
type OSPolicy_Resource_PackageResource_DesiredState int32
const (
// Unspecified is invalid.
OSPolicy_Resource_PackageResource_DESIRED_STATE_UNSPECIFIED OSPolicy_Resource_PackageResource_DesiredState = 0
// Ensure that the package is installed.
OSPolicy_Resource_PackageResource_INSTALLED OSPolicy_Resource_PackageResource_DesiredState = 1
// The agent ensures that the package is not installed and
// uninstalls it if detected.
OSPolicy_Resource_PackageResource_REMOVED OSPolicy_Resource_PackageResource_DesiredState = 2
)
// Enum value maps for OSPolicy_Resource_PackageResource_DesiredState.
var (
OSPolicy_Resource_PackageResource_DesiredState_name = map[int32]string{
0: "DESIRED_STATE_UNSPECIFIED",
1: "INSTALLED",
2: "REMOVED",
}
OSPolicy_Resource_PackageResource_DesiredState_value = map[string]int32{
"DESIRED_STATE_UNSPECIFIED": 0,
"INSTALLED": 1,
"REMOVED": 2,
}
)
func (x OSPolicy_Resource_PackageResource_DesiredState) Enum() *OSPolicy_Resource_PackageResource_DesiredState {
p := new(OSPolicy_Resource_PackageResource_DesiredState)
*p = x
return p
}
func (x OSPolicy_Resource_PackageResource_DesiredState) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (OSPolicy_Resource_PackageResource_DesiredState) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_osconfig_v1alpha_os_policy_proto_enumTypes[1].Descriptor()
}
func (OSPolicy_Resource_PackageResource_DesiredState) Type() protoreflect.EnumType {
return &file_google_cloud_osconfig_v1alpha_os_policy_proto_enumTypes[1]
}
func (x OSPolicy_Resource_PackageResource_DesiredState) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use OSPolicy_Resource_PackageResource_DesiredState.Descriptor instead.
func (OSPolicy_Resource_PackageResource_DesiredState) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_osconfig_v1alpha_os_policy_proto_rawDescGZIP(), []int{0, 2, 1, 0}
}
// Type of archive.
type OSPolicy_Resource_RepositoryResource_AptRepository_ArchiveType int32
const (
// Unspecified is invalid.
OSPolicy_Resource_RepositoryResource_AptRepository_ARCHIVE_TYPE_UNSPECIFIED OSPolicy_Resource_RepositoryResource_AptRepository_ArchiveType = 0
// Deb indicates that the archive contains binary files.
OSPolicy_Resource_RepositoryResource_AptRepository_DEB OSPolicy_Resource_RepositoryResource_AptRepository_ArchiveType = 1
// Deb-src indicates that the archive contains source files.
OSPolicy_Resource_RepositoryResource_AptRepository_DEB_SRC OSPolicy_Resource_RepositoryResource_AptRepository_ArchiveType = 2
)
// Enum value maps for OSPolicy_Resource_RepositoryResource_AptRepository_ArchiveType.
var (
OSPolicy_Resource_RepositoryResource_AptRepository_ArchiveType_name = map[int32]string{
0: "ARCHIVE_TYPE_UNSPECIFIED",
1: "DEB",
2: "DEB_SRC",
}
OSPolicy_Resource_RepositoryResource_AptRepository_ArchiveType_value = map[string]int32{
"ARCHIVE_TYPE_UNSPECIFIED": 0,
"DEB": 1,
"DEB_SRC": 2,
}
)
func (x OSPolicy_Resource_RepositoryResource_AptRepository_ArchiveType) Enum() *OSPolicy_Resource_RepositoryResource_AptRepository_ArchiveType {
p := new(OSPolicy_Resource_RepositoryResource_AptRepository_ArchiveType)
*p = x
return p
}
func (x OSPolicy_Resource_RepositoryResource_AptRepository_ArchiveType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (OSPolicy_Resource_RepositoryResource_AptRepository_ArchiveType) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_osconfig_v1alpha_os_policy_proto_enumTypes[2].Descriptor()
}
func (OSPolicy_Resource_RepositoryResource_AptRepository_ArchiveType) Type() protoreflect.EnumType {
return &file_google_cloud_osconfig_v1alpha_os_policy_proto_enumTypes[2]
}
func (x OSPolicy_Resource_RepositoryResource_AptRepository_ArchiveType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use OSPolicy_Resource_RepositoryResource_AptRepository_ArchiveType.Descriptor instead.
func (OSPolicy_Resource_RepositoryResource_AptRepository_ArchiveType) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_osconfig_v1alpha_os_policy_proto_rawDescGZIP(), []int{0, 2, 2, 0, 0}
}
// The interpreter to use.
type OSPolicy_Resource_ExecResource_Exec_Interpreter int32
const (
// Invalid value, the request will return validation error.
OSPolicy_Resource_ExecResource_Exec_INTERPRETER_UNSPECIFIED OSPolicy_Resource_ExecResource_Exec_Interpreter = 0
// If an interpreter is not specified, the
// source is executed directly. This execution, without an
// interpreter, only succeeds for executables and scripts that have <a
// href="https://en.wikipedia.org/wiki/Shebang_(Unix)"
// class="external">shebang lines</a>.
OSPolicy_Resource_ExecResource_Exec_NONE OSPolicy_Resource_ExecResource_Exec_Interpreter = 1
// Indicates that the script runs with `/bin/sh` on Linux and
// `cmd.exe` on Windows.
OSPolicy_Resource_ExecResource_Exec_SHELL OSPolicy_Resource_ExecResource_Exec_Interpreter = 2
// Indicates that the script runs with PowerShell.
OSPolicy_Resource_ExecResource_Exec_POWERSHELL OSPolicy_Resource_ExecResource_Exec_Interpreter = 3
)
// Enum value maps for OSPolicy_Resource_ExecResource_Exec_Interpreter.
var (
OSPolicy_Resource_ExecResource_Exec_Interpreter_name = map[int32]string{
0: "INTERPRETER_UNSPECIFIED",
1: "NONE",
2: "SHELL",
3: "POWERSHELL",
}
OSPolicy_Resource_ExecResource_Exec_Interpreter_value = map[string]int32{
"INTERPRETER_UNSPECIFIED": 0,
"NONE": 1,
"SHELL": 2,
"POWERSHELL": 3,
}
)
func (x OSPolicy_Resource_ExecResource_Exec_Interpreter) Enum() *OSPolicy_Resource_ExecResource_Exec_Interpreter {
p := new(OSPolicy_Resource_ExecResource_Exec_Interpreter)
*p = x
return p
}
func (x OSPolicy_Resource_ExecResource_Exec_Interpreter) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (OSPolicy_Resource_ExecResource_Exec_Interpreter) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_osconfig_v1alpha_os_policy_proto_enumTypes[3].Descriptor()
}
func (OSPolicy_Resource_ExecResource_Exec_Interpreter) Type() protoreflect.EnumType {
return &file_google_cloud_osconfig_v1alpha_os_policy_proto_enumTypes[3]
}
func (x OSPolicy_Resource_ExecResource_Exec_Interpreter) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use OSPolicy_Resource_ExecResource_Exec_Interpreter.Descriptor instead.
func (OSPolicy_Resource_ExecResource_Exec_Interpreter) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_osconfig_v1alpha_os_policy_proto_rawDescGZIP(), []int{0, 2, 3, 0, 0}
}
// Desired state of the file.
type OSPolicy_Resource_FileResource_DesiredState int32
const (
// Unspecified is invalid.
OSPolicy_Resource_FileResource_DESIRED_STATE_UNSPECIFIED OSPolicy_Resource_FileResource_DesiredState = 0
// Ensure file at path is present.
OSPolicy_Resource_FileResource_PRESENT OSPolicy_Resource_FileResource_DesiredState = 1
// Ensure file at path is absent.
OSPolicy_Resource_FileResource_ABSENT OSPolicy_Resource_FileResource_DesiredState = 2
// Ensure the contents of the file at path matches. If the file does
// not exist it will be created.
OSPolicy_Resource_FileResource_CONTENTS_MATCH OSPolicy_Resource_FileResource_DesiredState = 3
)
// Enum value maps for OSPolicy_Resource_FileResource_DesiredState.
var (
OSPolicy_Resource_FileResource_DesiredState_name = map[int32]string{
0: "DESIRED_STATE_UNSPECIFIED",
1: "PRESENT",
2: "ABSENT",
3: "CONTENTS_MATCH",
}
OSPolicy_Resource_FileResource_DesiredState_value = map[string]int32{
"DESIRED_STATE_UNSPECIFIED": 0,
"PRESENT": 1,
"ABSENT": 2,
"CONTENTS_MATCH": 3,
}
)
func (x OSPolicy_Resource_FileResource_DesiredState) Enum() *OSPolicy_Resource_FileResource_DesiredState {
p := new(OSPolicy_Resource_FileResource_DesiredState)
*p = x
return p
}
func (x OSPolicy_Resource_FileResource_DesiredState) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (OSPolicy_Resource_FileResource_DesiredState) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_osconfig_v1alpha_os_policy_proto_enumTypes[4].Descriptor()
}
func (OSPolicy_Resource_FileResource_DesiredState) Type() protoreflect.EnumType {
return &file_google_cloud_osconfig_v1alpha_os_policy_proto_enumTypes[4]
}
func (x OSPolicy_Resource_FileResource_DesiredState) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use OSPolicy_Resource_FileResource_DesiredState.Descriptor instead.
func (OSPolicy_Resource_FileResource_DesiredState) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_osconfig_v1alpha_os_policy_proto_rawDescGZIP(), []int{0, 2, 4, 0}
}
// An OS policy defines the desired state configuration for a VM.
type OSPolicy struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The id of the OS policy with the following restrictions:
//
// * Must contain only lowercase letters, numbers, and hyphens.
// * Must start with a letter.
// * Must be between 1-63 characters.
// * Must end with a number or a letter.
// * Must be unique within the assignment.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Policy description.
// Length of the description is limited to 1024 characters.
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
// Required. Policy mode
Mode OSPolicy_Mode `protobuf:"varint,3,opt,name=mode,proto3,enum=google.cloud.osconfig.v1alpha.OSPolicy_Mode" json:"mode,omitempty"`
// Required. List of resource groups for the policy.
// For a particular VM, resource groups are evaluated in the order specified
// and the first resource group that is applicable is selected and the rest
// are ignored.
//
// If none of the resource groups are applicable for a VM, the VM is
// considered to be non-compliant w.r.t this policy. This behavior can be
// toggled by the flag `allow_no_resource_group_match`
ResourceGroups []*OSPolicy_ResourceGroup `protobuf:"bytes,4,rep,name=resource_groups,json=resourceGroups,proto3" json:"resource_groups,omitempty"`
// This flag determines the OS policy compliance status when none of the
// resource groups within the policy are applicable for a VM. Set this value
// to `true` if the policy needs to be reported as compliant even if the
// policy has nothing to validate or enforce.
AllowNoResourceGroupMatch bool `protobuf:"varint,5,opt,name=allow_no_resource_group_match,json=allowNoResourceGroupMatch,proto3" json:"allow_no_resource_group_match,omitempty"`
}
func (x *OSPolicy) Reset() {
*x = OSPolicy{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OSPolicy) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OSPolicy) ProtoMessage() {}
func (x *OSPolicy) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OSPolicy.ProtoReflect.Descriptor instead.
func (*OSPolicy) Descriptor() ([]byte, []int) {
return file_google_cloud_osconfig_v1alpha_os_policy_proto_rawDescGZIP(), []int{0}
}
func (x *OSPolicy) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *OSPolicy) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *OSPolicy) GetMode() OSPolicy_Mode {
if x != nil {
return x.Mode
}
return OSPolicy_MODE_UNSPECIFIED
}
func (x *OSPolicy) GetResourceGroups() []*OSPolicy_ResourceGroup {
if x != nil {
return x.ResourceGroups
}
return nil
}
func (x *OSPolicy) GetAllowNoResourceGroupMatch() bool {
if x != nil {
return x.AllowNoResourceGroupMatch
}
return false
}
// Filtering criteria to select VMs based on OS details.
type OSPolicy_OSFilter struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// This should match OS short name emitted by the OS inventory agent.
// An empty value matches any OS.
OsShortName string `protobuf:"bytes,1,opt,name=os_short_name,json=osShortName,proto3" json:"os_short_name,omitempty"`
// This value should match the version emitted by the OS inventory
// agent.
// Prefix matches are supported if asterisk(*) is provided as the
// last character. For example, to match all versions with a major
// version of `7`, specify the following value for this field `7.*`
OsVersion string `protobuf:"bytes,2,opt,name=os_version,json=osVersion,proto3" json:"os_version,omitempty"`
}
func (x *OSPolicy_OSFilter) Reset() {
*x = OSPolicy_OSFilter{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OSPolicy_OSFilter) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OSPolicy_OSFilter) ProtoMessage() {}
func (x *OSPolicy_OSFilter) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OSPolicy_OSFilter.ProtoReflect.Descriptor instead.
func (*OSPolicy_OSFilter) Descriptor() ([]byte, []int) {
return file_google_cloud_osconfig_v1alpha_os_policy_proto_rawDescGZIP(), []int{0, 0}
}
func (x *OSPolicy_OSFilter) GetOsShortName() string {
if x != nil {
return x.OsShortName
}
return ""
}
func (x *OSPolicy_OSFilter) GetOsVersion() string {
if x != nil {
return x.OsVersion
}
return ""
}
// Filtering criteria to select VMs based on inventory details.
type OSPolicy_InventoryFilter struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The OS short name
OsShortName string `protobuf:"bytes,1,opt,name=os_short_name,json=osShortName,proto3" json:"os_short_name,omitempty"`
// The OS version
//
// Prefix matches are supported if asterisk(*) is provided as the
// last character. For example, to match all versions with a major
// version of `7`, specify the following value for this field `7.*`
//
// An empty string matches all OS versions.
OsVersion string `protobuf:"bytes,2,opt,name=os_version,json=osVersion,proto3" json:"os_version,omitempty"`
}
func (x *OSPolicy_InventoryFilter) Reset() {
*x = OSPolicy_InventoryFilter{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OSPolicy_InventoryFilter) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OSPolicy_InventoryFilter) ProtoMessage() {}
func (x *OSPolicy_InventoryFilter) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OSPolicy_InventoryFilter.ProtoReflect.Descriptor instead.
func (*OSPolicy_InventoryFilter) Descriptor() ([]byte, []int) {
return file_google_cloud_osconfig_v1alpha_os_policy_proto_rawDescGZIP(), []int{0, 1}
}
func (x *OSPolicy_InventoryFilter) GetOsShortName() string {
if x != nil {
return x.OsShortName
}
return ""
}
func (x *OSPolicy_InventoryFilter) GetOsVersion() string {
if x != nil {
return x.OsVersion
}
return ""
}
// An OS policy resource is used to define the desired state configuration
// and provides a specific functionality like installing/removing packages,
// executing a script etc.
//
// The system ensures that resources are always in their desired state by
// taking necessary actions if they have drifted from their desired state.
type OSPolicy_Resource struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The id of the resource with the following restrictions:
//
// * Must contain only lowercase letters, numbers, and hyphens.
// * Must start with a letter.
// * Must be between 1-63 characters.
// * Must end with a number or a letter.
// * Must be unique within the OS policy.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Resource type.
//
// Types that are assignable to ResourceType:
//
// *OSPolicy_Resource_Pkg
// *OSPolicy_Resource_Repository
// *OSPolicy_Resource_Exec
// *OSPolicy_Resource_File_
ResourceType isOSPolicy_Resource_ResourceType `protobuf_oneof:"resource_type"`
}
func (x *OSPolicy_Resource) Reset() {
*x = OSPolicy_Resource{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OSPolicy_Resource) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OSPolicy_Resource) ProtoMessage() {}
func (x *OSPolicy_Resource) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OSPolicy_Resource.ProtoReflect.Descriptor instead.
func (*OSPolicy_Resource) Descriptor() ([]byte, []int) {
return file_google_cloud_osconfig_v1alpha_os_policy_proto_rawDescGZIP(), []int{0, 2}
}
func (x *OSPolicy_Resource) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (m *OSPolicy_Resource) GetResourceType() isOSPolicy_Resource_ResourceType {
if m != nil {
return m.ResourceType
}
return nil
}
func (x *OSPolicy_Resource) GetPkg() *OSPolicy_Resource_PackageResource {
if x, ok := x.GetResourceType().(*OSPolicy_Resource_Pkg); ok {
return x.Pkg
}
return nil
}
func (x *OSPolicy_Resource) GetRepository() *OSPolicy_Resource_RepositoryResource {
if x, ok := x.GetResourceType().(*OSPolicy_Resource_Repository); ok {
return x.Repository
}
return nil
}
func (x *OSPolicy_Resource) GetExec() *OSPolicy_Resource_ExecResource {
if x, ok := x.GetResourceType().(*OSPolicy_Resource_Exec); ok {
return x.Exec
}
return nil
}
func (x *OSPolicy_Resource) GetFile() *OSPolicy_Resource_FileResource {
if x, ok := x.GetResourceType().(*OSPolicy_Resource_File_); ok {
return x.File
}
return nil
}
type isOSPolicy_Resource_ResourceType interface {
isOSPolicy_Resource_ResourceType()
}
type OSPolicy_Resource_Pkg struct {
// Package resource
Pkg *OSPolicy_Resource_PackageResource `protobuf:"bytes,2,opt,name=pkg,proto3,oneof"`
}
type OSPolicy_Resource_Repository struct {
// Package repository resource
Repository *OSPolicy_Resource_RepositoryResource `protobuf:"bytes,3,opt,name=repository,proto3,oneof"`
}
type OSPolicy_Resource_Exec struct {
// Exec resource
Exec *OSPolicy_Resource_ExecResource `protobuf:"bytes,4,opt,name=exec,proto3,oneof"`
}
type OSPolicy_Resource_File_ struct {
// File resource
File *OSPolicy_Resource_FileResource `protobuf:"bytes,5,opt,name=file,proto3,oneof"`
}
func (*OSPolicy_Resource_Pkg) isOSPolicy_Resource_ResourceType() {}
func (*OSPolicy_Resource_Repository) isOSPolicy_Resource_ResourceType() {}
func (*OSPolicy_Resource_Exec) isOSPolicy_Resource_ResourceType() {}
func (*OSPolicy_Resource_File_) isOSPolicy_Resource_ResourceType() {}
// Resource groups provide a mechanism to group OS policy resources.
//
// Resource groups enable OS policy authors to create a single OS policy
// to be applied to VMs running different operating Systems.
//
// When the OS policy is applied to a target VM, the appropriate resource
// group within the OS policy is selected based on the `OSFilter` specified
// within the resource group.
type OSPolicy_ResourceGroup struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Deprecated. Use the `inventory_filters` field instead.
// Used to specify the OS filter for a resource group
//
// Deprecated: Marked as deprecated in google/cloud/osconfig/v1alpha/os_policy.proto.
OsFilter *OSPolicy_OSFilter `protobuf:"bytes,1,opt,name=os_filter,json=osFilter,proto3" json:"os_filter,omitempty"`
// List of inventory filters for the resource group.
//
// The resources in this resource group are applied to the target VM if it
// satisfies at least one of the following inventory filters.
//
// For example, to apply this resource group to VMs running either `RHEL` or
// `CentOS` operating systems, specify 2 items for the list with following
// values:
// inventory_filters[0].os_short_name='rhel' and
// inventory_filters[1].os_short_name='centos'
//
// If the list is empty, this resource group will be applied to the target
// VM unconditionally.
InventoryFilters []*OSPolicy_InventoryFilter `protobuf:"bytes,3,rep,name=inventory_filters,json=inventoryFilters,proto3" json:"inventory_filters,omitempty"`
// Required. List of resources configured for this resource group.
// The resources are executed in the exact order specified here.
Resources []*OSPolicy_Resource `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"`
}
func (x *OSPolicy_ResourceGroup) Reset() {
*x = OSPolicy_ResourceGroup{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OSPolicy_ResourceGroup) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OSPolicy_ResourceGroup) ProtoMessage() {}
func (x *OSPolicy_ResourceGroup) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OSPolicy_ResourceGroup.ProtoReflect.Descriptor instead.
func (*OSPolicy_ResourceGroup) Descriptor() ([]byte, []int) {
return file_google_cloud_osconfig_v1alpha_os_policy_proto_rawDescGZIP(), []int{0, 3}
}
// Deprecated: Marked as deprecated in google/cloud/osconfig/v1alpha/os_policy.proto.
func (x *OSPolicy_ResourceGroup) GetOsFilter() *OSPolicy_OSFilter {
if x != nil {
return x.OsFilter
}
return nil
}
func (x *OSPolicy_ResourceGroup) GetInventoryFilters() []*OSPolicy_InventoryFilter {
if x != nil {
return x.InventoryFilters
}
return nil
}
func (x *OSPolicy_ResourceGroup) GetResources() []*OSPolicy_Resource {
if x != nil {
return x.Resources
}
return nil
}
// A remote or local file.
type OSPolicy_Resource_File struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A specific type of file.
//
// Types that are assignable to Type:
//
// *OSPolicy_Resource_File_Remote_
// *OSPolicy_Resource_File_Gcs_
// *OSPolicy_Resource_File_LocalPath
Type isOSPolicy_Resource_File_Type `protobuf_oneof:"type"`
// Defaults to false. When false, files are subject to validations
// based on the file type:
//
// Remote: A checksum must be specified.
// Cloud Storage: An object generation number must be specified.
AllowInsecure bool `protobuf:"varint,4,opt,name=allow_insecure,json=allowInsecure,proto3" json:"allow_insecure,omitempty"`
}
func (x *OSPolicy_Resource_File) Reset() {
*x = OSPolicy_Resource_File{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OSPolicy_Resource_File) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OSPolicy_Resource_File) ProtoMessage() {}
func (x *OSPolicy_Resource_File) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OSPolicy_Resource_File.ProtoReflect.Descriptor instead.
func (*OSPolicy_Resource_File) Descriptor() ([]byte, []int) {
return file_google_cloud_osconfig_v1alpha_os_policy_proto_rawDescGZIP(), []int{0, 2, 0}
}
func (m *OSPolicy_Resource_File) GetType() isOSPolicy_Resource_File_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *OSPolicy_Resource_File) GetRemote() *OSPolicy_Resource_File_Remote {
if x, ok := x.GetType().(*OSPolicy_Resource_File_Remote_); ok {
return x.Remote
}
return nil
}
func (x *OSPolicy_Resource_File) GetGcs() *OSPolicy_Resource_File_Gcs {
if x, ok := x.GetType().(*OSPolicy_Resource_File_Gcs_); ok {
return x.Gcs
}
return nil
}
func (x *OSPolicy_Resource_File) GetLocalPath() string {
if x, ok := x.GetType().(*OSPolicy_Resource_File_LocalPath); ok {
return x.LocalPath
}
return ""
}
func (x *OSPolicy_Resource_File) GetAllowInsecure() bool {
if x != nil {
return x.AllowInsecure
}
return false
}
type isOSPolicy_Resource_File_Type interface {
isOSPolicy_Resource_File_Type()
}
type OSPolicy_Resource_File_Remote_ struct {
// A generic remote file.
Remote *OSPolicy_Resource_File_Remote `protobuf:"bytes,1,opt,name=remote,proto3,oneof"`
}
type OSPolicy_Resource_File_Gcs_ struct {
// A Cloud Storage object.
Gcs *OSPolicy_Resource_File_Gcs `protobuf:"bytes,2,opt,name=gcs,proto3,oneof"`
}
type OSPolicy_Resource_File_LocalPath struct {
// A local path within the VM to use.
LocalPath string `protobuf:"bytes,3,opt,name=local_path,json=localPath,proto3,oneof"`
}
func (*OSPolicy_Resource_File_Remote_) isOSPolicy_Resource_File_Type() {}
func (*OSPolicy_Resource_File_Gcs_) isOSPolicy_Resource_File_Type() {}
func (*OSPolicy_Resource_File_LocalPath) isOSPolicy_Resource_File_Type() {}
// A resource that manages a system package.
type OSPolicy_Resource_PackageResource struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The desired state the agent should maintain for this package.
DesiredState OSPolicy_Resource_PackageResource_DesiredState `protobuf:"varint,1,opt,name=desired_state,json=desiredState,proto3,enum=google.cloud.osconfig.v1alpha.OSPolicy_Resource_PackageResource_DesiredState" json:"desired_state,omitempty"`
// A system package.
//
// Types that are assignable to SystemPackage:
//
// *OSPolicy_Resource_PackageResource_Apt
// *OSPolicy_Resource_PackageResource_Deb_
// *OSPolicy_Resource_PackageResource_Yum
// *OSPolicy_Resource_PackageResource_Zypper_
// *OSPolicy_Resource_PackageResource_Rpm
// *OSPolicy_Resource_PackageResource_Googet
// *OSPolicy_Resource_PackageResource_Msi
SystemPackage isOSPolicy_Resource_PackageResource_SystemPackage `protobuf_oneof:"system_package"`
}
func (x *OSPolicy_Resource_PackageResource) Reset() {
*x = OSPolicy_Resource_PackageResource{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OSPolicy_Resource_PackageResource) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OSPolicy_Resource_PackageResource) ProtoMessage() {}
func (x *OSPolicy_Resource_PackageResource) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_osconfig_v1alpha_os_policy_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use OSPolicy_Resource_PackageResource.ProtoReflect.Descriptor instead.
func (*OSPolicy_Resource_PackageResource) Descriptor() ([]byte, []int) {
return file_google_cloud_osconfig_v1alpha_os_policy_proto_rawDescGZIP(), []int{0, 2, 1}
}
func (x *OSPolicy_Resource_PackageResource) GetDesiredState() OSPolicy_Resource_PackageResource_DesiredState {
if x != nil {
return x.DesiredState
}
return OSPolicy_Resource_PackageResource_DESIRED_STATE_UNSPECIFIED
}
func (m *OSPolicy_Resource_PackageResource) GetSystemPackage() isOSPolicy_Resource_PackageResource_SystemPackage {
if m != nil {
return m.SystemPackage
}
return nil
}
func (x *OSPolicy_Resource_PackageResource) GetApt() *OSPolicy_Resource_PackageResource_APT {
if x, ok := x.GetSystemPackage().(*OSPolicy_Resource_PackageResource_Apt); ok {
return x.Apt
}
return nil
}
func (x *OSPolicy_Resource_PackageResource) GetDeb() *OSPolicy_Resource_PackageResource_Deb {
if x, ok := x.GetSystemPackage().(*OSPolicy_Resource_PackageResource_Deb_); ok {
return x.Deb
}
return nil
}
func (x *OSPolicy_Resource_PackageResource) GetYum() *OSPolicy_Resource_PackageResource_YUM {
if x, ok := x.GetSystemPackage().(*OSPolicy_Resource_PackageResource_Yum); ok {
return x.Yum
}
return nil
}
func (x *OSPolicy_Resource_PackageResource) GetZypper() *OSPolicy_Resource_PackageResource_Zypper {
if x, ok := x.GetSystemPackage().(*OSPolicy_Resource_PackageResource_Zypper_); ok {
return x.Zypper
}
return nil
}
func (x *OSPolicy_Resource_PackageResource) GetRpm() *OSPolicy_Resource_PackageResource_RPM {
if x, ok := x.GetSystemPackage().(*OSPolicy_Resource_PackageResource_Rpm); ok {
return x.Rpm
}
return nil
}
func (x *OSPolicy_Resource_PackageResource) GetGooget() *OSPolicy_Resource_PackageResource_GooGet {
if x, ok := x.GetSystemPackage().(*OSPolicy_Resource_PackageResource_Googet); ok {
return x.Googet
}
return nil
}