From 79474e618bb14370e8c0fc98c9c6f6f7928fdb91 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 5 Nov 2020 02:44:01 -0800 Subject: [PATCH] feat: Automated regeneration of file v1 client (#1398) This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` 2020-11-05 02:26:37,328 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py. On branch autosynth-file-v1 nothing to commit, working tree clean 2020-11-05 02:26:37,356 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth file v1 DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth file v1 bundle install Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`. Fetching gem metadata from https://rubygems.org/......... Fetching gem metadata from https://rubygems.org/. Resolving dependencies... Fetching rake 11.3.0 Installing rake 11.3.0 Fetching concurrent-ruby 1.1.7 Installing concurrent-ruby 1.1.7 Fetching i18n 1.8.5 Installing i18n 1.8.5 Fetching minitest 5.14.2 Installing minitest 5.14.2 Fetching thread_safe 0.3.6 Installing thread_safe 0.3.6 Fetching tzinfo 1.2.7 Installing tzinfo 1.2.7 Fetching activesupport 5.0.7.2 Installing activesupport 5.0.7.2 Fetching public_suffix 4.0.6 Installing public_suffix 4.0.6 Fetching addressable 2.7.0 Installing addressable 2.7.0 Fetching ast 2.4.1 Installing ast 2.4.1 Using bundler 2.1.4 Fetching byebug 11.1.3 Installing byebug 11.1.3 with native extensions Fetching coderay 1.1.3 Installing coderay 1.1.3 Fetching json 2.3.1 Installing json 2.3.1 with native extensions Fetching docile 1.3.2 Installing docile 1.3.2 Fetching simplecov-html 0.10.2 Installing simplecov-html 0.10.2 Fetching simplecov 0.16.1 Installing simplecov 0.16.1 Using sync 0.5.0 Fetching tins 1.26.0 Installing tins 1.26.0 Fetching term-ansicolor 1.7.1 Installing term-ansicolor 1.7.1 Fetching thor 0.20.3 Installing thor 0.20.3 Fetching coveralls 0.8.23 Installing coveralls 0.8.23 Fetching crack 0.4.4 Installing crack 0.4.4 Fetching declarative 0.0.20 Installing declarative 0.0.20 Fetching declarative-option 0.1.0 Installing declarative-option 0.1.0 Fetching diff-lcs 1.4.4 Installing diff-lcs 1.4.4 Fetching dotenv 2.7.6 Installing dotenv 2.7.6 Fetching fakefs 0.20.1 Installing fakefs 0.20.1 Fetching multipart-post 2.1.1 Installing multipart-post 2.1.1 Fetching ruby2_keywords 0.0.2 Installing ruby2_keywords 0.0.2 Fetching faraday 1.1.0 Installing faraday 1.1.0 Fetching gems 1.2.0 Installing gems 1.2.0 Fetching github-markup 1.7.0 Installing github-markup 1.7.0 Fetching jwt 2.2.2 Installing jwt 2.2.2 Fetching memoist 0.16.2 Installing memoist 0.16.2 Fetching multi_json 1.15.0 Installing multi_json 1.15.0 Fetching os 0.9.6 Installing os 0.9.6 Fetching signet 0.14.0 Installing signet 0.14.0 Fetching googleauth 0.14.0 Installing googleauth 0.14.0 Fetching httpclient 2.8.3 Installing httpclient 2.8.3 Fetching mini_mime 1.0.2 Installing mini_mime 1.0.2 Fetching uber 0.1.0 Installing uber 0.1.0 Fetching representable 3.0.4 Installing representable 3.0.4 Fetching retriable 3.1.2 Installing retriable 3.1.2 Fetching rexml 3.2.4 Installing rexml 3.2.4 Using google-api-client 0.48.0 from source at `.` Fetching google-id-token 1.4.2 Installing google-id-token 1.4.2 Fetching hashdiff 1.0.1 Installing hashdiff 1.0.1 Fetching mime-types-data 3.2020.1104 Installing mime-types-data 3.2020.1104 Fetching mime-types 3.3.1 Installing mime-types 3.3.1 Fetching multi_xml 0.6.0 Installing multi_xml 0.6.0 Fetching httparty 0.18.1 Installing httparty 0.18.1 Fetching rspec-support 3.10.0 Installing rspec-support 3.10.0 Fetching rspec-core 3.10.0 Installing rspec-core 3.10.0 Fetching rspec-expectations 3.10.0 Installing rspec-expectations 3.10.0 Fetching rspec-mocks 3.10.0 Installing rspec-mocks 3.10.0 Fetching rspec 3.10.0 Installing rspec 3.10.0 Fetching json_spec 1.1.5 Installing json_spec 1.1.5 Fetching launchy 2.5.0 Installing launchy 2.5.0 Fetching little-plugger 1.1.4 Installing little-plugger 1.1.4 Fetching logging 2.3.0 Installing logging 2.3.0 Fetching method_source 1.0.0 Installing method_source 1.0.0 Fetching opencensus 0.5.0 Installing opencensus 0.5.0 Fetching parallel 1.19.2 Installing parallel 1.19.2 Fetching parser 2.7.2.0 Installing parser 2.7.2.0 Fetching powerpack 0.1.2 Installing powerpack 0.1.2 Fetching pry 0.13.1 Installing pry 0.13.1 Fetching pry-byebug 3.9.0 Installing pry-byebug 3.9.0 Fetching yard 0.9.25 Installing yard 0.9.25 Fetching pry-doc 0.13.5 Installing pry-doc 0.13.5 Fetching rainbow 2.2.2 Installing rainbow 2.2.2 with native extensions Fetching redcarpet 3.5.0 Installing redcarpet 3.5.0 with native extensions Fetching redis 3.3.5 Installing redis 3.3.5 Fetching rmail 1.1.4 Installing rmail 1.1.4 Fetching ruby-progressbar 1.10.1 Installing ruby-progressbar 1.10.1 Fetching unicode-display_width 1.7.0 Installing unicode-display_width 1.7.0 Fetching rubocop 0.49.1 Installing rubocop 0.49.1 Fetching webmock 2.3.2 Installing webmock 2.3.2 Bundle complete! 31 Gemfile dependencies, 78 gems now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. Post-install message from i18n: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. But that may break your application. If you are upgrading your Rails application from an older version of Rails: Please check your Rails app for 'config.i18n.fallbacks = true'. If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be 'config.i18n.fallbacks = [I18n.default_locale]'. If not, fallbacks will be broken in your app by I18n 1.1.x. If you are starting a NEW Rails application, you can ignore this notice. For more info see: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0 Post-install message from httparty: When you HTTParty, you must party hard! echo a | bundle exec bin/generate-api gen generated --api=file.v1 --names-out=/workspace/api_names_out.yaml Loading file, version v1 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/file.v1.json conflict google/apis/file_v1.rb Wrote metadata to generated/google/apis/file_v1/synth.metadata. DEBUG:synthtool:Wrote metadata to generated/google/apis/file_v1/synth.metadata. ```
Full log will be available here: https://source.cloud.google.com/results/invocations/749223e1-0b80-43a0-be68-640be14dbb8a/targets - [ ] To automatically regenerate this PR, check this box. --- api_names_out.yaml | 83 +++ generated/google/apis/file_v1.rb | 2 +- generated/google/apis/file_v1/classes.rb | 509 +++++++++++++++++- .../google/apis/file_v1/representations.rb | 203 +++++++ generated/google/apis/file_v1/service.rb | 230 +++++++- generated/google/apis/file_v1/synth.metadata | 2 +- 6 files changed, 1022 insertions(+), 7 deletions(-) diff --git a/api_names_out.yaml b/api_names_out.yaml index aa58b5731..ed884ac38 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -101203,11 +101203,36 @@ "/fcm:v1/fields": fields "/fcm:v1/key": key "/fcm:v1/quotaUser": quota_user +"/file:v1/Backup": backup +"/file:v1/Backup/capacityGb": capacity_gb +"/file:v1/Backup/createTime": create_time +"/file:v1/Backup/description": description +"/file:v1/Backup/downloadBytes": download_bytes +"/file:v1/Backup/labels": labels +"/file:v1/Backup/labels/label": label +"/file:v1/Backup/name": name +"/file:v1/Backup/sourceFileShare": source_file_share +"/file:v1/Backup/sourceInstance": source_instance +"/file:v1/Backup/sourceInstanceTier": source_instance_tier +"/file:v1/Backup/state": state +"/file:v1/Backup/storageBytes": storage_bytes "/file:v1/CancelOperationRequest": cancel_operation_request +"/file:v1/DailyCycle": daily_cycle +"/file:v1/DailyCycle/duration": duration +"/file:v1/DailyCycle/startTime": start_time +"/file:v1/Date": date +"/file:v1/Date/day": day +"/file:v1/Date/month": month +"/file:v1/Date/year": year +"/file:v1/DenyMaintenancePeriod": deny_maintenance_period +"/file:v1/DenyMaintenancePeriod/endDate": end_date +"/file:v1/DenyMaintenancePeriod/startDate": start_date +"/file:v1/DenyMaintenancePeriod/time": time "/file:v1/Empty": empty "/file:v1/FileShareConfig": file_share_config "/file:v1/FileShareConfig/capacityGb": capacity_gb "/file:v1/FileShareConfig/name": name +"/file:v1/FileShareConfig/sourceBackup": source_backup "/file:v1/GoogleCloudSaasacceleratorManagementProvidersV1Instance": google_cloud_saasaccelerator_management_providers_v1_instance "/file:v1/GoogleCloudSaasacceleratorManagementProvidersV1Instance/consumerDefinedName": consumer_defined_name "/file:v1/GoogleCloudSaasacceleratorManagementProvidersV1Instance/createTime": create_time @@ -101239,6 +101264,8 @@ "/file:v1/GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule/startTime": start_time "/file:v1/GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings": google_cloud_saasaccelerator_management_providers_v1_maintenance_settings "/file:v1/GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings/exclude": exclude +"/file:v1/GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings/maintenancePolicies": maintenance_policies +"/file:v1/GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings/maintenancePolicies/maintenance_policy": maintenance_policy "/file:v1/GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata": google_cloud_saasaccelerator_management_providers_v1_node_slo_metadata "/file:v1/GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata/exclusions": exclusions "/file:v1/GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata/exclusions/exclusion": exclusion @@ -101288,6 +101315,12 @@ "/file:v1/Instance/state": state "/file:v1/Instance/statusMessage": status_message "/file:v1/Instance/tier": tier +"/file:v1/ListBackupsResponse": list_backups_response +"/file:v1/ListBackupsResponse/backups": backups +"/file:v1/ListBackupsResponse/backups/backup": backup +"/file:v1/ListBackupsResponse/nextPageToken": next_page_token +"/file:v1/ListBackupsResponse/unreachable": unreachable +"/file:v1/ListBackupsResponse/unreachable/unreachable": unreachable "/file:v1/ListInstancesResponse": list_instances_response "/file:v1/ListInstancesResponse/instances": instances "/file:v1/ListInstancesResponse/instances/instance": instance @@ -101310,6 +101343,18 @@ "/file:v1/Location/metadata": metadata "/file:v1/Location/metadata/metadatum": metadatum "/file:v1/Location/name": name +"/file:v1/MaintenancePolicy": maintenance_policy +"/file:v1/MaintenancePolicy/createTime": create_time +"/file:v1/MaintenancePolicy/description": description +"/file:v1/MaintenancePolicy/labels": labels +"/file:v1/MaintenancePolicy/labels/label": label +"/file:v1/MaintenancePolicy/name": name +"/file:v1/MaintenancePolicy/state": state +"/file:v1/MaintenancePolicy/updatePolicy": update_policy +"/file:v1/MaintenancePolicy/updateTime": update_time +"/file:v1/MaintenanceWindow": maintenance_window +"/file:v1/MaintenanceWindow/dailyCycle": daily_cycle +"/file:v1/MaintenanceWindow/weeklyCycle": weekly_cycle "/file:v1/NetworkConfig": network_config "/file:v1/NetworkConfig/ipAddresses": ip_addresses "/file:v1/NetworkConfig/ipAddresses/ip_address": ip_address @@ -101333,13 +101378,49 @@ "/file:v1/OperationMetadata/statusDetail": status_detail "/file:v1/OperationMetadata/target": target "/file:v1/OperationMetadata/verb": verb +"/file:v1/RestoreInstanceRequest": restore_instance_request +"/file:v1/RestoreInstanceRequest/fileShare": file_share +"/file:v1/RestoreInstanceRequest/sourceBackup": source_backup +"/file:v1/Schedule": schedule +"/file:v1/Schedule/day": day +"/file:v1/Schedule/duration": duration +"/file:v1/Schedule/startTime": start_time "/file:v1/Status": status "/file:v1/Status/code": code "/file:v1/Status/details": details "/file:v1/Status/details/detail": detail "/file:v1/Status/details/detail/detail": detail "/file:v1/Status/message": message +"/file:v1/TimeOfDay": time_of_day +"/file:v1/TimeOfDay/hours": hours +"/file:v1/TimeOfDay/minutes": minutes +"/file:v1/TimeOfDay/nanos": nanos +"/file:v1/TimeOfDay/seconds": seconds +"/file:v1/UpdatePolicy": update_policy +"/file:v1/UpdatePolicy/channel": channel +"/file:v1/UpdatePolicy/denyMaintenancePeriods": deny_maintenance_periods +"/file:v1/UpdatePolicy/denyMaintenancePeriods/deny_maintenance_period": deny_maintenance_period +"/file:v1/UpdatePolicy/window": window +"/file:v1/WeeklyCycle": weekly_cycle +"/file:v1/WeeklyCycle/schedule": schedule +"/file:v1/WeeklyCycle/schedule/schedule": schedule "/file:v1/fields": fields +"/file:v1/file.projects.locations.backups.create": create_project_location_backup +"/file:v1/file.projects.locations.backups.create/backupId": backup_id +"/file:v1/file.projects.locations.backups.create/parent": parent +"/file:v1/file.projects.locations.backups.delete": delete_project_location_backup +"/file:v1/file.projects.locations.backups.delete/name": name +"/file:v1/file.projects.locations.backups.get": get_project_location_backup +"/file:v1/file.projects.locations.backups.get/name": name +"/file:v1/file.projects.locations.backups.list": list_project_location_backups +"/file:v1/file.projects.locations.backups.list/filter": filter +"/file:v1/file.projects.locations.backups.list/orderBy": order_by +"/file:v1/file.projects.locations.backups.list/pageSize": page_size +"/file:v1/file.projects.locations.backups.list/pageToken": page_token +"/file:v1/file.projects.locations.backups.list/parent": parent +"/file:v1/file.projects.locations.backups.patch": patch_project_location_backup +"/file:v1/file.projects.locations.backups.patch/name": name +"/file:v1/file.projects.locations.backups.patch/updateMask": update_mask "/file:v1/file.projects.locations.get": get_project_location "/file:v1/file.projects.locations.get/name": name "/file:v1/file.projects.locations.instances.create": create_project_location_instance @@ -101358,6 +101439,8 @@ "/file:v1/file.projects.locations.instances.patch": patch_project_location_instance "/file:v1/file.projects.locations.instances.patch/name": name "/file:v1/file.projects.locations.instances.patch/updateMask": update_mask +"/file:v1/file.projects.locations.instances.restore": restore_instance +"/file:v1/file.projects.locations.instances.restore/name": name "/file:v1/file.projects.locations.list": list_project_locations "/file:v1/file.projects.locations.list/filter": filter "/file:v1/file.projects.locations.list/includeUnrevealedLocations": include_unrevealed_locations diff --git a/generated/google/apis/file_v1.rb b/generated/google/apis/file_v1.rb index 693a5b3d1..10507533b 100644 --- a/generated/google/apis/file_v1.rb +++ b/generated/google/apis/file_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/filestore/ module FileV1 VERSION = 'V1' - REVISION = '20201001' + REVISION = '20201029' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/file_v1/classes.rb b/generated/google/apis/file_v1/classes.rb index 0a65a1498..5828d4d49 100644 --- a/generated/google/apis/file_v1/classes.rb +++ b/generated/google/apis/file_v1/classes.rb @@ -22,6 +22,94 @@ module Google module Apis module FileV1 + # A Cloud Filestore backup. + class Backup + include Google::Apis::Core::Hashable + + # Output only. Capacity of the source file share when the backup was created. + # Corresponds to the JSON property `capacityGb` + # @return [Fixnum] + attr_accessor :capacity_gb + + # Output only. The time when the backup was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # A description of the backup with 2048 characters or less. Requests with longer + # descriptions will be rejected. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Output only. Amount of bytes that will be downloaded if the backup is restored. + # This may be different than storage bytes, since sequential backups of the + # same disk will share storage. + # Corresponds to the JSON property `downloadBytes` + # @return [Fixnum] + attr_accessor :download_bytes + + # Resource labels to represent user provided metadata. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Output only. The resource name of the backup, in the format projects/` + # project_number`/locations/`location_id`/backups/`backup_id`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Name of the file share in the source Cloud Filestore instance that the backup + # is created from. + # Corresponds to the JSON property `sourceFileShare` + # @return [String] + attr_accessor :source_file_share + + # The resource name of the source Cloud Filestore instance, in the format + # projects/`project_number`/locations/`location_id`/instances/`instance_id`, + # used to create this backup. + # Corresponds to the JSON property `sourceInstance` + # @return [String] + attr_accessor :source_instance + + # Output only. The service tier of the source Cloud Filestore instance that this + # backup is created from. + # Corresponds to the JSON property `sourceInstanceTier` + # @return [String] + attr_accessor :source_instance_tier + + # Output only. The backup state. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Output only. The size of the storage used by the backup. As backups share + # storage, this number is expected to change with backup creation/deletion. + # Corresponds to the JSON property `storageBytes` + # @return [Fixnum] + attr_accessor :storage_bytes + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @capacity_gb = args[:capacity_gb] if args.key?(:capacity_gb) + @create_time = args[:create_time] if args.key?(:create_time) + @description = args[:description] if args.key?(:description) + @download_bytes = args[:download_bytes] if args.key?(:download_bytes) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @source_file_share = args[:source_file_share] if args.key?(:source_file_share) + @source_instance = args[:source_instance] if args.key?(:source_instance) + @source_instance_tier = args[:source_instance_tier] if args.key?(:source_instance_tier) + @state = args[:state] if args.key?(:state) + @storage_bytes = args[:storage_bytes] if args.key?(:storage_bytes) + end + end + # The request message for Operations.CancelOperation. class CancelOperationRequest include Google::Apis::Core::Hashable @@ -35,6 +123,122 @@ module Google end end + # Time window specified for daily operations. + class DailyCycle + include Google::Apis::Core::Hashable + + # Output only. Duration of the time window, set by service producer. + # Corresponds to the JSON property `duration` + # @return [String] + attr_accessor :duration + + # Represents a time of day. The date and time zone are either not significant or + # are specified elsewhere. An API may choose to allow leap seconds. Related + # types are google.type.Date and `google.protobuf.Timestamp`. + # Corresponds to the JSON property `startTime` + # @return [Google::Apis::FileV1::TimeOfDay] + attr_accessor :start_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @duration = args[:duration] if args.key?(:duration) + @start_time = args[:start_time] if args.key?(:start_time) + end + end + + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: * A full date, with non-zero year, month, and day values * A month + # and day value, with a zero year, such as an anniversary * A year on its own, + # with zero month and day values * A year and month value, with a zero day, such + # as a credit card expiration date Related types are google.type.TimeOfDay and ` + # google.protobuf.Timestamp`. + class Date + include Google::Apis::Core::Hashable + + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to + # specify a year by itself or a year and month where the day isn't significant. + # Corresponds to the JSON property `day` + # @return [Fixnum] + attr_accessor :day + + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month + # and day. + # Corresponds to the JSON property `month` + # @return [Fixnum] + attr_accessor :month + + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a + # year. + # Corresponds to the JSON property `year` + # @return [Fixnum] + attr_accessor :year + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @day = args[:day] if args.key?(:day) + @month = args[:month] if args.key?(:month) + @year = args[:year] if args.key?(:year) + end + end + + # DenyMaintenancePeriod definition. Maintenance is forbidden within the deny + # period. The start_date must be less than the end_date. + class DenyMaintenancePeriod + include Google::Apis::Core::Hashable + + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: * A full date, with non-zero year, month, and day values * A month + # and day value, with a zero year, such as an anniversary * A year on its own, + # with zero month and day values * A year and month value, with a zero day, such + # as a credit card expiration date Related types are google.type.TimeOfDay and ` + # google.protobuf.Timestamp`. + # Corresponds to the JSON property `endDate` + # @return [Google::Apis::FileV1::Date] + attr_accessor :end_date + + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: * A full date, with non-zero year, month, and day values * A month + # and day value, with a zero year, such as an anniversary * A year on its own, + # with zero month and day values * A year and month value, with a zero day, such + # as a credit card expiration date Related types are google.type.TimeOfDay and ` + # google.protobuf.Timestamp`. + # Corresponds to the JSON property `startDate` + # @return [Google::Apis::FileV1::Date] + attr_accessor :start_date + + # Represents a time of day. The date and time zone are either not significant or + # are specified elsewhere. An API may choose to allow leap seconds. Related + # types are google.type.Date and `google.protobuf.Timestamp`. + # Corresponds to the JSON property `time` + # @return [Google::Apis::FileV1::TimeOfDay] + attr_accessor :time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @end_date = args[:end_date] if args.key?(:end_date) + @start_date = args[:start_date] if args.key?(:start_date) + @time = args[:time] if args.key?(:time) + end + end + # A generic empty message that you can re-use to avoid defining duplicated empty # messages in your APIs. A typical example is to use it as the request or the # response type of an API method. For instance: service Foo ` rpc Bar(google. @@ -67,6 +271,13 @@ module Google # @return [String] attr_accessor :name + # The resource name of the backup, in the format projects/`project_number`/ + # locations/`location_id`/backups/`backup_id`, that this file share has been + # restored from. + # Corresponds to the JSON property `sourceBackup` + # @return [String] + attr_accessor :source_backup + def initialize(**args) update!(**args) end @@ -75,6 +286,7 @@ module Google def update!(**args) @capacity_gb = args[:capacity_gb] if args.key?(:capacity_gb) @name = args[:name] if args.key?(:name) + @source_backup = args[:source_backup] if args.key?(:source_backup) end end @@ -102,10 +314,10 @@ module Google # @return [Hash] attr_accessor :labels - # The MaintenancePolicies that have been attached to the instance. The key must - # be of the type name of the oneof policy name defined in MaintenancePolicy, and - # the referenced policy must define the same policy type. For complete details - # of MaintenancePolicy, please refer to go/cloud-saas-mw-ug. + # Deprecated. The MaintenancePolicies that have been attached to the instance. + # The key must be of the type name of the oneof policy name defined in + # MaintenancePolicy, and the referenced policy must define the same policy type. + # For complete details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug. # Corresponds to the JSON property `maintenancePolicyNames` # @return [Hash] attr_accessor :maintenance_policy_names @@ -257,6 +469,16 @@ module Google attr_accessor :exclude alias_method :exclude?, :exclude + # Optional. The MaintenancePolicies that have been attached to the instance. The + # key must be of the type name of the oneof policy name defined in + # MaintenancePolicy, and the embedded policy must define the same policy type. + # For complete details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug. + # If only the name is needed (like in the deprecated Instance. + # maintenance_policy_names field) then only populate MaintenancePolicy.name. + # Corresponds to the JSON property `maintenancePolicies` + # @return [Hash] + attr_accessor :maintenance_policies + def initialize(**args) update!(**args) end @@ -264,6 +486,7 @@ module Google # Update properties of this object def update!(**args) @exclude = args[:exclude] if args.key?(:exclude) + @maintenance_policies = args[:maintenance_policies] if args.key?(:maintenance_policies) end end @@ -541,6 +764,42 @@ module Google end end + # ListBackupsResponse is the result of ListBackupsRequest. + class ListBackupsResponse + include Google::Apis::Core::Hashable + + # A list of backups in the project for the specified location. If the `location` + # value in the request is "-", the response contains a list of backups from all + # locations. If any location is unreachable, the response will only return + # backups in reachable locations and the "unreachable" field will be populated + # with a list of unreachable locations. + # Corresponds to the JSON property `backups` + # @return [Array] + attr_accessor :backups + + # The token you can use to retrieve the next page of results. Not returned if + # there are no more results in the list. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Locations that could not be reached. + # Corresponds to the JSON property `unreachable` + # @return [Array] + attr_accessor :unreachable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @backups = args[:backups] if args.key?(:backups) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @unreachable = args[:unreachable] if args.key?(:unreachable) + end + end + # ListInstancesResponse is the result of ListInstancesRequest. class ListInstancesResponse include Google::Apis::Core::Hashable @@ -674,6 +933,93 @@ module Google end end + # Defines policies to service maintenance events. + class MaintenancePolicy + include Google::Apis::Core::Hashable + + # Output only. The time when the resource was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Optional. Description of what this policy is for. Create/Update methods return + # INVALID_ARGUMENT if the length is greater than 512. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Optional. Resource labels to represent user provided metadata. Each label is a + # key-value pair, where both the key and the value are arbitrary strings + # provided by the user. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Required. MaintenancePolicy name using the form: `projects/`project_id`/ + # locations/`location_id`/maintenancePolicies/`maintenance_policy_id`` where ` + # project_id` refers to a GCP consumer project ID, `location_id` refers to a GCP + # region/zone, `maintenance_policy_id` must be 1-63 characters long and match + # the regular expression `[a-z0-9]([-a-z0-9]*[a-z0-9])?`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. The state of the policy. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Maintenance policy applicable to instance updates. + # Corresponds to the JSON property `updatePolicy` + # @return [Google::Apis::FileV1::UpdatePolicy] + attr_accessor :update_policy + + # Output only. The time when the resource was updated. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @description = args[:description] if args.key?(:description) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @state = args[:state] if args.key?(:state) + @update_policy = args[:update_policy] if args.key?(:update_policy) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # MaintenanceWindow definition. + class MaintenanceWindow + include Google::Apis::Core::Hashable + + # Time window specified for daily operations. + # Corresponds to the JSON property `dailyCycle` + # @return [Google::Apis::FileV1::DailyCycle] + attr_accessor :daily_cycle + + # Time window specified for weekly operations. + # Corresponds to the JSON property `weeklyCycle` + # @return [Google::Apis::FileV1::WeeklyCycle] + attr_accessor :weekly_cycle + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @daily_cycle = args[:daily_cycle] if args.key?(:daily_cycle) + @weekly_cycle = args[:weekly_cycle] if args.key?(:weekly_cycle) + end + end + # Network configuration for the instance. class NetworkConfig include Google::Apis::Core::Hashable @@ -840,6 +1186,67 @@ module Google end end + # RestoreInstanceRequest restores an existing instances's file share from a + # backup. + class RestoreInstanceRequest + include Google::Apis::Core::Hashable + + # Required. Name of the file share in the Cloud Filestore instance that the + # backup is being restored to. + # Corresponds to the JSON property `fileShare` + # @return [String] + attr_accessor :file_share + + # The resource name of the backup, in the format projects/`project_number`/ + # locations/`location_id`/backups/`backup_id`. + # Corresponds to the JSON property `sourceBackup` + # @return [String] + attr_accessor :source_backup + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @file_share = args[:file_share] if args.key?(:file_share) + @source_backup = args[:source_backup] if args.key?(:source_backup) + end + end + + # Configure the schedule. + class Schedule + include Google::Apis::Core::Hashable + + # Allows to define schedule that runs specified day of the week. + # Corresponds to the JSON property `day` + # @return [String] + attr_accessor :day + + # Output only. Duration of the time window, set by service producer. + # Corresponds to the JSON property `duration` + # @return [String] + attr_accessor :duration + + # Represents a time of day. The date and time zone are either not significant or + # are specified elsewhere. An API may choose to allow leap seconds. Related + # types are google.type.Date and `google.protobuf.Timestamp`. + # Corresponds to the JSON property `startTime` + # @return [Google::Apis::FileV1::TimeOfDay] + attr_accessor :start_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @day = args[:day] if args.key?(:day) + @duration = args[:duration] if args.key?(:duration) + @start_time = args[:start_time] if args.key?(:start_time) + end + end + # The `Status` type defines a logical error model that is suitable for different # programming environments, including REST APIs and RPC APIs. It is used by [ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of @@ -878,6 +1285,100 @@ module Google @message = args[:message] if args.key?(:message) end end + + # Represents a time of day. The date and time zone are either not significant or + # are specified elsewhere. An API may choose to allow leap seconds. Related + # types are google.type.Date and `google.protobuf.Timestamp`. + class TimeOfDay + include Google::Apis::Core::Hashable + + # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to + # allow the value "24:00:00" for scenarios like business closing time. + # Corresponds to the JSON property `hours` + # @return [Fixnum] + attr_accessor :hours + + # Minutes of hour of day. Must be from 0 to 59. + # Corresponds to the JSON property `minutes` + # @return [Fixnum] + attr_accessor :minutes + + # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + # Corresponds to the JSON property `nanos` + # @return [Fixnum] + attr_accessor :nanos + + # Seconds of minutes of the time. Must normally be from 0 to 59. An API may + # allow the value 60 if it allows leap-seconds. + # Corresponds to the JSON property `seconds` + # @return [Fixnum] + attr_accessor :seconds + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @hours = args[:hours] if args.key?(:hours) + @minutes = args[:minutes] if args.key?(:minutes) + @nanos = args[:nanos] if args.key?(:nanos) + @seconds = args[:seconds] if args.key?(:seconds) + end + end + + # Maintenance policy applicable to instance updates. + class UpdatePolicy + include Google::Apis::Core::Hashable + + # Optional. Relative scheduling channel applied to resource. + # Corresponds to the JSON property `channel` + # @return [String] + attr_accessor :channel + + # Deny Maintenance Period that is applied to resource to indicate when + # maintenance is forbidden. User can specify zero or more non-overlapping deny + # periods. For V1, Maximum number of deny_maintenance_periods is expected to be + # one. + # Corresponds to the JSON property `denyMaintenancePeriods` + # @return [Array] + attr_accessor :deny_maintenance_periods + + # MaintenanceWindow definition. + # Corresponds to the JSON property `window` + # @return [Google::Apis::FileV1::MaintenanceWindow] + attr_accessor :window + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @channel = args[:channel] if args.key?(:channel) + @deny_maintenance_periods = args[:deny_maintenance_periods] if args.key?(:deny_maintenance_periods) + @window = args[:window] if args.key?(:window) + end + end + + # Time window specified for weekly operations. + class WeeklyCycle + include Google::Apis::Core::Hashable + + # User can specify multiple windows in a week. Minimum of 1 window. + # Corresponds to the JSON property `schedule` + # @return [Array] + attr_accessor :schedule + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @schedule = args[:schedule] if args.key?(:schedule) + end + end end end end diff --git a/generated/google/apis/file_v1/representations.rb b/generated/google/apis/file_v1/representations.rb index 07b86e06b..29cf5a5b0 100644 --- a/generated/google/apis/file_v1/representations.rb +++ b/generated/google/apis/file_v1/representations.rb @@ -22,12 +22,36 @@ module Google module Apis module FileV1 + class Backup + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class CancelOperationRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class DailyCycle + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Date + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DenyMaintenancePeriod + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Empty class Representation < Google::Apis::Core::JsonRepresentation; end @@ -94,6 +118,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ListBackupsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ListInstancesResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -118,6 +148,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class MaintenancePolicy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MaintenanceWindow + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class NetworkConfig class Representation < Google::Apis::Core::JsonRepresentation; end @@ -136,18 +178,95 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class RestoreInstanceRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Schedule + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Status class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class TimeOfDay + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdatePolicy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class WeeklyCycle + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Backup + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :capacity_gb, :numeric_string => true, as: 'capacityGb' + property :create_time, as: 'createTime' + property :description, as: 'description' + property :download_bytes, :numeric_string => true, as: 'downloadBytes' + hash :labels, as: 'labels' + property :name, as: 'name' + property :source_file_share, as: 'sourceFileShare' + property :source_instance, as: 'sourceInstance' + property :source_instance_tier, as: 'sourceInstanceTier' + property :state, as: 'state' + property :storage_bytes, :numeric_string => true, as: 'storageBytes' + end + end + class CancelOperationRequest # @private class Representation < Google::Apis::Core::JsonRepresentation end end + class DailyCycle + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :duration, as: 'duration' + property :start_time, as: 'startTime', class: Google::Apis::FileV1::TimeOfDay, decorator: Google::Apis::FileV1::TimeOfDay::Representation + + end + end + + class Date + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :day, as: 'day' + property :month, as: 'month' + property :year, as: 'year' + end + end + + class DenyMaintenancePeriod + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :end_date, as: 'endDate', class: Google::Apis::FileV1::Date, decorator: Google::Apis::FileV1::Date::Representation + + property :start_date, as: 'startDate', class: Google::Apis::FileV1::Date, decorator: Google::Apis::FileV1::Date::Representation + + property :time, as: 'time', class: Google::Apis::FileV1::TimeOfDay, decorator: Google::Apis::FileV1::TimeOfDay::Representation + + end + end + class Empty # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -159,6 +278,7 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation property :capacity_gb, :numeric_string => true, as: 'capacityGb' property :name, as: 'name' + property :source_backup, as: 'sourceBackup' end end @@ -201,6 +321,8 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :exclude, as: 'exclude' + hash :maintenance_policies, as: 'maintenancePolicies', class: Google::Apis::FileV1::MaintenancePolicy, decorator: Google::Apis::FileV1::MaintenancePolicy::Representation + end end @@ -271,6 +393,16 @@ module Google end end + class ListBackupsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :backups, as: 'backups', class: Google::Apis::FileV1::Backup, decorator: Google::Apis::FileV1::Backup::Representation + + property :next_page_token, as: 'nextPageToken' + collection :unreachable, as: 'unreachable' + end + end + class ListInstancesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -310,6 +442,30 @@ module Google end end + class MaintenancePolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :description, as: 'description' + hash :labels, as: 'labels' + property :name, as: 'name' + property :state, as: 'state' + property :update_policy, as: 'updatePolicy', class: Google::Apis::FileV1::UpdatePolicy, decorator: Google::Apis::FileV1::UpdatePolicy::Representation + + property :update_time, as: 'updateTime' + end + end + + class MaintenanceWindow + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :daily_cycle, as: 'dailyCycle', class: Google::Apis::FileV1::DailyCycle, decorator: Google::Apis::FileV1::DailyCycle::Representation + + property :weekly_cycle, as: 'weeklyCycle', class: Google::Apis::FileV1::WeeklyCycle, decorator: Google::Apis::FileV1::WeeklyCycle::Representation + + end + end + class NetworkConfig # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -345,6 +501,24 @@ module Google end end + class RestoreInstanceRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :file_share, as: 'fileShare' + property :source_backup, as: 'sourceBackup' + end + end + + class Schedule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :day, as: 'day' + property :duration, as: 'duration' + property :start_time, as: 'startTime', class: Google::Apis::FileV1::TimeOfDay, decorator: Google::Apis::FileV1::TimeOfDay::Representation + + end + end + class Status # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -353,6 +527,35 @@ module Google property :message, as: 'message' end end + + class TimeOfDay + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :hours, as: 'hours' + property :minutes, as: 'minutes' + property :nanos, as: 'nanos' + property :seconds, as: 'seconds' + end + end + + class UpdatePolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :channel, as: 'channel' + collection :deny_maintenance_periods, as: 'denyMaintenancePeriods', class: Google::Apis::FileV1::DenyMaintenancePeriod, decorator: Google::Apis::FileV1::DenyMaintenancePeriod::Representation + + property :window, as: 'window', class: Google::Apis::FileV1::MaintenanceWindow, decorator: Google::Apis::FileV1::MaintenanceWindow::Representation + + end + end + + class WeeklyCycle + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :schedule, as: 'schedule', class: Google::Apis::FileV1::Schedule, decorator: Google::Apis::FileV1::Schedule::Representation + + end + end end end end diff --git a/generated/google/apis/file_v1/service.rb b/generated/google/apis/file_v1/service.rb index 8cb3f0228..664fd1286 100644 --- a/generated/google/apis/file_v1/service.rb +++ b/generated/google/apis/file_v1/service.rb @@ -119,7 +119,199 @@ module Google execute_or_queue_command(command, &block) end - # Creates an instance. + # Creates a backup. + # @param [String] parent + # Required. The backup's project and location, in the format projects/` + # project_number`/locations/`location`. In Cloud Filestore, backup locations map + # to GCP regions, for example **us-west1**. + # @param [Google::Apis::FileV1::Backup] backup_object + # @param [String] backup_id + # Required. The ID to use for the backup. The ID must be unique within the + # specified project and location. This value must start with a lowercase letter + # followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end + # with a hyphen. Values that do not match this pattern will trigger an + # INVALID_ARGUMENT error. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FileV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FileV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_backup(parent, backup_object = nil, backup_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/backups', options) + command.request_representation = Google::Apis::FileV1::Backup::Representation + command.request_object = backup_object + command.response_representation = Google::Apis::FileV1::Operation::Representation + command.response_class = Google::Apis::FileV1::Operation + command.params['parent'] = parent unless parent.nil? + command.query['backupId'] = backup_id unless backup_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a backup. + # @param [String] name + # Required. The backup resource name, in the format projects/`project_number`/ + # locations/`location`/backups/`backup_id` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FileV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FileV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_backup(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::FileV1::Operation::Representation + command.response_class = Google::Apis::FileV1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the details of a specific backup. + # @param [String] name + # Required. The backup resource name, in the format projects/`project_number`/ + # locations/`location`/backups/`backup_id`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FileV1::Backup] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FileV1::Backup] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_backup(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::FileV1::Backup::Representation + command.response_class = Google::Apis::FileV1::Backup + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all backups in a project for either a specified location or for all + # locations. + # @param [String] parent + # Required. The project and location for which to retrieve backup information, + # in the format projects/`project_number`/locations/`location`. In Cloud + # Filestore, backup locations map to GCP regions, for example **us-west1**. To + # retrieve backup information for all locations, use "-" for the `location` + # value. + # @param [String] filter + # List filter. + # @param [String] order_by + # Sort results. Supported values are "name", "name desc" or "" (unsorted). + # @param [Fixnum] page_size + # The maximum number of items to return. + # @param [String] page_token + # The next_page_token value to use if there are additional results to retrieve + # for this list request. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FileV1::ListBackupsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FileV1::ListBackupsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_backups(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/backups', options) + command.response_representation = Google::Apis::FileV1::ListBackupsResponse::Representation + command.response_class = Google::Apis::FileV1::ListBackupsResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['orderBy'] = order_by unless order_by.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates the settings of a specific backup. + # @param [String] name + # Output only. The resource name of the backup, in the format projects/` + # project_number`/locations/`location_id`/backups/`backup_id`. + # @param [Google::Apis::FileV1::Backup] backup_object + # @param [String] update_mask + # Required. Mask of fields to update. At least one path must be supplied in this + # field. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FileV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FileV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_backup(name, backup_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}', options) + command.request_representation = Google::Apis::FileV1::Backup::Representation + command.request_object = backup_object + command.response_representation = Google::Apis::FileV1::Operation::Representation + command.response_class = Google::Apis::FileV1::Operation + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates an instance. When creating from a backup, the capacity of the new + # instance needs to be equal to or larger than the capacity of the backup (and + # also equal to or larger than the minimum capacity of the tier). # @param [String] parent # Required. The instance's project and location, in the format projects/` # project_id`/locations/`location`. In Cloud Filestore, locations map to GCP @@ -306,6 +498,42 @@ module Google execute_or_queue_command(command, &block) end + # Restores an existing instance's file share from a backup. The instance's file + # share capacity will be set to the backup's capacity or the minimum capacity of + # the tier, whichever is larger. + # @param [String] name + # Required. The resource name of the instance, in the format projects/` + # project_number`/locations/`location_id`/instances/`instance_id`. + # @param [Google::Apis::FileV1::RestoreInstanceRequest] restore_instance_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FileV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FileV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def restore_instance(name, restore_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:restore', options) + command.request_representation = Google::Apis::FileV1::RestoreInstanceRequest::Representation + command.request_object = restore_instance_request_object + command.response_representation = Google::Apis::FileV1::Operation::Representation + command.response_class = Google::Apis::FileV1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Starts asynchronous cancellation on a long-running operation. The server makes # a best effort to cancel the operation, but success is not guaranteed. If the # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. diff --git a/generated/google/apis/file_v1/synth.metadata b/generated/google/apis/file_v1/synth.metadata index 429012f74..0a3c492b6 100644 --- a/generated/google/apis/file_v1/synth.metadata +++ b/generated/google/apis/file_v1/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-api-ruby-client.git", - "sha": "c98c719bbab68d0890524d53f8b629d7858af9c2" + "sha": "cdb4e840d40bb3831448360e59b74b03dafa9fe0" } } ]