class Google::Cloud::Storage::Service

def patch_file bucket_name,

Updates a file's metadata.
#
def patch_file bucket_name,
               file_path,
               file_gapi = nil,
               generation: nil,
               if_generation_match: nil,
               if_generation_not_match: nil,
               if_metageneration_match: nil,
               if_metageneration_not_match: nil,
               predefined_acl: nil,
               user_project: nil,
               override_unlocked_retention: nil,
               options: {}
  file_gapi ||= Google::Apis::StorageV1::Object.new
  if options[:retries].nil?
    is_idempotent = retry? if_metageneration_match: if_metageneration_match
    options = is_idempotent ? {} : { retries: 0 }
  end
  execute do
    service.patch_object bucket_name,
                         file_path,
                         file_gapi,
                         generation: generation,
                         if_generation_match: if_generation_match,
                         if_generation_not_match: if_generation_not_match,
                         if_metageneration_match: if_metageneration_match,
                         if_metageneration_not_match: if_metageneration_not_match,
                         predefined_acl: predefined_acl,
                         user_project: user_project(user_project),
                         override_unlocked_retention: override_unlocked_retention,
                         options: options
  end
end