lib/google/cloud/netapp/v1/netapp/rest/service_stub.rb in google-cloud-netapp-v1-0.2.0 vs lib/google/cloud/netapp/v1/netapp/rest/service_stub.rb in google-cloud-netapp-v1-0.3.0

- old
+ new

@@ -1407,10 +1407,580 @@ yield result, operation if block_given? result end ## + # Baseline implementation for the create_backup_vault REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::CreateBackupVaultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_backup_vault request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_vault_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_backup_vault REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::GetBackupVaultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetApp::V1::BackupVault] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetApp::V1::BackupVault] + # A result object deserialized from the server's reply + def get_backup_vault request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_vault_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetApp::V1::BackupVault.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_backup_vaults REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::ListBackupVaultsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetApp::V1::ListBackupVaultsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetApp::V1::ListBackupVaultsResponse] + # A result object deserialized from the server's reply + def list_backup_vaults request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_vaults_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetApp::V1::ListBackupVaultsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_backup_vault REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::UpdateBackupVaultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_backup_vault request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_vault_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_backup_vault REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::DeleteBackupVaultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_backup_vault request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_vault_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_backup REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::CreateBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_backup REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::GetBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetApp::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetApp::V1::Backup] + # A result object deserialized from the server's reply + def get_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetApp::V1::Backup.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_backups REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::ListBackupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetApp::V1::ListBackupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetApp::V1::ListBackupsResponse] + # A result object deserialized from the server's reply + def list_backups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetApp::V1::ListBackupsResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_backup REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::DeleteBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_backup REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::UpdateBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the create_backup_policy REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::CreateBackupPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_backup_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the get_backup_policy REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::GetBackupPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetApp::V1::BackupPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetApp::V1::BackupPolicy] + # A result object deserialized from the server's reply + def get_backup_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetApp::V1::BackupPolicy.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the list_backup_policies REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::ListBackupPoliciesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::NetApp::V1::ListBackupPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::NetApp::V1::ListBackupPoliciesResponse] + # A result object deserialized from the server's reply + def list_backup_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_policies_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::NetApp::V1::ListBackupPoliciesResponse.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the update_backup_policy REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::UpdateBackupPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_backup_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## + # Baseline implementation for the delete_backup_policy REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::DeleteBackupPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_backup_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + + yield result, operation if block_given? + result + end + + ## # @private # # GRPC transcoding helper method for the list_storage_pools REST call # # @param request_pb [::Google::Cloud::NetApp::V1::ListStoragePoolsRequest] @@ -2175,9 +2745,330 @@ uri_method: :post, uri_template: "/v1/{name}:reverseDirection", body: "*", matches: [ ["name", %r{^projects/[^/]+/locations/[^/]+/volumes/[^/]+/replications/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backup_vault REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::CreateBackupVaultRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_backup_vault_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backupVaults", + body: "backup_vault", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_vault REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::GetBackupVaultRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_backup_vault_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_vaults REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::ListBackupVaultsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_backup_vaults_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupVaults", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup_vault REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::UpdateBackupVaultRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_backup_vault_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup_vault.name}", + body: "backup_vault", + matches: [ + ["backup_vault.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup_vault REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::DeleteBackupVaultRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_backup_vault_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backup REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::CreateBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backups", + body: "backup", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::GetBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backups REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::ListBackupsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_backups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backups", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::DeleteBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::UpdateBackupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup.name}", + body: "backup", + matches: [ + ["backup.name", %r{^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backup_policy REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::CreateBackupPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_backup_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backupPolicies", + body: "backup_policy", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_policy REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::GetBackupPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_backup_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_policies REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::ListBackupPoliciesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_backup_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupPolicies", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup_policy REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::UpdateBackupPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_backup_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup_policy.name}", + body: "backup_policy", + matches: [ + ["backup_policy.name", %r{^projects/[^/]+/locations/[^/]+/backupPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup_policy REST call + # + # @param request_pb [::Google::Cloud::NetApp::V1::DeleteBackupPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_backup_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPolicies/[^/]+/?$}, false] ] ) transcoder.transcode request_pb end end