google-cloud-filestore-v1 0.2.0 → 0.4.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.
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/filestore/v1/version"
24
+
25
+ require "google/cloud/filestore/v1/cloud_filestore_manager/credentials"
26
+ require "google/cloud/filestore/v1/cloud_filestore_manager/paths"
27
+ require "google/cloud/filestore/v1/cloud_filestore_manager/rest/operations"
28
+ require "google/cloud/filestore/v1/cloud_filestore_manager/rest/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module Filestore
33
+ module V1
34
+ ##
35
+ # Configures and manages Filestore resources.
36
+ #
37
+ # Filestore Manager v1.
38
+ #
39
+ # The `file.googleapis.com` service implements the Filestore API and
40
+ # defines the following resource model for managing instances:
41
+ # * The service works with a collection of cloud projects, named: `/projects/*`
42
+ # * Each project has a collection of available locations, named: `/locations/*`
43
+ # * Each location has a collection of instances and backups, named:
44
+ # `/instances/*` and `/backups/*` respectively.
45
+ # * As such, Filestore instances are resources of the form:
46
+ # `/projects/{project_number}/locations/{location_id}/instances/{instance_id}`
47
+ # and backups are resources of the form:
48
+ # `/projects/{project_number}/locations/{location_id}/backup/{backup_id}`
49
+ #
50
+ # Note that location_id must be a Google Cloud `zone` for instances, but
51
+ # a Google Cloud `region` for backups; for example:
52
+ # * `projects/12345/locations/us-central1-c/instances/my-filestore`
53
+ # * `projects/12345/locations/us-central1/backups/my-backup`
54
+ #
55
+ # To load this service and instantiate a REST client:
56
+ #
57
+ # require "google/cloud/filestore/v1/cloud_filestore_manager/rest"
58
+ # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
59
+ #
60
+ module CloudFilestoreManager
61
+ # Client for the REST transport
62
+ module Rest
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
69
+
70
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
71
+ require "google/cloud/filestore/v1/cloud_filestore_manager/rest/helpers" if ::File.file? helper_path
@@ -26,37 +26,43 @@ require "google/cloud/filestore/v1/cloud_filestore_manager/credentials"
26
26
  require "google/cloud/filestore/v1/cloud_filestore_manager/paths"
27
27
  require "google/cloud/filestore/v1/cloud_filestore_manager/operations"
28
28
  require "google/cloud/filestore/v1/cloud_filestore_manager/client"
29
+ require "google/cloud/filestore/v1/cloud_filestore_manager/rest"
29
30
 
30
31
  module Google
31
32
  module Cloud
32
33
  module Filestore
33
34
  module V1
34
35
  ##
35
- # Configures and manages Cloud Filestore resources.
36
+ # Configures and manages Filestore resources.
36
37
  #
37
- # Cloud Filestore Manager v1.
38
+ # Filestore Manager v1.
38
39
  #
39
- # The `file.googleapis.com` service implements the Cloud Filestore API and
40
+ # The `file.googleapis.com` service implements the Filestore API and
40
41
  # defines the following resource model for managing instances:
41
42
  # * The service works with a collection of cloud projects, named: `/projects/*`
42
43
  # * Each project has a collection of available locations, named: `/locations/*`
43
44
  # * Each location has a collection of instances and backups, named:
44
45
  # `/instances/*` and `/backups/*` respectively.
45
- # * As such, Cloud Filestore instances are resources of the form:
46
+ # * As such, Filestore instances are resources of the form:
46
47
  # `/projects/{project_number}/locations/{location_id}/instances/{instance_id}`
47
48
  # and backups are resources of the form:
48
49
  # `/projects/{project_number}/locations/{location_id}/backup/{backup_id}`
49
50
  #
50
- # Note that location_id must be a GCP `zone` for instances and but to a GCP
51
- # `region` for backups; for example:
51
+ # Note that location_id must be a Google Cloud `zone` for instances, but
52
+ # a Google Cloud `region` for backups; for example:
52
53
  # * `projects/12345/locations/us-central1-c/instances/my-filestore`
53
54
  # * `projects/12345/locations/us-central1/backups/my-backup`
54
55
  #
55
- # To load this service and instantiate a client:
56
+ # @example Load this service and instantiate a gRPC client
56
57
  #
57
58
  # require "google/cloud/filestore/v1/cloud_filestore_manager"
58
59
  # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
59
60
  #
61
+ # @example Load this service and instantiate a REST client
62
+ #
63
+ # require "google/cloud/filestore/v1/cloud_filestore_manager/rest"
64
+ # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
65
+ #
60
66
  module CloudFilestoreManager
61
67
  end
62
68
  end
@@ -9,6 +9,7 @@ require 'google/api/field_behavior_pb'
9
9
  require 'google/api/resource_pb'
10
10
  require 'google/cloud/common/operation_metadata_pb'
11
11
  require 'google/longrunning/operations_pb'
12
+ require 'google/protobuf/empty_pb'
12
13
  require 'google/protobuf/field_mask_pb'
13
14
  require 'google/protobuf/timestamp_pb'
14
15
  require 'google/protobuf/wrappers_pb'
@@ -20,11 +21,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
20
21
  repeated :modes, :enum, 3, "google.cloud.filestore.v1.NetworkConfig.AddressMode"
21
22
  optional :reserved_ip_range, :string, 4
22
23
  repeated :ip_addresses, :string, 5
24
+ optional :connect_mode, :enum, 6, "google.cloud.filestore.v1.NetworkConfig.ConnectMode"
23
25
  end
24
26
  add_enum "google.cloud.filestore.v1.NetworkConfig.AddressMode" do
25
27
  value :ADDRESS_MODE_UNSPECIFIED, 0
26
28
  value :MODE_IPV4, 1
27
29
  end
30
+ add_enum "google.cloud.filestore.v1.NetworkConfig.ConnectMode" do
31
+ value :CONNECT_MODE_UNSPECIFIED, 0
32
+ value :DIRECT_PEERING, 1
33
+ value :PRIVATE_SERVICE_ACCESS, 2
34
+ end
28
35
  add_message "google.cloud.filestore.v1.FileShareConfig" do
29
36
  optional :name, :string, 1
30
37
  optional :capacity_gb, :int64, 2
@@ -62,6 +69,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
62
69
  repeated :networks, :message, 11, "google.cloud.filestore.v1.NetworkConfig"
63
70
  optional :etag, :string, 12
64
71
  optional :satisfies_pzs, :message, 13, "google.protobuf.BoolValue"
72
+ optional :kms_key_name, :string, 14
73
+ repeated :suspension_reasons, :enum, 15, "google.cloud.filestore.v1.Instance.SuspensionReason"
65
74
  end
66
75
  add_enum "google.cloud.filestore.v1.Instance.State" do
67
76
  value :STATE_UNSPECIFIED, 0
@@ -71,6 +80,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
71
80
  value :DELETING, 4
72
81
  value :ERROR, 6
73
82
  value :RESTORING, 7
83
+ value :SUSPENDED, 8
84
+ value :SUSPENDING, 9
85
+ value :RESUMING, 10
74
86
  end
75
87
  add_enum "google.cloud.filestore.v1.Instance.Tier" do
76
88
  value :TIER_UNSPECIFIED, 0
@@ -79,6 +91,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
79
91
  value :BASIC_HDD, 3
80
92
  value :BASIC_SSD, 4
81
93
  value :HIGH_SCALE_SSD, 5
94
+ value :ENTERPRISE, 6
95
+ end
96
+ add_enum "google.cloud.filestore.v1.Instance.SuspensionReason" do
97
+ value :SUSPENSION_REASON_UNSPECIFIED, 0
98
+ value :KMS_KEY_ISSUE, 1
82
99
  end
83
100
  add_message "google.cloud.filestore.v1.CreateInstanceRequest" do
84
101
  optional :parent, :string, 1
@@ -101,6 +118,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
101
118
  end
102
119
  add_message "google.cloud.filestore.v1.DeleteInstanceRequest" do
103
120
  optional :name, :string, 1
121
+ optional :force, :bool, 2
104
122
  end
105
123
  add_message "google.cloud.filestore.v1.ListInstancesRequest" do
106
124
  optional :parent, :string, 1
@@ -114,6 +132,46 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
114
132
  optional :next_page_token, :string, 2
115
133
  repeated :unreachable, :string, 3
116
134
  end
135
+ add_message "google.cloud.filestore.v1.Snapshot" do
136
+ optional :name, :string, 1
137
+ optional :description, :string, 2
138
+ optional :state, :enum, 3, "google.cloud.filestore.v1.Snapshot.State"
139
+ optional :create_time, :message, 4, "google.protobuf.Timestamp"
140
+ map :labels, :string, :string, 5
141
+ optional :filesystem_used_bytes, :int64, 6
142
+ end
143
+ add_enum "google.cloud.filestore.v1.Snapshot.State" do
144
+ value :STATE_UNSPECIFIED, 0
145
+ value :CREATING, 1
146
+ value :READY, 2
147
+ value :DELETING, 3
148
+ end
149
+ add_message "google.cloud.filestore.v1.CreateSnapshotRequest" do
150
+ optional :parent, :string, 1
151
+ optional :snapshot_id, :string, 2
152
+ optional :snapshot, :message, 3, "google.cloud.filestore.v1.Snapshot"
153
+ end
154
+ add_message "google.cloud.filestore.v1.GetSnapshotRequest" do
155
+ optional :name, :string, 1
156
+ end
157
+ add_message "google.cloud.filestore.v1.DeleteSnapshotRequest" do
158
+ optional :name, :string, 1
159
+ end
160
+ add_message "google.cloud.filestore.v1.UpdateSnapshotRequest" do
161
+ optional :update_mask, :message, 1, "google.protobuf.FieldMask"
162
+ optional :snapshot, :message, 2, "google.cloud.filestore.v1.Snapshot"
163
+ end
164
+ add_message "google.cloud.filestore.v1.ListSnapshotsRequest" do
165
+ optional :parent, :string, 1
166
+ optional :page_size, :int32, 2
167
+ optional :page_token, :string, 3
168
+ optional :order_by, :string, 4
169
+ optional :filter, :string, 5
170
+ end
171
+ add_message "google.cloud.filestore.v1.ListSnapshotsResponse" do
172
+ repeated :snapshots, :message, 1, "google.cloud.filestore.v1.Snapshot"
173
+ optional :next_page_token, :string, 2
174
+ end
117
175
  add_message "google.cloud.filestore.v1.Backup" do
118
176
  optional :name, :string, 1
119
177
  optional :description, :string, 2
@@ -127,6 +185,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
127
185
  optional :source_instance_tier, :enum, 10, "google.cloud.filestore.v1.Instance.Tier"
128
186
  optional :download_bytes, :int64, 11
129
187
  optional :satisfies_pzs, :message, 12, "google.protobuf.BoolValue"
188
+ optional :kms_key, :string, 13
130
189
  end
131
190
  add_enum "google.cloud.filestore.v1.Backup.State" do
132
191
  value :STATE_UNSPECIFIED, 0
@@ -171,6 +230,7 @@ module Google
171
230
  module V1
172
231
  NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.NetworkConfig").msgclass
173
232
  NetworkConfig::AddressMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.NetworkConfig.AddressMode").enummodule
233
+ NetworkConfig::ConnectMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.NetworkConfig.ConnectMode").enummodule
174
234
  FileShareConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.FileShareConfig").msgclass
175
235
  NfsExportOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.NfsExportOptions").msgclass
176
236
  NfsExportOptions::AccessMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.NfsExportOptions.AccessMode").enummodule
@@ -178,6 +238,7 @@ module Google
178
238
  Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.Instance").msgclass
179
239
  Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.Instance.State").enummodule
180
240
  Instance::Tier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.Instance.Tier").enummodule
241
+ Instance::SuspensionReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.Instance.SuspensionReason").enummodule
181
242
  CreateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.CreateInstanceRequest").msgclass
182
243
  GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.GetInstanceRequest").msgclass
183
244
  UpdateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.UpdateInstanceRequest").msgclass
@@ -185,6 +246,14 @@ module Google
185
246
  DeleteInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.DeleteInstanceRequest").msgclass
186
247
  ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.ListInstancesRequest").msgclass
187
248
  ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.ListInstancesResponse").msgclass
249
+ Snapshot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.Snapshot").msgclass
250
+ Snapshot::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.Snapshot.State").enummodule
251
+ CreateSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.CreateSnapshotRequest").msgclass
252
+ GetSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.GetSnapshotRequest").msgclass
253
+ DeleteSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.DeleteSnapshotRequest").msgclass
254
+ UpdateSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.UpdateSnapshotRequest").msgclass
255
+ ListSnapshotsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.ListSnapshotsRequest").msgclass
256
+ ListSnapshotsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.ListSnapshotsResponse").msgclass
188
257
  Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.Backup").msgclass
189
258
  Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.Backup.State").enummodule
190
259
  CreateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.filestore.v1.CreateBackupRequest").msgclass
@@ -24,23 +24,23 @@ module Google
24
24
  module Filestore
25
25
  module V1
26
26
  module CloudFilestoreManager
