-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
assets.pb.go
executable file
·3749 lines (3416 loc) · 160 KB
/
assets.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 2023 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/asset/v1/assets.proto
package assetpb
import (
reflect "reflect"
sync "sync"
accesscontextmanagerpb "cloud.google.com/go/accesscontextmanager/apiv1/accesscontextmanagerpb"
iampb "cloud.google.com/go/iam/apiv1/iampb"
orgpolicypb "cloud.google.com/go/orgpolicy/apiv1/orgpolicypb"
osconfigpb "cloud.google.com/go/osconfig/apiv1/osconfigpb"
_ "google.golang.org/genproto/googleapis/api/annotations"
code "google.golang.org/genproto/googleapis/rpc/code"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
structpb "google.golang.org/protobuf/types/known/structpb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)
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)
)
// State of prior asset.
type TemporalAsset_PriorAssetState int32
const (
// prior_asset is not applicable for the current asset.
TemporalAsset_PRIOR_ASSET_STATE_UNSPECIFIED TemporalAsset_PriorAssetState = 0
// prior_asset is populated correctly.
TemporalAsset_PRESENT TemporalAsset_PriorAssetState = 1
// Failed to set prior_asset.
TemporalAsset_INVALID TemporalAsset_PriorAssetState = 2
// Current asset is the first known state.
TemporalAsset_DOES_NOT_EXIST TemporalAsset_PriorAssetState = 3
// prior_asset is a deletion.
TemporalAsset_DELETED TemporalAsset_PriorAssetState = 4
)
// Enum value maps for TemporalAsset_PriorAssetState.
var (
TemporalAsset_PriorAssetState_name = map[int32]string{
0: "PRIOR_ASSET_STATE_UNSPECIFIED",
1: "PRESENT",
2: "INVALID",
3: "DOES_NOT_EXIST",
4: "DELETED",
}
TemporalAsset_PriorAssetState_value = map[string]int32{
"PRIOR_ASSET_STATE_UNSPECIFIED": 0,
"PRESENT": 1,
"INVALID": 2,
"DOES_NOT_EXIST": 3,
"DELETED": 4,
}
)
func (x TemporalAsset_PriorAssetState) Enum() *TemporalAsset_PriorAssetState {
p := new(TemporalAsset_PriorAssetState)
*p = x
return p
}
func (x TemporalAsset_PriorAssetState) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TemporalAsset_PriorAssetState) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_asset_v1_assets_proto_enumTypes[0].Descriptor()
}
func (TemporalAsset_PriorAssetState) Type() protoreflect.EnumType {
return &file_google_cloud_asset_v1_assets_proto_enumTypes[0]
}
func (x TemporalAsset_PriorAssetState) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use TemporalAsset_PriorAssetState.Descriptor instead.
func (TemporalAsset_PriorAssetState) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_assets_proto_rawDescGZIP(), []int{0, 0}
}
// Value of this expression.
type ConditionEvaluation_EvaluationValue int32
const (
// Reserved for future use.
ConditionEvaluation_EVALUATION_VALUE_UNSPECIFIED ConditionEvaluation_EvaluationValue = 0
// The evaluation result is `true`.
ConditionEvaluation_TRUE ConditionEvaluation_EvaluationValue = 1
// The evaluation result is `false`.
ConditionEvaluation_FALSE ConditionEvaluation_EvaluationValue = 2
// The evaluation result is `conditional` when the condition expression
// contains variables that are either missing input values or have not been
// supported by Policy Analyzer yet.
ConditionEvaluation_CONDITIONAL ConditionEvaluation_EvaluationValue = 3
)
// Enum value maps for ConditionEvaluation_EvaluationValue.
var (
ConditionEvaluation_EvaluationValue_name = map[int32]string{
0: "EVALUATION_VALUE_UNSPECIFIED",
1: "TRUE",
2: "FALSE",
3: "CONDITIONAL",
}
ConditionEvaluation_EvaluationValue_value = map[string]int32{
"EVALUATION_VALUE_UNSPECIFIED": 0,
"TRUE": 1,
"FALSE": 2,
"CONDITIONAL": 3,
}
)
func (x ConditionEvaluation_EvaluationValue) Enum() *ConditionEvaluation_EvaluationValue {
p := new(ConditionEvaluation_EvaluationValue)
*p = x
return p
}
func (x ConditionEvaluation_EvaluationValue) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ConditionEvaluation_EvaluationValue) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_asset_v1_assets_proto_enumTypes[1].Descriptor()
}
func (ConditionEvaluation_EvaluationValue) Type() protoreflect.EnumType {
return &file_google_cloud_asset_v1_assets_proto_enumTypes[1]
}
func (x ConditionEvaluation_EvaluationValue) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ConditionEvaluation_EvaluationValue.Descriptor instead.
func (ConditionEvaluation_EvaluationValue) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_assets_proto_rawDescGZIP(), []int{16, 0}
}
// An asset in Google Cloud and its temporal metadata, including the time window
// when it was observed and its status during that window.
type TemporalAsset struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The time window when the asset data and state was observed.
Window *TimeWindow `protobuf:"bytes,1,opt,name=window,proto3" json:"window,omitempty"`
// Whether the asset has been deleted or not.
Deleted bool `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted,omitempty"`
// An asset in Google Cloud.
Asset *Asset `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"`
// State of prior_asset.
PriorAssetState TemporalAsset_PriorAssetState `protobuf:"varint,4,opt,name=prior_asset_state,json=priorAssetState,proto3,enum=google.cloud.asset.v1.TemporalAsset_PriorAssetState" json:"prior_asset_state,omitempty"`
// Prior copy of the asset. Populated if prior_asset_state is PRESENT.
// Currently this is only set for responses in Real-Time Feed.
PriorAsset *Asset `protobuf:"bytes,5,opt,name=prior_asset,json=priorAsset,proto3" json:"prior_asset,omitempty"`
}
func (x *TemporalAsset) Reset() {
*x = TemporalAsset{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TemporalAsset) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TemporalAsset) ProtoMessage() {}
func (x *TemporalAsset) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_asset_v1_assets_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 TemporalAsset.ProtoReflect.Descriptor instead.
func (*TemporalAsset) Descriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_assets_proto_rawDescGZIP(), []int{0}
}
func (x *TemporalAsset) GetWindow() *TimeWindow {
if x != nil {
return x.Window
}
return nil
}
func (x *TemporalAsset) GetDeleted() bool {
if x != nil {
return x.Deleted
}
return false
}
func (x *TemporalAsset) GetAsset() *Asset {
if x != nil {
return x.Asset
}
return nil
}
func (x *TemporalAsset) GetPriorAssetState() TemporalAsset_PriorAssetState {
if x != nil {
return x.PriorAssetState
}
return TemporalAsset_PRIOR_ASSET_STATE_UNSPECIFIED
}
func (x *TemporalAsset) GetPriorAsset() *Asset {
if x != nil {
return x.PriorAsset
}
return nil
}
// A time window specified by its `start_time` and `end_time`.
type TimeWindow struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Start time of the time window (exclusive).
StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
// End time of the time window (inclusive). If not specified, the current
// timestamp is used instead.
EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
}
func (x *TimeWindow) Reset() {
*x = TimeWindow{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TimeWindow) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TimeWindow) ProtoMessage() {}
func (x *TimeWindow) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_asset_v1_assets_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 TimeWindow.ProtoReflect.Descriptor instead.
func (*TimeWindow) Descriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_assets_proto_rawDescGZIP(), []int{1}
}
func (x *TimeWindow) GetStartTime() *timestamppb.Timestamp {
if x != nil {
return x.StartTime
}
return nil
}
func (x *TimeWindow) GetEndTime() *timestamppb.Timestamp {
if x != nil {
return x.EndTime
}
return nil
}
// An asset in Google Cloud. An asset can be any resource in the Google Cloud
// [resource
// hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
// a resource outside the Google Cloud resource hierarchy (such as Google
// Kubernetes Engine clusters and objects), or a policy (e.g. IAM policy),
// or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP relationship).
// See [Supported asset
// types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
// for more information.
type Asset struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The last update timestamp of an asset. update_time is updated when
// create/update/delete operation is performed.
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// The full name of the asset. Example:
// `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
//
// See [Resource
// names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
// for more information.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The type of the asset. Example: `compute.googleapis.com/Disk`
//
// See [Supported asset
// types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
// for more information.
AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"`
// A representation of the resource.
Resource *Resource `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
// A representation of the IAM policy set on a Google Cloud resource.
// There can be a maximum of one IAM policy set on any given resource.
// In addition, IAM policies inherit their granted access scope from any
// policies set on parent resources in the resource hierarchy. Therefore, the
// effectively policy is the union of both the policy set on this resource
// and each policy set on all of the resource's ancestry resource levels in
// the hierarchy. See
// [this topic](https://cloud.google.com/iam/help/allow-policies/inheritance)
// for more information.
IamPolicy *iampb.Policy `protobuf:"bytes,4,opt,name=iam_policy,json=iamPolicy,proto3" json:"iam_policy,omitempty"`
// A representation of an [organization
// policy](https://cloud.google.com/resource-manager/docs/organization-policy/overview#organization_policy).
// There can be more than one organization policy with different constraints
// set on a given resource.
OrgPolicy []*orgpolicypb.Policy `protobuf:"bytes,6,rep,name=org_policy,json=orgPolicy,proto3" json:"org_policy,omitempty"`
// A representation of an [access
// policy](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
//
// Types that are assignable to AccessContextPolicy:
//
// *Asset_AccessPolicy
// *Asset_AccessLevel
// *Asset_ServicePerimeter
AccessContextPolicy isAsset_AccessContextPolicy `protobuf_oneof:"access_context_policy"`
// A representation of runtime OS Inventory information. See [this
// topic](https://cloud.google.com/compute/docs/instances/os-inventory-management)
// for more information.
OsInventory *osconfigpb.Inventory `protobuf:"bytes,12,opt,name=os_inventory,json=osInventory,proto3" json:"os_inventory,omitempty"`
// DEPRECATED. This field only presents for the purpose of
// backward-compatibility. The server will never generate responses with this
// field.
// The related assets of the asset of one relationship type. One asset
// only represents one type of relationship.
//
// Deprecated: Marked as deprecated in google/cloud/asset/v1/assets.proto.
RelatedAssets *RelatedAssets `protobuf:"bytes,13,opt,name=related_assets,json=relatedAssets,proto3" json:"related_assets,omitempty"`
// One related asset of the current asset.
RelatedAsset *RelatedAsset `protobuf:"bytes,15,opt,name=related_asset,json=relatedAsset,proto3" json:"related_asset,omitempty"`
// The ancestry path of an asset in Google Cloud [resource
// hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
// represented as a list of relative resource names. An ancestry path starts
// with the closest ancestor in the hierarchy and ends at root. If the asset
// is a project, folder, or organization, the ancestry path starts from the
// asset itself.
//
// Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
Ancestors []string `protobuf:"bytes,10,rep,name=ancestors,proto3" json:"ancestors,omitempty"`
}
func (x *Asset) Reset() {
*x = Asset{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Asset) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Asset) ProtoMessage() {}
func (x *Asset) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_asset_v1_assets_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 Asset.ProtoReflect.Descriptor instead.
func (*Asset) Descriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_assets_proto_rawDescGZIP(), []int{2}
}
func (x *Asset) GetUpdateTime() *timestamppb.Timestamp {
if x != nil {
return x.UpdateTime
}
return nil
}
func (x *Asset) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Asset) GetAssetType() string {
if x != nil {
return x.AssetType
}
return ""
}
func (x *Asset) GetResource() *Resource {
if x != nil {
return x.Resource
}
return nil
}
func (x *Asset) GetIamPolicy() *iampb.Policy {
if x != nil {
return x.IamPolicy
}
return nil
}
func (x *Asset) GetOrgPolicy() []*orgpolicypb.Policy {
if x != nil {
return x.OrgPolicy
}
return nil
}
func (m *Asset) GetAccessContextPolicy() isAsset_AccessContextPolicy {
if m != nil {
return m.AccessContextPolicy
}
return nil
}
func (x *Asset) GetAccessPolicy() *accesscontextmanagerpb.AccessPolicy {
if x, ok := x.GetAccessContextPolicy().(*Asset_AccessPolicy); ok {
return x.AccessPolicy
}
return nil
}
func (x *Asset) GetAccessLevel() *accesscontextmanagerpb.AccessLevel {
if x, ok := x.GetAccessContextPolicy().(*Asset_AccessLevel); ok {
return x.AccessLevel
}
return nil
}
func (x *Asset) GetServicePerimeter() *accesscontextmanagerpb.ServicePerimeter {
if x, ok := x.GetAccessContextPolicy().(*Asset_ServicePerimeter); ok {
return x.ServicePerimeter
}
return nil
}
func (x *Asset) GetOsInventory() *osconfigpb.Inventory {
if x != nil {
return x.OsInventory
}
return nil
}
// Deprecated: Marked as deprecated in google/cloud/asset/v1/assets.proto.
func (x *Asset) GetRelatedAssets() *RelatedAssets {
if x != nil {
return x.RelatedAssets
}
return nil
}
func (x *Asset) GetRelatedAsset() *RelatedAsset {
if x != nil {
return x.RelatedAsset
}
return nil
}
func (x *Asset) GetAncestors() []string {
if x != nil {
return x.Ancestors
}
return nil
}
type isAsset_AccessContextPolicy interface {
isAsset_AccessContextPolicy()
}
type Asset_AccessPolicy struct {
// Also refer to the [access policy user
// guide](https://cloud.google.com/access-context-manager/docs/overview#access-policies).
AccessPolicy *accesscontextmanagerpb.AccessPolicy `protobuf:"bytes,7,opt,name=access_policy,json=accessPolicy,proto3,oneof"`
}
type Asset_AccessLevel struct {
// Also refer to the [access level user
// guide](https://cloud.google.com/access-context-manager/docs/overview#access-levels).
AccessLevel *accesscontextmanagerpb.AccessLevel `protobuf:"bytes,8,opt,name=access_level,json=accessLevel,proto3,oneof"`
}
type Asset_ServicePerimeter struct {
// Also refer to the [service perimeter user
// guide](https://cloud.google.com/vpc-service-controls/docs/overview).
ServicePerimeter *accesscontextmanagerpb.ServicePerimeter `protobuf:"bytes,9,opt,name=service_perimeter,json=servicePerimeter,proto3,oneof"`
}
func (*Asset_AccessPolicy) isAsset_AccessContextPolicy() {}
func (*Asset_AccessLevel) isAsset_AccessContextPolicy() {}
func (*Asset_ServicePerimeter) isAsset_AccessContextPolicy() {}
// A representation of a Google Cloud resource.
type Resource struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The API version. Example: `v1`
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
// The URL of the discovery document containing the resource's JSON schema.
// Example:
// `https://www.googleapis.com/discovery/v1/apis/compute/v1/rest`
//
// This value is unspecified for resources that do not have an API based on a
// discovery document, such as Cloud Bigtable.
DiscoveryDocumentUri string `protobuf:"bytes,2,opt,name=discovery_document_uri,json=discoveryDocumentUri,proto3" json:"discovery_document_uri,omitempty"`
// The JSON schema name listed in the discovery document. Example:
// `Project`
//
// This value is unspecified for resources that do not have an API based on a
// discovery document, such as Cloud Bigtable.
DiscoveryName string `protobuf:"bytes,3,opt,name=discovery_name,json=discoveryName,proto3" json:"discovery_name,omitempty"`
// The REST URL for accessing the resource. An HTTP `GET` request using this
// URL returns the resource itself. Example:
// `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`
//
// This value is unspecified for resources without a REST API.
ResourceUrl string `protobuf:"bytes,4,opt,name=resource_url,json=resourceUrl,proto3" json:"resource_url,omitempty"`
// The full name of the immediate parent of this resource. See
// [Resource
// Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
// for more information.
//
// For Google Cloud assets, this value is the parent resource defined in the
// [IAM policy
// hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
// Example:
// `//cloudresourcemanager.googleapis.com/projects/my_project_123`
Parent string `protobuf:"bytes,5,opt,name=parent,proto3" json:"parent,omitempty"`
// The content of the resource, in which some sensitive fields are removed
// and may not be present.
Data *structpb.Struct `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
// The location of the resource in Google Cloud, such as its zone and region.
// For more information, see https://cloud.google.com/about/locations/.
Location string `protobuf:"bytes,8,opt,name=location,proto3" json:"location,omitempty"`
}
func (x *Resource) Reset() {
*x = Resource{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Resource) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Resource) ProtoMessage() {}
func (x *Resource) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_asset_v1_assets_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 Resource.ProtoReflect.Descriptor instead.
func (*Resource) Descriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_assets_proto_rawDescGZIP(), []int{3}
}
func (x *Resource) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
func (x *Resource) GetDiscoveryDocumentUri() string {
if x != nil {
return x.DiscoveryDocumentUri
}
return ""
}
func (x *Resource) GetDiscoveryName() string {
if x != nil {
return x.DiscoveryName
}
return ""
}
func (x *Resource) GetResourceUrl() string {
if x != nil {
return x.ResourceUrl
}
return ""
}
func (x *Resource) GetParent() string {
if x != nil {
return x.Parent
}
return ""
}
func (x *Resource) GetData() *structpb.Struct {
if x != nil {
return x.Data
}
return nil
}
func (x *Resource) GetLocation() string {
if x != nil {
return x.Location
}
return ""
}
// DEPRECATED. This message only presents for the purpose of
// backward-compatibility. The server will never populate this message in
// responses.
// The detailed related assets with the `relationship_type`.
//
// Deprecated: Marked as deprecated in google/cloud/asset/v1/assets.proto.
type RelatedAssets struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The detailed relationship attributes.
RelationshipAttributes *RelationshipAttributes `protobuf:"bytes,1,opt,name=relationship_attributes,json=relationshipAttributes,proto3" json:"relationship_attributes,omitempty"`
// The peer resources of the relationship.
Assets []*RelatedAsset `protobuf:"bytes,2,rep,name=assets,proto3" json:"assets,omitempty"`
}
func (x *RelatedAssets) Reset() {
*x = RelatedAssets{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RelatedAssets) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RelatedAssets) ProtoMessage() {}
func (x *RelatedAssets) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_asset_v1_assets_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 RelatedAssets.ProtoReflect.Descriptor instead.
func (*RelatedAssets) Descriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_assets_proto_rawDescGZIP(), []int{4}
}
func (x *RelatedAssets) GetRelationshipAttributes() *RelationshipAttributes {
if x != nil {
return x.RelationshipAttributes
}
return nil
}
func (x *RelatedAssets) GetAssets() []*RelatedAsset {
if x != nil {
return x.Assets
}
return nil
}
// DEPRECATED. This message only presents for the purpose of
// backward-compatibility. The server will never populate this message in
// responses.
// The relationship attributes which include `type`, `source_resource_type`,
// `target_resource_type` and `action`.
//
// Deprecated: Marked as deprecated in google/cloud/asset/v1/assets.proto.
type RelationshipAttributes struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The unique identifier of the relationship type. Example:
// `INSTANCE_TO_INSTANCEGROUP`
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
// The source asset type. Example: `compute.googleapis.com/Instance`
SourceResourceType string `protobuf:"bytes,1,opt,name=source_resource_type,json=sourceResourceType,proto3" json:"source_resource_type,omitempty"`
// The target asset type. Example: `compute.googleapis.com/Disk`
TargetResourceType string `protobuf:"bytes,2,opt,name=target_resource_type,json=targetResourceType,proto3" json:"target_resource_type,omitempty"`
// The detail of the relationship, e.g. `contains`, `attaches`
Action string `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty"`
}
func (x *RelationshipAttributes) Reset() {
*x = RelationshipAttributes{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RelationshipAttributes) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RelationshipAttributes) ProtoMessage() {}
func (x *RelationshipAttributes) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_asset_v1_assets_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 RelationshipAttributes.ProtoReflect.Descriptor instead.
func (*RelationshipAttributes) Descriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_assets_proto_rawDescGZIP(), []int{5}
}
func (x *RelationshipAttributes) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *RelationshipAttributes) GetSourceResourceType() string {
if x != nil {
return x.SourceResourceType
}
return ""
}
func (x *RelationshipAttributes) GetTargetResourceType() string {
if x != nil {
return x.TargetResourceType
}
return ""
}
func (x *RelationshipAttributes) GetAction() string {
if x != nil {
return x.Action
}
return ""
}
// An asset identifier in Google Cloud which contains its name, type and
// ancestors. An asset can be any resource in the Google Cloud [resource
// hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
// a resource outside the Google Cloud resource hierarchy (such as Google
// Kubernetes Engine clusters and objects), or a policy (e.g. IAM policy).
// See [Supported asset
// types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
// for more information.
type RelatedAsset struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The full name of the asset. Example:
// `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
//
// See [Resource
// names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
// for more information.
Asset string `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"`
// The type of the asset. Example: `compute.googleapis.com/Disk`
//
// See [Supported asset
// types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
// for more information.
AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"`
// The ancestors of an asset in Google Cloud [resource
// hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
// represented as a list of relative resource names. An ancestry path starts
// with the closest ancestor in the hierarchy and ends at root.
//
// Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
Ancestors []string `protobuf:"bytes,3,rep,name=ancestors,proto3" json:"ancestors,omitempty"`
// The unique identifier of the relationship type. Example:
// `INSTANCE_TO_INSTANCEGROUP`
RelationshipType string `protobuf:"bytes,4,opt,name=relationship_type,json=relationshipType,proto3" json:"relationship_type,omitempty"`
}
func (x *RelatedAsset) Reset() {
*x = RelatedAsset{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RelatedAsset) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RelatedAsset) ProtoMessage() {}
func (x *RelatedAsset) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_asset_v1_assets_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 RelatedAsset.ProtoReflect.Descriptor instead.
func (*RelatedAsset) Descriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_assets_proto_rawDescGZIP(), []int{6}
}
func (x *RelatedAsset) GetAsset() string {
if x != nil {
return x.Asset
}
return ""
}
func (x *RelatedAsset) GetAssetType() string {
if x != nil {
return x.AssetType
}
return ""
}
func (x *RelatedAsset) GetAncestors() []string {
if x != nil {
return x.Ancestors
}
return nil
}
func (x *RelatedAsset) GetRelationshipType() string {
if x != nil {
return x.RelationshipType
}
return ""
}
// The key and value for a
// [tag](https://cloud.google.com/resource-manager/docs/tags/tags-overview).
type Tag struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// TagKey namespaced name, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}.
TagKey *string `protobuf:"bytes,1,opt,name=tag_key,json=tagKey,proto3,oneof" json:"tag_key,omitempty"`
// TagValue namespaced name, in the format of
// {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}.
TagValue *string `protobuf:"bytes,3,opt,name=tag_value,json=tagValue,proto3,oneof" json:"tag_value,omitempty"`
// TagValue ID, in the format of tagValues/{TAG_VALUE_ID}.
TagValueId *string `protobuf:"bytes,4,opt,name=tag_value_id,json=tagValueId,proto3,oneof" json:"tag_value_id,omitempty"`
}
func (x *Tag) Reset() {
*x = Tag{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Tag) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Tag) ProtoMessage() {}
func (x *Tag) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_asset_v1_assets_proto_msgTypes[7]
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 Tag.ProtoReflect.Descriptor instead.
func (*Tag) Descriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_assets_proto_rawDescGZIP(), []int{7}
}
func (x *Tag) GetTagKey() string {
if x != nil && x.TagKey != nil {
return *x.TagKey
}
return ""
}
func (x *Tag) GetTagValue() string {
if x != nil && x.TagValue != nil {
return *x.TagValue
}
return ""
}
func (x *Tag) GetTagValueId() string {
if x != nil && x.TagValueId != nil {
return *x.TagValueId
}
return ""
}
// The effective tags and the ancestor resources from which they were inherited.
type EffectiveTagDetails struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The [full resource
// name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
// of the ancestor from which an [effective_tag][] is inherited, according to