google-cloud-asset-v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +203 -0
  5. data/README.md +24 -0
  6. data/lib/google-cloud-asset-v1.rb +1 -0
  7. data/lib/google/cloud/asset/v1.rb +19 -0
  8. data/lib/google/cloud/asset/v1/asset_service.rb +21 -0
  9. data/lib/google/cloud/asset/v1/asset_service/client.rb +878 -0
  10. data/lib/google/cloud/asset/v1/asset_service/credentials.rb +51 -0
  11. data/lib/google/cloud/asset/v1/asset_service/helpers.rb +43 -0
  12. data/lib/google/cloud/asset/v1/asset_service/operations.rb +558 -0
  13. data/lib/google/cloud/asset/v1/asset_service/paths.rb +85 -0
  14. data/lib/google/cloud/asset/v1/asset_service_pb.rb +124 -0
  15. data/lib/google/cloud/asset/v1/asset_service_services_pb.rb +68 -0
  16. data/lib/google/cloud/asset/v1/assets_pb.rb +52 -0
  17. data/lib/google/cloud/asset/v1/version.rb +28 -0
  18. data/lib/google/cloud/common_resources_pb.rb +15 -0
  19. data/lib/google/cloud/orgpolicy/v1/orgpolicy_pb.rb +54 -0
  20. data/proto_docs/README.md +4 -0
  21. data/proto_docs/google/api/field_behavior.rb +59 -0
  22. data/proto_docs/google/api/resource.rb +247 -0
  23. data/proto_docs/google/cloud/asset/v1/asset_service.rb +347 -0
  24. data/proto_docs/google/cloud/asset/v1/assets.rb +132 -0
  25. data/proto_docs/google/cloud/orgpolicy/v1/orgpolicy.rb +307 -0
  26. data/proto_docs/google/iam/v1/policy.rb +156 -0
  27. data/proto_docs/google/longrunning/operations.rb +150 -0
  28. data/proto_docs/google/protobuf/any.rb +137 -0
  29. data/proto_docs/google/protobuf/empty.rb +36 -0
  30. data/proto_docs/google/protobuf/field_mask.rb +237 -0
  31. data/proto_docs/google/protobuf/struct.rb +96 -0
  32. data/proto_docs/google/protobuf/timestamp.rb +116 -0
  33. data/proto_docs/google/rpc/status.rb +46 -0
  34. metadata +201 -0
@@ -0,0 +1,247 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Api
22
+ # A simple descriptor of a resource type.
23
+ #
24
+ # ResourceDescriptor annotates a resource message (either by means of a
25
+ # protobuf annotation or use in the service config), and associates the
26
+ # resource's schema, the resource type, and the pattern of the resource name.
27
+ #
28
+ # Example:
29
+ #
30
+ # message Topic {
31
+ # // Indicates this message defines a resource schema.
32
+ # // Declares the resource type in the format of {service}/{kind}.
33
+ # // For Kubernetes resources, the format is {api group}/{kind}.
34
+ # option (google.api.resource) = {
35
+ # type: "pubsub.googleapis.com/Topic"
36
+ # name_descriptor: {
37
+ # pattern: "projects/{project}/topics/{topic}"
38
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
+ # parent_name_extractor: "projects/{project}"
40
+ # }
41
+ # };
42
+ # }
43
+ #
44
+ # The ResourceDescriptor Yaml config will look like:
45
+ #
46
+ # resources:
47
+ # - type: "pubsub.googleapis.com/Topic"
48
+ # name_descriptor:
49
+ # - pattern: "projects/\\{project}/topics/\\{topic}"
50
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
+ # parent_name_extractor: "projects/\\{project}"
52
+ #
53
+ # Sometimes, resources have multiple patterns, typically because they can
54
+ # live under multiple parents.
55
+ #
56
+ # Example:
57
+ #
58
+ # message LogEntry {
59
+ # option (google.api.resource) = {
60
+ # type: "logging.googleapis.com/LogEntry"
61
+ # name_descriptor: {
62
+ # pattern: "projects/{project}/logs/{log}"
63
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
+ # parent_name_extractor: "projects/{project}"
65
+ # }
66
+ # name_descriptor: {
67
+ # pattern: "folders/{folder}/logs/{log}"
68
+ # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
+ # parent_name_extractor: "folders/{folder}"
70
+ # }
71
+ # name_descriptor: {
72
+ # pattern: "organizations/{organization}/logs/{log}"
73
+ # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
+ # parent_name_extractor: "organizations/{organization}"
75
+ # }
76
+ # name_descriptor: {
77
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
+ # parent_type: "billing.googleapis.com/BillingAccount"
79
+ # parent_name_extractor: "billingAccounts/{billing_account}"
80
+ # }
81
+ # };
82
+ # }
83
+ #
84
+ # The ResourceDescriptor Yaml config will look like:
85
+ #
86
+ # resources:
87
+ # - type: 'logging.googleapis.com/LogEntry'
88
+ # name_descriptor:
89
+ # - pattern: "projects/{project}/logs/{log}"
90
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
+ # parent_name_extractor: "projects/{project}"
92
+ # - pattern: "folders/{folder}/logs/{log}"
93
+ # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
+ # parent_name_extractor: "folders/{folder}"
95
+ # - pattern: "organizations/{organization}/logs/{log}"
96
+ # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
+ # parent_name_extractor: "organizations/{organization}"
98
+ # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
+ # parent_type: "billing.googleapis.com/BillingAccount"
100
+ # parent_name_extractor: "billingAccounts/{billing_account}"
101
+ #
102
+ # For flexible resources, the resource name doesn't contain parent names, but
103
+ # the resource itself has parents for policy evaluation.
104
+ #
105
+ # Example:
106
+ #
107
+ # message Shelf {
108
+ # option (google.api.resource) = {
109
+ # type: "library.googleapis.com/Shelf"
110
+ # name_descriptor: {
111
+ # pattern: "shelves/{shelf}"
112
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
+ # }
114
+ # name_descriptor: {
115
+ # pattern: "shelves/{shelf}"
116
+ # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
+ # }
118
+ # };
119
+ # }
120
+ #
121
+ # The ResourceDescriptor Yaml config will look like:
122
+ #
123
+ # resources:
124
+ # - type: 'library.googleapis.com/Shelf'
125
+ # name_descriptor:
126
+ # - pattern: "shelves/{shelf}"
127
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
+ # - pattern: "shelves/{shelf}"
129
+ # parent_type: "cloudresourcemanager.googleapis.com/Folder"
130
+ # @!attribute [rw] type
131
+ # @return [String]
132
+ # The resource type. It must be in the format of
133
+ # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
134
+ # singular and must not include version numbers.
135
+ #
136
+ # Example: `storage.googleapis.com/Bucket`
137
+ #
138
+ # The value of the resource_type_kind must follow the regular expression
139
+ # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
140
+ # should use PascalCase (UpperCamelCase). The maximum number of
141
+ # characters allowed for the `resource_type_kind` is 100.
142
+ # @!attribute [rw] pattern
143
+ # @return [Array<String>]
144
+ # Optional. The relative resource name pattern associated with this resource
145
+ # type. The DNS prefix of the full resource name shouldn't be specified here.
146
+ #
147
+ # The path pattern must follow the syntax, which aligns with HTTP binding
148
+ # syntax:
149
+ #
150
+ # Template = Segment { "/" Segment } ;
151
+ # Segment = LITERAL | Variable ;
152
+ # Variable = "{" LITERAL "}" ;
153
+ #
154
+ # Examples:
155
+ #
156
+ # - "projects/\\{project}/topics/\\{topic}"
157
+ # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
158
+ #
159
+ # The components in braces correspond to the IDs for each resource in the
160
+ # hierarchy. It is expected that, if multiple patterns are provided,
161
+ # the same component name (e.g. "project") refers to IDs of the same
162
+ # type of resource.
163
+ # @!attribute [rw] name_field
164
+ # @return [String]
165
+ # Optional. The field on the resource that designates the resource name
166
+ # field. If omitted, this is assumed to be "name".
167
+ # @!attribute [rw] history
168
+ # @return [Google::Api::ResourceDescriptor::History]
169
+ # Optional. The historical or future-looking state of the resource pattern.
170
+ #
171
+ # Example:
172
+ #
173
+ # // The InspectTemplate message originally only supported resource
174
+ # // names with organization, and project was added later.
175
+ # message InspectTemplate {
176
+ # option (google.api.resource) = {
177
+ # type: "dlp.googleapis.com/InspectTemplate"
178
+ # pattern:
179
+ # "organizations/{organization}/inspectTemplates/{inspect_template}"
180
+ # pattern: "projects/{project}/inspectTemplates/{inspect_template}"
181
+ # history: ORIGINALLY_SINGLE_PATTERN
182
+ # };
183
+ # }
184
+ # @!attribute [rw] plural
185
+ # @return [String]
186
+ # The plural name used in the resource name, such as 'projects' for
187
+ # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
+ # field in k8s CRD spec
189
+ # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
190
+ # @!attribute [rw] singular
191
+ # @return [String]
192
+ # The same concept of the `singular` field in k8s CRD spec
193
+ # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
+ # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
195
+ class ResourceDescriptor
196
+ include Google::Protobuf::MessageExts
197
+ extend Google::Protobuf::MessageExts::ClassMethods
198
+
199
+ # A description of the historical or future-looking state of the
200
+ # resource pattern.
201
+ module History
202
+ # The "unset" value.
203
+ HISTORY_UNSPECIFIED = 0
204
+
205
+ # The resource originally had one pattern and launched as such, and
206
+ # additional patterns were added later.
207
+ ORIGINALLY_SINGLE_PATTERN = 1
208
+
209
+ # The resource has one pattern, but the API owner expects to add more
210
+ # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
211
+ # that from being necessary once there are multiple patterns.)
212
+ FUTURE_MULTI_PATTERN = 2
213
+ end
214
+ end
215
+
216
+ # Defines a proto annotation that describes a string field that refers to
217
+ # an API resource.
218
+ # @!attribute [rw] type
219
+ # @return [String]
220
+ # The resource type that the annotated field references.
221
+ #
222
+ # Example:
223
+ #
224
+ # message Subscription {
225
+ # string topic = 2 [(google.api.resource_reference) = {
226
+ # type: "pubsub.googleapis.com/Topic"
227
+ # }];
228
+ # }
229
+ # @!attribute [rw] child_type
230
+ # @return [String]
231
+ # The resource type of a child collection that the annotated field
232
+ # references. This is useful for annotating the `parent` field that
233
+ # doesn't have a fixed resource type.
234
+ #
235
+ # Example:
236
+ #
237
+ # message ListLogEntriesRequest {
238
+ # string parent = 1 [(google.api.resource_reference) = {
239
+ # child_type: "logging.googleapis.com/LogEntry"
240
+ # };
241
+ # }
242
+ class ResourceReference
243
+ include Google::Protobuf::MessageExts
244
+ extend Google::Protobuf::MessageExts::ClassMethods
245
+ end
246
+ end
247
+ end
@@ -0,0 +1,347 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Asset
23
+ module V1
24
+ # Export asset request.
25
+ # @!attribute [rw] parent
26
+ # @return [String]
27
+ # Required. The relative name of the root asset. This can only be an
28
+ # organization number (such as "organizations/123"), a project ID (such as
29
+ # "projects/my-project-id"), or a project number (such as "projects/12345"),
30
+ # or a folder number (such as "folders/123").
31
+ # @!attribute [rw] read_time
32
+ # @return [Google::Protobuf::Timestamp]
33
+ # Timestamp to take an asset snapshot. This can only be set to a timestamp
34
+ # between 2018-10-02 UTC (inclusive) and the current time. If not specified,
35
+ # the current time will be used. Due to delays in resource data collection
36
+ # and indexing, there is a volatile window during which running the same
37
+ # query may get different results.
38
+ # @!attribute [rw] asset_types
39
+ # @return [Array<String>]
40
+ # A list of asset types of which to take a snapshot for. For example:
41
+ # "compute.googleapis.com/Disk". If specified, only matching assets will be
42
+ # returned. See [Introduction to Cloud Asset
43
+ # Inventory](https://cloud.google.com/asset-inventory/docs/overview)
44
+ # for all supported asset types.
45
+ # @!attribute [rw] content_type
46
+ # @return [Google::Cloud::Asset::V1::ContentType]
47
+ # Asset content type. If not specified, no content but the asset name will be
48
+ # returned.
49
+ # @!attribute [rw] output_config
50
+ # @return [Google::Cloud::Asset::V1::OutputConfig]
51
+ # Required. Output configuration indicating where the results will be output
52
+ # to. All results will be in newline delimited JSON format.
53
+ class ExportAssetsRequest
54
+ include Google::Protobuf::MessageExts
55
+ extend Google::Protobuf::MessageExts::ClassMethods
56
+ end
57
+
58
+ # The export asset response. This message is returned by the
59
+ # google.longrunning.Operations.GetOperation method in the returned
60
+ # {Google::Longrunning::Operation#response google.longrunning.Operation.response} field.
61
+ # @!attribute [rw] read_time
62
+ # @return [Google::Protobuf::Timestamp]
63
+ # Time the snapshot was taken.
64
+ # @!attribute [rw] output_config
65
+ # @return [Google::Cloud::Asset::V1::OutputConfig]
66
+ # Output configuration indicating where the results were output to.
67
+ # All results are in JSON format.
68
+ class ExportAssetsResponse
69
+ include Google::Protobuf::MessageExts
70
+ extend Google::Protobuf::MessageExts::ClassMethods
71
+ end
72
+
73
+ # Batch get assets history request.
74
+ # @!attribute [rw] parent
75
+ # @return [String]
76
+ # Required. The relative name of the root asset. It can only be an
77
+ # organization number (such as "organizations/123"), a project ID (such as
78
+ # "projects/my-project-id")", or a project number (such as "projects/12345").
79
+ # @!attribute [rw] asset_names
80
+ # @return [Array<String>]
81
+ # A list of the full names of the assets. For example:
82
+ # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
83
+ # See [Resource
84
+ # Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
85
+ # and [Resource Name
86
+ # Format](https://cloud.google.com/asset-inventory/docs/resource-name-format)
87
+ # for more info.
88
+ #
89
+ # The request becomes a no-op if the asset name list is empty, and the max
90
+ # size of the asset name list is 100 in one request.
91
+ # @!attribute [rw] content_type
92
+ # @return [Google::Cloud::Asset::V1::ContentType]
93
+ # Optional. The content type.
94
+ # @!attribute [rw] read_time_window
95
+ # @return [Google::Cloud::Asset::V1::TimeWindow]
96
+ # Optional. The time window for the asset history. Both start_time and
97
+ # end_time are optional and if set, it must be after 2018-10-02 UTC. If
98
+ # end_time is not set, it is default to current timestamp. If start_time is
99
+ # not set, the snapshot of the assets at end_time will be returned. The
100
+ # returned results contain all temporal assets whose time window overlap with
101
+ # read_time_window.
102
+ class BatchGetAssetsHistoryRequest
103
+ include Google::Protobuf::MessageExts
104
+ extend Google::Protobuf::MessageExts::ClassMethods
105
+ end
106
+
107
+ # Batch get assets history response.
108
+ # @!attribute [rw] assets
109
+ # @return [Array<Google::Cloud::Asset::V1::TemporalAsset>]
110
+ # A list of assets with valid time windows.
111
+ class BatchGetAssetsHistoryResponse
112
+ include Google::Protobuf::MessageExts
113
+ extend Google::Protobuf::MessageExts::ClassMethods
114
+ end
115
+
116
+ # Create asset feed request.
117
+ # @!attribute [rw] parent
118
+ # @return [String]
119
+ # Required. The name of the project/folder/organization where this feed
120
+ # should be created in. It can only be an organization number (such as
121
+ # "organizations/123"), a folder number (such as "folders/123"), a project ID
122
+ # (such as "projects/my-project-id")", or a project number (such as
123
+ # "projects/12345").
124
+ # @!attribute [rw] feed_id
125
+ # @return [String]
126
+ # Required. This is the client-assigned asset feed identifier and it needs to
127
+ # be unique under a specific parent project/folder/organization.
128
+ # @!attribute [rw] feed
129
+ # @return [Google::Cloud::Asset::V1::Feed]
130
+ # Required. The feed details. The field `name` must be empty and it will be generated
131
+ # in the format of:
132
+ # projects/project_number/feeds/feed_id
133
+ # folders/folder_number/feeds/feed_id
134
+ # organizations/organization_number/feeds/feed_id
135
+ class CreateFeedRequest
136
+ include Google::Protobuf::MessageExts
137
+ extend Google::Protobuf::MessageExts::ClassMethods
138
+ end
139
+
140
+ # Get asset feed request.
141
+ # @!attribute [rw] name
142
+ # @return [String]
143
+ # Required. The name of the Feed and it must be in the format of:
144
+ # projects/project_number/feeds/feed_id
145
+ # folders/folder_number/feeds/feed_id
146
+ # organizations/organization_number/feeds/feed_id
147
+ class GetFeedRequest
148
+ include Google::Protobuf::MessageExts
149
+ extend Google::Protobuf::MessageExts::ClassMethods
150
+ end
151
+
152
+ # List asset feeds request.
153
+ # @!attribute [rw] parent
154
+ # @return [String]
155
+ # Required. The parent project/folder/organization whose feeds are to be
156
+ # listed. It can only be using project/folder/organization number (such as
157
+ # "folders/12345")", or a project ID (such as "projects/my-project-id").
158
+ class ListFeedsRequest
159
+ include Google::Protobuf::MessageExts
160
+ extend Google::Protobuf::MessageExts::ClassMethods
161
+ end
162
+
163
+ # @!attribute [rw] feeds
164
+ # @return [Array<Google::Cloud::Asset::V1::Feed>]
165
+ # A list of feeds.
166
+ class ListFeedsResponse
167
+ include Google::Protobuf::MessageExts
168
+ extend Google::Protobuf::MessageExts::ClassMethods
169
+ end
170
+
171
+ # Update asset feed request.
172
+ # @!attribute [rw] feed
173
+ # @return [Google::Cloud::Asset::V1::Feed]
174
+ # Required. The new values of feed details. It must match an existing feed and the
175
+ # field `name` must be in the format of:
176
+ # projects/project_number/feeds/feed_id or
177
+ # folders/folder_number/feeds/feed_id or
178
+ # organizations/organization_number/feeds/feed_id.
179
+ # @!attribute [rw] update_mask
180
+ # @return [Google::Protobuf::FieldMask]
181
+ # Required. Only updates the `feed` fields indicated by this mask.
182
+ # The field mask must not be empty, and it must not contain fields that
183
+ # are immutable or only set by the server.
184
+ class UpdateFeedRequest
185
+ include Google::Protobuf::MessageExts
186
+ extend Google::Protobuf::MessageExts::ClassMethods
187
+ end
188
+
189
+ # @!attribute [rw] name
190
+ # @return [String]
191
+ # Required. The name of the feed and it must be in the format of:
192
+ # projects/project_number/feeds/feed_id
193
+ # folders/folder_number/feeds/feed_id
194
+ # organizations/organization_number/feeds/feed_id
195
+ class DeleteFeedRequest
196
+ include Google::Protobuf::MessageExts
197
+ extend Google::Protobuf::MessageExts::ClassMethods
198
+ end
199
+
200
+ # Output configuration for export assets destination.
201
+ # @!attribute [rw] gcs_destination
202
+ # @return [Google::Cloud::Asset::V1::GcsDestination]
203
+ # Destination on Cloud Storage.
204
+ # @!attribute [rw] bigquery_destination
205
+ # @return [Google::Cloud::Asset::V1::BigQueryDestination]
206
+ # Destination on BigQuery. The output table stores the fields in asset
207
+ # proto as columns in BigQuery. The resource/iam_policy field is converted
208
+ # to a record with each field to a column, except metadata to a single JSON
209
+ # string.
210
+ class OutputConfig
211
+ include Google::Protobuf::MessageExts
212
+ extend Google::Protobuf::MessageExts::ClassMethods
213
+ end
214
+
215
+ # A Cloud Storage location.
216
+ # @!attribute [rw] uri
217
+ # @return [String]
218
+ # The uri of the Cloud Storage object. It's the same uri that is used by
219
+ # gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
220
+ # Editing Object
221
+ # Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
222
+ # for more information.
223
+ # @!attribute [rw] uri_prefix
224
+ # @return [String]
225
+ # The uri prefix of all generated Cloud Storage objects. For example:
226
+ # "gs://bucket_name/object_name_prefix". Each object uri is in format:
227
+ # "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
228
+ # contains assets for that type. <shard number> starts from 0. For example:
229
+ # "gs://bucket_name/object_name_prefix/compute.googleapis.com/Disk/0" is
230
+ # the first shard of output objects containing all
231
+ # compute.googleapis.com/Disk assets. An INVALID_ARGUMENT error will be
232
+ # returned if file with the same name "gs://bucket_name/object_name_prefix"
233
+ # already exists.
234
+ class GcsDestination
235
+ include Google::Protobuf::MessageExts
236
+ extend Google::Protobuf::MessageExts::ClassMethods
237
+ end
238
+
239
+ # A BigQuery destination.
240
+ # @!attribute [rw] dataset
241
+ # @return [String]
242
+ # Required. The BigQuery dataset in format
243
+ # "projects/projectId/datasets/datasetId", to which the snapshot result
244
+ # should be exported. If this dataset does not exist, the export call returns
245
+ # an error.
246
+ # @!attribute [rw] table
247
+ # @return [String]
248
+ # Required. The BigQuery table to which the snapshot result should be
249
+ # written. If this table does not exist, a new table with the given name
250
+ # will be created.
251
+ # @!attribute [rw] force
252
+ # @return [Boolean]
253
+ # If the destination table already exists and this flag is `TRUE`, the
254
+ # table will be overwritten by the contents of assets snapshot. If the flag
255
+ # is not set and the destination table already exists, the export call
256
+ # returns an error.
257
+ class BigQueryDestination
258
+ include Google::Protobuf::MessageExts
259
+ extend Google::Protobuf::MessageExts::ClassMethods
260
+ end
261
+
262
+ # A Cloud Pubsub destination.
263
+ # @!attribute [rw] topic
264
+ # @return [String]
265
+ # The name of the Cloud Pub/Sub topic to publish to.
266
+ # For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
267
+ class PubsubDestination
268
+ include Google::Protobuf::MessageExts
269
+ extend Google::Protobuf::MessageExts::ClassMethods
270
+ end
271
+
272
+ # Output configuration for asset feed destination.
273
+ # @!attribute [rw] pubsub_destination
274
+ # @return [Google::Cloud::Asset::V1::PubsubDestination]
275
+ # Destination on Cloud Pubsub.
276
+ class FeedOutputConfig
277
+ include Google::Protobuf::MessageExts
278
+ extend Google::Protobuf::MessageExts::ClassMethods
279
+ end
280
+
281
+ # An asset feed used to export asset updates to a destinations.
282
+ # An asset feed filter controls what updates are exported.
283
+ # The asset feed must be created within a project, organization, or
284
+ # folder. Supported destinations are:
285
+ # Cloud Pub/Sub topics.
286
+ # @!attribute [rw] name
287
+ # @return [String]
288
+ # Required. The format will be
289
+ # projects/\\{project_number}/feeds/\\{client-assigned_feed_identifier} or
290
+ # folders/\\{folder_number}/feeds/\\{client-assigned_feed_identifier} or
291
+ # organizations/\\{organization_number}/feeds/\\{client-assigned_feed_identifier}
292
+ #
293
+ # The client-assigned feed identifier must be unique within the parent
294
+ # project/folder/organization.
295
+ # @!attribute [rw] asset_names
296
+ # @return [Array<String>]
297
+ # A list of the full names of the assets to receive updates. You must specify
298
+ # either or both of asset_names and asset_types. Only asset updates matching
299
+ # specified asset_names and asset_types are exported to the feed. For
300
+ # example:
301
+ # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
302
+ # See [Resource
303
+ # Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
304
+ # for more info.
305
+ # @!attribute [rw] asset_types
306
+ # @return [Array<String>]
307
+ # A list of types of the assets to receive updates. You must specify either
308
+ # or both of asset_names and asset_types. Only asset updates matching
309
+ # specified asset_names and asset_types are exported to the feed.
310
+ # For example:
311
+ # "compute.googleapis.com/Disk" See [Introduction to Cloud Asset
312
+ # Inventory](https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview)
313
+ # for all supported asset types.
314
+ # @!attribute [rw] content_type
315
+ # @return [Google::Cloud::Asset::V1::ContentType]
316
+ # Asset content type. If not specified, no content but the asset name and
317
+ # type will be returned.
318
+ # @!attribute [rw] feed_output_config
319
+ # @return [Google::Cloud::Asset::V1::FeedOutputConfig]
320
+ # Required. Feed output configuration defining where the asset updates are
321
+ # published to.
322
+ class Feed
323
+ include Google::Protobuf::MessageExts
324
+ extend Google::Protobuf::MessageExts::ClassMethods
325
+ end
326
+
327
+ # Asset content type.
328
+ module ContentType
329
+ # Unspecified content type.
330
+ CONTENT_TYPE_UNSPECIFIED = 0
331
+
332
+ # Resource metadata.
333
+ RESOURCE = 1
334
+
335
+ # The actual IAM policy set on a resource.
336
+ IAM_POLICY = 2
337
+
338
+ # The Cloud Organization Policy set on an asset.
339
+ ORG_POLICY = 4
340
+
341
+ # The Cloud Access context mananger Policy set on an asset.
342
+ ACCESS_POLICY = 5
343
+ end
344
+ end
345
+ end
346
+ end
347
+ end