27
- # Configures and manages Cloud Filestore resources.
27
+ # Configures and manages Filestore resources.
28
28
  #
29
- # Cloud Filestore Manager v1.
29
+ # Filestore Manager v1.
30
30
  #
31
- # The `file.googleapis.com` service implements the Cloud Filestore API and
31
+ # The `file.googleapis.com` service implements the Filestore API and
32
32
  # defines the following resource model for managing instances:
33
33
  # * The service works with a collection of cloud projects, named: `/projects/*`
34
34
  # * Each project has a collection of available locations, named: `/locations/*`
35
35
  # * Each location has a collection of instances and backups, named:
36
36
  # `/instances/*` and `/backups/*` respectively.
37
- # * As such, Cloud Filestore instances are resources of the form:
37
+ # * As such, Filestore instances are resources of the form:
38
38
  # `/projects/{project_number}/locations/{location_id}/instances/{instance_id}`
39
39
  # and backups are resources of the form:
40
40
  # `/projects/{project_number}/locations/{location_id}/backup/{backup_id}`
41
41
  #
42
- # Note that location_id must be a GCP `zone` for instances and but to a GCP
43
- # `region` for backups; for example:
42
+ # Note that location_id must be a Google Cloud `zone` for instances, but
43
+ # a Google Cloud `region` for backups; for example:
44
44
  # * `projects/12345/locations/us-central1-c/instances/my-filestore`
45
45
  # * `projects/12345/locations/us-central1/backups/my-backup`
46
46
  class Service
@@ -71,6 +71,17 @@ module Google
71
71
  rpc :RestoreInstance, ::Google::Cloud::Filestore::V1::RestoreInstanceRequest, ::Google::Longrunning::Operation
72
72
  # Deletes an instance.
73
73
  rpc :DeleteInstance, ::Google::Cloud::Filestore::V1::DeleteInstanceRequest, ::Google::Longrunning::Operation
74
+ # Lists all snapshots in a project for either a specified location
75
+ # or for all locations.
76
+ rpc :ListSnapshots, ::Google::Cloud::Filestore::V1::ListSnapshotsRequest, ::Google::Cloud::Filestore::V1::ListSnapshotsResponse
77
+ # Gets the details of a specific snapshot.
78
+ rpc :GetSnapshot, ::Google::Cloud::Filestore::V1::GetSnapshotRequest, ::Google::Cloud::Filestore::V1::Snapshot
79
+ # Creates a snapshot.
80
+ rpc :CreateSnapshot, ::Google::Cloud::Filestore::V1::CreateSnapshotRequest, ::Google::Longrunning::Operation
81
+ # Deletes a snapshot.
82
+ rpc :DeleteSnapshot, ::Google::Cloud::Filestore::V1::DeleteSnapshotRequest, ::Google::Longrunning::Operation
83
+ # Updates the settings of a specific snapshot.
84
+ rpc :UpdateSnapshot, ::Google::Cloud::Filestore::V1::UpdateSnapshotRequest, ::Google::Longrunning::Operation
74
85
  # Lists all backups in a project for either a specified location or for all
75
86
  # locations.
76
87
  rpc :ListBackups, ::Google::Cloud::Filestore::V1::ListBackupsRequest, ::Google::Cloud::Filestore::V1::ListBackupsResponse
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/filestore/v1/cloud_filestore_manager/rest"
20
+ require "google/cloud/filestore/v1/version"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Filestore
25
+ ##
26
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
27
+ #
28
+ # @example
29
+ #
30
+ # require "google/cloud/filestore/v1/rest"
31
+ # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
32
+ #
33
+ module V1
34
+ end
35
+ end
36
+ end
37
+ end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Filestore
23
23
  module V1
24
- VERSION = "0.2.0"
24
+ VERSION = "0.4.0"
25
25
  end
26
26
  end
27
27
  end
@@ -23,13 +23,18 @@ module Google
23
23
  module Cloud
24
24
  module Filestore
25
25
  ##
26
- # To load this package, including all its services, and instantiate a client:
26
+ # API client module.
27
27
  #
28
- # @example
28
+ # @example Load this package, including all its services, and instantiate a gRPC client
29
29
  #
30
30
  # require "google/cloud/filestore/v1"
31
31
  # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new
32
32
  #
33
+ # @example Load this package, including all its services, and instantiate a REST client
34
+ #
35
+ # require "google/cloud/filestore/v1"
36
+ # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new
37
+ #
33
38
  module V1
34
39
  end
35
40
  end