C# Класс Smartsheet.Api.Internal.UserResourcesImpl

This is the implementation of the UserResources. Thread Safety: This class is thread safe because it is immutable and its base class is thread safe.
Наследование: AbstractResources, UserResources
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddAlternateEmail ( long userId, IEnumerable altEmails ) : IList

Add alternate email(s).

It mirrors to the following Smartsheet REST API method: POST /users/{userId}/alternateemails

AddUser ( User user, bool sendEmail, bool allowInviteAccountAdmin ) : User

Add a user To the organization, without sending Email. It mirrors To the following Smartsheet REST API method: POST /Users Exceptions: - IllegalArgumentException : if any argument is null - InvalidRequestException : if there is any problem with the REST API request - AuthorizationException : if there is any problem with the REST API authorization(access token) - ResourceNotFoundException : if the resource can not be found - ServiceUnavailableException : if the REST API service is not available (possibly due To rate limiting) - SmartsheetRestException : if there is any other REST API related error occurred during the operation - SmartsheetException : if there is any other error occurred during the operation

Add a user To the organization

It mirrors To the following Smartsheet REST API method: POST /Users

DeleteAlternateEmail ( long userId, long altEmailId ) : void

Delete alternate email.

It mirrors to the following Smartsheet REST API method: DELETE /users/{userId}/alternateemails/{alternateEmailId}

GetAlternateEmail ( long userId, long altEmailId ) : AlternateEmail

Get alternate email.

It mirrors to the following Smartsheet REST API method: GET /users/{userId}/alternateemails/{alternateEmailId}

GetCurrentUser ( ) : UserProfile

Get the current user.

It mirrors To the following Smartsheet REST API method: GET /users/me

GetUser ( long userId ) : UserProfile

Gets the user.

It mirrors To the following Smartsheet REST API method: GET /users/{userId}

ListAlternateEmails ( long userId, PaginationParameters pagination ) : PaginatedResult

List all user alternate email(s).

It mirrors to the following Smartsheet REST API method: GET /users/{userId}/alternateemails

ListUsers ( IEnumerable emails, PaginationParameters paging ) : PaginatedResult

List all Users.

It mirrors To the following Smartsheet REST API method: GET /Users

RemoveUser ( long userId, long transferTo, bool transferSheets, bool removeFromSharing ) : void

Removes a User from an organization. User is transitioned to a free collaborator with read-only access to owned sheets (unless those are optionally transferred to another user).

This operation is only available to system administrators.

It mirrors To the following Smartsheet REST API method: DELETE /user{Id}

UpdateUser ( User user ) : User

Update a user.

It mirrors To the following Smartsheet REST API method: PUT /users/{userId}

UserResourcesImpl ( SmartsheetImpl smartsheet ) : System.Collections.Generic

Constructor. Exceptions: - IllegalArgumentException : if any argument is null

Описание методов

AddAlternateEmail() публичный Метод

Add alternate email(s).

It mirrors to the following Smartsheet REST API method: POST /users/{userId}/alternateemails

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public AddAlternateEmail ( long userId, IEnumerable altEmails ) : IList
userId long the Id of the user
altEmails IEnumerable list of AlternateEmail(s)
Результат IList

AddUser() публичный Метод

Add a user To the organization, without sending Email. It mirrors To the following Smartsheet REST API method: POST /Users Exceptions: - IllegalArgumentException : if any argument is null - InvalidRequestException : if there is any problem with the REST API request - AuthorizationException : if there is any problem with the REST API authorization(access token) - ResourceNotFoundException : if the resource can not be found - ServiceUnavailableException : if the REST API service is not available (possibly due To rate limiting) - SmartsheetRestException : if there is any other REST API related error occurred during the operation - SmartsheetException : if there is any other error occurred during the operation

Add a user To the organization

It mirrors To the following Smartsheet REST API method: POST /Users

the Smartsheet exception if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public AddUser ( User user, bool sendEmail, bool allowInviteAccountAdmin ) : User
user User the user object limited To the following attributes: * Admin * Email * LicensedSheetCreator
sendEmail bool flag indicating whether or not to send a welcome email. Defaults to false.
allowInviteAccountAdmin bool if user is an admin in another organization, setting to true will invite their entire organization.
Результат User

DeleteAlternateEmail() публичный Метод

Delete alternate email.

It mirrors to the following Smartsheet REST API method: DELETE /users/{userId}/alternateemails/{alternateEmailId}

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public DeleteAlternateEmail ( long userId, long altEmailId ) : void
userId long the Id of the user
altEmailId long the alternate email Id
Результат void

GetAlternateEmail() публичный Метод

Get alternate email.

It mirrors to the following Smartsheet REST API method: GET /users/{userId}/alternateemails/{alternateEmailId}

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public GetAlternateEmail ( long userId, long altEmailId ) : AlternateEmail
userId long the Id of the user
altEmailId long the alternate email Id
Результат AlternateEmail

GetCurrentUser() публичный Метод

Get the current user.

It mirrors To the following Smartsheet REST API method: GET /users/me

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public GetCurrentUser ( ) : UserProfile
Результат UserProfile

GetUser() публичный Метод

Gets the user.

It mirrors To the following Smartsheet REST API method: GET /users/{userId}

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public GetUser ( long userId ) : UserProfile
userId long the user Id
Результат UserProfile

ListAlternateEmails() публичный Метод

List all user alternate email(s).

It mirrors to the following Smartsheet REST API method: GET /users/{userId}/alternateemails

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public ListAlternateEmails ( long userId, PaginationParameters pagination ) : PaginatedResult
userId long the Id of the user
pagination PaginationParameters the pagination
Результат PaginatedResult

ListUsers() публичный Метод

List all Users.

It mirrors To the following Smartsheet REST API method: GET /Users

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public ListUsers ( IEnumerable emails, PaginationParameters paging ) : PaginatedResult
emails IEnumerable list of emails
paging PaginationParameters the pagination
Результат PaginatedResult

RemoveUser() публичный Метод

Removes a User from an organization. User is transitioned to a free collaborator with read-only access to owned sheets (unless those are optionally transferred to another user).

This operation is only available to system administrators.

It mirrors To the following Smartsheet REST API method: DELETE /user{Id}

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public RemoveUser ( long userId, long transferTo, bool transferSheets, bool removeFromSharing ) : void
userId long the Id of the user
transferTo long (required if user owns groups): The ID of the user to transfer ownership to. /// If the user being deleted owns groups, they will be transferred to this user. /// If the user owns sheets, and transferSheets is true, then the deleted user’s sheets will be transferred to this user.
transferSheets bool If true, and transferTo is specified, the deleted user’s sheets will be transferred. Else, sheets will not be transferred. Defaults to false.
removeFromSharing bool Set to true to remove the user from sharing for all sheets/workspaces in the organization. If not specified, User will not be removed from sharing.
Результат void

UpdateUser() публичный Метод

Update a user.

It mirrors To the following Smartsheet REST API method: PUT /users/{userId}

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public UpdateUser ( User user ) : User
user User the user To update
Результат User

UserResourcesImpl() публичный Метод

Constructor. Exceptions: - IllegalArgumentException : if any argument is null
public UserResourcesImpl ( SmartsheetImpl smartsheet ) : System.Collections.Generic
smartsheet SmartsheetImpl the Smartsheet
Результат System.Collections.Generic