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.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +24 -0
- data/lib/google-cloud-asset-v1.rb +1 -0
- data/lib/google/cloud/asset/v1.rb +19 -0
- data/lib/google/cloud/asset/v1/asset_service.rb +21 -0
- data/lib/google/cloud/asset/v1/asset_service/client.rb +878 -0
- data/lib/google/cloud/asset/v1/asset_service/credentials.rb +51 -0
- data/lib/google/cloud/asset/v1/asset_service/helpers.rb +43 -0
- data/lib/google/cloud/asset/v1/asset_service/operations.rb +558 -0
- data/lib/google/cloud/asset/v1/asset_service/paths.rb +85 -0
- data/lib/google/cloud/asset/v1/asset_service_pb.rb +124 -0
- data/lib/google/cloud/asset/v1/asset_service_services_pb.rb +68 -0
- data/lib/google/cloud/asset/v1/assets_pb.rb +52 -0
- data/lib/google/cloud/asset/v1/version.rb +28 -0
- data/lib/google/cloud/common_resources_pb.rb +15 -0
- data/lib/google/cloud/orgpolicy/v1/orgpolicy_pb.rb +54 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/cloud/asset/v1/asset_service.rb +347 -0
- data/proto_docs/google/cloud/asset/v1/assets.rb +132 -0
- data/proto_docs/google/cloud/orgpolicy/v1/orgpolicy.rb +307 -0
- data/proto_docs/google/iam/v1/policy.rb +156 -0
- data/proto_docs/google/longrunning/operations.rb +150 -0
- data/proto_docs/google/protobuf/any.rb +137 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +237 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +116 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +201 -0
@@ -0,0 +1,85 @@
|
|
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
|
+
module AssetService
|
25
|
+
# Path helper methods for the AssetService API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Feed resource string.
|
29
|
+
#
|
30
|
+
# @overload feed_path(project:, feed:)
|
31
|
+
# The resource will be in the following format:
|
32
|
+
#
|
33
|
+
# `projects/{project}/feeds/{feed}`
|
34
|
+
#
|
35
|
+
# @param project [String]
|
36
|
+
# @param feed [String]
|
37
|
+
#
|
38
|
+
# @overload feed_path(folder:, feed:)
|
39
|
+
# The resource will be in the following format:
|
40
|
+
#
|
41
|
+
# `folders/{folder}/feeds/{feed}`
|
42
|
+
#
|
43
|
+
# @param folder [String]
|
44
|
+
# @param feed [String]
|
45
|
+
#
|
46
|
+
# @overload feed_path(organization:, feed:)
|
47
|
+
# The resource will be in the following format:
|
48
|
+
#
|
49
|
+
# `organizations/{organization}/feeds/{feed}`
|
50
|
+
#
|
51
|
+
# @param organization [String]
|
52
|
+
# @param feed [String]
|
53
|
+
#
|
54
|
+
# @return [String]
|
55
|
+
def feed_path **args
|
56
|
+
resources = {
|
57
|
+
"feed:project" => (proc do |project:, feed:|
|
58
|
+
raise ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
59
|
+
|
60
|
+
"projects/#{project}/feeds/#{feed}"
|
61
|
+
end),
|
62
|
+
"feed:folder" => (proc do |folder:, feed:|
|
63
|
+
raise ArgumentError, "folder cannot contain /" if folder.to_s.include? "/"
|
64
|
+
|
65
|
+
"folders/#{folder}/feeds/#{feed}"
|
66
|
+
end),
|
67
|
+
"feed:organization" => (proc do |organization:, feed:|
|
68
|
+
raise ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
69
|
+
|
70
|
+
"organizations/#{organization}/feeds/#{feed}"
|
71
|
+
end)
|
72
|
+
}
|
73
|
+
|
74
|
+
resource = resources[args.keys.sort.join(":")]
|
75
|
+
raise ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
76
|
+
resource.call(**args)
|
77
|
+
end
|
78
|
+
|
79
|
+
extend self
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,124 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/asset/v1/asset_service.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/api/client_pb'
|
8
|
+
require 'google/api/field_behavior_pb'
|
9
|
+
require 'google/api/resource_pb'
|
10
|
+
require 'google/cloud/asset/v1/assets_pb'
|
11
|
+
require 'google/longrunning/operations_pb'
|
12
|
+
require 'google/protobuf/empty_pb'
|
13
|
+
require 'google/protobuf/field_mask_pb'
|
14
|
+
require 'google/protobuf/timestamp_pb'
|
15
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
16
|
+
add_file("google/cloud/asset/v1/asset_service.proto", :syntax => :proto3) do
|
17
|
+
add_message "google.cloud.asset.v1.ExportAssetsRequest" do
|
18
|
+
optional :parent, :string, 1
|
19
|
+
optional :read_time, :message, 2, "google.protobuf.Timestamp"
|
20
|
+
repeated :asset_types, :string, 3
|
21
|
+
optional :content_type, :enum, 4, "google.cloud.asset.v1.ContentType"
|
22
|
+
optional :output_config, :message, 5, "google.cloud.asset.v1.OutputConfig"
|
23
|
+
end
|
24
|
+
add_message "google.cloud.asset.v1.ExportAssetsResponse" do
|
25
|
+
optional :read_time, :message, 1, "google.protobuf.Timestamp"
|
26
|
+
optional :output_config, :message, 2, "google.cloud.asset.v1.OutputConfig"
|
27
|
+
end
|
28
|
+
add_message "google.cloud.asset.v1.BatchGetAssetsHistoryRequest" do
|
29
|
+
optional :parent, :string, 1
|
30
|
+
repeated :asset_names, :string, 2
|
31
|
+
optional :content_type, :enum, 3, "google.cloud.asset.v1.ContentType"
|
32
|
+
optional :read_time_window, :message, 4, "google.cloud.asset.v1.TimeWindow"
|
33
|
+
end
|
34
|
+
add_message "google.cloud.asset.v1.BatchGetAssetsHistoryResponse" do
|
35
|
+
repeated :assets, :message, 1, "google.cloud.asset.v1.TemporalAsset"
|
36
|
+
end
|
37
|
+
add_message "google.cloud.asset.v1.CreateFeedRequest" do
|
38
|
+
optional :parent, :string, 1
|
39
|
+
optional :feed_id, :string, 2
|
40
|
+
optional :feed, :message, 3, "google.cloud.asset.v1.Feed"
|
41
|
+
end
|
42
|
+
add_message "google.cloud.asset.v1.GetFeedRequest" do
|
43
|
+
optional :name, :string, 1
|
44
|
+
end
|
45
|
+
add_message "google.cloud.asset.v1.ListFeedsRequest" do
|
46
|
+
optional :parent, :string, 1
|
47
|
+
end
|
48
|
+
add_message "google.cloud.asset.v1.ListFeedsResponse" do
|
49
|
+
repeated :feeds, :message, 1, "google.cloud.asset.v1.Feed"
|
50
|
+
end
|
51
|
+
add_message "google.cloud.asset.v1.UpdateFeedRequest" do
|
52
|
+
optional :feed, :message, 1, "google.cloud.asset.v1.Feed"
|
53
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
54
|
+
end
|
55
|
+
add_message "google.cloud.asset.v1.DeleteFeedRequest" do
|
56
|
+
optional :name, :string, 1
|
57
|
+
end
|
58
|
+
add_message "google.cloud.asset.v1.OutputConfig" do
|
59
|
+
oneof :destination do
|
60
|
+
optional :gcs_destination, :message, 1, "google.cloud.asset.v1.GcsDestination"
|
61
|
+
optional :bigquery_destination, :message, 2, "google.cloud.asset.v1.BigQueryDestination"
|
62
|
+
end
|
63
|
+
end
|
64
|
+
add_message "google.cloud.asset.v1.GcsDestination" do
|
65
|
+
oneof :object_uri do
|
66
|
+
optional :uri, :string, 1
|
67
|
+
optional :uri_prefix, :string, 2
|
68
|
+
end
|
69
|
+
end
|
70
|
+
add_message "google.cloud.asset.v1.BigQueryDestination" do
|
71
|
+
optional :dataset, :string, 1
|
72
|
+
optional :table, :string, 2
|
73
|
+
optional :force, :bool, 3
|
74
|
+
end
|
75
|
+
add_message "google.cloud.asset.v1.PubsubDestination" do
|
76
|
+
optional :topic, :string, 1
|
77
|
+
end
|
78
|
+
add_message "google.cloud.asset.v1.FeedOutputConfig" do
|
79
|
+
oneof :destination do
|
80
|
+
optional :pubsub_destination, :message, 1, "google.cloud.asset.v1.PubsubDestination"
|
81
|
+
end
|
82
|
+
end
|
83
|
+
add_message "google.cloud.asset.v1.Feed" do
|
84
|
+
optional :name, :string, 1
|
85
|
+
repeated :asset_names, :string, 2
|
86
|
+
repeated :asset_types, :string, 3
|
87
|
+
optional :content_type, :enum, 4, "google.cloud.asset.v1.ContentType"
|
88
|
+
optional :feed_output_config, :message, 5, "google.cloud.asset.v1.FeedOutputConfig"
|
89
|
+
end
|
90
|
+
add_enum "google.cloud.asset.v1.ContentType" do
|
91
|
+
value :CONTENT_TYPE_UNSPECIFIED, 0
|
92
|
+
value :RESOURCE, 1
|
93
|
+
value :IAM_POLICY, 2
|
94
|
+
value :ORG_POLICY, 4
|
95
|
+
value :ACCESS_POLICY, 5
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
module Google
|
101
|
+
module Cloud
|
102
|
+
module Asset
|
103
|
+
module V1
|
104
|
+
ExportAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ExportAssetsRequest").msgclass
|
105
|
+
ExportAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ExportAssetsResponse").msgclass
|
106
|
+
BatchGetAssetsHistoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetAssetsHistoryRequest").msgclass
|
107
|
+
BatchGetAssetsHistoryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BatchGetAssetsHistoryResponse").msgclass
|
108
|
+
CreateFeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.CreateFeedRequest").msgclass
|
109
|
+
GetFeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.GetFeedRequest").msgclass
|
110
|
+
ListFeedsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ListFeedsRequest").msgclass
|
111
|
+
ListFeedsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ListFeedsResponse").msgclass
|
112
|
+
UpdateFeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.UpdateFeedRequest").msgclass
|
113
|
+
DeleteFeedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.DeleteFeedRequest").msgclass
|
114
|
+
OutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.OutputConfig").msgclass
|
115
|
+
GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.GcsDestination").msgclass
|
116
|
+
BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.BigQueryDestination").msgclass
|
117
|
+
PubsubDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.PubsubDestination").msgclass
|
118
|
+
FeedOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.FeedOutputConfig").msgclass
|
119
|
+
Feed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Feed").msgclass
|
120
|
+
ContentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.ContentType").enummodule
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/asset/v1/asset_service.proto for package 'google.cloud.asset.v1'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2019 Google LLC.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
#
|
19
|
+
|
20
|
+
require 'grpc'
|
21
|
+
require 'google/cloud/asset/v1/asset_service_pb'
|
22
|
+
|
23
|
+
module Google
|
24
|
+
module Cloud
|
25
|
+
module Asset
|
26
|
+
module V1
|
27
|
+
module AssetService
|
28
|
+
# Asset service definition.
|
29
|
+
class Service
|
30
|
+
|
31
|
+
include GRPC::GenericService
|
32
|
+
|
33
|
+
self.marshal_class_method = :encode
|
34
|
+
self.unmarshal_class_method = :decode
|
35
|
+
self.service_name = 'google.cloud.asset.v1.AssetService'
|
36
|
+
|
37
|
+
# Exports assets with time and resource types to a given Cloud Storage
|
38
|
+
# location. The output format is newline-delimited JSON.
|
39
|
+
# This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you
|
40
|
+
# to keep track of the export.
|
41
|
+
rpc :ExportAssets, ExportAssetsRequest, Google::Longrunning::Operation
|
42
|
+
# Batch gets the update history of assets that overlap a time window.
|
43
|
+
# For RESOURCE content, this API outputs history with asset in both
|
44
|
+
# non-delete or deleted status.
|
45
|
+
# For IAM_POLICY content, this API outputs history when the asset and its
|
46
|
+
# attached IAM POLICY both exist. This can create gaps in the output history.
|
47
|
+
# If a specified asset does not exist, this API returns an INVALID_ARGUMENT
|
48
|
+
# error.
|
49
|
+
rpc :BatchGetAssetsHistory, BatchGetAssetsHistoryRequest, BatchGetAssetsHistoryResponse
|
50
|
+
# Creates a feed in a parent project/folder/organization to listen to its
|
51
|
+
# asset updates.
|
52
|
+
rpc :CreateFeed, CreateFeedRequest, Feed
|
53
|
+
# Gets details about an asset feed.
|
54
|
+
rpc :GetFeed, GetFeedRequest, Feed
|
55
|
+
# Lists all asset feeds in a parent project/folder/organization.
|
56
|
+
rpc :ListFeeds, ListFeedsRequest, ListFeedsResponse
|
57
|
+
# Updates an asset feed configuration.
|
58
|
+
rpc :UpdateFeed, UpdateFeedRequest, Feed
|
59
|
+
# Deletes an asset feed.
|
60
|
+
rpc :DeleteFeed, DeleteFeedRequest, Google::Protobuf::Empty
|
61
|
+
end
|
62
|
+
|
63
|
+
Stub = Service.rpc_stub_class
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/asset/v1/assets.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/resource_pb'
|
7
|
+
require 'google/iam/v1/policy_pb'
|
8
|
+
require 'google/protobuf/any_pb'
|
9
|
+
require 'google/protobuf/struct_pb'
|
10
|
+
require 'google/protobuf/timestamp_pb'
|
11
|
+
require 'google/api/annotations_pb'
|
12
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
|
+
add_file("google/cloud/asset/v1/assets.proto", :syntax => :proto3) do
|
14
|
+
add_message "google.cloud.asset.v1.TemporalAsset" do
|
15
|
+
optional :window, :message, 1, "google.cloud.asset.v1.TimeWindow"
|
16
|
+
optional :deleted, :bool, 2
|
17
|
+
optional :asset, :message, 3, "google.cloud.asset.v1.Asset"
|
18
|
+
end
|
19
|
+
add_message "google.cloud.asset.v1.TimeWindow" do
|
20
|
+
optional :start_time, :message, 1, "google.protobuf.Timestamp"
|
21
|
+
optional :end_time, :message, 2, "google.protobuf.Timestamp"
|
22
|
+
end
|
23
|
+
add_message "google.cloud.asset.v1.Asset" do
|
24
|
+
optional :name, :string, 1
|
25
|
+
optional :asset_type, :string, 2
|
26
|
+
optional :resource, :message, 3, "google.cloud.asset.v1.Resource"
|
27
|
+
optional :iam_policy, :message, 4, "google.iam.v1.Policy"
|
28
|
+
repeated :ancestors, :string, 10
|
29
|
+
end
|
30
|
+
add_message "google.cloud.asset.v1.Resource" do
|
31
|
+
optional :version, :string, 1
|
32
|
+
optional :discovery_document_uri, :string, 2
|
33
|
+
optional :discovery_name, :string, 3
|
34
|
+
optional :resource_url, :string, 4
|
35
|
+
optional :parent, :string, 5
|
36
|
+
optional :data, :message, 6, "google.protobuf.Struct"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
module Google
|
42
|
+
module Cloud
|
43
|
+
module Asset
|
44
|
+
module V1
|
45
|
+
TemporalAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TemporalAsset").msgclass
|
46
|
+
TimeWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.TimeWindow").msgclass
|
47
|
+
Asset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Asset").msgclass
|
48
|
+
Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.asset.v1.Resource").msgclass
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,28 @@
|
|
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
|
+
VERSION = "0.1.0"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/common_resources.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/resource_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_file("google/cloud/common_resources.proto", :syntax => :proto3) do
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module Google
|
13
|
+
module Cloud
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/orgpolicy/v1/orgpolicy.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/protobuf/empty_pb'
|
7
|
+
require 'google/protobuf/timestamp_pb'
|
8
|
+
require 'google/api/annotations_pb'
|
9
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
|
+
add_file("google/cloud/orgpolicy/v1/orgpolicy.proto", :syntax => :proto3) do
|
11
|
+
add_message "google.cloud.orgpolicy.v1.Policy" do
|
12
|
+
optional :version, :int32, 1
|
13
|
+
optional :constraint, :string, 2
|
14
|
+
optional :etag, :bytes, 3
|
15
|
+
optional :update_time, :message, 4, "google.protobuf.Timestamp"
|
16
|
+
oneof :policy_type do
|
17
|
+
optional :list_policy, :message, 5, "google.cloud.orgpolicy.v1.Policy.ListPolicy"
|
18
|
+
optional :boolean_policy, :message, 6, "google.cloud.orgpolicy.v1.Policy.BooleanPolicy"
|
19
|
+
optional :restore_default, :message, 7, "google.cloud.orgpolicy.v1.Policy.RestoreDefault"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
add_message "google.cloud.orgpolicy.v1.Policy.ListPolicy" do
|
23
|
+
repeated :allowed_values, :string, 1
|
24
|
+
repeated :denied_values, :string, 2
|
25
|
+
optional :all_values, :enum, 3, "google.cloud.orgpolicy.v1.Policy.ListPolicy.AllValues"
|
26
|
+
optional :suggested_value, :string, 4
|
27
|
+
optional :inherit_from_parent, :bool, 5
|
28
|
+
end
|
29
|
+
add_enum "google.cloud.orgpolicy.v1.Policy.ListPolicy.AllValues" do
|
30
|
+
value :ALL_VALUES_UNSPECIFIED, 0
|
31
|
+
value :ALLOW, 1
|
32
|
+
value :DENY, 2
|
33
|
+
end
|
34
|
+
add_message "google.cloud.orgpolicy.v1.Policy.BooleanPolicy" do
|
35
|
+
optional :enforced, :bool, 1
|
36
|
+
end
|
37
|
+
add_message "google.cloud.orgpolicy.v1.Policy.RestoreDefault" do
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
module Google
|
43
|
+
module Cloud
|
44
|
+
module OrgPolicy
|
45
|
+
module V1
|
46
|
+
Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v1.Policy").msgclass
|
47
|
+
Policy::ListPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v1.Policy.ListPolicy").msgclass
|
48
|
+
Policy::ListPolicy::AllValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v1.Policy.ListPolicy.AllValues").enummodule
|
49
|
+
Policy::BooleanPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v1.Policy.BooleanPolicy").msgclass
|
50
|
+
Policy::RestoreDefault = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.orgpolicy.v1.Policy.RestoreDefault").msgclass
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,59 @@
|
|
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
|
+
# An indicator of the behavior of a given field (for example, that a field
|
23
|
+
# is required in requests, or given as output but ignored as input).
|
24
|
+
# This **does not** change the behavior in protocol buffers itself; it only
|
25
|
+
# denotes the behavior and may affect how API tooling handles the field.
|
26
|
+
#
|
27
|
+
# Note: This enum **may** receive new values in the future.
|
28
|
+
module FieldBehavior
|
29
|
+
# Conventional default for enums. Do not use this.
|
30
|
+
FIELD_BEHAVIOR_UNSPECIFIED = 0
|
31
|
+
|
32
|
+
# Specifically denotes a field as optional.
|
33
|
+
# While all fields in protocol buffers are optional, this may be specified
|
34
|
+
# for emphasis if appropriate.
|
35
|
+
OPTIONAL = 1
|
36
|
+
|
37
|
+
# Denotes a field as required.
|
38
|
+
# This indicates that the field **must** be provided as part of the request,
|
39
|
+
# and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
|
40
|
+
REQUIRED = 2
|
41
|
+
|
42
|
+
# Denotes a field as output only.
|
43
|
+
# This indicates that the field is provided in responses, but including the
|
44
|
+
# field in a request does nothing (the server *must* ignore it and
|
45
|
+
# *must not* throw an error as a result of the field's presence).
|
46
|
+
OUTPUT_ONLY = 3
|
47
|
+
|
48
|
+
# Denotes a field as input only.
|
49
|
+
# This indicates that the field is provided in requests, and the
|
50
|
+
# corresponding field is not included in output.
|
51
|
+
INPUT_ONLY = 4
|
52
|
+
|
53
|
+
# Denotes a field as immutable.
|
54
|
+
# This indicates that the field may be set once in a request to create a
|
55
|
+
# resource, but may not be changed thereafter.
|
56
|
+
IMMUTABLE = 5
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|