#' Deletes a role assignment.
#'
#' Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{https://developers.google.com/admin-sdk/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/admin.directory.rolemanagement
#' }
#' @param roleAssignmentId Immutable ID of the role assignment.
#' @param customer Immutable ID of the Google Workspace account.
#' @param callback JSONP
#' @param fields Selector specifying which fields to include in a partial response.
#' @param uploadType Legacy upload protocol for media (e.g. "media", "multipart").
#' @param upload_protocol Upload protocol for media (e.g. "raw", "multipart").
#' @param prettyPrint Returns response with indentations and line breaks.
#' @param quotaUser Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
#' @param alt Data format for response.
#' @param gargle_token A token prepared by one of gargle's token generating functions. Defaults to gargle::token_fetch(...) with appropriate scopes. See \code{\link[gargle]{token_fetch}} for more info.
#' @param return_request Whether to return the request without making it. Defaults to FALSE. See \code{\link[gargle]{request_build}} for more info on the returned request object.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
roleAssignments.delete <- function(roleAssignmentId, customer, callback = NULL, fields = NULL, uploadType = NULL, upload_protocol = NULL, prettyPrint = NULL, quotaUser = NULL, alt = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.roleAssignments.delete']]$scopes[[1]]), return_request = F, return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_request', 'return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['directory.roleAssignments.delete']], params = params, base_url = 'https://admin.googleapis.com/')
req <- gargle::request_build(method = req$method, path = req$path, params = req$params, body = req$body, token = httr::config(token = gargle_token), base_url = req$base_url)
if(return_request) return(req)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
#' Retrieves a role assignment.
#'
#' Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{https://developers.google.com/admin-sdk/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/admin.directory.rolemanagement
#' \item https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly
#' }
#' @param customer Immutable ID of the Google Workspace account.
#' @param roleAssignmentId Immutable ID of the role assignment.
#' @param callback JSONP
#' @param fields Selector specifying which fields to include in a partial response.
#' @param uploadType Legacy upload protocol for media (e.g. "media", "multipart").
#' @param upload_protocol Upload protocol for media (e.g. "raw", "multipart").
#' @param prettyPrint Returns response with indentations and line breaks.
#' @param quotaUser Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
#' @param alt Data format for response.
#' @param gargle_token A token prepared by one of gargle's token generating functions. Defaults to gargle::token_fetch(...) with appropriate scopes. See \code{\link[gargle]{token_fetch}} for more info.
#' @param return_request Whether to return the request without making it. Defaults to FALSE. See \code{\link[gargle]{request_build}} for more info on the returned request object.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
roleAssignments.get <- function(customer, roleAssignmentId, callback = NULL, fields = NULL, uploadType = NULL, upload_protocol = NULL, prettyPrint = NULL, quotaUser = NULL, alt = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.roleAssignments.get']]$scopes[[1]]), return_request = F, return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_request', 'return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['directory.roleAssignments.get']], params = params, base_url = 'https://admin.googleapis.com/')
req <- gargle::request_build(method = req$method, path = req$path, params = req$params, body = req$body, token = httr::config(token = gargle_token), base_url = req$base_url)
if(return_request) return(req)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
#' Creates a role assignment.
#'
#' Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{https://developers.google.com/admin-sdk/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/admin.directory.rolemanagement
#' }
#' @param customer Immutable ID of the Google Workspace account.
#' @param roleAssignmentId ID of this roleAssignment.
#' @param scopeType The scope in which this role is assigned.
#' @param assignedTo The unique ID of the user this role is assigned to.
#' @param etag ETag of the resource.
#' @param orgUnitId If the role is restricted to an organization unit, this contains the ID for the organization unit the exercise of this role is restricted to.
#' @param roleId The ID of the role that is assigned.
#' @param kind The type of the API resource. This is always `admin#directory#roleAssignment`.
#' @param callback JSONP
#' @param fields Selector specifying which fields to include in a partial response.
#' @param uploadType Legacy upload protocol for media (e.g. "media", "multipart").
#' @param upload_protocol Upload protocol for media (e.g. "raw", "multipart").
#' @param prettyPrint Returns response with indentations and line breaks.
#' @param quotaUser Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
#' @param alt Data format for response.
#' @param gargle_token A token prepared by one of gargle's token generating functions. Defaults to gargle::token_fetch(...) with appropriate scopes. See \code{\link[gargle]{token_fetch}} for more info.
#' @param return_request Whether to return the request without making it. Defaults to FALSE. See \code{\link[gargle]{request_build}} for more info on the returned request object.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
roleAssignments.insert <- function(customer, roleAssignmentId = NULL, scopeType = NULL, assignedTo = NULL, etag = NULL, orgUnitId = NULL, roleId = NULL, kind = NULL, callback = NULL, fields = NULL, uploadType = NULL, upload_protocol = NULL, prettyPrint = NULL, quotaUser = NULL, alt = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.roleAssignments.insert']]$scopes[[1]]), return_request = F, return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_request', 'return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['directory.roleAssignments.insert']], params = params, base_url = 'https://admin.googleapis.com/')
req <- gargle::request_build(method = req$method, path = req$path, params = req$params, body = req$body, token = httr::config(token = gargle_token), base_url = req$base_url)
if(return_request) return(req)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
#' Retrieves a paginated list of all roleAssignments.
#'
#' Autogenerated via \code{\link[googlePackageMaker]{package_make}}.
#'
#' @seealso \href{https://developers.google.com/admin-sdk/}{Google Documentation}
#'
#' @details
#' Authentication scopes used by this function are:
#' \itemize{
#' \item https://www.googleapis.com/auth/admin.directory.rolemanagement
#' \item https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly
#' }
#' @param customer Immutable ID of the Google Workspace account.
#' @param maxResults Maximum number of results to return.
#' @param pageToken Token to specify the next page in the list.
#' @param roleId Immutable ID of a role. If included in the request, returns only role assignments containing this role ID.
#' @param userKey The user's primary email address, alias email address, or unique user ID. If included in the request, returns role assignments only for this user.
#' @param callback JSONP
#' @param fields Selector specifying which fields to include in a partial response.
#' @param uploadType Legacy upload protocol for media (e.g. "media", "multipart").
#' @param upload_protocol Upload protocol for media (e.g. "raw", "multipart").
#' @param prettyPrint Returns response with indentations and line breaks.
#' @param quotaUser Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
#' @param alt Data format for response.
#' @param gargle_token A token prepared by one of gargle's token generating functions. Defaults to gargle::token_fetch(...) with appropriate scopes. See \code{\link[gargle]{token_fetch}} for more info.
#' @param return_request Whether to return the request without making it. Defaults to FALSE. See \code{\link[gargle]{request_build}} for more info on the returned request object.
#' @param return_response Whether to return the response or the response content. Defaults to FALSE (return response content).
#' @export
roleAssignments.list <- function(customer, maxResults = NULL, pageToken = NULL, roleId = NULL, userKey = NULL, callback = NULL, fields = NULL, uploadType = NULL, upload_protocol = NULL, prettyPrint = NULL, quotaUser = NULL, alt = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.roleAssignments.list']]$scopes[[1]]), return_request = F, return_response = F){
params <- as.list(environment())[!names(as.list(environment())) %in% c('return_request', 'return_response', 'gargle_token')]
req <- gargle::request_develop(endpoint = .endpoints[['directory.roleAssignments.list']], params = params, base_url = 'https://admin.googleapis.com/')
req <- gargle::request_build(method = req$method, path = req$path, params = req$params, body = req$body, token = httr::config(token = gargle_token), base_url = req$base_url)
if(return_request) return(req)
res <- gargle::request_make(req, encode = 'json')
if(return_response) return(res)
httr::content(res)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.