R/schemas.R

Defines functions schemas.update schemas.patch schemas.list schemas.insert schemas.get schemas.delete

Documented in schemas.delete schemas.get schemas.insert schemas.list schemas.patch schemas.update

	#' Deletes a schema.
	#'
	#'  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.userschema
	#' }
	#' @param customerId Immutable ID of the Google Workspace account.
	#' @param schemaKey Name or immutable ID of the schema.
	#' @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
	schemas.delete <- function(customerId, schemaKey, callback = NULL, fields = NULL, uploadType = NULL, upload_protocol = NULL, prettyPrint = NULL, quotaUser = NULL, alt = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.schemas.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.schemas.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 schema.
	#'
	#'  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.userschema
	#' \item https://www.googleapis.com/auth/admin.directory.userschema.readonly
	#' }
	#' @param schemaKey Name or immutable ID of the schema.
	#' @param customerId 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
	schemas.get <- function(schemaKey, customerId, callback = NULL, fields = NULL, uploadType = NULL, upload_protocol = NULL, prettyPrint = NULL, quotaUser = NULL, alt = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.schemas.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.schemas.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 schema.
	#'
	#'  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.userschema
	#' }
	#' @param customerId Immutable ID of the Google Workspace account.
	#' @param displayName Display name for the schema.
	#' @param kind Kind of resource this is.
	#' @param fields A list of fields in the schema.
	#' @param etag The ETag of the resource.
	#' @param schemaName The schema's name.
	#' @param schemaId The unique identifier of the schema (Read-only)
	#' @param callback JSONP
	#' @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
	schemas.insert <- function(customerId, displayName = NULL, kind = NULL, fields = NULL, etag = NULL, schemaName = NULL, schemaId = NULL, callback = NULL, uploadType = NULL, upload_protocol = NULL, prettyPrint = NULL, quotaUser = NULL, alt = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.schemas.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.schemas.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 all schemas for a customer.
	#'
	#'  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.userschema
	#' \item https://www.googleapis.com/auth/admin.directory.userschema.readonly
	#' }
	#' @param customerId 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
	schemas.list <- function(customerId, callback = NULL, fields = NULL, uploadType = NULL, upload_protocol = NULL, prettyPrint = NULL, quotaUser = NULL, alt = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.schemas.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.schemas.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)
	}

	#' Patches a schema.
	#'
	#'  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.userschema
	#' }
	#' @param customerId Immutable ID of the Google Workspace account.
	#' @param schemaKey Name or immutable ID of the schema.
	#' @param displayName Display name for the schema.
	#' @param kind Kind of resource this is.
	#' @param fields A list of fields in the schema.
	#' @param etag The ETag of the resource.
	#' @param schemaName The schema's name.
	#' @param schemaId The unique identifier of the schema (Read-only)
	#' @param callback JSONP
	#' @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
	schemas.patch <- function(customerId, schemaKey, displayName = NULL, kind = NULL, fields = NULL, etag = NULL, schemaName = NULL, schemaId = NULL, callback = NULL, uploadType = NULL, upload_protocol = NULL, prettyPrint = NULL, quotaUser = NULL, alt = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.schemas.patch']]$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.schemas.patch']], 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)
	}

	#' Updates a schema.
	#'
	#'  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.userschema
	#' }
	#' @param schemaKey Name or immutable ID of the schema.
	#' @param customerId Immutable ID of the Google Workspace account.
	#' @param displayName Display name for the schema.
	#' @param kind Kind of resource this is.
	#' @param fields A list of fields in the schema.
	#' @param etag The ETag of the resource.
	#' @param schemaName The schema's name.
	#' @param schemaId The unique identifier of the schema (Read-only)
	#' @param callback JSONP
	#' @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
	schemas.update <- function(schemaKey, customerId, displayName = NULL, kind = NULL, fields = NULL, etag = NULL, schemaName = NULL, schemaId = NULL, callback = NULL, uploadType = NULL, upload_protocol = NULL, prettyPrint = NULL, quotaUser = NULL, alt = NULL, gargle_token = gargle::token_fetch(scopes = .endpoints[['directory.schemas.update']]$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.schemas.update']], 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)
	}
samterfa/gapiAdminSDK documentation built on Dec. 22, 2021, 10:11 p.m.