Class UserRoleClient
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Syntax
[GeneratedCode("NSwag", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")]
public class UserRoleClient : ClientBase, IUserRoleClient
Constructors
UserRoleClient(IPictureparkServiceSettings, HttpClient)
Declaration
public UserRoleClient(IPictureparkServiceSettings configuration, HttpClient httpClient)
Parameters
IPictureparkServiceSettings configuration |
HttpClient httpClient |
Properties
JsonSerializerSettings
Declaration
protected JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
JsonSerializerSettings |
ReadResponseAsString
Methods
CreateAsync(UserRoleCreateRequest, CancellationToken)
Create user role
Declaration
public virtual Task<UserRoleDetail> CreateAsync(UserRoleCreateRequest request, CancellationToken cancellationToken = default)
Parameters
UserRoleCreateRequest
request
Request containing information needed to create new user role. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<UserRoleDetail>
Represents a user role, which associates users with user rights. |
Implements
Remarks
Creates new user role based on the supplied request.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
CreateManyAsync(UserRoleCreateManyRequest, CancellationToken)
Create multiple user roles
Declaration
public virtual Task<BulkResponse> CreateManyAsync(UserRoleCreateManyRequest request, CancellationToken cancellationToken = default)
Parameters
UserRoleCreateManyRequest
request
Request containing information needed to create new user role. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BulkResponse>
Response to a bulk operation |
Implements
Remarks
Creates new user roles based on supplied requests.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
DeleteAsync(string, CancellationToken)
Delete user role
Declaration
public virtual Task DeleteAsync(string id, CancellationToken cancellationToken = default)
Parameters
string
id
User role ID. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task |
Implements
Remarks
Deletes the user role specified by the ID.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
DeleteManyAsync(UserRoleDeleteManyRequest, CancellationToken)
Delete multiple user roles
Declaration
public virtual Task<BulkResponse> DeleteManyAsync(UserRoleDeleteManyRequest request, CancellationToken cancellationToken = default)
Parameters
UserRoleDeleteManyRequest
request
The request with user role IDs to delete. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BulkResponse>
Response to a bulk operation |
Implements
Remarks
Deletes the user roles specified by the IDs.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
GetAsync(string, CancellationToken)
Get user role
Declaration
public virtual Task<UserRoleDetail> GetAsync(string id, CancellationToken cancellationToken = default)
Parameters
string
id
User role ID. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<UserRoleDetail>
Represents a user role, which associates users with user rights. |
Implements
Remarks
Gets the user role by the user role ID.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
GetManyAsync(IEnumerable<string>, CancellationToken)
Get multiple user roles
Declaration
public virtual Task<ICollection<UserRoleDetail>> GetManyAsync(IEnumerable<string> ids = null, CancellationToken cancellationToken = default)
Parameters
IEnumerable<string>
ids
User role IDs to get information about. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<ICollection<UserRoleDetail>>
Array of Represents a user role, which associates users with user rights. |
Implements
Remarks
Gets multiple user role details by the user role IDs. Can fetch maximum of 100 user roles at once.
Exceptions
ApiException
A server side error occurred. |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
PictureparkValidationException
Validation exception |
RequestSizeLimitExceededException
List of IDs exceeded maximum size |
ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)
Declaration
protected virtual Task<UserRoleClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
HttpResponseMessage response |
IReadOnlyDictionary<string, IEnumerable<string>> headers |
CancellationToken cancellationToken |
Returns
Task<UserRoleClient.ObjectResponseResult<T>> |
Type Parameters
T |
SearchAsync(UserRoleSearchRequest, CancellationToken)
Search user roles
Declaration
public virtual Task<UserRoleSearchResult> SearchAsync(UserRoleSearchRequest request, CancellationToken cancellationToken = default)
Parameters
UserRoleSearchRequest
request
User role search request. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<UserRoleSearchResult>
Result of the user role search |
Implements
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
UpdateAsync(string, UserRoleEditable, CancellationToken)
Update user role
Declaration
public virtual Task<UserRoleDetail> UpdateAsync(string id, UserRoleEditable request, CancellationToken cancellationToken = default)
Parameters
string
id
User role ID. |
UserRoleEditable
request
Request containing information needed to update the user role. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<UserRoleDetail>
Represents a user role, which associates users with user rights. |
Implements
Remarks
Updates the user role specified by the ID and based on supplied request.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
UpdateManyAsync(UserRoleUpdateManyRequest, CancellationToken)
Update multiple user roles
Declaration
public virtual Task<BulkResponse> UpdateManyAsync(UserRoleUpdateManyRequest request, CancellationToken cancellationToken = default)
Parameters
UserRoleUpdateManyRequest
request
Request containing information needed to update the user role. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BulkResponse>
Response to a bulk operation |
Implements
Remarks
Updates the user roles specified by the IDs and based on supplied requests.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |