google-cloud-asset-v1 0.2.2 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +6 -6
  3. data/README.md +1 -1
  4. data/lib/google/cloud/asset/v1.rb +1 -1
  5. data/lib/google/cloud/asset/v1/asset_service.rb +1 -1
  6. data/lib/google/cloud/asset/v1/asset_service/client.rb +449 -170
  7. data/lib/google/cloud/asset/v1/asset_service/credentials.rb +1 -1
  8. data/lib/google/cloud/asset/v1/asset_service/operations.rb +108 -102
  9. data/lib/google/cloud/asset/v1/asset_service/paths.rb +5 -5
  10. data/lib/google/cloud/asset/v1/asset_service_pb.rb +26 -0
  11. data/lib/google/cloud/asset/v1/asset_service_services_pb.rb +13 -2
  12. data/lib/google/cloud/asset/v1/assets_pb.rb +29 -1
  13. data/lib/google/cloud/asset/v1/version.rb +1 -1
  14. data/proto_docs/google/api/resource.rb +12 -12
  15. data/proto_docs/google/cloud/asset/v1/asset_service.rb +235 -74
  16. data/proto_docs/google/cloud/asset/v1/assets.rb +225 -36
  17. data/proto_docs/google/cloud/orgpolicy/v1/orgpolicy.rb +21 -21
  18. data/proto_docs/google/iam/v1/policy.rb +26 -26
  19. data/proto_docs/google/identity/accesscontextmanager/v1/access_level.rb +37 -37
  20. data/proto_docs/google/identity/accesscontextmanager/v1/access_policy.rb +8 -8
  21. data/proto_docs/google/identity/accesscontextmanager/v1/service_perimeter.rb +21 -21
  22. data/proto_docs/google/longrunning/operations.rb +30 -30
  23. data/proto_docs/google/protobuf/any.rb +4 -4
  24. data/proto_docs/google/protobuf/empty.rb +2 -2
  25. data/proto_docs/google/protobuf/field_mask.rb +3 -3
  26. data/proto_docs/google/protobuf/struct.rb +18 -18
  27. data/proto_docs/google/protobuf/timestamp.rb +4 -4
  28. data/proto_docs/google/rpc/status.rb +6 -6
  29. data/proto_docs/google/type/expr.rb +6 -6
  30. metadata +32 -5
  31. data/lib/google/cloud/common_resources_pb.rb +0 -15
@@ -51,28 +51,28 @@ module Google
51
51
  # @param organization [String]
52
52
  # @param feed [String]
53
53
  #
54
- # @return [String]
54
+ # @return [::String]
55
55
  def feed_path **args
56
56
  resources = {
57
57
  "feed:project" => (proc do |project:, feed:|
58
- raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
58
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
59
59
 
60
60
  "projects/#{project}/feeds/#{feed}"
61
61
  end),
62
62
  "feed:folder" => (proc do |folder:, feed:|
63
- raise ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
63
+ raise ::ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
64
64
 
65
65
  "folders/#{folder}/feeds/#{feed}"
66
66
  end),
67
67
  "feed:organization" => (proc do |organization:, feed:|
68
- raise ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
68
+ raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
69
69
 
70
70
  "organizations/#{organization}/feeds/#{feed}"
71
71
  end)
72
72
  }
73
73
 
74
74
  resource = resources[args.keys.sort.join(":")]
75
- raise ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
75
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
76
76
  resource.call(**args)
77
77
  end
78
78
 
@@ -88,6 +88,28 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
88
88
  optional :content_type, :enum, 4, "google.cloud.asset.v1.ContentType"
89
89
  optional :feed_output_config, :message, 5, "google.cloud.asset.v1.FeedOutputConfig"
90
90
  end
91
+ add_message "google.cloud.asset.v1.SearchAllResourcesRequest" do
92
+ optional :scope, :string, 1
93
+ optional :query, :string, 2
94
+ repeated :asset_types, :string, 3
95
+ optional :page_size, :int32, 4
96
+ optional :page_token, :string, 5
97
+ optional :order_by, :string, 6
98
+ end
99
+ add_message "google.cloud.asset.v1.SearchAllResourcesResponse" do
100
+ repeated :results, :message, 1, "google.cloud.asset.v1.ResourceSearchResult"
101
+ optional :next_page_token, :string, 2
102
+ end
103
+ add_message "google.cloud.asset.v1.SearchAllIamPoliciesRequest" do
104
+ optional :scope, :string, 1
105
+ optional :query, :string, 2
106
+ optional :page_size, :int32, 3
107
+ optional :page_token, :string, 4
108
+ end
109
+ add_message "google.cloud.asset.v1.SearchAllIamPoliciesResponse" do
110
+ repeated :results, :message, 1, "google.cloud.asset.v1.IamPolicySearchResult"
111
+ optional :next_page_token, :string, 2
112
+ end
91
113
  add_enum "google.cloud.asset.v1.ContentType" do
92
114
  value :CONTENT_TYPE_UNSPECIFIED, 0
93
115
  value :RESOURCE, 1
@@ -118,6 +140,10 @@ module Google
118
140
  PubsubDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.PubsubDestination").msgclass
119
141
  FeedOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.FeedOutputConfig").msgclass
120
142
  Feed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Feed").msgclass
143
+ SearchAllResourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.SearchAllResourcesRequest").msgclass
144
+ SearchAllResourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.SearchAllResourcesResponse").msgclass
145
+ SearchAllIamPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.SearchAllIamPoliciesRequest").msgclass
146
+ SearchAllIamPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.SearchAllIamPoliciesResponse").msgclass
121
147
  ContentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ContentType").enummodule
122
148
  end
123
149
  end
@@ -35,8 +35,9 @@ module Google
35
35
 
36
36
  # Exports assets with time and resource types to a given Cloud Storage
37
37
  # location. The output format is newline-delimited JSON.
38
- # This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you
39
- # to keep track of the export.
38
+ # This API implements the
39
+ # [google.longrunning.Operation][google.longrunning.Operation] API allowing
40
+ # you to keep track of the export.
40
41
  rpc :ExportAssets, ExportAssetsRequest, Google::Longrunning::Operation
41
42
  # Batch gets the update history of assets that overlap a time window.
42
43
  # For RESOURCE content, this API outputs history with asset in both
@@ -57,6 +58,16 @@ module Google
57
58
  rpc :UpdateFeed, UpdateFeedRequest, Feed
58
59
  # Deletes an asset feed.
59
60
  rpc :DeleteFeed, DeleteFeedRequest, Google::Protobuf::Empty
61
+ # Searches all the resources within the given accessible scope (e.g., a
62
+ # project, a folder or an organization). Callers should have
63
+ # cloud.assets.SearchAllResources permission upon the requested scope,
64
+ # otherwise the request will be rejected.
65
+ rpc :SearchAllResources, SearchAllResourcesRequest, SearchAllResourcesResponse
66
+ # Searches all the IAM policies within the given accessible scope (e.g., a
67
+ # project, a folder or an organization). Callers should have
68
+ # cloud.assets.SearchAllIamPolicies permission upon the requested scope,
69
+ # otherwise the request will be rejected.
70
+ rpc :SearchAllIamPolicies, SearchAllIamPoliciesRequest, SearchAllIamPoliciesResponse
60
71
  end
61
72
 
62
73
  Stub = Service.rpc_stub_class
@@ -3,6 +3,7 @@
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
+ require 'google/api/annotations_pb'
6
7
  require 'google/api/resource_pb'
7
8
  require 'google/cloud/orgpolicy/v1/orgpolicy_pb'
8
9
  require 'google/iam/v1/policy_pb'
@@ -12,7 +13,6 @@ require 'google/identity/accesscontextmanager/v1/service_perimeter_pb'
12
13
  require 'google/protobuf/any_pb'
13
14
  require 'google/protobuf/struct_pb'
14
15
  require 'google/protobuf/timestamp_pb'
15
- require 'google/api/annotations_pb'
16
16
  Google::Protobuf::DescriptorPool.generated_pool.build do
17
17
  add_file("google/cloud/asset/v1/assets.proto", :syntax => :proto3) do
18
18
  add_message "google.cloud.asset.v1.TemporalAsset" do
@@ -44,6 +44,30 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
44
44
  optional :resource_url, :string, 4
45
45
  optional :parent, :string, 5
46
46
  optional :data, :message, 6, "google.protobuf.Struct"
47
+ optional :location, :string, 8
48
+ end
49
+ add_message "google.cloud.asset.v1.ResourceSearchResult" do
50
+ optional :name, :string, 1
51
+ optional :asset_type, :string, 2
52
+ optional :project, :string, 3
53
+ optional :display_name, :string, 4
54
+ optional :description, :string, 5
55
+ optional :location, :string, 6
56
+ map :labels, :string, :string, 7
57
+ repeated :network_tags, :string, 8
58
+ optional :additional_attributes, :message, 9, "google.protobuf.Struct"
59
+ end
60
+ add_message "google.cloud.asset.v1.IamPolicySearchResult" do
61
+ optional :resource, :string, 1
62
+ optional :project, :string, 2
63
+ optional :policy, :message, 3, "google.iam.v1.Policy"
64
+ optional :explanation, :message, 4, "google.cloud.asset.v1.IamPolicySearchResult.Explanation"
65
+ end
66
+ add_message "google.cloud.asset.v1.IamPolicySearchResult.Explanation" do
67
+ map :matched_permissions, :string, :message, 1, "google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions"
68
+ end
69
+ add_message "google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions" do
70
+ repeated :permissions, :string, 1
47
71
  end
48
72
  end
49
73
  end
@@ -56,6 +80,10 @@ module Google
56
80
  TimeWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TimeWindow").msgclass
57
81
  Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Asset").msgclass
58
82
  Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Resource").msgclass
83
+ ResourceSearchResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ResourceSearchResult").msgclass
84
+ IamPolicySearchResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicySearchResult").msgclass
85
+ IamPolicySearchResult::Explanation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicySearchResult.Explanation").msgclass
86
+ IamPolicySearchResult::Explanation::Permissions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.IamPolicySearchResult.Explanation.Permissions").msgclass
59
87
  end
60
88
  end
61
89
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Asset
23
23
  module V1
24
- VERSION = "0.2.2"
24
+ VERSION = "0.4.2"
25
25
  end
26
26
  end
27
27
  end
@@ -128,7 +128,7 @@ module Google
128
128
  # - pattern: "shelves/{shelf}"
129
129
  # parent_type: "cloudresourcemanager.googleapis.com/Folder"
130
130
  # @!attribute [rw] type
131
- # @return [String]
131
+ # @return [::String]
132
132
  # The resource type. It must be in the format of
133
133
  # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
134
134
  # singular and must not include version numbers.
@@ -140,7 +140,7 @@ module Google
140
140
  # should use PascalCase (UpperCamelCase). The maximum number of
141
141
  # characters allowed for the `resource_type_kind` is 100.
142
142
  # @!attribute [rw] pattern
143
- # @return [Array<String>]
143
+ # @return [::Array<::String>]
144
144
  # Optional. The relative resource name pattern associated with this resource
145
145
  # type. The DNS prefix of the full resource name shouldn't be specified here.
146
146
  #
@@ -161,11 +161,11 @@ module Google
161
161
  # the same component name (e.g. "project") refers to IDs of the same
162
162
  # type of resource.
163
163
  # @!attribute [rw] name_field
164
- # @return [String]
164
+ # @return [::String]
165
165
  # Optional. The field on the resource that designates the resource name
166
166
  # field. If omitted, this is assumed to be "name".
167
167
  # @!attribute [rw] history
168
- # @return [Google::Api::ResourceDescriptor::History]
168
+ # @return [::Google::Api::ResourceDescriptor::History]
169
169
  # Optional. The historical or future-looking state of the resource pattern.
170
170
  #
171
171
  # Example:
@@ -182,19 +182,19 @@ module Google
182
182
  # };
183
183
  # }
184
184
  # @!attribute [rw] plural
185
- # @return [String]
185
+ # @return [::String]
186
186
  # The plural name used in the resource name, such as 'projects' for
187
187
  # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
188
  # field in k8s CRD spec
189
189
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
190
190
  # @!attribute [rw] singular
191
- # @return [String]
191
+ # @return [::String]
192
192
  # The same concept of the `singular` field in k8s CRD spec
193
193
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
194
  # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
195
195
  class ResourceDescriptor
196
- include Google::Protobuf::MessageExts
197
- extend Google::Protobuf::MessageExts::ClassMethods
196
+ include ::Google::Protobuf::MessageExts
197
+ extend ::Google::Protobuf::MessageExts::ClassMethods
198
198
 
199
199
  # A description of the historical or future-looking state of the
200
200
  # resource pattern.
@@ -216,7 +216,7 @@ module Google
216
216
  # Defines a proto annotation that describes a string field that refers to
217
217
  # an API resource.
218
218
  # @!attribute [rw] type
219
- # @return [String]
219
+ # @return [::String]
220
220
  # The resource type that the annotated field references.
221
221
  #
222
222
  # Example:
@@ -227,7 +227,7 @@ module Google
227
227
  # }];
228
228
  # }
229
229
  # @!attribute [rw] child_type
230
- # @return [String]
230
+ # @return [::String]
231
231
  # The resource type of a child collection that the annotated field
232
232
  # references. This is useful for annotating the `parent` field that
233
233
  # doesn't have a fixed resource type.
@@ -240,8 +240,8 @@ module Google
240
240
  # };
241
241
  # }
242
242
  class ResourceReference
243
- include Google::Protobuf::MessageExts
244
- extend Google::Protobuf::MessageExts::ClassMethods
243
+ include ::Google::Protobuf::MessageExts
244
+ extend ::Google::Protobuf::MessageExts::ClassMethods
245
245
  end
246
246
  end
247
247
  end
@@ -23,61 +23,63 @@ module Google
23
23
  module V1
24
24
  # Export asset request.
25
25
  # @!attribute [rw] parent
26
- # @return [String]
26
+ # @return [::String]
27
27
  # Required. The relative name of the root asset. This can only be an
28
28
  # organization number (such as "organizations/123"), a project ID (such as
29
29
  # "projects/my-project-id"), or a project number (such as "projects/12345"),
30
30
  # or a folder number (such as "folders/123").
31
31
  # @!attribute [rw] read_time
32
- # @return [Google::Protobuf::Timestamp]
32
+ # @return [::Google::Protobuf::Timestamp]
33
33
  # Timestamp to take an asset snapshot. This can only be set to a timestamp
34
34
  # between the current time and the current time minus 35 days (inclusive).
35
35
  # If not specified, the current time will be used. Due to delays in resource
36
36
  # data collection and indexing, there is a volatile window during which
37
37
  # running the same query may get different results.
38
38
  # @!attribute [rw] asset_types
39
- # @return [Array<String>]
39
+ # @return [::Array<::String>]
40
40
  # A list of asset types of which to take a snapshot for. For example:
41
41
  # "compute.googleapis.com/Disk". If specified, only matching assets will be
42
42
  # returned. See [Introduction to Cloud Asset
43
43
  # Inventory](https://cloud.google.com/asset-inventory/docs/overview)
44
44
  # for all supported asset types.
45
45
  # @!attribute [rw] content_type
46
- # @return [Google::Cloud::Asset::V1::ContentType]
46
+ # @return [::Google::Cloud::Asset::V1::ContentType]
47
47
  # Asset content type. If not specified, no content but the asset name will be
48
48
  # returned.
49
49
  # @!attribute [rw] output_config
50
- # @return [Google::Cloud::Asset::V1::OutputConfig]
50
+ # @return [::Google::Cloud::Asset::V1::OutputConfig]
51
51
  # Required. Output configuration indicating where the results will be output
52
52
  # to. All results will be in newline delimited JSON format.
53
53
  class ExportAssetsRequest
54
- include Google::Protobuf::MessageExts
55
- extend Google::Protobuf::MessageExts::ClassMethods
54
+ include ::Google::Protobuf::MessageExts
55
+ extend ::Google::Protobuf::MessageExts::ClassMethods
56
56
  end
57
57
 
58
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.
59
+ # google.longrunning.Operations.GetOperation
60
+ # method in the returned
61
+ # {::Google::Longrunning::Operation#response google.longrunning.Operation.response}
62
+ # field.
61
63
  # @!attribute [rw] read_time
62
- # @return [Google::Protobuf::Timestamp]
64
+ # @return [::Google::Protobuf::Timestamp]
63
65
  # Time the snapshot was taken.
64
66
  # @!attribute [rw] output_config
65
- # @return [Google::Cloud::Asset::V1::OutputConfig]
67
+ # @return [::Google::Cloud::Asset::V1::OutputConfig]
66
68
  # Output configuration indicating where the results were output to.
67
69
  # All results are in JSON format.
68
70
  class ExportAssetsResponse
69
- include Google::Protobuf::MessageExts
70
- extend Google::Protobuf::MessageExts::ClassMethods
71
+ include ::Google::Protobuf::MessageExts
72
+ extend ::Google::Protobuf::MessageExts::ClassMethods
71
73
  end
72
74
 
73
75
  # Batch get assets history request.
74
76
  # @!attribute [rw] parent
75
- # @return [String]
77
+ # @return [::String]
76
78
  # Required. The relative name of the root asset. It can only be an
77
79
  # organization number (such as "organizations/123"), a project ID (such as
78
80
  # "projects/my-project-id")", or a project number (such as "projects/12345").
79
81
  # @!attribute [rw] asset_names
80
- # @return [Array<String>]
82
+ # @return [::Array<::String>]
81
83
  # A list of the full names of the assets. For example:
82
84
  # `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
83
85
  # See [Resource
@@ -89,10 +91,10 @@ module Google
89
91
  # The request becomes a no-op if the asset name list is empty, and the max
90
92
  # size of the asset name list is 100 in one request.
91
93
  # @!attribute [rw] content_type
92
- # @return [Google::Cloud::Asset::V1::ContentType]
94
+ # @return [::Google::Cloud::Asset::V1::ContentType]
93
95
  # Optional. The content type.
94
96
  # @!attribute [rw] read_time_window
95
- # @return [Google::Cloud::Asset::V1::TimeWindow]
97
+ # @return [::Google::Cloud::Asset::V1::TimeWindow]
96
98
  # Optional. The time window for the asset history. Both start_time and
97
99
  # end_time are optional and if set, it must be after the current time minus
98
100
  # 35 days. If end_time is not set, it is default to current timestamp.
@@ -100,128 +102,127 @@ module Google
100
102
  # returned. The returned results contain all temporal assets whose time
101
103
  # window overlap with read_time_window.
102
104
  class BatchGetAssetsHistoryRequest
103
- include Google::Protobuf::MessageExts
104
- extend Google::Protobuf::MessageExts::ClassMethods
105
+ include ::Google::Protobuf::MessageExts
106
+ extend ::Google::Protobuf::MessageExts::ClassMethods
105
107
  end
106
108
 
107
109
  # Batch get assets history response.
108
110
  # @!attribute [rw] assets
109
- # @return [Array<Google::Cloud::Asset::V1::TemporalAsset>]
111
+ # @return [::Array<::Google::Cloud::Asset::V1::TemporalAsset>]
110
112
  # A list of assets with valid time windows.
111
113
  class BatchGetAssetsHistoryResponse
112
- include Google::Protobuf::MessageExts
113
- extend Google::Protobuf::MessageExts::ClassMethods
114
+ include ::Google::Protobuf::MessageExts
115
+ extend ::Google::Protobuf::MessageExts::ClassMethods
114
116
  end
115
117
 
116
118
  # Create asset feed request.
117
119
  # @!attribute [rw] parent
118
- # @return [String]
120
+ # @return [::String]
119
121
  # Required. The name of the project/folder/organization where this feed
120
122
  # should be created in. It can only be an organization number (such as
121
123
  # "organizations/123"), a folder number (such as "folders/123"), a project ID
122
124
  # (such as "projects/my-project-id")", or a project number (such as
123
125
  # "projects/12345").
124
126
  # @!attribute [rw] feed_id
125
- # @return [String]
127
+ # @return [::String]
126
128
  # Required. This is the client-assigned asset feed identifier and it needs to
127
129
  # be unique under a specific parent project/folder/organization.
128
130
  # @!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
131
+ # @return [::Google::Cloud::Asset::V1::Feed]
132
+ # Required. The feed details. The field `name` must be empty and it will be
133
+ # generated in the format of: projects/project_number/feeds/feed_id
133
134
  # folders/folder_number/feeds/feed_id
134
135
  # organizations/organization_number/feeds/feed_id
135
136
  class CreateFeedRequest
136
- include Google::Protobuf::MessageExts
137
- extend Google::Protobuf::MessageExts::ClassMethods
137
+ include ::Google::Protobuf::MessageExts
138
+ extend ::Google::Protobuf::MessageExts::ClassMethods
138
139
  end
139
140
 
140
141
  # Get asset feed request.
141
142
  # @!attribute [rw] name
142
- # @return [String]
143
+ # @return [::String]
143
144
  # Required. The name of the Feed and it must be in the format of:
144
145
  # projects/project_number/feeds/feed_id
145
146
  # folders/folder_number/feeds/feed_id
146
147
  # organizations/organization_number/feeds/feed_id
147
148
  class GetFeedRequest
148
- include Google::Protobuf::MessageExts
149
- extend Google::Protobuf::MessageExts::ClassMethods
149
+ include ::Google::Protobuf::MessageExts
150
+ extend ::Google::Protobuf::MessageExts::ClassMethods
150
151
  end
151
152
 
152
153
  # List asset feeds request.
153
154
  # @!attribute [rw] parent
154
- # @return [String]
155
+ # @return [::String]
155
156
  # Required. The parent project/folder/organization whose feeds are to be
156
157
  # listed. It can only be using project/folder/organization number (such as
157
158
  # "folders/12345")", or a project ID (such as "projects/my-project-id").
158
159
  class ListFeedsRequest
159
- include Google::Protobuf::MessageExts
160
- extend Google::Protobuf::MessageExts::ClassMethods
160
+ include ::Google::Protobuf::MessageExts
161
+ extend ::Google::Protobuf::MessageExts::ClassMethods
161
162
  end
162
163
 
163
164
  # @!attribute [rw] feeds
164
- # @return [Array<Google::Cloud::Asset::V1::Feed>]
165
+ # @return [::Array<::Google::Cloud::Asset::V1::Feed>]
165
166
  # A list of feeds.
166
167
  class ListFeedsResponse
167
- include Google::Protobuf::MessageExts
168
- extend Google::Protobuf::MessageExts::ClassMethods
168
+ include ::Google::Protobuf::MessageExts
169
+ extend ::Google::Protobuf::MessageExts::ClassMethods
169
170
  end
170
171
 
171
172
  # Update asset feed request.
172
173
  # @!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:
174
+ # @return [::Google::Cloud::Asset::V1::Feed]
175
+ # Required. The new values of feed details. It must match an existing feed
176
+ # and the field `name` must be in the format of:
176
177
  # projects/project_number/feeds/feed_id or
177
178
  # folders/folder_number/feeds/feed_id or
178
179
  # organizations/organization_number/feeds/feed_id.
179
180
  # @!attribute [rw] update_mask
180
- # @return [Google::Protobuf::FieldMask]
181
+ # @return [::Google::Protobuf::FieldMask]
181
182
  # Required. Only updates the `feed` fields indicated by this mask.
182
183
  # The field mask must not be empty, and it must not contain fields that
183
184
  # are immutable or only set by the server.
184
185
  class UpdateFeedRequest
185
- include Google::Protobuf::MessageExts
186
- extend Google::Protobuf::MessageExts::ClassMethods
186
+ include ::Google::Protobuf::MessageExts
187
+ extend ::Google::Protobuf::MessageExts::ClassMethods
187
188
  end
188
189
 
189
190
  # @!attribute [rw] name
190
- # @return [String]
191
+ # @return [::String]
191
192
  # Required. The name of the feed and it must be in the format of:
192
193
  # projects/project_number/feeds/feed_id
193
194
  # folders/folder_number/feeds/feed_id
194
195
  # organizations/organization_number/feeds/feed_id
195
196
  class DeleteFeedRequest
196
- include Google::Protobuf::MessageExts
197
- extend Google::Protobuf::MessageExts::ClassMethods
197
+ include ::Google::Protobuf::MessageExts
198
+ extend ::Google::Protobuf::MessageExts::ClassMethods
198
199
  end
199
200
 
200
201
  # Output configuration for export assets destination.
201
202
  # @!attribute [rw] gcs_destination
202
- # @return [Google::Cloud::Asset::V1::GcsDestination]
203
+ # @return [::Google::Cloud::Asset::V1::GcsDestination]
203
204
  # Destination on Cloud Storage.
204
205
  # @!attribute [rw] bigquery_destination
205
- # @return [Google::Cloud::Asset::V1::BigQueryDestination]
206
+ # @return [::Google::Cloud::Asset::V1::BigQueryDestination]
206
207
  # Destination on BigQuery. The output table stores the fields in asset
207
208
  # proto as columns in BigQuery. The resource/iam_policy field is converted
208
209
  # to a record with each field to a column, except metadata to a single JSON
209
210
  # string.
210
211
  class OutputConfig
211
- include Google::Protobuf::MessageExts
212
- extend Google::Protobuf::MessageExts::ClassMethods
212
+ include ::Google::Protobuf::MessageExts
213
+ extend ::Google::Protobuf::MessageExts::ClassMethods
213
214
  end
214
215
 
215
216
  # A Cloud Storage location.
216
217
  # @!attribute [rw] uri
217
- # @return [String]
218
+ # @return [::String]
218
219
  # The uri of the Cloud Storage object. It's the same uri that is used by
219
220
  # gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
220
221
  # Editing Object
221
222
  # Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
222
223
  # for more information.
223
224
  # @!attribute [rw] uri_prefix
224
- # @return [String]
225
+ # @return [::String]
225
226
  # The uri prefix of all generated Cloud Storage objects. For example:
226
227
  # "gs://bucket_name/object_name_prefix". Each object uri is in format:
227
228
  # "gs://bucket_name/object_name_prefix/<asset type>/<shard number> and only
@@ -232,50 +233,50 @@ module Google
232
233
  # returned if file with the same name "gs://bucket_name/object_name_prefix"
233
234
  # already exists.
234
235
  class GcsDestination
235
- include Google::Protobuf::MessageExts
236
- extend Google::Protobuf::MessageExts::ClassMethods
236
+ include ::Google::Protobuf::MessageExts
237
+ extend ::Google::Protobuf::MessageExts::ClassMethods
237
238
  end
238
239
 
239
240
  # A BigQuery destination.
240
241
  # @!attribute [rw] dataset
241
- # @return [String]
242
+ # @return [::String]
242
243
  # Required. The BigQuery dataset in format
243
244
  # "projects/projectId/datasets/datasetId", to which the snapshot result
244
245
  # should be exported. If this dataset does not exist, the export call returns
245
246
  # an INVALID_ARGUMENT error.
246
247
  # @!attribute [rw] table
247
- # @return [String]
248
+ # @return [::String]
248
249
  # Required. The BigQuery table to which the snapshot result should be
249
250
  # written. If this table does not exist, a new table with the given name
250
251
  # will be created.
251
252
  # @!attribute [rw] force
252
- # @return [Boolean]
253
+ # @return [::Boolean]
253
254
  # If the destination table already exists and this flag is `TRUE`, the
254
255
  # table will be overwritten by the contents of assets snapshot. If the flag
255
256
  # is `FALSE` or unset and the destination table already exists, the export
256
257
  # call returns an INVALID_ARGUMEMT error.
257
258
  class BigQueryDestination
258
- include Google::Protobuf::MessageExts
259
- extend Google::Protobuf::MessageExts::ClassMethods
259
+ include ::Google::Protobuf::MessageExts
260
+ extend ::Google::Protobuf::MessageExts::ClassMethods
260
261
  end
261
262
 
262
263
  # A Pub/Sub destination.
263
264
  # @!attribute [rw] topic
264
- # @return [String]
265
+ # @return [::String]
265
266
  # The name of the Pub/Sub topic to publish to.
266
267
  # For example: `projects/PROJECT_ID/topics/TOPIC_ID`.
267
268
  class PubsubDestination
268
- include Google::Protobuf::MessageExts
269
- extend Google::Protobuf::MessageExts::ClassMethods
269
+ include ::Google::Protobuf::MessageExts
270
+ extend ::Google::Protobuf::MessageExts::ClassMethods
270
271
  end
271
272
 
272
273
  # Output configuration for asset feed destination.
273
274
  # @!attribute [rw] pubsub_destination
274
- # @return [Google::Cloud::Asset::V1::PubsubDestination]
275
+ # @return [::Google::Cloud::Asset::V1::PubsubDestination]
275
276
  # Destination on Pub/Sub.
276
277
  class FeedOutputConfig
277
- include Google::Protobuf::MessageExts
278
- extend Google::Protobuf::MessageExts::ClassMethods
278
+ include ::Google::Protobuf::MessageExts
279
+ extend ::Google::Protobuf::MessageExts::ClassMethods
279
280
  end
280
281
 
281
282
  # An asset feed used to export asset updates to a destinations.
@@ -284,7 +285,7 @@ module Google
284
285
  # folder. Supported destinations are:
285
286
  # Pub/Sub topics.
286
287
  # @!attribute [rw] name
287
- # @return [String]
288
+ # @return [::String]
288
289
  # Required. The format will be
289
290
  # projects/\\{project_number}/feeds/\\{client-assigned_feed_identifier} or
290
291
  # folders/\\{folder_number}/feeds/\\{client-assigned_feed_identifier} or
@@ -293,7 +294,7 @@ module Google
293
294
  # The client-assigned feed identifier must be unique within the parent
294
295
  # project/folder/organization.
295
296
  # @!attribute [rw] asset_names
296
- # @return [Array<String>]
297
+ # @return [::Array<::String>]
297
298
  # A list of the full names of the assets to receive updates. You must specify
298
299
  # either or both of asset_names and asset_types. Only asset updates matching
299
300
  # specified asset_names and asset_types are exported to the feed. For
@@ -303,7 +304,7 @@ module Google
303
304
  # Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
304
305
  # for more info.
305
306
  # @!attribute [rw] asset_types
306
- # @return [Array<String>]
307
+ # @return [::Array<::String>]
307
308
  # A list of types of the assets to receive updates. You must specify either
308
309
  # or both of asset_names and asset_types. Only asset updates matching
309
310
  # specified asset_names and asset_types are exported to the feed.
@@ -313,16 +314,176 @@ module Google
313
314
  # topic](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
314
315
  # for a list of all supported asset types.
315
316
  # @!attribute [rw] content_type
316
- # @return [Google::Cloud::Asset::V1::ContentType]
317
+ # @return [::Google::Cloud::Asset::V1::ContentType]
317
318
  # Asset content type. If not specified, no content but the asset name and
318
319
  # type will be returned.
319
320
  # @!attribute [rw] feed_output_config
320
- # @return [Google::Cloud::Asset::V1::FeedOutputConfig]
321
+ # @return [::Google::Cloud::Asset::V1::FeedOutputConfig]
321
322
  # Required. Feed output configuration defining where the asset updates are
322
323
  # published to.
323
324
  class Feed
324
- include Google::Protobuf::MessageExts
325
- extend Google::Protobuf::MessageExts::ClassMethods
325
+ include ::Google::Protobuf::MessageExts
326
+ extend ::Google::Protobuf::MessageExts::ClassMethods
327
+ end
328
+
329
+ # Search all resources request.
330
+ # @!attribute [rw] scope
331
+ # @return [::String]
332
+ # Required. A scope can be a project, a folder or an organization. The search
333
+ # is limited to the resources within the `scope`.
334
+ #
335
+ # The allowed values are:
336
+ #
337
+ # * projects/\\{PROJECT_ID}
338
+ # * projects/\\{PROJECT_NUMBER}
339
+ # * folders/\\{FOLDER_NUMBER}
340
+ # * organizations/\\{ORGANIZATION_NUMBER}
341
+ # @!attribute [rw] query
342
+ # @return [::String]
343
+ # Optional. The query statement. An empty query can be specified to search
344
+ # all the resources of certain `asset_types` within the given `scope`.
345
+ #
346
+ # Examples:
347
+ #
348
+ # * `name : "Important"` to find Cloud resources whose name contains
349
+ # "Important" as a word.
350
+ # * `displayName : "Impor*"` to find Cloud resources whose display name
351
+ # contains "Impor" as a word prefix.
352
+ # * `description : "*por*"` to find Cloud resources whose description
353
+ # contains "por" as a substring.
354
+ # * `location : "us-west*"` to find Cloud resources whose location is
355
+ # prefixed with "us-west".
356
+ # * `labels : "prod"` to find Cloud resources whose labels contain "prod" as
357
+ # a key or value.
358
+ # * `labels.env : "prod"` to find Cloud resources which have a label "env"
359
+ # and its value is "prod".
360
+ # * `labels.env : *` to find Cloud resources which have a label "env".
361
+ # * `"Important"` to find Cloud resources which contain "Important" as a word
362
+ # in any of the searchable fields.
363
+ # * `"Impor*"` to find Cloud resources which contain "Impor" as a word prefix
364
+ # in any of the searchable fields.
365
+ # * `"*por*"` to find Cloud resources which contain "por" as a substring in
366
+ # any of the searchable fields.
367
+ # * `("Important" AND location : ("us-west1" OR "global"))` to find Cloud
368
+ # resources which contain "Important" as a word in any of the searchable
369
+ # fields and are also located in the "us-west1" region or the "global"
370
+ # location.
371
+ #
372
+ # See [how to construct a
373
+ # query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
374
+ # for more details.
375
+ # @!attribute [rw] asset_types
376
+ # @return [::Array<::String>]
377
+ # Optional. A list of asset types that this request searches for. If empty,
378
+ # it will search all the [searchable asset
379
+ # types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
380
+ # @!attribute [rw] page_size
381
+ # @return [::Integer]
382
+ # Optional. The page size for search result pagination. Page size is capped
383
+ # at 500 even if a larger value is given. If set to zero, server will pick an
384
+ # appropriate default. Returned results may be fewer than requested. When
385
+ # this happens, there could be more results as long as `next_page_token` is
386
+ # returned.
387
+ # @!attribute [rw] page_token
388
+ # @return [::String]
389
+ # Optional. If present, then retrieve the next batch of results from the
390
+ # preceding call to this method. `page_token` must be the value of
391
+ # `next_page_token` from the previous response. The values of all other
392
+ # method parameters, must be identical to those in the previous call.
393
+ # @!attribute [rw] order_by
394
+ # @return [::String]
395
+ # Optional. A comma separated list of fields specifying the sorting order of
396
+ # the results. The default order is ascending. Add " DESC" after the field
397
+ # name to indicate descending order. Redundant space characters are ignored.
398
+ # Example: "location DESC, name". See [supported resource metadata
399
+ # fields](https://cloud.google.com/asset-inventory/docs/searching-resources#query_on_resource_metadata_fields)
400
+ # for more details.
401
+ class SearchAllResourcesRequest
402
+ include ::Google::Protobuf::MessageExts
403
+ extend ::Google::Protobuf::MessageExts::ClassMethods
404
+ end
405
+
406
+ # Search all resources response.
407
+ # @!attribute [rw] results
408
+ # @return [::Array<::Google::Cloud::Asset::V1::ResourceSearchResult>]
409
+ # A list of Resources that match the search query. It contains the resource
410
+ # standard metadata information.
411
+ # @!attribute [rw] next_page_token
412
+ # @return [::String]
413
+ # If there are more results than those appearing in this response, then
414
+ # `next_page_token` is included. To get the next set of results, call this
415
+ # method again using the value of `next_page_token` as `page_token`.
416
+ class SearchAllResourcesResponse
417
+ include ::Google::Protobuf::MessageExts
418
+ extend ::Google::Protobuf::MessageExts::ClassMethods
419
+ end
420
+
421
+ # Search all IAM policies request.
422
+ # @!attribute [rw] scope
423
+ # @return [::String]
424
+ # Required. A scope can be a project, a folder or an organization. The search
425
+ # is limited to the IAM policies within the `scope`.
426
+ #
427
+ # The allowed values are:
428
+ #
429
+ # * projects/\\{PROJECT_ID}
430
+ # * projects/\\{PROJECT_NUMBER}
431
+ # * folders/\\{FOLDER_NUMBER}
432
+ # * organizations/\\{ORGANIZATION_NUMBER}
433
+ # @!attribute [rw] query
434
+ # @return [::String]
435
+ # Optional. The query statement. An empty query can be specified to search
436
+ # all the IAM policies within the given `scope`.
437
+ #
438
+ # Examples:
439
+ #
440
+ # * `policy : "amy@gmail.com"` to find Cloud IAM policy bindings that
441
+ # specify user "amy@gmail.com".
442
+ # * `policy : "roles/compute.admin"` to find Cloud IAM policy bindings that
443
+ # specify the Compute Admin role.
444
+ # * `policy.role.permissions : "storage.buckets.update"` to find Cloud IAM
445
+ # policy bindings that specify a role containing "storage.buckets.update"
446
+ # permission.
447
+ # * `resource : "organizations/123"` to find Cloud IAM policy bindings that
448
+ # are set on "organizations/123".
449
+ # * `(resource : ("organizations/123" OR "folders/1234") AND policy : "amy")`
450
+ # to find Cloud IAM policy bindings that are set on "organizations/123" or
451
+ # "folders/1234", and also specify user "amy".
452
+ #
453
+ # See [how to construct a
454
+ # query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query)
455
+ # for more details.
456
+ # @!attribute [rw] page_size
457
+ # @return [::Integer]
458
+ # Optional. The page size for search result pagination. Page size is capped
459
+ # at 500 even if a larger value is given. If set to zero, server will pick an
460
+ # appropriate default. Returned results may be fewer than requested. When
461
+ # this happens, there could be more results as long as `next_page_token` is
462
+ # returned.
463
+ # @!attribute [rw] page_token
464
+ # @return [::String]
465
+ # Optional. If present, retrieve the next batch of results from the preceding
466
+ # call to this method. `page_token` must be the value of `next_page_token`
467
+ # from the previous response. The values of all other method parameters must
468
+ # be identical to those in the previous call.
469
+ class SearchAllIamPoliciesRequest
470
+ include ::Google::Protobuf::MessageExts
471
+ extend ::Google::Protobuf::MessageExts::ClassMethods
472
+ end
473
+
474
+ # Search all IAM policies response.
475
+ # @!attribute [rw] results
476
+ # @return [::Array<::Google::Cloud::Asset::V1::IamPolicySearchResult>]
477
+ # A list of IamPolicy that match the search query. Related information such
478
+ # as the associated resource is returned along with the policy.
479
+ # @!attribute [rw] next_page_token
480
+ # @return [::String]
481
+ # Set if there are more results than those appearing in this response; to get
482
+ # the next set of results, call this method again, using this value as the
483
+ # `page_token`.
484
+ class SearchAllIamPoliciesResponse
485
+ include ::Google::Protobuf::MessageExts
486
+ extend ::Google::Protobuf::MessageExts::ClassMethods
326
487
  end
327
488
 
328
489
  # Asset content type.