# FireCloud
#
# FireCloud API
#
# The version of the OpenAPI document: 0.1
#
# Generated by: https://openapi-generator.tech
#' @docType class
#' @title MethodRepository operations
#' @description openapi.MethodRepository
#' @format An \code{R6Class} generator object
#' @field apiClient Handles the client-server communication.
#'
#' @section Methods:
#' \describe{
#' \strong{ ApiConfigurationsNamespaceNameSnapshotIdDelete } \emph{ Redact a single configuration. }
#' Redacts a configuration and all of its associated configurations
#'
#' \itemize{
#' \item \emph{ @param } namespace character
#' \item \emph{ @param } name character
#' \item \emph{ @param } snapshot.id character
#'
#'
#' \item status code : 200 | An integer showing how many configurations were deleted. Should be 1.
#'
#' \item return type : integer
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 0 | Error upon redaction
#'
#' \item return type : Error
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ ApiConfigurationsPost } \emph{ Add a configuration. }
#' Inserts a method configuration into the method repository and gives the owner full access permissions. Must supply a namespace, name, payload, and entityType. Cannot supply a snapshotId
#'
#' \itemize{
#' \item \emph{ @param } body \link{ConfigurationQuery}
#' \item \emph{ @returnType } \link{ConfigurationResponse} \cr
#'
#'
#' \item status code : 201 | Method successfully added.
#'
#' \item return type : ConfigurationResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 400 | Malformed input.
#'
#' \item return type : Error
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Internal error.
#'
#' \item return type : Error
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ ApiMethodsDefinitionsGet } \emph{ List method definitions }
#' List method definitions - i.e. unique namespace/name pairs - with counts of snapshots and associated configurations
#'
#' \itemize{
#' \item \emph{ @returnType } list( \link{MethodDefinition} ) \cr
#'
#'
#' \item status code : 200 | An array of method definitions.
#'
#' \item return type : array[MethodDefinition]
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Internal error.
#'
#' \item return type : Error
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ ApiMethodsNamespaceNameConfigurationsGet } \emph{ List configurations associated with a method }
#' Given the namespace/name of a method, returns all configurations in the repository that reference that method
#'
#' \itemize{
#' \item \emph{ @param } namespace character
#' \item \emph{ @param } name character
#' \item \emph{ @returnType } list( \link{ConfigurationResponseWithPayloadObject} ) \cr
#'
#'
#' \item status code : 200 | An array of configurations.
#'
#' \item return type : array[ConfigurationResponseWithPayloadObject]
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 404 | Method not found.
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 0 | Unexpected error
#'
#' \item return type : Error
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ ApiMethodsNamespaceNameSnapshotIdConfigurationsGet } \emph{ List compatible configurations for this method snapshot }
#' Returns all configurations that 1. have the exact same input and output arguments as the supplied method snapshot, and 2. reference any snapshot of this method.
#'
#' \itemize{
#' \item \emph{ @param } namespace character
#' \item \emph{ @param } name character
#' \item \emph{ @param } snapshot.id character
#' \item \emph{ @returnType } list( \link{ConfigurationResponseWithPayloadObject} ) \cr
#'
#'
#' \item status code : 200 | An array of configurations.
#'
#' \item return type : array[ConfigurationResponseWithPayloadObject]
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 404 | Method not found.
#'
#' \item return type : ErrorReport
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Unexpected error
#'
#' \item return type : ErrorReport
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ ApiMethodsNamespaceNameSnapshotIdDelete } \emph{ Redact a single method. }
#' Redacts a method and all of its associated configurations
#'
#' \itemize{
#' \item \emph{ @param } namespace character
#' \item \emph{ @param } name character
#' \item \emph{ @param } snapshot.id character
#'
#'
#' \item status code : 200 | An integer showing how many methods were deleted.
#'
#' \item return type : integer
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 0 | Error upon redaction
#'
#' \item return type : Error
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ ApiMethodsNamespaceNameSnapshotIdGet } \emph{ Find a single method. }
#' Returns one method that matches the namespace, name, and snapshotId.
#'
#' \itemize{
#' \item \emph{ @param } namespace character
#' \item \emph{ @param } name character
#' \item \emph{ @param } snapshot.id character
#' \item \emph{ @param } only.payload character
#' \item \emph{ @returnType } \link{MethodResponse} \cr
#'
#'
#' \item status code : 200 | A single method.
#'
#' \item return type : MethodResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 0 | Unexpected error
#'
#' \item return type : Error
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ ApiMethodsNamespaceNameSnapshotIdPost } \emph{ Create a new snapshot of an existing Method. }
#' Inserts a new snapshot of the method into the method repository and copies access permissions from previous snapshot, optionally redacting the source snapshot. Documentation, synopsis, and payload are the only arguments considered for the new snapshot; everything else is copied from the source.
#'
#' \itemize{
#' \item \emph{ @param } namespace character
#' \item \emph{ @param } name character
#' \item \emph{ @param } snapshot.id character
#' \item \emph{ @param } redact character
#' \item \emph{ @param } body \link{InlineObject1}
#' \item \emph{ @returnType } \link{MethodResponse} \cr
#'
#'
#' \item status code : 200 | Method successfully copied.
#'
#' \item return type : MethodResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 206 | Method successfully copied, but error while redacting.
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 400 | Malformed input.
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 403 | Forbidden to create copy.
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 404 | Source snapshot not found.
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Internal error.
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ ApiMethodsPost } \emph{ Add a Method. }
#' Inserts a method into the method repository and gives the owner full access permissions. Must supply a namespace name, payload, and entityType. Cannot supply a snapshotId
#'
#' \itemize{
#' \item \emph{ @param } body \link{MethodQuery}
#' \item \emph{ @returnType } \link{MethodResponse} \cr
#'
#'
#' \item status code : 201 | Method successfully added.
#'
#' \item return type : MethodResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 400 | Malformed input.
#'
#' \item return type : Error
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Internal error.
#'
#' \item return type : Error
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ CopyFromMethodRepo } \emph{ Copy a Method Repository Configuration into a workspace }
#'
#'
#' \itemize{
#' \item \emph{ @param } workspace.namespace character
#' \item \emph{ @param } workspace.name character
#' \item \emph{ @param } config.to.copy \link{CopyConfigurationIngest}
#'
#'
#' \item status code : 201 | Successful request
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 404 | Source method configuration does not exist
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 409 | Destination method configuration by that name already exists
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 422 | Error parsing source method configuration
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Internal Server Error
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ CopyToMethodRepo } \emph{ Copy a Method Config in a workspace to the Method Repository }
#'
#'
#' \itemize{
#' \item \emph{ @param } workspace.namespace character
#' \item \emph{ @param } workspace.name character
#' \item \emph{ @param } config.to.copy \link{PublishConfigurationIngest}
#'
#'
#' \item status code : 201 | Successful request
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 404 | Source method configuration does not exist
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 409 | Destination method configuration by that name already exists
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 422 | Error parsing source method configuration
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Internal Server Error
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ CreateMethodTemplate } \emph{ Create a Method Configuration template from a Method }
#'
#'
#' \itemize{
#' \item \emph{ @param } method.name \link{MethodID}
#'
#'
#' \item status code : 200 | Method Configuration template
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 400 | Method WDL can't be parsed
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 404 | No Such Method
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Internal Server Error
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetConfigACL } \emph{ get ACL permissions on a Method Repository configuration }
#'
#'
#' \itemize{
#' \item \emph{ @param } namespace character
#' \item \emph{ @param } name character
#' \item \emph{ @param } snapshot.id character
#'
#'
#' \item status code : 200 | the indicated configuration ACL
#'
#' \item return type : array[object]
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Internal Server Error
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetConfigNamespaceACL } \emph{ get ACL permissions on a Method Repository Configuration Namespace }
#'
#'
#' \itemize{
#' \item \emph{ @param } namespace character
#'
#'
#' \item status code : 200 | List of the indicated configuration namespace ACL permissions
#'
#' \item return type : array[object]
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 403 | user does not have correct permissions to manage namespace permissions or the indicated namespace was not found
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Internal Server Error
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetMethodACL } \emph{ get ACL permissions on a Method Repository method }
#'
#'
#' \itemize{
#' \item \emph{ @param } namespace character
#' \item \emph{ @param } name character
#' \item \emph{ @param } snapshot.id character
#'
#'
#' \item status code : 200 | the indicated method ACL
#'
#' \item return type : array[object]
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Internal Server Error
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetMethodIO } \emph{ Get information about a method's inputs and outputs }
#'
#'
#' \itemize{
#' \item \emph{ @param } method.name \link{MethodID}
#'
#'
#' \item status code : 200 | Method Configuration inputs and outputs
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 400 | Method WDL can't be parsed
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 404 | No Such Method
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Internal Server Error
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetMethodNamespaceACL } \emph{ get ACL permissions on a Method Repository Method Namespace }
#'
#'
#' \itemize{
#' \item \emph{ @param } namespace character
#'
#'
#' \item status code : 200 | List of indicated method namespace ACL permissions
#'
#' \item return type : array[object]
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 403 | user does not have correct permissions to manage namespace permissions or the indicated namespace was not found
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Internal Server Error
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ GetMethodRepositoryConfiguration } \emph{ Get a Method Repository configuration }
#'
#'
#' \itemize{
#' \item \emph{ @param } namespace character
#' \item \emph{ @param } name character
#' \item \emph{ @param } snapshot.id character
#' \item \emph{ @param } payload.as.object character
#' \item \emph{ @returnType } \link{ConfigurationResponse} \cr
#'
#'
#' \item status code : 200 | Method Repository configuration detail
#'
#' \item return type : ConfigurationResponse
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Internal Server Error
#'
#' \item return type : Error
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ ListMethodRepositoryConfigurations } \emph{ List Method Repository configurations. }
#' The configurations endpoint returns all configurations the requester has permissions to read that fit the filter criteria.
#'
#' \itemize{
#' \item \emph{ @param } namespace character
#' \item \emph{ @param } name character
#' \item \emph{ @param } snapshot.id integer
#' \item \emph{ @param } snapshot.comment character
#' \item \emph{ @param } synopsis character
#' \item \emph{ @param } documentation character
#' \item \emph{ @param } owner character
#' \item \emph{ @param } payload character
#' \item \emph{ @param } entity.type character
#' \item \emph{ @returnType } list( \link{ConfigurationResponse} ) \cr
#'
#'
#' \item status code : 200 | An array of configurations.
#'
#' \item return type : array[ConfigurationResponse]
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 0 | Unexpected error
#'
#' \item return type : Error
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ ListMethodRepositoryMethods } \emph{ Lists Method Repository methods. }
#'
#'
#' \itemize{
#' \item \emph{ @param } namespace character
#' \item \emph{ @param } name character
#' \item \emph{ @param } snapshot.id integer
#' \item \emph{ @param } snapshot.comment character
#' \item \emph{ @param } synopsis character
#' \item \emph{ @param } documentation character
#' \item \emph{ @param } owner character
#' \item \emph{ @param } payload character
#' \item \emph{ @param } entity.type character
#' \item \emph{ @returnType } list( \link{MethodResponse} ) \cr
#'
#'
#' \item status code : 200 | An array of methods.
#'
#' \item return type : array[MethodResponse]
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 0 | Unexpected error
#'
#' \item return type : Error
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ MultiUpsertMethodsACL } \emph{ set ACLs for multiple methods in one call }
#'
#'
#' \itemize{
#' \item \emph{ @param } methodacls list( \link{MethodAclPair} )
#' \item \emph{ @returnType } list( \link{MethodAclPair} ) \cr
#'
#'
#' \item status code : 200 | the indicated method namespace ACL permissions once the posted changes have been applied
#'
#' \item return type : array[MethodAclPair]
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 400 | Invalid content format
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Internal Server Error
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ SetConfigACL } \emph{ set ACL permissions on a Method Repository configuration }
#'
#'
#' \itemize{
#' \item \emph{ @param } namespace character
#' \item \emph{ @param } name character
#' \item \emph{ @param } snapshot.id character
#' \item \emph{ @param } payload list( object )
#'
#'
#' \item status code : 200 | the indicated configuration ACL once the posted changes have been applied
#'
#' \item return type : array[object]
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 400 | Bad Request
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Internal Server Error
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ SetConfigNamespaceACL } \emph{ set ACL permissions on a Method Repository Configuration Namespace }
#'
#'
#' \itemize{
#' \item \emph{ @param } namespace character
#' \item \emph{ @param } payload list( object )
#' \item \emph{ @returnType } list( \link{array} ) \cr
#'
#'
#' \item status code : 200 | the indicated configuration ACL once the posted changes have been applied
#'
#' \item return type : array[Array]
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 400 | Invalid content format
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 403 | User does not have correct permissions to manage namespace permissions or the indicated namespace was not found
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Internal Server Error
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ SetMethodACL } \emph{ set ACL permissions on a Method Repository method }
#'
#'
#' \itemize{
#' \item \emph{ @param } namespace character
#' \item \emph{ @param } name character
#' \item \emph{ @param } snapshot.id character
#' \item \emph{ @param } payload list( object )
#'
#'
#' \item status code : 200 | the indicated method ACL once the posted changes have been applied
#'
#' \item return type : array[object]
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 400 | Bad Request
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Internal Server Error
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' \strong{ SetMethodNamespaceACL } \emph{ set ACL permissions on a Method Repository Method Namespace }
#'
#'
#' \itemize{
#' \item \emph{ @param } namespace character
#' \item \emph{ @param } payload list( object )
#'
#'
#' \item status code : 200 | the indicated method namespace ACL permissions once the posted changes have been applied
#'
#' \item return type : array[object]
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 400 | Invalid content format
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 403 | User does not have correct permissions to manage namespace permissions or the indicated namespace was not found
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' \item status code : 500 | Internal Server Error
#'
#'
#' \item response headers :
#'
#' \tabular{ll}{
#' }
#' }
#'
#' }
#'
#'
#' @examples
#' \dontrun{
#' #################### ApiConfigurationsNamespaceNameSnapshotIdDelete ####################
#'
#' library(openapi)
#' var.namespace <- 'namespace_example' # character | Method Configuration Namespace
#' var.name <- 'name_example' # character | Method Configuration Name
#' var.snapshot.id <- 'snapshot.id_example' # character | Method Configuration snapshot ID
#'
#' #Redact a single configuration.
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$ApiConfigurationsNamespaceNameSnapshotIdDelete(var.namespace, var.name, var.snapshot.id)
#'
#'
#' #################### ApiConfigurationsPost ####################
#'
#' library(openapi)
#' var.body <- ConfigurationQuery$new() # ConfigurationQuery | Agora Entity
#'
#' #Add a configuration.
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$ApiConfigurationsPost(body=var.body)
#'
#'
#' #################### ApiMethodsDefinitionsGet ####################
#'
#' library(openapi)
#'
#' #List method definitions
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$ApiMethodsDefinitionsGet()
#'
#'
#' #################### ApiMethodsNamespaceNameConfigurationsGet ####################
#'
#' library(openapi)
#' var.namespace <- 'namespace_example' # character | Namespace of method.
#' var.name <- 'name_example' # character | Name of method.
#'
#' #List configurations associated with a method
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$ApiMethodsNamespaceNameConfigurationsGet(var.namespace, var.name)
#'
#'
#' #################### ApiMethodsNamespaceNameSnapshotIdConfigurationsGet ####################
#'
#' library(openapi)
#' var.namespace <- 'namespace_example' # character | Method Namespace
#' var.name <- 'name_example' # character | Method Name
#' var.snapshot.id <- 'snapshot.id_example' # character | Method snapshot ID
#'
#' #List compatible configurations for this method snapshot
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$ApiMethodsNamespaceNameSnapshotIdConfigurationsGet(var.namespace, var.name, var.snapshot.id)
#'
#'
#' #################### ApiMethodsNamespaceNameSnapshotIdDelete ####################
#'
#' library(openapi)
#' var.namespace <- 'namespace_example' # character | Method Namespace
#' var.name <- 'name_example' # character | Method Name
#' var.snapshot.id <- 'snapshot.id_example' # character | Method snapshot ID
#'
#' #Redact a single method.
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$ApiMethodsNamespaceNameSnapshotIdDelete(var.namespace, var.name, var.snapshot.id)
#'
#'
#' #################### ApiMethodsNamespaceNameSnapshotIdGet ####################
#'
#' library(openapi)
#' var.namespace <- 'namespace_example' # character | Method Namespace
#' var.name <- 'name_example' # character | Method Name
#' var.snapshot.id <- 'snapshot.id_example' # character | Method snapshot ID
#' var.only.payload <- FALSE # character | Boolean to return only the payload of the method.
#'
#' #Find a single method.
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$ApiMethodsNamespaceNameSnapshotIdGet(var.namespace, var.name, var.snapshot.id, only.payload=var.only.payload)
#'
#'
#' #################### ApiMethodsNamespaceNameSnapshotIdPost ####################
#'
#' library(openapi)
#' var.namespace <- 'namespace_example' # character | Method Namespace
#' var.name <- 'name_example' # character | Method Name
#' var.snapshot.id <- 'snapshot.id_example' # character | Method snapshot ID
#' var.redact <- FALSE # character | Should the source method be redacted?
#' var.body <- InlineObject1$new() # InlineObject1 |
#'
#' #Create a new snapshot of an existing Method.
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$ApiMethodsNamespaceNameSnapshotIdPost(var.namespace, var.name, var.snapshot.id, redact=var.redact, body=var.body)
#'
#'
#' #################### ApiMethodsPost ####################
#'
#' library(openapi)
#' var.body <- MethodQuery$new() # MethodQuery | Agora Entity
#'
#' #Add a Method.
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$ApiMethodsPost(body=var.body)
#'
#'
#' #################### CopyFromMethodRepo ####################
#'
#' library(openapi)
#' var.workspace.namespace <- 'workspace.namespace_example' # character | Workspace Namespace
#' var.workspace.name <- 'workspace.name_example' # character | Workspace Name
#' var.config.to.copy <- CopyConfigurationIngest$new() # CopyConfigurationIngest | Method Configuration to Copy
#'
#' #Copy a Method Repository Configuration into a workspace
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$CopyFromMethodRepo(var.workspace.namespace, var.workspace.name, var.config.to.copy)
#'
#'
#' #################### CopyToMethodRepo ####################
#'
#' library(openapi)
#' var.workspace.namespace <- 'workspace.namespace_example' # character | Workspace Namespace
#' var.workspace.name <- 'workspace.name_example' # character | Workspace Name
#' var.config.to.copy <- PublishConfigurationIngest$new() # PublishConfigurationIngest | Method Configuration to Copy
#'
#' #Copy a Method Config in a workspace to the Method Repository
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$CopyToMethodRepo(var.workspace.namespace, var.workspace.name, var.config.to.copy)
#'
#'
#' #################### CreateMethodTemplate ####################
#'
#' library(openapi)
#' var.method.name <- MethodID$new() # MethodID | name of Method to use for template
#'
#' #Create a Method Configuration template from a Method
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$CreateMethodTemplate(var.method.name)
#'
#'
#' #################### GetConfigACL ####################
#'
#' library(openapi)
#' var.namespace <- 'namespace_example' # character | Method Configuration Namespace
#' var.name <- 'name_example' # character | Method Configuration Name
#' var.snapshot.id <- 'snapshot.id_example' # character | Method Configuration snapshot ID
#'
#' #get ACL permissions on a Method Repository configuration
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$GetConfigACL(var.namespace, var.name, var.snapshot.id)
#'
#'
#' #################### GetConfigNamespaceACL ####################
#'
#' library(openapi)
#' var.namespace <- 'namespace_example' # character | Method Configuration Namespace
#'
#' #get ACL permissions on a Method Repository Configuration Namespace
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$GetConfigNamespaceACL(var.namespace)
#'
#'
#' #################### GetMethodACL ####################
#'
#' library(openapi)
#' var.namespace <- 'namespace_example' # character | Method Namespace
#' var.name <- 'name_example' # character | Method Name
#' var.snapshot.id <- 'snapshot.id_example' # character | Method snapshot ID
#'
#' #get ACL permissions on a Method Repository method
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$GetMethodACL(var.namespace, var.name, var.snapshot.id)
#'
#'
#' #################### GetMethodIO ####################
#'
#' library(openapi)
#' var.method.name <- MethodID$new() # MethodID | name of Method to look up
#'
#' #Get information about a method's inputs and outputs
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$GetMethodIO(var.method.name)
#'
#'
#' #################### GetMethodNamespaceACL ####################
#'
#' library(openapi)
#' var.namespace <- 'namespace_example' # character | Method Namespace
#'
#' #get ACL permissions on a Method Repository Method Namespace
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$GetMethodNamespaceACL(var.namespace)
#'
#'
#' #################### GetMethodRepositoryConfiguration ####################
#'
#' library(openapi)
#' var.namespace <- 'namespace_example' # character | Method Configuration Namespace
#' var.name <- 'name_example' # character | Method Configuration Name
#' var.snapshot.id <- 'snapshot.id_example' # character | Method Configuration snapshot ID
#' var.payload.as.object <- FALSE # character | Instead of returning a string under key payload, return a JSON object under key payloadObject
#'
#' #Get a Method Repository configuration
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$GetMethodRepositoryConfiguration(var.namespace, var.name, var.snapshot.id, payload.as.object=var.payload.as.object)
#'
#'
#' #################### ListMethodRepositoryConfigurations ####################
#'
#' library(openapi)
#' var.namespace <- 'namespace_example' # character | Namespace of configuration.
#' var.name <- 'name_example' # character | Name of configuration.
#' var.snapshot.id <- 56 # integer | Snapshot ID of configuration.
#' var.snapshot.comment <- 'snapshot.comment_example' # character | Snapshot comment of AgoraEntity
#' var.synopsis <- 'synopsis_example' # character | Synopsis of configuration.
#' var.documentation <- 'documentation_example' # character | Documentation of configuration.
#' var.owner <- 'owner_example' # character | Owner of configuration.
#' var.payload <- 'payload_example' # character | Payload of configuration in WDL.
#' var.entity.type <- 'entity.type_example' # character | Type of configuration - Task or Workflow
#'
#' #List Method Repository configurations.
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$ListMethodRepositoryConfigurations(namespace=var.namespace, name=var.name, snapshot.id=var.snapshot.id, snapshot.comment=var.snapshot.comment, synopsis=var.synopsis, documentation=var.documentation, owner=var.owner, payload=var.payload, entity.type=var.entity.type)
#'
#'
#' #################### ListMethodRepositoryMethods ####################
#'
#' library(openapi)
#' var.namespace <- 'namespace_example' # character | Namespace of method.
#' var.name <- 'name_example' # character | Name of method.
#' var.snapshot.id <- 56 # integer | Snapshot ID of method.
#' var.snapshot.comment <- 'snapshot.comment_example' # character | Snapshot comment of AgoraEntity
#' var.synopsis <- 'synopsis_example' # character | Synopsis of method.
#' var.documentation <- 'documentation_example' # character | Documentation of method.
#' var.owner <- 'owner_example' # character | Owner of method.
#' var.payload <- 'payload_example' # character | Payload of method in WDL.
#' var.entity.type <- 'entity.type_example' # character | Type of Method - Task or Workflow
#'
#' #Lists Method Repository methods.
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$ListMethodRepositoryMethods(namespace=var.namespace, name=var.name, snapshot.id=var.snapshot.id, snapshot.comment=var.snapshot.comment, synopsis=var.synopsis, documentation=var.documentation, owner=var.owner, payload=var.payload, entity.type=var.entity.type)
#'
#'
#' #################### MultiUpsertMethodsACL ####################
#'
#' library(openapi)
#' var.methodacls <- [MethodAclPair$new()] # array[MethodAclPair] | method acls to upsert
#'
#' #set ACLs for multiple methods in one call
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$MultiUpsertMethodsACL(var.methodacls)
#'
#'
#' #################### SetConfigACL ####################
#'
#' library(openapi)
#' var.namespace <- 'namespace_example' # character | Method Configuration Namespace
#' var.name <- 'name_example' # character | Method Configuration Name
#' var.snapshot.id <- 'snapshot.id_example' # character | Method Configuration snapshot ID
#' var.payload <- NULL # array[object] | the ACLs to upsert
#'
#' #set ACL permissions on a Method Repository configuration
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$SetConfigACL(var.namespace, var.name, var.snapshot.id, var.payload)
#'
#'
#' #################### SetConfigNamespaceACL ####################
#'
#' library(openapi)
#' var.namespace <- 'namespace_example' # character | Method Configuration Namespace
#' var.payload <- NULL # array[object] | the ACLs to upsert
#'
#' #set ACL permissions on a Method Repository Configuration Namespace
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$SetConfigNamespaceACL(var.namespace, var.payload)
#'
#'
#' #################### SetMethodACL ####################
#'
#' library(openapi)
#' var.namespace <- 'namespace_example' # character | Method Namespace
#' var.name <- 'name_example' # character | Method Name
#' var.snapshot.id <- 'snapshot.id_example' # character | Method snapshot ID
#' var.payload <- NULL # array[object] | the ACLs to upsert
#'
#' #set ACL permissions on a Method Repository method
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$SetMethodACL(var.namespace, var.name, var.snapshot.id, var.payload)
#'
#'
#' #################### SetMethodNamespaceACL ####################
#'
#' library(openapi)
#' var.namespace <- 'namespace_example' # character | Method Namespace
#' var.payload <- NULL # array[object] | the ACLs to upsert
#'
#' #set ACL permissions on a Method Repository Method Namespace
#' api.instance <- MethodRepositoryApi$new()
#'
#' # Configure OAuth2 access token for authorization: googleoauth
#' api.instance$apiClient$accessToken <- 'TODO_YOUR_ACCESS_TOKEN';
#'
#' result <- api.instance$SetMethodNamespaceACL(var.namespace, var.payload)
#'
#'
#' }
#' @importFrom R6 R6Class
#' @importFrom base64enc base64encode
#' @export
MethodRepositoryApi <- R6::R6Class(
'MethodRepositoryApi',
public = list(
apiClient = NULL,
initialize = function(apiClient){
if (!missing(apiClient)) {
self$apiClient <- apiClient
}
else {
self$apiClient <- ApiClient$new()
}
},
ApiConfigurationsNamespaceNameSnapshotIdDelete = function(namespace, name, snapshot.id, ...){
apiResponse <- self$ApiConfigurationsNamespaceNameSnapshotIdDeleteWithHttpInfo(namespace, name, snapshot.id, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
ApiConfigurationsNamespaceNameSnapshotIdDeleteWithHttpInfo = function(namespace, name, snapshot.id, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`namespace`)) {
stop("Missing required parameter `namespace`.")
}
if (missing(`name`)) {
stop("Missing required parameter `name`.")
}
if (missing(`snapshot.id`)) {
stop("Missing required parameter `snapshot.id`.")
}
body <- NULL
urlPath <- "/api/configurations/{namespace}/{name}/{snapshotId}"
if (!missing(`namespace`)) {
urlPath <- gsub(paste0("\\{", "namespace", "\\}"), URLencode(as.character(`namespace`), reserved = TRUE), urlPath)
}
if (!missing(`name`)) {
urlPath <- gsub(paste0("\\{", "name", "\\}"), URLencode(as.character(`name`), reserved = TRUE), urlPath)
}
if (!missing(`snapshot.id`)) {
urlPath <- gsub(paste0("\\{", "snapshotId", "\\}"), URLencode(as.character(`snapshot.id`), reserved = TRUE), urlPath)
}
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "integer", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
ApiConfigurationsPost = function(body=NULL, ...){
apiResponse <- self$ApiConfigurationsPostWithHttpInfo(body, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
ApiConfigurationsPostWithHttpInfo = function(body=NULL, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/api/configurations"
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "ConfigurationResponse", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
ApiMethodsDefinitionsGet = function(...){
apiResponse <- self$ApiMethodsDefinitionsGetWithHttpInfo(...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
ApiMethodsDefinitionsGetWithHttpInfo = function(...){
args <- list(...)
queryParams <- list()
headerParams <- c()
body <- NULL
urlPath <- "/api/methods/definitions"
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "array[MethodDefinition]", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
ApiMethodsNamespaceNameConfigurationsGet = function(namespace, name, ...){
apiResponse <- self$ApiMethodsNamespaceNameConfigurationsGetWithHttpInfo(namespace, name, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
ApiMethodsNamespaceNameConfigurationsGetWithHttpInfo = function(namespace, name, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`namespace`)) {
stop("Missing required parameter `namespace`.")
}
if (missing(`name`)) {
stop("Missing required parameter `name`.")
}
body <- NULL
urlPath <- "/api/methods/{namespace}/{name}/configurations"
if (!missing(`namespace`)) {
urlPath <- gsub(paste0("\\{", "namespace", "\\}"), URLencode(as.character(`namespace`), reserved = TRUE), urlPath)
}
if (!missing(`name`)) {
urlPath <- gsub(paste0("\\{", "name", "\\}"), URLencode(as.character(`name`), reserved = TRUE), urlPath)
}
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "array[ConfigurationResponseWithPayloadObject]", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
ApiMethodsNamespaceNameSnapshotIdConfigurationsGet = function(namespace, name, snapshot.id, ...){
apiResponse <- self$ApiMethodsNamespaceNameSnapshotIdConfigurationsGetWithHttpInfo(namespace, name, snapshot.id, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
ApiMethodsNamespaceNameSnapshotIdConfigurationsGetWithHttpInfo = function(namespace, name, snapshot.id, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`namespace`)) {
stop("Missing required parameter `namespace`.")
}
if (missing(`name`)) {
stop("Missing required parameter `name`.")
}
if (missing(`snapshot.id`)) {
stop("Missing required parameter `snapshot.id`.")
}
body <- NULL
urlPath <- "/api/methods/{namespace}/{name}/{snapshotId}/configurations"
if (!missing(`namespace`)) {
urlPath <- gsub(paste0("\\{", "namespace", "\\}"), URLencode(as.character(`namespace`), reserved = TRUE), urlPath)
}
if (!missing(`name`)) {
urlPath <- gsub(paste0("\\{", "name", "\\}"), URLencode(as.character(`name`), reserved = TRUE), urlPath)
}
if (!missing(`snapshot.id`)) {
urlPath <- gsub(paste0("\\{", "snapshotId", "\\}"), URLencode(as.character(`snapshot.id`), reserved = TRUE), urlPath)
}
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "array[ConfigurationResponseWithPayloadObject]", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
ApiMethodsNamespaceNameSnapshotIdDelete = function(namespace, name, snapshot.id, ...){
apiResponse <- self$ApiMethodsNamespaceNameSnapshotIdDeleteWithHttpInfo(namespace, name, snapshot.id, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
ApiMethodsNamespaceNameSnapshotIdDeleteWithHttpInfo = function(namespace, name, snapshot.id, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`namespace`)) {
stop("Missing required parameter `namespace`.")
}
if (missing(`name`)) {
stop("Missing required parameter `name`.")
}
if (missing(`snapshot.id`)) {
stop("Missing required parameter `snapshot.id`.")
}
body <- NULL
urlPath <- "/api/methods/{namespace}/{name}/{snapshotId}"
if (!missing(`namespace`)) {
urlPath <- gsub(paste0("\\{", "namespace", "\\}"), URLencode(as.character(`namespace`), reserved = TRUE), urlPath)
}
if (!missing(`name`)) {
urlPath <- gsub(paste0("\\{", "name", "\\}"), URLencode(as.character(`name`), reserved = TRUE), urlPath)
}
if (!missing(`snapshot.id`)) {
urlPath <- gsub(paste0("\\{", "snapshotId", "\\}"), URLencode(as.character(`snapshot.id`), reserved = TRUE), urlPath)
}
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "DELETE",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "integer", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
ApiMethodsNamespaceNameSnapshotIdGet = function(namespace, name, snapshot.id, only.payload=FALSE, ...){
apiResponse <- self$ApiMethodsNamespaceNameSnapshotIdGetWithHttpInfo(namespace, name, snapshot.id, only.payload, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
ApiMethodsNamespaceNameSnapshotIdGetWithHttpInfo = function(namespace, name, snapshot.id, only.payload=FALSE, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`namespace`)) {
stop("Missing required parameter `namespace`.")
}
if (missing(`name`)) {
stop("Missing required parameter `name`.")
}
if (missing(`snapshot.id`)) {
stop("Missing required parameter `snapshot.id`.")
}
queryParams['onlyPayload'] <- only.payload
body <- NULL
urlPath <- "/api/methods/{namespace}/{name}/{snapshotId}"
if (!missing(`namespace`)) {
urlPath <- gsub(paste0("\\{", "namespace", "\\}"), URLencode(as.character(`namespace`), reserved = TRUE), urlPath)
}
if (!missing(`name`)) {
urlPath <- gsub(paste0("\\{", "name", "\\}"), URLencode(as.character(`name`), reserved = TRUE), urlPath)
}
if (!missing(`snapshot.id`)) {
urlPath <- gsub(paste0("\\{", "snapshotId", "\\}"), URLencode(as.character(`snapshot.id`), reserved = TRUE), urlPath)
}
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "MethodResponse", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
ApiMethodsNamespaceNameSnapshotIdPost = function(namespace, name, snapshot.id, redact=FALSE, body=NULL, ...){
apiResponse <- self$ApiMethodsNamespaceNameSnapshotIdPostWithHttpInfo(namespace, name, snapshot.id, redact, body, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
ApiMethodsNamespaceNameSnapshotIdPostWithHttpInfo = function(namespace, name, snapshot.id, redact=FALSE, body=NULL, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`namespace`)) {
stop("Missing required parameter `namespace`.")
}
if (missing(`name`)) {
stop("Missing required parameter `name`.")
}
if (missing(`snapshot.id`)) {
stop("Missing required parameter `snapshot.id`.")
}
queryParams['redact'] <- redact
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/api/methods/{namespace}/{name}/{snapshotId}"
if (!missing(`namespace`)) {
urlPath <- gsub(paste0("\\{", "namespace", "\\}"), URLencode(as.character(`namespace`), reserved = TRUE), urlPath)
}
if (!missing(`name`)) {
urlPath <- gsub(paste0("\\{", "name", "\\}"), URLencode(as.character(`name`), reserved = TRUE), urlPath)
}
if (!missing(`snapshot.id`)) {
urlPath <- gsub(paste0("\\{", "snapshotId", "\\}"), URLencode(as.character(`snapshot.id`), reserved = TRUE), urlPath)
}
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "MethodResponse", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
ApiMethodsPost = function(body=NULL, ...){
apiResponse <- self$ApiMethodsPostWithHttpInfo(body, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
ApiMethodsPostWithHttpInfo = function(body=NULL, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/api/methods"
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "MethodResponse", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
CopyFromMethodRepo = function(workspace.namespace, workspace.name, config.to.copy, ...){
apiResponse <- self$CopyFromMethodRepoWithHttpInfo(workspace.namespace, workspace.name, config.to.copy, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
CopyFromMethodRepoWithHttpInfo = function(workspace.namespace, workspace.name, config.to.copy, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`workspace.namespace`)) {
stop("Missing required parameter `workspace.namespace`.")
}
if (missing(`workspace.name`)) {
stop("Missing required parameter `workspace.name`.")
}
if (missing(`config.to.copy`)) {
stop("Missing required parameter `config.to.copy`.")
}
if (!missing(`config.to.copy`)) {
body <- `config.to.copy`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/api/workspaces/{workspaceNamespace}/{workspaceName}/method_configs/copyFromMethodRepo"
if (!missing(`workspace.namespace`)) {
urlPath <- gsub(paste0("\\{", "workspaceNamespace", "\\}"), URLencode(as.character(`workspace.namespace`), reserved = TRUE), urlPath)
}
if (!missing(`workspace.name`)) {
urlPath <- gsub(paste0("\\{", "workspaceName", "\\}"), URLencode(as.character(`workspace.name`), reserved = TRUE), urlPath)
}
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
ApiResponse$new(NULL, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
CopyToMethodRepo = function(workspace.namespace, workspace.name, config.to.copy, ...){
apiResponse <- self$CopyToMethodRepoWithHttpInfo(workspace.namespace, workspace.name, config.to.copy, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
CopyToMethodRepoWithHttpInfo = function(workspace.namespace, workspace.name, config.to.copy, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`workspace.namespace`)) {
stop("Missing required parameter `workspace.namespace`.")
}
if (missing(`workspace.name`)) {
stop("Missing required parameter `workspace.name`.")
}
if (missing(`config.to.copy`)) {
stop("Missing required parameter `config.to.copy`.")
}
if (!missing(`config.to.copy`)) {
body <- `config.to.copy`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/api/workspaces/{workspaceNamespace}/{workspaceName}/method_configs/copyToMethodRepo"
if (!missing(`workspace.namespace`)) {
urlPath <- gsub(paste0("\\{", "workspaceNamespace", "\\}"), URLencode(as.character(`workspace.namespace`), reserved = TRUE), urlPath)
}
if (!missing(`workspace.name`)) {
urlPath <- gsub(paste0("\\{", "workspaceName", "\\}"), URLencode(as.character(`workspace.name`), reserved = TRUE), urlPath)
}
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
ApiResponse$new(NULL, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
CreateMethodTemplate = function(method.name, ...){
apiResponse <- self$CreateMethodTemplateWithHttpInfo(method.name, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
CreateMethodTemplateWithHttpInfo = function(method.name, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`method.name`)) {
stop("Missing required parameter `method.name`.")
}
if (!missing(`method.name`)) {
body <- `method.name`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/api/template"
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
ApiResponse$new(NULL, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
GetConfigACL = function(namespace, name, snapshot.id, ...){
apiResponse <- self$GetConfigACLWithHttpInfo(namespace, name, snapshot.id, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
GetConfigACLWithHttpInfo = function(namespace, name, snapshot.id, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`namespace`)) {
stop("Missing required parameter `namespace`.")
}
if (missing(`name`)) {
stop("Missing required parameter `name`.")
}
if (missing(`snapshot.id`)) {
stop("Missing required parameter `snapshot.id`.")
}
body <- NULL
urlPath <- "/api/configurations/{namespace}/{name}/{snapshotId}/permissions"
if (!missing(`namespace`)) {
urlPath <- gsub(paste0("\\{", "namespace", "\\}"), URLencode(as.character(`namespace`), reserved = TRUE), urlPath)
}
if (!missing(`name`)) {
urlPath <- gsub(paste0("\\{", "name", "\\}"), URLencode(as.character(`name`), reserved = TRUE), urlPath)
}
if (!missing(`snapshot.id`)) {
urlPath <- gsub(paste0("\\{", "snapshotId", "\\}"), URLencode(as.character(`snapshot.id`), reserved = TRUE), urlPath)
}
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "array[object]", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
GetConfigNamespaceACL = function(namespace, ...){
apiResponse <- self$GetConfigNamespaceACLWithHttpInfo(namespace, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
GetConfigNamespaceACLWithHttpInfo = function(namespace, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`namespace`)) {
stop("Missing required parameter `namespace`.")
}
body <- NULL
urlPath <- "/api/configurations/{namespace}/permissions"
if (!missing(`namespace`)) {
urlPath <- gsub(paste0("\\{", "namespace", "\\}"), URLencode(as.character(`namespace`), reserved = TRUE), urlPath)
}
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "array[object]", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
GetMethodACL = function(namespace, name, snapshot.id, ...){
apiResponse <- self$GetMethodACLWithHttpInfo(namespace, name, snapshot.id, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
GetMethodACLWithHttpInfo = function(namespace, name, snapshot.id, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`namespace`)) {
stop("Missing required parameter `namespace`.")
}
if (missing(`name`)) {
stop("Missing required parameter `name`.")
}
if (missing(`snapshot.id`)) {
stop("Missing required parameter `snapshot.id`.")
}
body <- NULL
urlPath <- "/api/methods/{namespace}/{name}/{snapshotId}/permissions"
if (!missing(`namespace`)) {
urlPath <- gsub(paste0("\\{", "namespace", "\\}"), URLencode(as.character(`namespace`), reserved = TRUE), urlPath)
}
if (!missing(`name`)) {
urlPath <- gsub(paste0("\\{", "name", "\\}"), URLencode(as.character(`name`), reserved = TRUE), urlPath)
}
if (!missing(`snapshot.id`)) {
urlPath <- gsub(paste0("\\{", "snapshotId", "\\}"), URLencode(as.character(`snapshot.id`), reserved = TRUE), urlPath)
}
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "array[object]", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
GetMethodIO = function(method.name, ...){
apiResponse <- self$GetMethodIOWithHttpInfo(method.name, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
GetMethodIOWithHttpInfo = function(method.name, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`method.name`)) {
stop("Missing required parameter `method.name`.")
}
if (!missing(`method.name`)) {
body <- `method.name`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/api/inputsOutputs"
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
ApiResponse$new(NULL, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
GetMethodNamespaceACL = function(namespace, ...){
apiResponse <- self$GetMethodNamespaceACLWithHttpInfo(namespace, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
GetMethodNamespaceACLWithHttpInfo = function(namespace, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`namespace`)) {
stop("Missing required parameter `namespace`.")
}
body <- NULL
urlPath <- "/api/methods/{namespace}/permissions"
if (!missing(`namespace`)) {
urlPath <- gsub(paste0("\\{", "namespace", "\\}"), URLencode(as.character(`namespace`), reserved = TRUE), urlPath)
}
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "array[object]", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
GetMethodRepositoryConfiguration = function(namespace, name, snapshot.id, payload.as.object=FALSE, ...){
apiResponse <- self$GetMethodRepositoryConfigurationWithHttpInfo(namespace, name, snapshot.id, payload.as.object, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
GetMethodRepositoryConfigurationWithHttpInfo = function(namespace, name, snapshot.id, payload.as.object=FALSE, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`namespace`)) {
stop("Missing required parameter `namespace`.")
}
if (missing(`name`)) {
stop("Missing required parameter `name`.")
}
if (missing(`snapshot.id`)) {
stop("Missing required parameter `snapshot.id`.")
}
queryParams['payloadAsObject'] <- payload.as.object
body <- NULL
urlPath <- "/api/configurations/{namespace}/{name}/{snapshotId}"
if (!missing(`namespace`)) {
urlPath <- gsub(paste0("\\{", "namespace", "\\}"), URLencode(as.character(`namespace`), reserved = TRUE), urlPath)
}
if (!missing(`name`)) {
urlPath <- gsub(paste0("\\{", "name", "\\}"), URLencode(as.character(`name`), reserved = TRUE), urlPath)
}
if (!missing(`snapshot.id`)) {
urlPath <- gsub(paste0("\\{", "snapshotId", "\\}"), URLencode(as.character(`snapshot.id`), reserved = TRUE), urlPath)
}
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "ConfigurationResponse", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
ListMethodRepositoryConfigurations = function(namespace=NULL, name=NULL, snapshot.id=NULL, snapshot.comment=NULL, synopsis=NULL, documentation=NULL, owner=NULL, payload=NULL, entity.type=NULL, ...){
apiResponse <- self$ListMethodRepositoryConfigurationsWithHttpInfo(namespace, name, snapshot.id, snapshot.comment, synopsis, documentation, owner, payload, entity.type, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
ListMethodRepositoryConfigurationsWithHttpInfo = function(namespace=NULL, name=NULL, snapshot.id=NULL, snapshot.comment=NULL, synopsis=NULL, documentation=NULL, owner=NULL, payload=NULL, entity.type=NULL, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
queryParams['namespace'] <- namespace
queryParams['name'] <- name
queryParams['snapshotId'] <- snapshot.id
queryParams['snapshotComment'] <- snapshot.comment
queryParams['synopsis'] <- synopsis
queryParams['documentation'] <- documentation
queryParams['owner'] <- owner
queryParams['payload'] <- payload
queryParams['entityType'] <- entity.type
body <- NULL
urlPath <- "/api/configurations"
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "array[ConfigurationResponse]", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
ListMethodRepositoryMethods = function(namespace=NULL, name=NULL, snapshot.id=NULL, snapshot.comment=NULL, synopsis=NULL, documentation=NULL, owner=NULL, payload=NULL, entity.type=NULL, ...){
apiResponse <- self$ListMethodRepositoryMethodsWithHttpInfo(namespace, name, snapshot.id, snapshot.comment, synopsis, documentation, owner, payload, entity.type, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
ListMethodRepositoryMethodsWithHttpInfo = function(namespace=NULL, name=NULL, snapshot.id=NULL, snapshot.comment=NULL, synopsis=NULL, documentation=NULL, owner=NULL, payload=NULL, entity.type=NULL, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
queryParams['namespace'] <- namespace
queryParams['name'] <- name
queryParams['snapshotId'] <- snapshot.id
queryParams['snapshotComment'] <- snapshot.comment
queryParams['synopsis'] <- synopsis
queryParams['documentation'] <- documentation
queryParams['owner'] <- owner
queryParams['payload'] <- payload
queryParams['entityType'] <- entity.type
body <- NULL
urlPath <- "/api/methods"
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "GET",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "array[MethodResponse]", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
MultiUpsertMethodsACL = function(methodacls, ...){
apiResponse <- self$MultiUpsertMethodsACLWithHttpInfo(methodacls, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
MultiUpsertMethodsACLWithHttpInfo = function(methodacls, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`methodacls`)) {
stop("Missing required parameter `methodacls`.")
}
if (!missing(`methodacls`)) {
body.items = paste(unlist(lapply(methodacls, function(param){param$toJSONString()})), collapse = ",")
body <- paste0('[', body.items, ']')
} else {
body <- NULL
}
urlPath <- "/api/methods/permissions"
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "PUT",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "array[MethodAclPair]", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
SetConfigACL = function(namespace, name, snapshot.id, payload, ...){
apiResponse <- self$SetConfigACLWithHttpInfo(namespace, name, snapshot.id, payload, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
SetConfigACLWithHttpInfo = function(namespace, name, snapshot.id, payload, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`namespace`)) {
stop("Missing required parameter `namespace`.")
}
if (missing(`name`)) {
stop("Missing required parameter `name`.")
}
if (missing(`snapshot.id`)) {
stop("Missing required parameter `snapshot.id`.")
}
if (missing(`payload`)) {
stop("Missing required parameter `payload`.")
}
if (!missing(`payload`)) {
body.items = paste(unlist(lapply(payload, function(param){param$toJSONString()})), collapse = ",")
body <- paste0('[', body.items, ']')
} else {
body <- NULL
}
urlPath <- "/api/configurations/{namespace}/{name}/{snapshotId}/permissions"
if (!missing(`namespace`)) {
urlPath <- gsub(paste0("\\{", "namespace", "\\}"), URLencode(as.character(`namespace`), reserved = TRUE), urlPath)
}
if (!missing(`name`)) {
urlPath <- gsub(paste0("\\{", "name", "\\}"), URLencode(as.character(`name`), reserved = TRUE), urlPath)
}
if (!missing(`snapshot.id`)) {
urlPath <- gsub(paste0("\\{", "snapshotId", "\\}"), URLencode(as.character(`snapshot.id`), reserved = TRUE), urlPath)
}
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "array[object]", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
SetConfigNamespaceACL = function(namespace, payload, ...){
apiResponse <- self$SetConfigNamespaceACLWithHttpInfo(namespace, payload, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
SetConfigNamespaceACLWithHttpInfo = function(namespace, payload, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`namespace`)) {
stop("Missing required parameter `namespace`.")
}
if (missing(`payload`)) {
stop("Missing required parameter `payload`.")
}
if (!missing(`payload`)) {
body.items = paste(unlist(lapply(payload, function(param){param$toJSONString()})), collapse = ",")
body <- paste0('[', body.items, ']')
} else {
body <- NULL
}
urlPath <- "/api/configurations/{namespace}/permissions"
if (!missing(`namespace`)) {
urlPath <- gsub(paste0("\\{", "namespace", "\\}"), URLencode(as.character(`namespace`), reserved = TRUE), urlPath)
}
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "array[Array]", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
SetMethodACL = function(namespace, name, snapshot.id, payload, ...){
apiResponse <- self$SetMethodACLWithHttpInfo(namespace, name, snapshot.id, payload, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
SetMethodACLWithHttpInfo = function(namespace, name, snapshot.id, payload, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`namespace`)) {
stop("Missing required parameter `namespace`.")
}
if (missing(`name`)) {
stop("Missing required parameter `name`.")
}
if (missing(`snapshot.id`)) {
stop("Missing required parameter `snapshot.id`.")
}
if (missing(`payload`)) {
stop("Missing required parameter `payload`.")
}
if (!missing(`payload`)) {
body.items = paste(unlist(lapply(payload, function(param){param$toJSONString()})), collapse = ",")
body <- paste0('[', body.items, ']')
} else {
body <- NULL
}
urlPath <- "/api/methods/{namespace}/{name}/{snapshotId}/permissions"
if (!missing(`namespace`)) {
urlPath <- gsub(paste0("\\{", "namespace", "\\}"), URLencode(as.character(`namespace`), reserved = TRUE), urlPath)
}
if (!missing(`name`)) {
urlPath <- gsub(paste0("\\{", "name", "\\}"), URLencode(as.character(`name`), reserved = TRUE), urlPath)
}
if (!missing(`snapshot.id`)) {
urlPath <- gsub(paste0("\\{", "snapshotId", "\\}"), URLencode(as.character(`snapshot.id`), reserved = TRUE), urlPath)
}
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "array[object]", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
},
SetMethodNamespaceACL = function(namespace, payload, ...){
apiResponse <- self$SetMethodNamespaceACLWithHttpInfo(namespace, payload, ...)
resp <- apiResponse$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
apiResponse$content
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
apiResponse
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
apiResponse
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
apiResponse
}
},
SetMethodNamespaceACLWithHttpInfo = function(namespace, payload, ...){
args <- list(...)
queryParams <- list()
headerParams <- c()
if (missing(`namespace`)) {
stop("Missing required parameter `namespace`.")
}
if (missing(`payload`)) {
stop("Missing required parameter `payload`.")
}
if (!missing(`payload`)) {
body.items = paste(unlist(lapply(payload, function(param){param$toJSONString()})), collapse = ",")
body <- paste0('[', body.items, ']')
} else {
body <- NULL
}
urlPath <- "/api/methods/{namespace}/permissions"
if (!missing(`namespace`)) {
urlPath <- gsub(paste0("\\{", "namespace", "\\}"), URLencode(as.character(`namespace`), reserved = TRUE), urlPath)
}
# OAuth token
headerParams['Authorization'] <- paste("Bearer", self$apiClient$accessToken, sep=" ")
resp <- self$apiClient$CallApi(url = paste0(self$apiClient$basePath, urlPath),
method = "POST",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
deserializedRespObj <- tryCatch(
self$apiClient$deserialize(resp, "array[object]", loadNamespace("openapi")),
error = function(e){
stop("Failed to deserialize response")
}
)
ApiResponse$new(deserializedRespObj, resp)
} else if (httr::status_code(resp) >= 300 && httr::status_code(resp) <= 399) {
ApiResponse$new(paste("Server returned " , httr::status_code(resp) , " response status code."), resp)
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
ApiResponse$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
ApiResponse$new("API server error", resp)
}
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.