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

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

There is a newer version: 4.5.1
Show newest version
/*
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.StepBuilder;
import org.ovirt.engine.sdk4.types.Step;

/**
 * A service to manage steps.
 */
public interface StepsService extends Service {
    /**
     * Add an external step to an existing job or to an existing step.
     * 
     * For example, to add a step to `job` with identifier `123` send the
     * following request:
     * 
     * [source]
     * ----
     * POST /ovirt-engine/api/jobs/123/steps
     * ----
     * 
     * With the following request body:
     * 
     * [source,xml]
     * ----
     * 
     *   Validating
     *   2016-12-12T23:07:26.605+02:00
     *   started
     *   validating
     * 
     * ----
     * 
     * The response should look like:
     * 
     * [source,xml]
     * ----
     * 
     *   
     *     
     *   
     *   Validating
     *   
     *   true
     *   2
     *   2016-12-13T01:06:15.380+02:00
     *   started
     *   validating
     *   
     * 
     * ----
     */
    public interface AddRequest extends Request {
        AddRequest step(Step step);
        /**
         * Step that will be added.
         */
        AddRequest step(StepBuilder step);
    }
    
    /**
     * Add an external step to an existing job or to an existing step.
     * 
     * For example, to add a step to `job` with identifier `123` send the
     * following request:
     * 
     * [source]
     * ----
     * POST /ovirt-engine/api/jobs/123/steps
     * ----
     * 
     * With the following request body:
     * 
     * [source,xml]
     * ----
     * 
     *   Validating
     *   2016-12-12T23:07:26.605+02:00
     *   started
     *   validating
     * 
     * ----
     * 
     * The response should look like:
     * 
     * [source,xml]
     * ----
     * 
     *   
     *     
     *   
     *   Validating
     *   
     *   true
     *   2
     *   2016-12-13T01:06:15.380+02:00
     *   started
     *   validating
     *   
     * 
     * ----
     */
    public interface AddResponse extends Response {
        /**
         * Step that will be added.
         */
        Step step();
    }
    
    /**
     * Add an external step to an existing job or to an existing step.
     * 
     * For example, to add a step to `job` with identifier `123` send the
     * following request:
     * 
     * [source]
     * ----
     * POST /ovirt-engine/api/jobs/123/steps
     * ----
     * 
     * With the following request body:
     * 
     * [source,xml]
     * ----
     * 
     *   Validating
     *   2016-12-12T23:07:26.605+02:00
     *   started
     *   validating
     * 
     * ----
     * 
     * The response should look like:
     * 
     * [source,xml]
     * ----
     * 
     *   
     *     
     *   
     *   Validating
     *   
     *   true
     *   2
     *   2016-12-13T01:06:15.380+02:00
     *   started
     *   validating
     *   
     * 
     * ----
     */
    AddRequest add();
    
    /**
     * Retrieves the representation of the steps.
     * 
     * [source]
     * ----
     * GET /ovirt-engine/api/job/123/steps
     * ----
     * 
     * You will receive response in XML like this one:
     * 
     * [source,xml]
     * ----
     * 
     *   
     *     
     *       
     *     
     *     Validating
     *     
     *     true
     *     2
     *     2016-12-13T01:06:15.380+02:00
     *     started
     *     validating
     *     
     *   
     *   ...
     * 
     * ----
     */
    public interface ListRequest extends Request {
        /**
         * Sets the maximum number of steps to return. If not specified all the steps are returned.
         */
        ListRequest max(Integer max);
        /**
         * Sets the maximum number of steps to return. If not specified all the steps are returned.
         */
        ListRequest max(Long max);
        /**
         * Sets the maximum number of steps to return. If not specified all the steps are returned.
         */
        ListRequest max(BigInteger max);
    }
    
    /**
     * Retrieves the representation of the steps.
     * 
     * [source]
     * ----
     * GET /ovirt-engine/api/job/123/steps
     * ----
     * 
     * You will receive response in XML like this one:
     * 
     * [source,xml]
     * ----
     * 
     *   
     *     
     *       
     *     
     *     Validating
     *     
     *     true
     *     2
     *     2016-12-13T01:06:15.380+02:00
     *     started
     *     validating
     *     
     *   
     *   ...
     * 
     * ----
     */
    public interface ListResponse extends Response {
        /**
         * A representation of steps.
         */
        List steps();
    }
    
    /**
     * Retrieves the representation of the steps.
     * 
     * [source]
     * ----
     * GET /ovirt-engine/api/job/123/steps
     * ----
     * 
     * You will receive response in XML like this one:
     * 
     * [source,xml]
     * ----
     * 
     *   
     *     
     *       
     *     
     *     Validating
     *     
     *     true
     *     2
     *     2016-12-13T01:06:15.380+02:00
     *     started
     *     validating
     *     
     *   
     *   ...
     * 
     * ----
     */
    ListRequest list();
    
    /**
     * Reference to the step service.
     */
    StepService stepService(String id);
    /**
     * Service locator method, returns individual service on which the URI is dispatched.
     */
    Service service(String path);
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy