/
asset_service.pb.go
5918 lines (5371 loc) · 258 KB
/
asset_service.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.26.0
// protoc v3.12.2
// source: google/cloud/asset/v1/asset_service.proto
package asset
import (
context "context"
reflect "reflect"
sync "sync"
_ "google.golang.org/genproto/googleapis/api/annotations"
longrunning "google.golang.org/genproto/googleapis/longrunning"
status "google.golang.org/genproto/googleapis/rpc/status"
expr "google.golang.org/genproto/googleapis/type/expr"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status1 "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
emptypb "google.golang.org/protobuf/types/known/emptypb"
fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
_ "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)
)
// Asset content type.
type ContentType int32
const (
// Unspecified content type.
ContentType_CONTENT_TYPE_UNSPECIFIED ContentType = 0
// Resource metadata.
ContentType_RESOURCE ContentType = 1
// The actual IAM policy set on a resource.
ContentType_IAM_POLICY ContentType = 2
// The Cloud Organization Policy set on an asset.
ContentType_ORG_POLICY ContentType = 4
// The Cloud Access context manager Policy set on an asset.
ContentType_ACCESS_POLICY ContentType = 5
// The runtime OS Inventory information.
ContentType_OS_INVENTORY ContentType = 6
)
// Enum value maps for ContentType.
var (
ContentType_name = map[int32]string{
0: "CONTENT_TYPE_UNSPECIFIED",
1: "RESOURCE",
2: "IAM_POLICY",
4: "ORG_POLICY",
5: "ACCESS_POLICY",
6: "OS_INVENTORY",
}
ContentType_value = map[string]int32{
"CONTENT_TYPE_UNSPECIFIED": 0,
"RESOURCE": 1,
"IAM_POLICY": 2,
"ORG_POLICY": 4,
"ACCESS_POLICY": 5,
"OS_INVENTORY": 6,
}
)
func (x ContentType) Enum() *ContentType {
p := new(ContentType)
*p = x
return p
}
func (x ContentType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ContentType) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_asset_v1_asset_service_proto_enumTypes[0].Descriptor()
}
func (ContentType) Type() protoreflect.EnumType {
return &file_google_cloud_asset_v1_asset_service_proto_enumTypes[0]
}
func (x ContentType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ContentType.Descriptor instead.
func (ContentType) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_asset_service_proto_rawDescGZIP(), []int{0}
}
// This enum is used to determine the partition key column when exporting
// assets to BigQuery partitioned table(s). Note that, if the partition key is
// a timestamp column, the actual partition is based on its date value
// (expressed in UTC. see details in
// https://cloud.google.com/bigquery/docs/partitioned-tables#date_timestamp_partitioned_tables).
type PartitionSpec_PartitionKey int32
const (
// Unspecified partition key. If used, it means using non-partitioned table.
PartitionSpec_PARTITION_KEY_UNSPECIFIED PartitionSpec_PartitionKey = 0
// The time when the snapshot is taken. If specified as partition key, the
// result table(s) is partitoned by the additional timestamp column,
// readTime. If [read_time] in ExportAssetsRequest is specified, the
// readTime column's value will be the same as it. Otherwise, its value will
// be the current time that is used to take the snapshot.
PartitionSpec_READ_TIME PartitionSpec_PartitionKey = 1
// The time when the request is received and started to be processed. If
// specified as partition key, the result table(s) is partitoned by the
// requestTime column, an additional timestamp column representing when the
// request was received.
PartitionSpec_REQUEST_TIME PartitionSpec_PartitionKey = 2
)
// Enum value maps for PartitionSpec_PartitionKey.
var (
PartitionSpec_PartitionKey_name = map[int32]string{
0: "PARTITION_KEY_UNSPECIFIED",
1: "READ_TIME",
2: "REQUEST_TIME",
}
PartitionSpec_PartitionKey_value = map[string]int32{
"PARTITION_KEY_UNSPECIFIED": 0,
"READ_TIME": 1,
"REQUEST_TIME": 2,
}
)
func (x PartitionSpec_PartitionKey) Enum() *PartitionSpec_PartitionKey {
p := new(PartitionSpec_PartitionKey)
*p = x
return p
}
func (x PartitionSpec_PartitionKey) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PartitionSpec_PartitionKey) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_asset_v1_asset_service_proto_enumTypes[1].Descriptor()
}
func (PartitionSpec_PartitionKey) Type() protoreflect.EnumType {
return &file_google_cloud_asset_v1_asset_service_proto_enumTypes[1]
}
func (x PartitionSpec_PartitionKey) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PartitionSpec_PartitionKey.Descriptor instead.
func (PartitionSpec_PartitionKey) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_asset_service_proto_rawDescGZIP(), []int{18, 0}
}
// This enum determines the partition key column for the bigquery tables.
// Partitioning can improve query performance and reduce query cost by
// filtering partitions. Refer to
// https://cloud.google.com/bigquery/docs/partitioned-tables for details.
type IamPolicyAnalysisOutputConfig_BigQueryDestination_PartitionKey int32
const (
// Unspecified partition key. Tables won't be partitioned using this
// option.
IamPolicyAnalysisOutputConfig_BigQueryDestination_PARTITION_KEY_UNSPECIFIED IamPolicyAnalysisOutputConfig_BigQueryDestination_PartitionKey = 0
// The time when the request is received. If specified as partition key,
// the result table(s) is partitoned by the RequestTime column, an
// additional timestamp column representing when the request was received.
IamPolicyAnalysisOutputConfig_BigQueryDestination_REQUEST_TIME IamPolicyAnalysisOutputConfig_BigQueryDestination_PartitionKey = 1
)
// Enum value maps for IamPolicyAnalysisOutputConfig_BigQueryDestination_PartitionKey.
var (
IamPolicyAnalysisOutputConfig_BigQueryDestination_PartitionKey_name = map[int32]string{
0: "PARTITION_KEY_UNSPECIFIED",
1: "REQUEST_TIME",
}
IamPolicyAnalysisOutputConfig_BigQueryDestination_PartitionKey_value = map[string]int32{
"PARTITION_KEY_UNSPECIFIED": 0,
"REQUEST_TIME": 1,
}
)
func (x IamPolicyAnalysisOutputConfig_BigQueryDestination_PartitionKey) Enum() *IamPolicyAnalysisOutputConfig_BigQueryDestination_PartitionKey {
p := new(IamPolicyAnalysisOutputConfig_BigQueryDestination_PartitionKey)
*p = x
return p
}
func (x IamPolicyAnalysisOutputConfig_BigQueryDestination_PartitionKey) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (IamPolicyAnalysisOutputConfig_BigQueryDestination_PartitionKey) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_asset_v1_asset_service_proto_enumTypes[2].Descriptor()
}
func (IamPolicyAnalysisOutputConfig_BigQueryDestination_PartitionKey) Type() protoreflect.EnumType {
return &file_google_cloud_asset_v1_asset_service_proto_enumTypes[2]
}
func (x IamPolicyAnalysisOutputConfig_BigQueryDestination_PartitionKey) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use IamPolicyAnalysisOutputConfig_BigQueryDestination_PartitionKey.Descriptor instead.
func (IamPolicyAnalysisOutputConfig_BigQueryDestination_PartitionKey) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_asset_service_proto_rawDescGZIP(), []int{29, 1, 0}
}
// View enum for supporting partial analysis responses.
type AnalyzeMoveRequest_AnalysisView int32
const (
// The default/unset value.
// The API will default to the FULL view.
AnalyzeMoveRequest_ANALYSIS_VIEW_UNSPECIFIED AnalyzeMoveRequest_AnalysisView = 0
// Full analysis including all level of impacts of the specified resource
// move.
AnalyzeMoveRequest_FULL AnalyzeMoveRequest_AnalysisView = 1
// Basic analysis only including blockers which will prevent the specified
// resource move at runtime.
AnalyzeMoveRequest_BASIC AnalyzeMoveRequest_AnalysisView = 2
)
// Enum value maps for AnalyzeMoveRequest_AnalysisView.
var (
AnalyzeMoveRequest_AnalysisView_name = map[int32]string{
0: "ANALYSIS_VIEW_UNSPECIFIED",
1: "FULL",
2: "BASIC",
}
AnalyzeMoveRequest_AnalysisView_value = map[string]int32{
"ANALYSIS_VIEW_UNSPECIFIED": 0,
"FULL": 1,
"BASIC": 2,
}
)
func (x AnalyzeMoveRequest_AnalysisView) Enum() *AnalyzeMoveRequest_AnalysisView {
p := new(AnalyzeMoveRequest_AnalysisView)
*p = x
return p
}
func (x AnalyzeMoveRequest_AnalysisView) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (AnalyzeMoveRequest_AnalysisView) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_asset_v1_asset_service_proto_enumTypes[3].Descriptor()
}
func (AnalyzeMoveRequest_AnalysisView) Type() protoreflect.EnumType {
return &file_google_cloud_asset_v1_asset_service_proto_enumTypes[3]
}
func (x AnalyzeMoveRequest_AnalysisView) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use AnalyzeMoveRequest_AnalysisView.Descriptor instead.
func (AnalyzeMoveRequest_AnalysisView) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_asset_service_proto_rawDescGZIP(), []int{32, 0}
}
// Represents the metadata of the longrunning operation for the
// AnalyzeIamPolicyLongrunning rpc.
type AnalyzeIamPolicyLongrunningMetadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The time the operation was created.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
}
func (x *AnalyzeIamPolicyLongrunningMetadata) Reset() {
*x = AnalyzeIamPolicyLongrunningMetadata{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AnalyzeIamPolicyLongrunningMetadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AnalyzeIamPolicyLongrunningMetadata) ProtoMessage() {}
func (x *AnalyzeIamPolicyLongrunningMetadata) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_asset_v1_asset_service_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 AnalyzeIamPolicyLongrunningMetadata.ProtoReflect.Descriptor instead.
func (*AnalyzeIamPolicyLongrunningMetadata) Descriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_asset_service_proto_rawDescGZIP(), []int{0}
}
func (x *AnalyzeIamPolicyLongrunningMetadata) GetCreateTime() *timestamppb.Timestamp {
if x != nil {
return x.CreateTime
}
return nil
}
// Export asset request.
type ExportAssetsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The relative name of the root asset. This can only be an
// organization number (such as "organizations/123"), a project ID (such as
// "projects/my-project-id"), or a project number (such as "projects/12345"),
// or a folder number (such as "folders/123").
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Timestamp to take an asset snapshot. This can only be set to a timestamp
// between the current time and the current time minus 35 days (inclusive).
// If not specified, the current time will be used. Due to delays in resource
// data collection and indexing, there is a volatile window during which
// running the same query may get different results.
ReadTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`
// A list of asset types to take a snapshot for. For example:
// "compute.googleapis.com/Disk".
//
// Regular expressions are also supported. For example:
//
// * "compute.googleapis.com.*" snapshots resources whose asset type starts
// with "compute.googleapis.com".
// * ".*Instance" snapshots resources whose asset type ends with "Instance".
// * ".*Instance.*" snapshots resources whose asset type contains "Instance".
//
// See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
// regular expression syntax. If the regular expression does not match any
// supported asset type, an INVALID_ARGUMENT error will be returned.
//
// If specified, only matching assets will be returned, otherwise, it will
// snapshot all asset types. See [Introduction to Cloud Asset
// Inventory](https://cloud.google.com/asset-inventory/docs/overview)
// for all supported asset types.
AssetTypes []string `protobuf:"bytes,3,rep,name=asset_types,json=assetTypes,proto3" json:"asset_types,omitempty"`
// Asset content type. If not specified, no content but the asset name will be
// returned.
ContentType ContentType `protobuf:"varint,4,opt,name=content_type,json=contentType,proto3,enum=google.cloud.asset.v1.ContentType" json:"content_type,omitempty"`
// Required. Output configuration indicating where the results will be output to.
OutputConfig *OutputConfig `protobuf:"bytes,5,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"`
}
func (x *ExportAssetsRequest) Reset() {
*x = ExportAssetsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExportAssetsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExportAssetsRequest) ProtoMessage() {}
func (x *ExportAssetsRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_asset_v1_asset_service_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 ExportAssetsRequest.ProtoReflect.Descriptor instead.
func (*ExportAssetsRequest) Descriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_asset_service_proto_rawDescGZIP(), []int{1}
}
func (x *ExportAssetsRequest) GetParent() string {
if x != nil {
return x.Parent
}
return ""
}
func (x *ExportAssetsRequest) GetReadTime() *timestamppb.Timestamp {
if x != nil {
return x.ReadTime
}
return nil
}
func (x *ExportAssetsRequest) GetAssetTypes() []string {
if x != nil {
return x.AssetTypes
}
return nil
}
func (x *ExportAssetsRequest) GetContentType() ContentType {
if x != nil {
return x.ContentType
}
return ContentType_CONTENT_TYPE_UNSPECIFIED
}
func (x *ExportAssetsRequest) GetOutputConfig() *OutputConfig {
if x != nil {
return x.OutputConfig
}
return nil
}
// The export asset response. This message is returned by the
// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned
// [google.longrunning.Operation.response][google.longrunning.Operation.response] field.
type ExportAssetsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Time the snapshot was taken.
ReadTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`
// Output configuration indicating where the results were output to.
OutputConfig *OutputConfig `protobuf:"bytes,2,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"`
// Output result indicating where the assets were exported to. For example, a
// set of actual Google Cloud Storage object uris where the assets are
// exported to. The uris can be different from what [output_config] has
// specified, as the service will split the output object into multiple ones
// once it exceeds a single Google Cloud Storage object limit.
OutputResult *OutputResult `protobuf:"bytes,3,opt,name=output_result,json=outputResult,proto3" json:"output_result,omitempty"`
}
func (x *ExportAssetsResponse) Reset() {
*x = ExportAssetsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExportAssetsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExportAssetsResponse) ProtoMessage() {}
func (x *ExportAssetsResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_asset_v1_asset_service_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 ExportAssetsResponse.ProtoReflect.Descriptor instead.
func (*ExportAssetsResponse) Descriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_asset_service_proto_rawDescGZIP(), []int{2}
}
func (x *ExportAssetsResponse) GetReadTime() *timestamppb.Timestamp {
if x != nil {
return x.ReadTime
}
return nil
}
func (x *ExportAssetsResponse) GetOutputConfig() *OutputConfig {
if x != nil {
return x.OutputConfig
}
return nil
}
func (x *ExportAssetsResponse) GetOutputResult() *OutputResult {
if x != nil {
return x.OutputResult
}
return nil
}
// ListAssets request.
type ListAssetsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. Name of the organization or project the assets belong to. Format:
// "organizations/[organization-number]" (such as "organizations/123"),
// "projects/[project-id]" (such as "projects/my-project-id"), or
// "projects/[project-number]" (such as "projects/12345").
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Timestamp to take an asset snapshot. This can only be set to a timestamp
// between the current time and the current time minus 35 days (inclusive).
// If not specified, the current time will be used. Due to delays in resource
// data collection and indexing, there is a volatile window during which
// running the same query may get different results.
ReadTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`
// A list of asset types to take a snapshot for. For example:
// "compute.googleapis.com/Disk".
//
// Regular expression is also supported. For example:
//
// * "compute.googleapis.com.*" snapshots resources whose asset type starts
// with "compute.googleapis.com".
// * ".*Instance" snapshots resources whose asset type ends with "Instance".
// * ".*Instance.*" snapshots resources whose asset type contains "Instance".
//
// See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
// regular expression syntax. If the regular expression does not match any
// supported asset type, an INVALID_ARGUMENT error will be returned.
//
// If specified, only matching assets will be returned, otherwise, it will
// snapshot all asset types. See [Introduction to Cloud Asset
// Inventory](https://cloud.google.com/asset-inventory/docs/overview)
// for all supported asset types.
AssetTypes []string `protobuf:"bytes,3,rep,name=asset_types,json=assetTypes,proto3" json:"asset_types,omitempty"`
// Asset content type. If not specified, no content but the asset name will
// be returned.
ContentType ContentType `protobuf:"varint,4,opt,name=content_type,json=contentType,proto3,enum=google.cloud.asset.v1.ContentType" json:"content_type,omitempty"`
// The maximum number of assets to be returned in a single response. Default
// is 100, minimum is 1, and maximum is 1000.
PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// The `next_page_token` returned from the previous `ListAssetsResponse`, or
// unspecified for the first `ListAssetsRequest`. It is a continuation of a
// prior `ListAssets` call, and the API should return the next page of assets.
PageToken string `protobuf:"bytes,6,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
}
func (x *ListAssetsRequest) Reset() {
*x = ListAssetsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListAssetsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListAssetsRequest) ProtoMessage() {}
func (x *ListAssetsRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_asset_v1_asset_service_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 ListAssetsRequest.ProtoReflect.Descriptor instead.
func (*ListAssetsRequest) Descriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_asset_service_proto_rawDescGZIP(), []int{3}
}
func (x *ListAssetsRequest) GetParent() string {
if x != nil {
return x.Parent
}
return ""
}
func (x *ListAssetsRequest) GetReadTime() *timestamppb.Timestamp {
if x != nil {
return x.ReadTime
}
return nil
}
func (x *ListAssetsRequest) GetAssetTypes() []string {
if x != nil {
return x.AssetTypes
}
return nil
}
func (x *ListAssetsRequest) GetContentType() ContentType {
if x != nil {
return x.ContentType
}
return ContentType_CONTENT_TYPE_UNSPECIFIED
}
func (x *ListAssetsRequest) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *ListAssetsRequest) GetPageToken() string {
if x != nil {
return x.PageToken
}
return ""
}
// ListAssets response.
type ListAssetsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Time the snapshot was taken.
ReadTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`
// Assets.
Assets []*Asset `protobuf:"bytes,2,rep,name=assets,proto3" json:"assets,omitempty"`
// Token to retrieve the next page of results. It expires 72 hours after the
// page token for the first page is generated. Set to empty if there are no
// remaining results.
NextPageToken string `protobuf:"bytes,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
}
func (x *ListAssetsResponse) Reset() {
*x = ListAssetsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListAssetsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListAssetsResponse) ProtoMessage() {}
func (x *ListAssetsResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_asset_v1_asset_service_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 ListAssetsResponse.ProtoReflect.Descriptor instead.
func (*ListAssetsResponse) Descriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_asset_service_proto_rawDescGZIP(), []int{4}
}
func (x *ListAssetsResponse) GetReadTime() *timestamppb.Timestamp {
if x != nil {
return x.ReadTime
}
return nil
}
func (x *ListAssetsResponse) GetAssets() []*Asset {
if x != nil {
return x.Assets
}
return nil
}
func (x *ListAssetsResponse) GetNextPageToken() string {
if x != nil {
return x.NextPageToken
}
return ""
}
// Batch get assets history request.
type BatchGetAssetsHistoryRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The relative name of the root asset. It can only be an
// organization number (such as "organizations/123"), a project ID (such as
// "projects/my-project-id")", or a project number (such as "projects/12345").
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// A list of the full names of the assets.
// See: https://cloud.google.com/asset-inventory/docs/resource-name-format
// Example:
//
// `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
//
// The request becomes a no-op if the asset name list is empty, and the max
// size of the asset name list is 100 in one request.
AssetNames []string `protobuf:"bytes,2,rep,name=asset_names,json=assetNames,proto3" json:"asset_names,omitempty"`
// Optional. The content type.
ContentType ContentType `protobuf:"varint,3,opt,name=content_type,json=contentType,proto3,enum=google.cloud.asset.v1.ContentType" json:"content_type,omitempty"`
// Optional. The time window for the asset history. Both start_time and
// end_time are optional and if set, it must be after the current time minus
// 35 days. If end_time is not set, it is default to current timestamp.
// If start_time is not set, the snapshot of the assets at end_time will be
// returned. The returned results contain all temporal assets whose time
// window overlap with read_time_window.
ReadTimeWindow *TimeWindow `protobuf:"bytes,4,opt,name=read_time_window,json=readTimeWindow,proto3" json:"read_time_window,omitempty"`
}
func (x *BatchGetAssetsHistoryRequest) Reset() {
*x = BatchGetAssetsHistoryRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchGetAssetsHistoryRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchGetAssetsHistoryRequest) ProtoMessage() {}
func (x *BatchGetAssetsHistoryRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_asset_v1_asset_service_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 BatchGetAssetsHistoryRequest.ProtoReflect.Descriptor instead.
func (*BatchGetAssetsHistoryRequest) Descriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_asset_service_proto_rawDescGZIP(), []int{5}
}
func (x *BatchGetAssetsHistoryRequest) GetParent() string {
if x != nil {
return x.Parent
}
return ""
}
func (x *BatchGetAssetsHistoryRequest) GetAssetNames() []string {
if x != nil {
return x.AssetNames
}
return nil
}
func (x *BatchGetAssetsHistoryRequest) GetContentType() ContentType {
if x != nil {
return x.ContentType
}
return ContentType_CONTENT_TYPE_UNSPECIFIED
}
func (x *BatchGetAssetsHistoryRequest) GetReadTimeWindow() *TimeWindow {
if x != nil {
return x.ReadTimeWindow
}
return nil
}
// Batch get assets history response.
type BatchGetAssetsHistoryResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A list of assets with valid time windows.
Assets []*TemporalAsset `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets,omitempty"`
}
func (x *BatchGetAssetsHistoryResponse) Reset() {
*x = BatchGetAssetsHistoryResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchGetAssetsHistoryResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchGetAssetsHistoryResponse) ProtoMessage() {}
func (x *BatchGetAssetsHistoryResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_asset_v1_asset_service_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 BatchGetAssetsHistoryResponse.ProtoReflect.Descriptor instead.
func (*BatchGetAssetsHistoryResponse) Descriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_asset_service_proto_rawDescGZIP(), []int{6}
}
func (x *BatchGetAssetsHistoryResponse) GetAssets() []*TemporalAsset {
if x != nil {
return x.Assets
}
return nil
}
// Create asset feed request.
type CreateFeedRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The name of the project/folder/organization where this feed
// should be created in. It can only be an organization number (such as
// "organizations/123"), a folder number (such as "folders/123"), a project ID
// (such as "projects/my-project-id")", or a project number (such as
// "projects/12345").
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. This is the client-assigned asset feed identifier and it needs to
// be unique under a specific parent project/folder/organization.
FeedId string `protobuf:"bytes,2,opt,name=feed_id,json=feedId,proto3" json:"feed_id,omitempty"`
// Required. The feed details. The field `name` must be empty and it will be generated
// in the format of:
// projects/project_number/feeds/feed_id
// folders/folder_number/feeds/feed_id
// organizations/organization_number/feeds/feed_id
Feed *Feed `protobuf:"bytes,3,opt,name=feed,proto3" json:"feed,omitempty"`
}
func (x *CreateFeedRequest) Reset() {
*x = CreateFeedRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateFeedRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateFeedRequest) ProtoMessage() {}
func (x *CreateFeedRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_asset_v1_asset_service_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 CreateFeedRequest.ProtoReflect.Descriptor instead.
func (*CreateFeedRequest) Descriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_asset_service_proto_rawDescGZIP(), []int{7}
}
func (x *CreateFeedRequest) GetParent() string {
if x != nil {
return x.Parent
}
return ""
}
func (x *CreateFeedRequest) GetFeedId() string {
if x != nil {
return x.FeedId
}
return ""
}
func (x *CreateFeedRequest) GetFeed() *Feed {
if x != nil {
return x.Feed
}
return nil
}
// Get asset feed request.
type GetFeedRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The name of the Feed and it must be in the format of:
// projects/project_number/feeds/feed_id
// folders/folder_number/feeds/feed_id
// organizations/organization_number/feeds/feed_id
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *GetFeedRequest) Reset() {
*x = GetFeedRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetFeedRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetFeedRequest) ProtoMessage() {}
func (x *GetFeedRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[8]
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 GetFeedRequest.ProtoReflect.Descriptor instead.
func (*GetFeedRequest) Descriptor() ([]byte, []int) {
return file_google_cloud_asset_v1_asset_service_proto_rawDescGZIP(), []int{8}
}
func (x *GetFeedRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
// List asset feeds request.
type ListFeedsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The parent project/folder/organization whose feeds are to be
// listed. It can only be using project/folder/organization number (such as
// "folders/12345")", or a project ID (such as "projects/my-project-id").
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
}
func (x *ListFeedsRequest) Reset() {
*x = ListFeedsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_asset_v1_asset_service_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}