google-cloud-bare_metal_solution-v2 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +149 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +144 -0
  6. data/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb +2365 -0
  7. data/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/credentials.rb +47 -0
  8. data/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb +767 -0
  9. data/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb +166 -0
  10. data/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb +57 -0
  11. data/lib/google/cloud/bare_metal_solution/v2/version.rb +28 -0
  12. data/lib/google/cloud/bare_metal_solution/v2.rb +40 -0
  13. data/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb +42 -0
  14. data/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb +92 -0
  15. data/lib/google/cloud/baremetalsolution/v2/instance_pb.rb +113 -0
  16. data/lib/google/cloud/baremetalsolution/v2/lun_pb.rb +69 -0
  17. data/lib/google/cloud/baremetalsolution/v2/network_pb.rb +127 -0
  18. data/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb +74 -0
  19. data/lib/google/cloud/baremetalsolution/v2/volume_pb.rb +93 -0
  20. data/lib/google-cloud-bare_metal_solution-v2.rb +21 -0
  21. data/proto_docs/README.md +4 -0
  22. data/proto_docs/google/api/field_behavior.rb +71 -0
  23. data/proto_docs/google/api/resource.rb +222 -0
  24. data/proto_docs/google/cloud/baremetalsolution/v2/baremetalsolution.rb +62 -0
  25. data/proto_docs/google/cloud/baremetalsolution/v2/instance.rb +283 -0
  26. data/proto_docs/google/cloud/baremetalsolution/v2/lun.rb +142 -0
  27. data/proto_docs/google/cloud/baremetalsolution/v2/network.rb +312 -0
  28. data/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb +169 -0
  29. data/proto_docs/google/cloud/baremetalsolution/v2/volume.rb +238 -0
  30. data/proto_docs/google/longrunning/operations.rb +164 -0
  31. data/proto_docs/google/protobuf/any.rb +141 -0
  32. data/proto_docs/google/protobuf/duration.rb +98 -0
  33. data/proto_docs/google/protobuf/empty.rb +36 -0
  34. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  35. data/proto_docs/google/protobuf/timestamp.rb +129 -0
  36. data/proto_docs/google/rpc/status.rb +46 -0
  37. metadata +268 -0
@@ -0,0 +1,127 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/baremetalsolution/v2/network.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/field_behavior_pb'
7
+ require 'google/api/resource_pb'
8
+ require 'google/protobuf/field_mask_pb'
9
+
10
+ Google::Protobuf::DescriptorPool.generated_pool.build do
11
+ add_file("google/cloud/baremetalsolution/v2/network.proto", :syntax => :proto3) do
12
+ add_message "google.cloud.baremetalsolution.v2.Network" do
13
+ optional :name, :string, 5
14
+ optional :id, :string, 10
15
+ optional :type, :enum, 2, "google.cloud.baremetalsolution.v2.Network.Type"
16
+ optional :ip_address, :string, 3
17
+ repeated :mac_address, :string, 4
18
+ optional :state, :enum, 6, "google.cloud.baremetalsolution.v2.Network.State"
19
+ optional :vlan_id, :string, 7
20
+ optional :cidr, :string, 8
21
+ optional :vrf, :message, 9, "google.cloud.baremetalsolution.v2.VRF"
22
+ map :labels, :string, :string, 11
23
+ optional :services_cidr, :string, 12
24
+ repeated :reservations, :message, 13, "google.cloud.baremetalsolution.v2.NetworkAddressReservation"
25
+ end
26
+ add_enum "google.cloud.baremetalsolution.v2.Network.Type" do
27
+ value :TYPE_UNSPECIFIED, 0
28
+ value :CLIENT, 1
29
+ value :PRIVATE, 2
30
+ end
31
+ add_enum "google.cloud.baremetalsolution.v2.Network.State" do
32
+ value :STATE_UNSPECIFIED, 0
33
+ value :PROVISIONING, 1
34
+ value :PROVISIONED, 2
35
+ end
36
+ add_message "google.cloud.baremetalsolution.v2.NetworkAddressReservation" do
37
+ optional :start_address, :string, 1
38
+ optional :end_address, :string, 2
39
+ optional :note, :string, 3
40
+ end
41
+ add_message "google.cloud.baremetalsolution.v2.VRF" do
42
+ optional :name, :string, 1
43
+ optional :state, :enum, 5, "google.cloud.baremetalsolution.v2.VRF.State"
44
+ optional :qos_policy, :message, 6, "google.cloud.baremetalsolution.v2.VRF.QosPolicy"
45
+ repeated :vlan_attachments, :message, 7, "google.cloud.baremetalsolution.v2.VRF.VlanAttachment"
46
+ end
47
+ add_message "google.cloud.baremetalsolution.v2.VRF.QosPolicy" do
48
+ optional :bandwidth_gbps, :double, 1
49
+ end
50
+ add_message "google.cloud.baremetalsolution.v2.VRF.VlanAttachment" do
51
+ optional :peer_vlan_id, :int64, 1
52
+ optional :peer_ip, :string, 2
53
+ optional :router_ip, :string, 3
54
+ end
55
+ add_enum "google.cloud.baremetalsolution.v2.VRF.State" do
56
+ value :STATE_UNSPECIFIED, 0
57
+ value :PROVISIONING, 1
58
+ value :PROVISIONED, 2
59
+ end
60
+ add_message "google.cloud.baremetalsolution.v2.LogicalInterface" do
61
+ repeated :logical_network_interfaces, :message, 1, "google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface"
62
+ optional :name, :string, 2
63
+ optional :interface_index, :int32, 3
64
+ end
65
+ add_message "google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface" do
66
+ optional :network, :string, 1
67
+ optional :ip_address, :string, 2
68
+ optional :default_gateway, :bool, 3
69
+ optional :network_type, :enum, 4, "google.cloud.baremetalsolution.v2.Network.Type"
70
+ optional :id, :string, 5
71
+ end
72
+ add_message "google.cloud.baremetalsolution.v2.GetNetworkRequest" do
73
+ optional :name, :string, 1
74
+ end
75
+ add_message "google.cloud.baremetalsolution.v2.ListNetworksRequest" do
76
+ optional :parent, :string, 1
77
+ optional :page_size, :int32, 2
78
+ optional :page_token, :string, 3
79
+ optional :filter, :string, 4
80
+ end
81
+ add_message "google.cloud.baremetalsolution.v2.ListNetworksResponse" do
82
+ repeated :networks, :message, 1, "google.cloud.baremetalsolution.v2.Network"
83
+ optional :next_page_token, :string, 2
84
+ repeated :unreachable, :string, 3
85
+ end
86
+ add_message "google.cloud.baremetalsolution.v2.UpdateNetworkRequest" do
87
+ optional :network, :message, 1, "google.cloud.baremetalsolution.v2.Network"
88
+ optional :update_mask, :message, 2, "google.protobuf.FieldMask"
89
+ end
90
+ add_message "google.cloud.baremetalsolution.v2.NetworkUsage" do
91
+ optional :network, :message, 1, "google.cloud.baremetalsolution.v2.Network"
92
+ repeated :used_ips, :string, 2
93
+ end
94
+ add_message "google.cloud.baremetalsolution.v2.ListNetworkUsageRequest" do
95
+ optional :location, :string, 1
96
+ end
97
+ add_message "google.cloud.baremetalsolution.v2.ListNetworkUsageResponse" do
98
+ repeated :networks, :message, 1, "google.cloud.baremetalsolution.v2.NetworkUsage"
99
+ end
100
+ end
101
+ end
102
+
103
+ module Google
104
+ module Cloud
105
+ module BareMetalSolution
106
+ module V2
107
+ Network = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Network").msgclass
108
+ Network::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Network.Type").enummodule
109
+ Network::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Network.State").enummodule
110
+ NetworkAddressReservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkAddressReservation").msgclass
111
+ VRF = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF").msgclass
112
+ VRF::QosPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF.QosPolicy").msgclass
113
+ VRF::VlanAttachment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF.VlanAttachment").msgclass
114
+ VRF::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.VRF.State").enummodule
115
+ LogicalInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.LogicalInterface").msgclass
116
+ LogicalInterface::LogicalNetworkInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface").msgclass
117
+ GetNetworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetNetworkRequest").msgclass
118
+ ListNetworksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworksRequest").msgclass
119
+ ListNetworksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworksResponse").msgclass
120
+ UpdateNetworkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateNetworkRequest").msgclass
121
+ NetworkUsage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NetworkUsage").msgclass
122
+ ListNetworkUsageRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworkUsageRequest").msgclass
123
+ ListNetworkUsageResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNetworkUsageResponse").msgclass
124
+ end
125
+ end
126
+ end
127
+ end
@@ -0,0 +1,74 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/baremetalsolution/v2/nfs_share.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/field_behavior_pb'
7
+ require 'google/api/resource_pb'
8
+ require 'google/protobuf/field_mask_pb'
9
+
10
+ Google::Protobuf::DescriptorPool.generated_pool.build do
11
+ add_file("google/cloud/baremetalsolution/v2/nfs_share.proto", :syntax => :proto3) do
12
+ add_message "google.cloud.baremetalsolution.v2.NfsShare" do
13
+ optional :name, :string, 1
14
+ optional :nfs_share_id, :string, 2
15
+ optional :state, :enum, 3, "google.cloud.baremetalsolution.v2.NfsShare.State"
16
+ optional :volume, :string, 4
17
+ repeated :allowed_clients, :message, 5, "google.cloud.baremetalsolution.v2.NfsShare.AllowedClient"
18
+ map :labels, :string, :string, 6
19
+ end
20
+ add_message "google.cloud.baremetalsolution.v2.NfsShare.AllowedClient" do
21
+ optional :network, :string, 1
22
+ optional :share_ip, :string, 2
23
+ optional :allowed_clients_cidr, :string, 3
24
+ optional :mount_permissions, :enum, 4, "google.cloud.baremetalsolution.v2.NfsShare.MountPermissions"
25
+ optional :allow_dev, :bool, 5
26
+ optional :allow_suid, :bool, 6
27
+ optional :no_root_squash, :bool, 7
28
+ end
29
+ add_enum "google.cloud.baremetalsolution.v2.NfsShare.State" do
30
+ value :STATE_UNSPECIFIED, 0
31
+ value :PROVISIONED, 1
32
+ end
33
+ add_enum "google.cloud.baremetalsolution.v2.NfsShare.MountPermissions" do
34
+ value :MOUNT_PERMISSIONS_UNSPECIFIED, 0
35
+ value :READ, 1
36
+ value :READ_WRITE, 2
37
+ end
38
+ add_message "google.cloud.baremetalsolution.v2.GetNfsShareRequest" do
39
+ optional :name, :string, 1
40
+ end
41
+ add_message "google.cloud.baremetalsolution.v2.ListNfsSharesRequest" do
42
+ optional :parent, :string, 1
43
+ optional :page_size, :int32, 2
44
+ optional :page_token, :string, 3
45
+ optional :filter, :string, 4
46
+ end
47
+ add_message "google.cloud.baremetalsolution.v2.ListNfsSharesResponse" do
48
+ repeated :nfs_shares, :message, 1, "google.cloud.baremetalsolution.v2.NfsShare"
49
+ optional :next_page_token, :string, 2
50
+ repeated :unreachable, :string, 3
51
+ end
52
+ add_message "google.cloud.baremetalsolution.v2.UpdateNfsShareRequest" do
53
+ optional :nfs_share, :message, 1, "google.cloud.baremetalsolution.v2.NfsShare"
54
+ optional :update_mask, :message, 2, "google.protobuf.FieldMask"
55
+ end
56
+ end
57
+ end
58
+
59
+ module Google
60
+ module Cloud
61
+ module BareMetalSolution
62
+ module V2
63
+ NfsShare = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare").msgclass
64
+ NfsShare::AllowedClient = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.AllowedClient").msgclass
65
+ NfsShare::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.State").enummodule
66
+ NfsShare::MountPermissions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.NfsShare.MountPermissions").enummodule
67
+ GetNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetNfsShareRequest").msgclass
68
+ ListNfsSharesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNfsSharesRequest").msgclass
69
+ ListNfsSharesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListNfsSharesResponse").msgclass
70
+ UpdateNfsShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateNfsShareRequest").msgclass
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,93 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/baremetalsolution/v2/volume.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/field_behavior_pb'
7
+ require 'google/api/resource_pb'
8
+ require 'google/protobuf/field_mask_pb'
9
+
10
+ Google::Protobuf::DescriptorPool.generated_pool.build do
11
+ add_file("google/cloud/baremetalsolution/v2/volume.proto", :syntax => :proto3) do
12
+ add_message "google.cloud.baremetalsolution.v2.Volume" do
13
+ optional :name, :string, 1
14
+ optional :id, :string, 11
15
+ optional :storage_type, :enum, 2, "google.cloud.baremetalsolution.v2.Volume.StorageType"
16
+ optional :state, :enum, 3, "google.cloud.baremetalsolution.v2.Volume.State"
17
+ optional :requested_size_gib, :int64, 4
18
+ optional :current_size_gib, :int64, 5
19
+ optional :emergency_size_gib, :int64, 14
20
+ optional :auto_grown_size_gib, :int64, 6
21
+ optional :remaining_space_gib, :int64, 7
22
+ optional :snapshot_reservation_detail, :message, 8, "google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail"
23
+ optional :snapshot_auto_delete_behavior, :enum, 9, "google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior"
24
+ map :labels, :string, :string, 12
25
+ optional :snapshot_enabled, :bool, 13
26
+ optional :pod, :string, 15
27
+ end
28
+ add_message "google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail" do
29
+ optional :reserved_space_gib, :int64, 1
30
+ optional :reserved_space_used_percent, :int32, 2
31
+ optional :reserved_space_remaining_gib, :int64, 3
32
+ optional :reserved_space_percent, :int32, 4
33
+ end
34
+ add_enum "google.cloud.baremetalsolution.v2.Volume.StorageType" do
35
+ value :STORAGE_TYPE_UNSPECIFIED, 0
36
+ value :SSD, 1
37
+ value :HDD, 2
38
+ end
39
+ add_enum "google.cloud.baremetalsolution.v2.Volume.State" do
40
+ value :STATE_UNSPECIFIED, 0
41
+ value :CREATING, 1
42
+ value :READY, 2
43
+ value :DELETING, 3
44
+ end
45
+ add_enum "google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior" do
46
+ value :SNAPSHOT_AUTO_DELETE_BEHAVIOR_UNSPECIFIED, 0
47
+ value :DISABLED, 1
48
+ value :OLDEST_FIRST, 2
49
+ value :NEWEST_FIRST, 3
50
+ end
51
+ add_message "google.cloud.baremetalsolution.v2.GetVolumeRequest" do
52
+ optional :name, :string, 1
53
+ end
54
+ add_message "google.cloud.baremetalsolution.v2.ListVolumesRequest" do
55
+ optional :parent, :string, 1
56
+ optional :page_size, :int32, 2
57
+ optional :page_token, :string, 3
58
+ optional :filter, :string, 4
59
+ end
60
+ add_message "google.cloud.baremetalsolution.v2.ListVolumesResponse" do
61
+ repeated :volumes, :message, 1, "google.cloud.baremetalsolution.v2.Volume"
62
+ optional :next_page_token, :string, 2
63
+ repeated :unreachable, :string, 3
64
+ end
65
+ add_message "google.cloud.baremetalsolution.v2.UpdateVolumeRequest" do
66
+ optional :volume, :message, 1, "google.cloud.baremetalsolution.v2.Volume"
67
+ optional :update_mask, :message, 2, "google.protobuf.FieldMask"
68
+ end
69
+ add_message "google.cloud.baremetalsolution.v2.ResizeVolumeRequest" do
70
+ optional :volume, :string, 1
71
+ optional :size_gib, :int64, 2
72
+ end
73
+ end
74
+ end
75
+
76
+ module Google
77
+ module Cloud
78
+ module BareMetalSolution
79
+ module V2
80
+ Volume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume").msgclass
81
+ Volume::SnapshotReservationDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.SnapshotReservationDetail").msgclass
82
+ Volume::StorageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.StorageType").enummodule
83
+ Volume::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.State").enummodule
84
+ Volume::SnapshotAutoDeleteBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.Volume.SnapshotAutoDeleteBehavior").enummodule
85
+ GetVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.GetVolumeRequest").msgclass
86
+ ListVolumesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListVolumesRequest").msgclass
87
+ ListVolumesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ListVolumesResponse").msgclass
88
+ UpdateVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.UpdateVolumeRequest").msgclass
89
+ ResizeVolumeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.baremetalsolution.v2.ResizeVolumeRequest").msgclass
90
+ end
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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/bare_metal_solution/v2"
@@ -0,0 +1,4 @@
1
+ # Bare Metal Solution V2 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 2022 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
@@ -0,0 +1,222 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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
+ # pattern: "projects/{project}/topics/{topic}"
37
+ # };
38
+ # }
39
+ #
40
+ # The ResourceDescriptor Yaml config will look like:
41
+ #
42
+ # resources:
43
+ # - type: "pubsub.googleapis.com/Topic"
44
+ # pattern: "projects/{project}/topics/{topic}"
45
+ #
46
+ # Sometimes, resources have multiple patterns, typically because they can
47
+ # live under multiple parents.
48
+ #
49
+ # Example:
50
+ #
51
+ # message LogEntry {
52
+ # option (google.api.resource) = {
53
+ # type: "logging.googleapis.com/LogEntry"
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
58
+ # };
59
+ # }
60
+ #
61
+ # The ResourceDescriptor Yaml config will look like:
62
+ #
63
+ # resources:
64
+ # - type: 'logging.googleapis.com/LogEntry'
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
69
+ # @!attribute [rw] type
70
+ # @return [::String]
71
+ # The resource type. It must be in the format of
72
+ # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be
73
+ # singular and must not include version numbers.
74
+ #
75
+ # Example: `storage.googleapis.com/Bucket`
76
+ #
77
+ # The value of the resource_type_kind must follow the regular expression
78
+ # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
79
+ # should use PascalCase (UpperCamelCase). The maximum number of
80
+ # characters allowed for the `resource_type_kind` is 100.
81
+ # @!attribute [rw] pattern
82
+ # @return [::Array<::String>]
83
+ # Optional. The relative resource name pattern associated with this resource
84
+ # type. The DNS prefix of the full resource name shouldn't be specified here.
85
+ #
86
+ # The path pattern must follow the syntax, which aligns with HTTP binding
87
+ # syntax:
88
+ #
89
+ # Template = Segment { "/" Segment } ;
90
+ # Segment = LITERAL | Variable ;
91
+ # Variable = "{" LITERAL "}" ;
92
+ #
93
+ # Examples:
94
+ #
95
+ # - "projects/\\{project}/topics/\\{topic}"
96
+ # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}"
97
+ #
98
+ # The components in braces correspond to the IDs for each resource in the
99
+ # hierarchy. It is expected that, if multiple patterns are provided,
100
+ # the same component name (e.g. "project") refers to IDs of the same
101
+ # type of resource.
102
+ # @!attribute [rw] name_field
103
+ # @return [::String]
104
+ # Optional. The field on the resource that designates the resource name
105
+ # field. If omitted, this is assumed to be "name".
106
+ # @!attribute [rw] history
107
+ # @return [::Google::Api::ResourceDescriptor::History]
108
+ # Optional. The historical or future-looking state of the resource pattern.
109
+ #
110
+ # Example:
111
+ #
112
+ # // The InspectTemplate message originally only supported resource
113
+ # // names with organization, and project was added later.
114
+ # message InspectTemplate {
115
+ # option (google.api.resource) = {
116
+ # type: "dlp.googleapis.com/InspectTemplate"
117
+ # pattern:
118
+ # "organizations/{organization}/inspectTemplates/{inspect_template}"
119
+ # pattern: "projects/{project}/inspectTemplates/{inspect_template}"
120
+ # history: ORIGINALLY_SINGLE_PATTERN
121
+ # };
122
+ # }
123
+ # @!attribute [rw] plural
124
+ # @return [::String]
125
+ # The plural name used in the resource name and permission names, such as
126
+ # 'projects' for the resource name of 'projects/\\{project}' and the permission
127
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
128
+ # concept of the `plural` field in k8s CRD spec
129
+ # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
130
+ #
131
+ # Note: The plural form is required even for singleton resources. See
132
+ # https://aip.dev/156
133
+ # @!attribute [rw] singular
134
+ # @return [::String]
135
+ # The same concept of the `singular` field in k8s CRD spec
136
+ # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
137
+ # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
138
+ # @!attribute [rw] style
139
+ # @return [::Array<::Google::Api::ResourceDescriptor::Style>]
140
+ # Style flag(s) for this resource.
141
+ # These indicate that a resource is expected to conform to a given
142
+ # style. See the specific style flags for additional information.
143
+ class ResourceDescriptor
144
+ include ::Google::Protobuf::MessageExts
145
+ extend ::Google::Protobuf::MessageExts::ClassMethods
146
+
147
+ # A description of the historical or future-looking state of the
148
+ # resource pattern.
149
+ module History
150
+ # The "unset" value.
151
+ HISTORY_UNSPECIFIED = 0
152
+
153
+ # The resource originally had one pattern and launched as such, and
154
+ # additional patterns were added later.
155
+ ORIGINALLY_SINGLE_PATTERN = 1
156
+
157
+ # The resource has one pattern, but the API owner expects to add more
158
+ # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
159
+ # that from being necessary once there are multiple patterns.)
160
+ FUTURE_MULTI_PATTERN = 2
161
+ end
162
+
163
+ # A flag representing a specific style that a resource claims to conform to.
164
+ module Style
165
+ # The unspecified value. Do not use.
166
+ STYLE_UNSPECIFIED = 0
167
+
168
+ # This resource is intended to be "declarative-friendly".
169
+ #
170
+ # Declarative-friendly resources must be more strictly consistent, and
171
+ # setting this to true communicates to tools that this resource should
172
+ # adhere to declarative-friendly expectations.
173
+ #
174
+ # Note: This is used by the API linter (linter.aip.dev) to enable
175
+ # additional checks.
176
+ DECLARATIVE_FRIENDLY = 1
177
+ end
178
+ end
179
+
180
+ # Defines a proto annotation that describes a string field that refers to
181
+ # an API resource.
182
+ # @!attribute [rw] type
183
+ # @return [::String]
184
+ # The resource type that the annotated field references.
185
+ #
186
+ # Example:
187
+ #
188
+ # message Subscription {
189
+ # string topic = 2 [(google.api.resource_reference) = {
190
+ # type: "pubsub.googleapis.com/Topic"
191
+ # }];
192
+ # }
193
+ #
194
+ # Occasionally, a field may reference an arbitrary resource. In this case,
195
+ # APIs use the special value * in their resource reference.
196
+ #
197
+ # Example:
198
+ #
199
+ # message GetIamPolicyRequest {
200
+ # string resource = 2 [(google.api.resource_reference) = {
201
+ # type: "*"
202
+ # }];
203
+ # }
204
+ # @!attribute [rw] child_type
205
+ # @return [::String]
206
+ # The resource type of a child collection that the annotated field
207
+ # references. This is useful for annotating the `parent` field that
208
+ # doesn't have a fixed resource type.
209
+ #
210
+ # Example:
211
+ #
212
+ # message ListLogEntriesRequest {
213
+ # string parent = 1 [(google.api.resource_reference) = {
214
+ # child_type: "logging.googleapis.com/LogEntry"
215
+ # };
216
+ # }
217
+ class ResourceReference
218
+ include ::Google::Protobuf::MessageExts
219
+ extend ::Google::Protobuf::MessageExts::ClassMethods
220
+ end
221
+ end
222
+ end