All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ovirt.engine.sdk4.services.VmBackupsService Maven / Gradle / Ivy

/*
Copyright (c) 2015 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package org.ovirt.engine.sdk4.services;

import java.io.IOException;
import java.math.BigInteger;
import java.util.List;
import org.ovirt.engine.sdk4.Request;
import org.ovirt.engine.sdk4.Response;
import org.ovirt.engine.sdk4.Service;
import org.ovirt.engine.sdk4.builders.BackupBuilder;
import org.ovirt.engine.sdk4.types.Backup;

/**
 * Lists the backups of a virtual machine.
 */
public interface VmBackupsService extends Service {
    /**
     * Adds a new backup entity to a virtual machine.
     * 
     * For example, to start a new incremental backup of a virtual machine
     * since checkpoint id `previous-checkpoint-uuid`, send a request like this:
     * 
     * [source]
     * ----
     * POST /ovirt-engine/api/vms/123/backups
     * ----
     * 
     * With a request body like this:
     * 
     * [source,xml]
     * ----
     * POST /ovirt-engine/api/vms/123/backups
     * 
     *   previous-checkpoint-uuid
     *   
     *       
     *       ...
     *   
     * 
     * ----
     * 
     * The response body:
     * 
     * [source,xml]
     * ----
     * 
     *     previous-checkpoint-uuid
     *     new-checkpoint-uuid
     *     
     *         
     *         ...
     *         ...
     *     
     *     initializing
     *     
     * 
     * ----
     */
    public interface AddRequest extends Request {
        AddRequest backup(Backup backup);
        /**
         * The information about the virtual machine backup entity.
         */
        AddRequest backup(BackupBuilder backup);
    }
    
    /**
     * Adds a new backup entity to a virtual machine.
     * 
     * For example, to start a new incremental backup of a virtual machine
     * since checkpoint id `previous-checkpoint-uuid`, send a request like this:
     * 
     * [source]
     * ----
     * POST /ovirt-engine/api/vms/123/backups
     * ----
     * 
     * With a request body like this:
     * 
     * [source,xml]
     * ----
     * POST /ovirt-engine/api/vms/123/backups
     * 
     *   previous-checkpoint-uuid
     *   
     *       
     *       ...
     *   
     * 
     * ----
     * 
     * The response body:
     * 
     * [source,xml]
     * ----
     * 
     *     previous-checkpoint-uuid
     *     new-checkpoint-uuid
     *     
     *         
     *         ...
     *         ...
     *     
     *     initializing
     *     
     * 
     * ----
     */
    public interface AddResponse extends Response {
        /**
         * The information about the virtual machine backup entity.
         */
        Backup backup();
    }
    
    /**
     * Adds a new backup entity to a virtual machine.
     * 
     * For example, to start a new incremental backup of a virtual machine
     * since checkpoint id `previous-checkpoint-uuid`, send a request like this:
     * 
     * [source]
     * ----
     * POST /ovirt-engine/api/vms/123/backups
     * ----
     * 
     * With a request body like this:
     * 
     * [source,xml]
     * ----
     * POST /ovirt-engine/api/vms/123/backups
     * 
     *   previous-checkpoint-uuid
     *   
     *       
     *       ...
     *   
     * 
     * ----
     * 
     * The response body:
     * 
     * [source,xml]
     * ----
     * 
     *     previous-checkpoint-uuid
     *     new-checkpoint-uuid
     *     
     *         
     *         ...
     *         ...
     *     
     *     initializing
     *     
     * 
     * ----
     */
    AddRequest add();
    
    /**
     * The list of virtual machine backups.
     */
    public interface ListRequest extends Request {
        /**
         * Indicates which inner links should be _followed_. The objects referenced by these links will be fetched as part
         * of the current request. See <> for details.
         */
        ListRequest follow(String follow);
        /**
         * Sets the maximum number of virtual machine backups to return. If not specified, all the virtual machine backups are returned.
         */
        ListRequest max(Integer max);
        /**
         * Sets the maximum number of virtual machine backups to return. If not specified, all the virtual machine backups are returned.
         */
        ListRequest max(Long max);
        /**
         * Sets the maximum number of virtual machine backups to return. If not specified, all the virtual machine backups are returned.
         */
        ListRequest max(BigInteger max);
    }
    
    /**
     * The list of virtual machine backups.
     */
    public interface ListResponse extends Response {
        /**
         * The information about the virtual machine backup entities.
         * 
         * [source,xml]
         * ----
         * 
         *   
         *     previous-checkpoint-uuid
         *     
         *       
         *       ...
         *       ...
         *     
         *     initiailizing
         *     
         *  
         * 
         * ----
         */
        List backups();
    }
    
    /**
     * The list of virtual machine backups.
     */
    ListRequest list();
    
    /**
     * Returns a reference to the service that manages a specific VM backup.
     */
    VmBackupService backupService(String id);
    /**
     * Service locator method, returns individual service on which the URI is dispatched.
     */
    Service service(String path);
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy