# Looker API 4.0 (Beta) Reference
#
# Welcome to the future! API 4.0 co-exists with APIs 3.1 and 3.0. (3.0 should no longer be used.) The \"beta\" tag means updates for API 4.0 may include breaking changes, but as always we will work to minimize them. ### Authorization The classic method of API authorization uses Looker **API3** credentials for authorization and access control. Looker admins can create API3 credentials on Looker's **Admin/Users** page. API 4.0 adds additional ways to authenticate API requests, including OAuth and CORS requests. For details, see [Looker API Authorization](https://looker.com/docs/r/api/authorization). ### API Explorer The API Explorer is a Looker-provided utility with many new and unique features for learning and using the Looker API and SDKs. It is a replacement for the 'api-docs' page currently provided on Looker instances. For details, see the [API Explorer documentation](https://looker.com/docs/r/api/explorer). ### Looker Language SDKs The Looker API is a RESTful system that should be usable by any programming language capable of making HTTPS requests. SDKs for a variety of programming languages are also provided to streamline using the API. Looker has an OpenSource [sdk-codegen project](https://github.com/looker-open-source/sdk-codegen) that provides several language SDKs. Language SDKs generated by `sdk-codegen` have an Authentication manager that can automatically authenticate API requests when needed. For details on available Looker SDKs, see [Looker API Client SDKs](https://looker.com/docs/r/api/client_sdks). ### API Versioning Future releases of Looker expand the latest API version release-by-release to securely expose more and more of the core power of the Looker platform to API client applications. API endpoints marked as \"beta\" may receive breaking changes without warning (but we will try to avoid doing that). Stable (non-beta) API endpoints should not receive breaking changes in future releases. For details, see [Looker API Versioning](https://looker.com/docs/r/api/versioning). ### In This Release API 4.0 version was introduced so we can make adjustments to API functions, parameters, and response types to fix bugs and inconsistencies. These changes fall outside the bounds of non-breaking additive changes we can make to our stable API 3.1. One benefit of these type adjustments in API 4.0 is dramatically better support for strongly typed languages like TypeScript, Kotlin, Swift, Go, C#, and more. While API 3.1 is still the de-facto Looker API (\"current\", \"stable\", \"default\", etc), the bulk of our development activity has shifted to API 4.0, where all new features are added. The API Explorer can be used to [interactively compare](https://looker.com/docs/r/api/explorer#comparing_api_versions) the differences between API 3.1 and 4.0. ### API and SDK Support Policies Looker API versions and language SDKs have varying support levels. Please read the API and SDK [support policies](https://looker.com/docs/r/api/support-policy) for more information.
#
# OpenAPI spec version: 4.0.21.18
#
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#' @title User operations
#' @description looker.User
#'
#' @field path Stores url path of the request.
#' @field apiClient Handles the client-server communication.
#' @field userAgent Set the user agent of the request.
#'
#' @importFrom R6 R6Class
#'
#' @section Methods:
#' \describe{
#'
#' all_user_credentials_api3s Get All API 3 Credentials
#'
#'
#' all_user_credentials_embeds Get All Embedding Credentials
#'
#'
#' all_user_sessions Get All Web Login Sessions
#'
#'
#' all_users Get All Users
#'
#'
#' create_embed_user Create an embed user from an external user ID
#'
#'
#' create_user Create User
#'
#'
#' create_user_credentials_api3 Create API 3 Credential
#'
#'
#' create_user_credentials_email Create Email/Password Credential
#'
#'
#' create_user_credentials_email_password_reset Create Password Reset Token
#'
#'
#' create_user_credentials_totp Create Two-Factor Credential
#'
#'
#' delete_user Delete User
#'
#'
#' delete_user_attribute_user_value Delete User Attribute User Value
#'
#'
#' delete_user_credentials_api3 Delete API 3 Credential
#'
#'
#' delete_user_credentials_email Delete Email/Password Credential
#'
#'
#' delete_user_credentials_embed Delete Embedding Credential
#'
#'
#' delete_user_credentials_google Delete Google Auth Credential
#'
#'
#' delete_user_credentials_ldap Delete LDAP Credential
#'
#'
#' delete_user_credentials_looker_openid Delete Looker OpenId Credential
#'
#'
#' delete_user_credentials_oidc Delete OIDC Auth Credential
#'
#'
#' delete_user_credentials_saml Delete Saml Auth Credential
#'
#'
#' delete_user_credentials_totp Delete Two-Factor Credential
#'
#'
#' delete_user_session Delete Web Login Session
#'
#'
#' me Get Current User
#'
#'
#' search_credentials_email Search CredentialsEmail
#'
#'
#' search_users Search Users
#'
#'
#' search_users_names Search User Names
#'
#'
#' send_user_credentials_email_password_reset Send Password Reset Token
#'
#'
#' set_user_attribute_user_value Set User Attribute User Value
#'
#'
#' set_user_roles Set User Roles
#'
#'
#' update_user Update User
#'
#'
#' update_user_credentials_email Update Email/Password Credential
#'
#'
#' user Get User by Id
#'
#'
#' user_attribute_user_values Get User Attribute Values
#'
#'
#' user_credentials_api3 Get API 3 Credential
#'
#'
#' user_credentials_email Get Email/Password Credential
#'
#'
#' user_credentials_embed Get Embedding Credential
#'
#'
#' user_credentials_google Get Google Auth Credential
#'
#'
#' user_credentials_ldap Get LDAP Credential
#'
#'
#' user_credentials_looker_openid Get Looker OpenId Credential
#'
#'
#' user_credentials_oidc Get OIDC Auth Credential
#'
#'
#' user_credentials_saml Get Saml Auth Credential
#'
#'
#' user_credentials_totp Get Two-Factor Credential
#'
#'
#' user_for_credential Get User by Credential Id
#'
#'
#' user_roles Get User Roles
#'
#'
#' user_session Get Web Login Session
#'
#'
#' wipeout_user_emails Wipeout User Emails
#'
#' }
#'
#' @export
UserApi <- R6::R6Class(
'UserApi',
public = list(
userAgent = "R-SDK",
apiClient = NULL,
initialize = function(apiClient){
if (!missing(apiClient)) {
self$apiClient <- apiClient
}
else {
self$apiClient <- ApiClient$new()
}
},
all_user_credentials_api3s = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_api3"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- CredentialsApi3$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- CredentialsApi3$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
all_user_credentials_embeds = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_embed"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- CredentialsEmbed$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- CredentialsEmbed$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
all_user_sessions = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/sessions"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- Session$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- Session$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
all_users = function(fields, page, per_page, limit, offset, sorts, ids, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`page`)) {
queryParams['page'] <- page
}
if (!missing(`per_page`)) {
queryParams['per_page'] <- per_page
}
if (!missing(`limit`)) {
queryParams['limit'] <- limit
}
if (!missing(`offset`)) {
queryParams['offset'] <- offset
}
if (!missing(`sorts`)) {
queryParams['sorts'] <- sorts
}
if (!missing(`ids`)) {
queryParams['ids'] <- ids
}
urlPath <- "/users"
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- User$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- User$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
create_embed_user = function(body, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/embed_user"
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- UserPublic$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- UserPublic$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
create_user = function(body, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users"
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- User$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- User$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
create_user_credentials_api3 = function(user_id, body, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/{user_id}/credentials_api3"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- CredentialsApi3$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- CredentialsApi3$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
create_user_credentials_email = function(user_id, body, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/{user_id}/credentials_email"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- CredentialsEmail$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- CredentialsEmail$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
create_user_credentials_email_password_reset = function(user_id, expires, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`expires`)) {
queryParams['expires'] <- expires
}
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_email/password_reset"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- CredentialsEmail$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- CredentialsEmail$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
create_user_credentials_totp = function(user_id, body, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/{user_id}/credentials_totp"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- CredentialsTotp$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- CredentialsTotp$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user = function(user_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- Character$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- Character$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_attribute_user_value = function(user_id, user_attribute_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/attribute_values/{user_attribute_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`user_attribute_id`)) {
urlPath <- gsub(paste0("\\{", "user_attribute_id", "\\}"), `user_attribute_id`, urlPath)
}
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) {
# void response, no need to return anything
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_api3 = function(user_id, credentials_api3_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_api3/{credentials_api3_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`credentials_api3_id`)) {
urlPath <- gsub(paste0("\\{", "credentials_api3_id", "\\}"), `credentials_api3_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- Character$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- Character$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_email = function(user_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_email"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- Character$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- Character$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_embed = function(user_id, credentials_embed_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_embed/{credentials_embed_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`credentials_embed_id`)) {
urlPath <- gsub(paste0("\\{", "credentials_embed_id", "\\}"), `credentials_embed_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- Character$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- Character$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_google = function(user_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_google"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- Character$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- Character$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_ldap = function(user_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_ldap"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- Character$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- Character$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_looker_openid = function(user_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_looker_openid"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- Character$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- Character$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_oidc = function(user_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_oidc"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- Character$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- Character$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_saml = function(user_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_saml"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- Character$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- Character$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_credentials_totp = function(user_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/credentials_totp"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- Character$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- Character$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
delete_user_session = function(user_id, session_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
urlPath <- "/users/{user_id}/sessions/{session_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`session_id`)) {
urlPath <- gsub(paste0("\\{", "session_id", "\\}"), `session_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- Character$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- Character$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
me = function(fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/user"
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- User$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- User$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
search_credentials_email = function(fields, limit, offset, sorts, id, email, emails, filter_or, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`limit`)) {
queryParams['limit'] <- limit
}
if (!missing(`offset`)) {
queryParams['offset'] <- offset
}
if (!missing(`sorts`)) {
queryParams['sorts'] <- sorts
}
if (!missing(`id`)) {
queryParams['id'] <- id
}
if (!missing(`email`)) {
queryParams['email'] <- email
}
if (!missing(`emails`)) {
queryParams['emails'] <- emails
}
if (!missing(`filter_or`)) {
queryParams['filter_or'] <- filter_or
}
urlPath <- "/credentials_email/search"
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- CredentialsEmailSearch$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- CredentialsEmailSearch$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
search_users = function(fields, page, per_page, limit, offset, sorts, id, first_name, last_name, verified_looker_employee, embed_user, email, is_disabled, filter_or, content_metadata_id, group_id, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`page`)) {
queryParams['page'] <- page
}
if (!missing(`per_page`)) {
queryParams['per_page'] <- per_page
}
if (!missing(`limit`)) {
queryParams['limit'] <- limit
}
if (!missing(`offset`)) {
queryParams['offset'] <- offset
}
if (!missing(`sorts`)) {
queryParams['sorts'] <- sorts
}
if (!missing(`id`)) {
queryParams['id'] <- id
}
if (!missing(`first_name`)) {
queryParams['first_name'] <- first_name
}
if (!missing(`last_name`)) {
queryParams['last_name'] <- last_name
}
if (!missing(`verified_looker_employee`)) {
queryParams['verified_looker_employee'] <- verified_looker_employee
}
if (!missing(`embed_user`)) {
queryParams['embed_user'] <- embed_user
}
if (!missing(`email`)) {
queryParams['email'] <- email
}
if (!missing(`is_disabled`)) {
queryParams['is_disabled'] <- is_disabled
}
if (!missing(`filter_or`)) {
queryParams['filter_or'] <- filter_or
}
if (!missing(`content_metadata_id`)) {
queryParams['content_metadata_id'] <- content_metadata_id
}
if (!missing(`group_id`)) {
queryParams['group_id'] <- group_id
}
urlPath <- "/users/search"
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- User$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- User$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
search_users_names = function(pattern, fields, page, per_page, limit, offset, sorts, id, first_name, last_name, verified_looker_employee, email, is_disabled, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`page`)) {
queryParams['page'] <- page
}
if (!missing(`per_page`)) {
queryParams['per_page'] <- per_page
}
if (!missing(`limit`)) {
queryParams['limit'] <- limit
}
if (!missing(`offset`)) {
queryParams['offset'] <- offset
}
if (!missing(`sorts`)) {
queryParams['sorts'] <- sorts
}
if (!missing(`id`)) {
queryParams['id'] <- id
}
if (!missing(`first_name`)) {
queryParams['first_name'] <- first_name
}
if (!missing(`last_name`)) {
queryParams['last_name'] <- last_name
}
if (!missing(`verified_looker_employee`)) {
queryParams['verified_looker_employee'] <- verified_looker_employee
}
if (!missing(`email`)) {
queryParams['email'] <- email
}
if (!missing(`is_disabled`)) {
queryParams['is_disabled'] <- is_disabled
}
urlPath <- "/users/search/names/{pattern}"
if (!missing(`pattern`)) {
urlPath <- gsub(paste0("\\{", "pattern", "\\}"), `pattern`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- User$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- User$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
send_user_credentials_email_password_reset = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_email/send_password_reset"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- CredentialsEmail$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- CredentialsEmail$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
set_user_attribute_user_value = function(user_id, user_attribute_id, body, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/{user_id}/attribute_values/{user_attribute_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`user_attribute_id`)) {
urlPath <- gsub(paste0("\\{", "user_attribute_id", "\\}"), `user_attribute_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "PATCH",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- UserAttributeWithValue$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- UserAttributeWithValue$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
set_user_roles = function(user_id, body, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/{user_id}/roles"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- Role$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- Role$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
update_user = function(user_id, body, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/{user_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "PATCH",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- User$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- User$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
update_user_credentials_email = function(user_id, body, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/{user_id}/credentials_email"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath),
method = "PATCH",
queryParams = queryParams,
headerParams = headerParams,
body = body,
...)
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- CredentialsEmail$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- CredentialsEmail$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- User$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- User$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_attribute_user_values = function(user_id, fields, user_attribute_ids, all_values, include_unset, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`user_attribute_ids`)) {
queryParams['user_attribute_ids'] <- user_attribute_ids
}
if (!missing(`all_values`)) {
queryParams['all_values'] <- all_values
}
if (!missing(`include_unset`)) {
queryParams['include_unset'] <- include_unset
}
urlPath <- "/users/{user_id}/attribute_values"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- UserAttributeWithValue$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- UserAttributeWithValue$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_api3 = function(user_id, credentials_api3_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_api3/{credentials_api3_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`credentials_api3_id`)) {
urlPath <- gsub(paste0("\\{", "credentials_api3_id", "\\}"), `credentials_api3_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- CredentialsApi3$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- CredentialsApi3$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_email = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_email"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- CredentialsEmail$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- CredentialsEmail$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_embed = function(user_id, credentials_embed_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_embed/{credentials_embed_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`credentials_embed_id`)) {
urlPath <- gsub(paste0("\\{", "credentials_embed_id", "\\}"), `credentials_embed_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- CredentialsEmbed$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- CredentialsEmbed$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_google = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_google"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- CredentialsGoogle$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- CredentialsGoogle$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_ldap = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_ldap"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- CredentialsLDAP$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- CredentialsLDAP$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_looker_openid = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_looker_openid"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- CredentialsLookerOpenid$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- CredentialsLookerOpenid$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_oidc = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_oidc"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- CredentialsOIDC$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- CredentialsOIDC$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_saml = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_saml"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- CredentialsSaml$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- CredentialsSaml$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_credentials_totp = function(user_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/credentials_totp"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- CredentialsTotp$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- CredentialsTotp$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_for_credential = function(credential_type, credential_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/credential/{credential_type}/{credential_id}"
if (!missing(`credential_type`)) {
urlPath <- gsub(paste0("\\{", "credential_type", "\\}"), `credential_type`, urlPath)
}
if (!missing(`credential_id`)) {
urlPath <- gsub(paste0("\\{", "credential_id", "\\}"), `credential_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- User$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- User$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_roles = function(user_id, fields, direct_association_only, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`direct_association_only`)) {
queryParams['direct_association_only'] <- direct_association_only
}
urlPath <- "/users/{user_id}/roles"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- Role$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- Role$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
user_session = function(user_id, session_id, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
urlPath <- "/users/{user_id}/sessions/{session_id}"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
if (!missing(`session_id`)) {
urlPath <- gsub(paste0("\\{", "session_id", "\\}"), `session_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- Session$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- Session$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
},
wipeout_user_emails = function(user_id, body, fields, ...){
args <- list(...)
queryParams <- list()
headerParams <- character()
if (!missing(`fields`)) {
queryParams['fields'] <- fields
}
if (!missing(`body`)) {
body <- `body`$toJSONString()
} else {
body <- NULL
}
urlPath <- "/users/{user_id}/update_emails"
if (!missing(`user_id`)) {
urlPath <- gsub(paste0("\\{", "user_id", "\\}"), `user_id`, urlPath)
}
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) {
data <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"),simplifyVector = FALSE)
if (is.null(names(data))) {
returnObjects <- lapply(data, function(x) {
returnObject <- User$new()
#returnObject$fromJSON(jsonlite::toJSON(x, auto_unbox = FALSE))
returnObject$fromJSONObject(x)
returnObject
})
Response$new(returnObjects, resp)
} else {
returnObject <- User$new()
#result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8"))
result <- returnObject$fromJSONObject(data)
Response$new(returnObject, resp)
}
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
Response$new("API client error", resp)
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
Response$new("API server error", resp)
}
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.