google-cloud-assured_workloads-v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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 AssuredWorkloads
23
+ module V1
24
+ module AssuredWorkloadsService
25
+ # Path helper methods for the AssuredWorkloadsService API.
26
+ module Paths
27
+ ##
28
+ # Create a fully-qualified Location resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `organizations/{organization}/locations/{location}`
33
+ #
34
+ # @param organization [String]
35
+ # @param location [String]
36
+ #
37
+ # @return [::String]
38
+ def location_path organization:, location:
39
+ raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
40
+
41
+ "organizations/#{organization}/locations/#{location}"
42
+ end
43
+
44
+ ##
45
+ # Create a fully-qualified Workload resource string.
46
+ #
47
+ # The resource will be in the following format:
48
+ #
49
+ # `organizations/{organization}/locations/{location}/workloads/{workload}`
50
+ #
51
+ # @param organization [String]
52
+ # @param location [String]
53
+ # @param workload [String]
54
+ #
55
+ # @return [::String]
56
+ def workload_path organization:, location:, workload:
57
+ raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
58
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
59
+
60
+ "organizations/#{organization}/locations/#{location}/workloads/#{workload}"
61
+ end
62
+
63
+ extend self
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/assured_workloads/v1/version"
24
+
25
+ require "google/cloud/assured_workloads/v1/assured_workloads_service/credentials"
26
+ require "google/cloud/assured_workloads/v1/assured_workloads_service/paths"
27
+ require "google/cloud/assured_workloads/v1/assured_workloads_service/operations"
28
+ require "google/cloud/assured_workloads/v1/assured_workloads_service/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module AssuredWorkloads
33
+ module V1
34
+ ##
35
+ # Service to manage AssuredWorkloads.
36
+ #
37
+ # To load this service and instantiate a client:
38
+ #
39
+ # require "google/cloud/assured_workloads/v1/assured_workloads_service"
40
+ # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new
41
+ #
42
+ module AssuredWorkloadsService
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+
49
+ helper_path = ::File.join __dir__, "assured_workloads_service", "helpers.rb"
50
+ require "google/cloud/assured_workloads/v1/assured_workloads_service/helpers" if ::File.file? helper_path
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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 AssuredWorkloads
23
+ module V1
24
+ VERSION = "0.1.0"
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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
+ require "google/cloud/assured_workloads/v1/assured_workloads_service"
20
+ require "google/cloud/assured_workloads/v1/version"
21
+
22
+ module Google
23
+ module Cloud
24
+ module AssuredWorkloads
25
+ ##
26
+ # To load this package, including all its services, and instantiate a client:
27
+ #
28
+ # require "google/cloud/assured_workloads/v1"
29
+ # client = ::Google::Cloud::AssuredWorkloads::V1::AssuredWorkloadsService::Client.new
30
+ #
31
+ module V1
32
+ end
33
+ end
34
+ end
35
+ end
36
+
37
+ helper_path = ::File.join __dir__, "v1", "_helpers.rb"
38
+ require "google/cloud/assured_workloads/v1/_helpers" if ::File.file? helper_path
@@ -0,0 +1,116 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/assuredworkloads/v1/assuredworkloads.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/longrunning/operations_pb'
11
+ require 'google/protobuf/duration_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/assuredworkloads/v1/assuredworkloads.proto", :syntax => :proto3) do
17
+ add_message "google.cloud.assuredworkloads.v1.CreateWorkloadRequest" do
18
+ optional :parent, :string, 1
19
+ optional :workload, :message, 2, "google.cloud.assuredworkloads.v1.Workload"
20
+ optional :external_id, :string, 3
21
+ end
22
+ add_message "google.cloud.assuredworkloads.v1.UpdateWorkloadRequest" do
23
+ optional :workload, :message, 1, "google.cloud.assuredworkloads.v1.Workload"
24
+ optional :update_mask, :message, 2, "google.protobuf.FieldMask"
25
+ end
26
+ add_message "google.cloud.assuredworkloads.v1.DeleteWorkloadRequest" do
27
+ optional :name, :string, 1
28
+ optional :etag, :string, 2
29
+ end
30
+ add_message "google.cloud.assuredworkloads.v1.GetWorkloadRequest" do
31
+ optional :name, :string, 1
32
+ end
33
+ add_message "google.cloud.assuredworkloads.v1.ListWorkloadsRequest" do
34
+ optional :parent, :string, 1
35
+ optional :page_size, :int32, 2
36
+ optional :page_token, :string, 3
37
+ optional :filter, :string, 4
38
+ end
39
+ add_message "google.cloud.assuredworkloads.v1.ListWorkloadsResponse" do
40
+ repeated :workloads, :message, 1, "google.cloud.assuredworkloads.v1.Workload"
41
+ optional :next_page_token, :string, 2
42
+ end
43
+ add_message "google.cloud.assuredworkloads.v1.Workload" do
44
+ optional :name, :string, 1
45
+ optional :display_name, :string, 2
46
+ repeated :resources, :message, 3, "google.cloud.assuredworkloads.v1.Workload.ResourceInfo"
47
+ optional :compliance_regime, :enum, 4, "google.cloud.assuredworkloads.v1.Workload.ComplianceRegime"
48
+ optional :create_time, :message, 5, "google.protobuf.Timestamp"
49
+ optional :billing_account, :string, 6
50
+ optional :etag, :string, 9
51
+ map :labels, :string, :string, 10
52
+ optional :provisioned_resources_parent, :string, 13
53
+ optional :kms_settings, :message, 14, "google.cloud.assuredworkloads.v1.Workload.KMSSettings"
54
+ repeated :resource_settings, :message, 15, "google.cloud.assuredworkloads.v1.Workload.ResourceSettings"
55
+ end
56
+ add_message "google.cloud.assuredworkloads.v1.Workload.ResourceInfo" do
57
+ optional :resource_id, :int64, 1
58
+ optional :resource_type, :enum, 2, "google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType"
59
+ end
60
+ add_enum "google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType" do
61
+ value :RESOURCE_TYPE_UNSPECIFIED, 0
62
+ value :CONSUMER_PROJECT, 1
63
+ value :ENCRYPTION_KEYS_PROJECT, 2
64
+ value :KEYRING, 3
65
+ end
66
+ add_message "google.cloud.assuredworkloads.v1.Workload.KMSSettings" do
67
+ optional :next_rotation_time, :message, 1, "google.protobuf.Timestamp"
68
+ optional :rotation_period, :message, 2, "google.protobuf.Duration"
69
+ end
70
+ add_message "google.cloud.assuredworkloads.v1.Workload.ResourceSettings" do
71
+ optional :resource_id, :string, 1
72
+ optional :resource_type, :enum, 2, "google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType"
73
+ optional :display_name, :string, 3
74
+ end
75
+ add_enum "google.cloud.assuredworkloads.v1.Workload.ComplianceRegime" do
76
+ value :COMPLIANCE_REGIME_UNSPECIFIED, 0
77
+ value :IL4, 1
78
+ value :CJIS, 2
79
+ value :FEDRAMP_HIGH, 3
80
+ value :FEDRAMP_MODERATE, 4
81
+ value :US_REGIONAL_ACCESS, 5
82
+ value :HIPAA, 6
83
+ value :HITRUST, 7
84
+ value :EU_REGIONS_AND_SUPPORT, 8
85
+ value :CA_REGIONS_AND_SUPPORT, 9
86
+ end
87
+ add_message "google.cloud.assuredworkloads.v1.CreateWorkloadOperationMetadata" do
88
+ optional :create_time, :message, 1, "google.protobuf.Timestamp"
89
+ optional :display_name, :string, 2
90
+ optional :parent, :string, 3
91
+ optional :compliance_regime, :enum, 4, "google.cloud.assuredworkloads.v1.Workload.ComplianceRegime"
92
+ end
93
+ end
94
+ end
95
+
96
+ module Google
97
+ module Cloud
98
+ module AssuredWorkloads
99
+ module V1
100
+ CreateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.CreateWorkloadRequest").msgclass
101
+ UpdateWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.UpdateWorkloadRequest").msgclass
102
+ DeleteWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.DeleteWorkloadRequest").msgclass
103
+ GetWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.GetWorkloadRequest").msgclass
104
+ ListWorkloadsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.ListWorkloadsRequest").msgclass
105
+ ListWorkloadsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.ListWorkloadsResponse").msgclass
106
+ Workload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload").msgclass
107
+ Workload::ResourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ResourceInfo").msgclass
108
+ Workload::ResourceInfo::ResourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ResourceInfo.ResourceType").enummodule
109
+ Workload::KMSSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.KMSSettings").msgclass
110
+ Workload::ResourceSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ResourceSettings").msgclass
111
+ Workload::ComplianceRegime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.Workload.ComplianceRegime").enummodule
112
+ CreateWorkloadOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.assuredworkloads.v1.CreateWorkloadOperationMetadata").msgclass
113
+ end
114
+ end
115
+ end
116
+ end
@@ -0,0 +1,58 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/assuredworkloads/v1/assuredworkloads.proto for package 'Google.Cloud.AssuredWorkloads.V1'
3
+ # Original file comments:
4
+ # Copyright 2021 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
+ require 'grpc'
20
+ require 'google/cloud/assuredworkloads/v1/assuredworkloads_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module AssuredWorkloads
25
+ module V1
26
+ module AssuredWorkloadsService
27
+ # Service to manage AssuredWorkloads.
28
+ class Service
29
+
30
+ include ::GRPC::GenericService
31
+
32
+ self.marshal_class_method = :encode
33
+ self.unmarshal_class_method = :decode
34
+ self.service_name = 'google.cloud.assuredworkloads.v1.AssuredWorkloadsService'
35
+
36
+ # Creates Assured Workload.
37
+ rpc :CreateWorkload, ::Google::Cloud::AssuredWorkloads::V1::CreateWorkloadRequest, ::Google::Longrunning::Operation
38
+ # Updates an existing workload.
39
+ # Currently allows updating of workload display_name and labels.
40
+ # For force updates don't set etag field in the Workload.
41
+ # Only one update operation per workload can be in progress.
42
+ rpc :UpdateWorkload, ::Google::Cloud::AssuredWorkloads::V1::UpdateWorkloadRequest, ::Google::Cloud::AssuredWorkloads::V1::Workload
43
+ # Deletes the workload. Make sure that workload's direct children are already
44
+ # in a deleted state, otherwise the request will fail with a
45
+ # FAILED_PRECONDITION error.
46
+ rpc :DeleteWorkload, ::Google::Cloud::AssuredWorkloads::V1::DeleteWorkloadRequest, ::Google::Protobuf::Empty
47
+ # Gets Assured Workload associated with a CRM Node
48
+ rpc :GetWorkload, ::Google::Cloud::AssuredWorkloads::V1::GetWorkloadRequest, ::Google::Cloud::AssuredWorkloads::V1::Workload
49
+ # Lists Assured Workloads under a CRM Node.
50
+ rpc :ListWorkloads, ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsRequest, ::Google::Cloud::AssuredWorkloads::V1::ListWorkloadsResponse
51
+ end
52
+
53
+ Stub = Service.rpc_stub_class
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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
+ # This gem does not autoload during Bundler.require. To load this gem,
20
+ # issue explicit require statements for the packages desired, e.g.:
21
+ # require "google/cloud/assured_workloads/v1"
@@ -0,0 +1,4 @@
1
+ # Assured Workloads for Government V1 Protocol Buffer Documentation
2
+
3
+ These files are for the YARD documentation of the generated protobuf files.
4
+ They are not intended to be required or loaded at runtime.
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 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
+
58
+ # Denotes that a (repeated) field is an unordered list.
59
+ # This indicates that the service may provide the elements of the list
60
+ # in any arbitrary order, rather than the order the user originally
61
+ # provided. Additionally, the list's order may or may not be stable.
62
+ UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
69
+ end
70
+ end
71
+ end