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

org.projectodd.openwhisk.api.ActivationsApi Maven / Gradle / Ivy

There is a newer version: 0.8
Show newest version
package org.projectodd.openwhisk.api;

import org.projectodd.openwhisk.invoker.ApiException;
import org.projectodd.openwhisk.invoker.ApiClient;
import org.projectodd.openwhisk.invoker.Configuration;
import org.projectodd.openwhisk.invoker.Pair;

import javax.ws.rs.core.GenericType;

import org.projectodd.openwhisk.model.Activation;
import org.projectodd.openwhisk.model.ActivationLogs;
import org.projectodd.openwhisk.model.ActivationResponse;
import org.projectodd.openwhisk.model.EntityBrief;
import org.projectodd.openwhisk.model.ErrorMessage;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


public class ActivationsApi {
  private ApiClient apiClient;

  public ActivationsApi() {
    this(Configuration.getDefaultApiClient());
  }

  public ActivationsApi(ApiClient apiClient) {
    this.apiClient = apiClient;
  }

  public ApiClient getApiClient() {
    return apiClient;
  }

  public void setApiClient(ApiClient apiClient) {
    this.apiClient = apiClient;
  }

  /**
   * Get activation information
   * Get activation information.
   * @param namespace The entity namespace (required)
   * @param activationid Name of activation to fetch (required)
   * @return Activation
   * @throws ApiException if fails to make API call
   */
  public Activation getActivationById(String namespace, String activationid) throws ApiException {
    Object localVarPostBody = null;
    
    // verify the required parameter 'namespace' is set
    if (namespace == null) {
      throw new ApiException(400, "Missing the required parameter 'namespace' when calling getActivationById");
    }
    
    // verify the required parameter 'activationid' is set
    if (activationid == null) {
      throw new ApiException(400, "Missing the required parameter 'activationid' when calling getActivationById");
    }
    
    // create path and map variables
    String localVarPath = "/namespaces/{namespace}/activations/{activationid}"
      .replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()))
      .replaceAll("\\{" + "activationid" + "\\}", apiClient.escapeString(activationid.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
    final String[] localVarAccepts = {
      "application/json"
    };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

    final String[] localVarContentTypes = {
      
    };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

    String[] localVarAuthNames = new String[] {  };

    GenericType localVarReturnType = new GenericType() {};
    return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
      }
  /**
   * Get activation ids
   * Get activation ids.
   * @param namespace The entity namespace (required)
   * @param name Name of item (optional)
   * @param limit Number of entities to include in the result (0-200). The default limit is 30. A value of 0 sets the limit to the maximum. (optional)
   * @param skip Number of entities to skip in the result. (optional)
   * @param since Only include entities later than this timestamp (measured in milliseconds since Thu, 01 Jan 1970) (optional)
   * @param upto Only include entities earlier than this timestamp (measured in milliseconds since Thu, 01 Jan 1970) (optional)
   * @param docs Whether to include full entity description. (optional)
   * @return List<EntityBrief>
   * @throws ApiException if fails to make API call
   */
  public List getActivations(String namespace, String name, Integer limit, Integer skip, Integer since, Integer upto, Boolean docs) throws ApiException {
    Object localVarPostBody = null;
    
    // verify the required parameter 'namespace' is set
    if (namespace == null) {
      throw new ApiException(400, "Missing the required parameter 'namespace' when calling getActivations");
    }
    
    // create path and map variables
    String localVarPath = "/namespaces/{namespace}/activations"
      .replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();

    localVarQueryParams.addAll(apiClient.parameterToPairs("", "name", name));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "skip", skip));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "since", since));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "upto", upto));
    localVarQueryParams.addAll(apiClient.parameterToPairs("", "docs", docs));

    
    
    final String[] localVarAccepts = {
      "application/json"
    };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

    final String[] localVarContentTypes = {
      
    };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

    String[] localVarAuthNames = new String[] {  };

    GenericType> localVarReturnType = new GenericType>() {};
    return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
      }
  /**
   * Get the logs for an activation
   * Get activation logs information.
   * @param namespace The entity namespace (required)
   * @param activationid Name of activation to fetch (required)
   * @return ActivationLogs
   * @throws ApiException if fails to make API call
   */
  public ActivationLogs namespacesNamespaceActivationsActivationidLogsGet(String namespace, String activationid) throws ApiException {
    Object localVarPostBody = null;
    
    // verify the required parameter 'namespace' is set
    if (namespace == null) {
      throw new ApiException(400, "Missing the required parameter 'namespace' when calling namespacesNamespaceActivationsActivationidLogsGet");
    }
    
    // verify the required parameter 'activationid' is set
    if (activationid == null) {
      throw new ApiException(400, "Missing the required parameter 'activationid' when calling namespacesNamespaceActivationsActivationidLogsGet");
    }
    
    // create path and map variables
    String localVarPath = "/namespaces/{namespace}/activations/{activationid}/logs"
      .replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()))
      .replaceAll("\\{" + "activationid" + "\\}", apiClient.escapeString(activationid.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
    final String[] localVarAccepts = {
      "application/json"
    };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

    final String[] localVarContentTypes = {
      
    };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

    String[] localVarAuthNames = new String[] {  };

    GenericType localVarReturnType = new GenericType() {};
    return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
      }
  /**
   * Get the result of an activation
   * Get activation result.
   * @param namespace The entity namespace (required)
   * @param activationid Name of activation to fetch (required)
   * @return ActivationResponse
   * @throws ApiException if fails to make API call
   */
  public ActivationResponse namespacesNamespaceActivationsActivationidResultGet(String namespace, String activationid) throws ApiException {
    Object localVarPostBody = null;
    
    // verify the required parameter 'namespace' is set
    if (namespace == null) {
      throw new ApiException(400, "Missing the required parameter 'namespace' when calling namespacesNamespaceActivationsActivationidResultGet");
    }
    
    // verify the required parameter 'activationid' is set
    if (activationid == null) {
      throw new ApiException(400, "Missing the required parameter 'activationid' when calling namespacesNamespaceActivationsActivationidResultGet");
    }
    
    // create path and map variables
    String localVarPath = "/namespaces/{namespace}/activations/{activationid}/result"
      .replaceAll("\\{" + "namespace" + "\\}", apiClient.escapeString(namespace.toString()))
      .replaceAll("\\{" + "activationid" + "\\}", apiClient.escapeString(activationid.toString()));

    // query params
    List localVarQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarFormParams = new HashMap();


    
    
    final String[] localVarAccepts = {
      "application/json"
    };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

    final String[] localVarContentTypes = {
      
    };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

    String[] localVarAuthNames = new String[] {  };

    GenericType localVarReturnType = new GenericType() {};
    return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
      }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy