Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / cloud / asset / v1 / assets.proto
1 // Copyright 2019 Google LLC.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15
16 syntax = "proto3";
17
18 package google.cloud.asset.v1;
19
20 import "google/api/annotations.proto";
21 import "google/iam/v1/policy.proto";
22 import "google/protobuf/any.proto";
23 import "google/protobuf/struct.proto";
24 import "google/protobuf/timestamp.proto";
25
26 option csharp_namespace = "Google.Cloud.Asset.V1";
27 option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1;asset";
28 option java_multiple_files = true;
29 option java_outer_classname = "AssetProto";
30 option java_package = "com.google.cloud.asset.v1";
31 option php_namespace = "Google\\Cloud\\Asset\\V1";
32
33
34 // Temporal asset. In addition to the asset, the temporal asset includes the
35 // status of the asset and valid from and to time of it.
36 message TemporalAsset {
37   // The time window when the asset data and state was observed.
38   TimeWindow window = 1;
39
40   // If the asset is deleted or not.
41   bool deleted = 2;
42
43   // Asset.
44   Asset asset = 3;
45 }
46
47 // A time window of (start_time, end_time].
48 message TimeWindow {
49   // Start time of the time window (exclusive).
50   google.protobuf.Timestamp start_time = 1;
51
52   // End time of the time window (inclusive).
53   // Current timestamp if not specified.
54   google.protobuf.Timestamp end_time = 2;
55 }
56
57 // Cloud asset. This includes all Google Cloud Platform resources,
58 // Cloud IAM policies, and other non-GCP assets.
59 message Asset {
60   // The full name of the asset. For example:
61   // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
62   // See [Resource
63   // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
64   // for more information.
65   string name = 1;
66
67   // Type of the asset. Example: "compute.googleapis.com/Disk".
68   string asset_type = 2;
69
70   // Representation of the resource.
71   Resource resource = 3;
72
73   // Representation of the actual Cloud IAM policy set on a cloud resource. For
74   // each resource, there must be at most one Cloud IAM policy set on it.
75   google.iam.v1.Policy iam_policy = 4;
76 }
77
78 // Representation of a cloud resource.
79 message Resource {
80   // The API version. Example: "v1".
81   string version = 1;
82
83   // The URL of the discovery document containing the resource's JSON schema.
84   // For example:
85   // `"https://www.googleapis.com/discovery/v1/apis/compute/v1/rest"`.
86   // It will be left unspecified for resources without a discovery-based API,
87   // such as Cloud Bigtable.
88   string discovery_document_uri = 2;
89
90   // The JSON schema name listed in the discovery document.
91   // Example: "Project". It will be left unspecified for resources (such as
92   // Cloud Bigtable) without a discovery-based API.
93   string discovery_name = 3;
94
95   // The REST URL for accessing the resource. An HTTP GET operation using this
96   // URL returns the resource itself.
97   // Example:
98   // `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
99   // It will be left unspecified for resources without a REST API.
100   string resource_url = 4;
101
102   // The full name of the immediate parent of this resource. See
103   // [Resource
104   // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
105   // for more information.
106   //
107   // For GCP assets, it is the parent resource defined in the [Cloud IAM policy
108   // hierarchy](https://cloud.google.com/iam/docs/overview#policy_hierarchy).
109   // For example:
110   // `"//cloudresourcemanager.googleapis.com/projects/my_project_123"`.
111   //
112   // For third-party assets, it is up to the users to define.
113   string parent = 5;
114
115   // The content of the resource, in which some sensitive fields are scrubbed
116   // away and may not be present.
117   google.protobuf.Struct data = 6;
118 }