Class UserRoleClient
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Syntax
public class UserRoleClient : ClientBase
Constructors
UserRoleClient(Contract.IPictureparkServiceSettings, Http.HttpClient)
Declaration
public UserRoleClient(Contract.IPictureparkServiceSettings configuration, Http.HttpClient httpClient)
Parameters
Picturepark.SDK.V1.Contract.IPictureparkServiceSettings
configuration
|
System.Net.Http.HttpClient
httpClient
|
Properties
JsonSerializerSettings
Declaration
protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
Newtonsoft.Json.JsonSerializerSettings
|
ReadResponseAsString
Declaration
public bool ReadResponseAsString { get; set; }
Property Value
System.Boolean
|
Methods
CreateAsync(UserRoleCreateRequest, CancellationToken)
Create user role
Declaration
public virtual async Task<UserRoleDetail> CreateAsync(UserRoleCreateRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
UserRoleCreateRequest
request
Request containing information needed to create new user role. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<UserRoleDetail>
Represents a user role, which associates users with user rights. |
Remarks
Creates new user role based on the supplied request.
CreateManyAsync(UserRoleCreateManyRequest, CancellationToken)
Create multiple user roles
Declaration
public virtual async Task<BulkResponse> CreateManyAsync(UserRoleCreateManyRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
UserRoleCreateManyRequest
request
Request containing information needed to create new user role. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BulkResponse>
Response to a bulk operation |
Remarks
Creates new user roles based on supplied requests.
DeleteAsync(String, CancellationToken)
Delete user role
Declaration
public virtual async Task DeleteAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
User role ID. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task
|
Remarks
Deletes the user role specified by the ID.
DeleteManyAsync(UserRoleDeleteManyRequest, CancellationToken)
Delete multiple user roles
Declaration
public virtual async Task<BulkResponse> DeleteManyAsync(UserRoleDeleteManyRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
UserRoleDeleteManyRequest
request
The request with user role IDs to delete. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BulkResponse>
Response to a bulk operation |
Remarks
Deletes the user roles specified by the IDs.
GetAsync(String, CancellationToken)
Get user role
Declaration
public virtual async Task<UserRoleDetail> GetAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
User role ID. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<UserRoleDetail>
Represents a user role, which associates users with user rights. |
Remarks
Gets the user role by the user role ID.
GetManyAsync(IEnumerable<String>, CancellationToken)
Get multiple user roles
Declaration
public virtual async Task<ICollection<UserRoleDetail>> GetManyAsync(IEnumerable<string> ids = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.Collections.Generic.IEnumerable<System.String>
ids
User role IDs to get information about. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<System.Collections.Generic.ICollection<UserRoleDetail>>
Array of Represents a user role, which associates users with user rights. |
Remarks
Gets multiple user role details by the user role IDs. Can fetch maximum of 100 user roles at once.
ReadObjectResponseAsync<T>(Http.HttpResponseMessage, IReadOnlyDictionary<String, IEnumerable<String>>, CancellationToken)
Declaration
protected virtual async Task<UserRoleClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(Http.HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
System.Net.Http.HttpResponseMessage
response
|
System.Collections.Generic.IReadOnlyDictionary<System.String, System.Collections.Generic.IEnumerable<System.String>>
headers
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<UserRoleClient.ObjectResponseResult<T>>
|
Type Parameters
T
|
SearchAsync(UserRoleSearchRequest, CancellationToken)
Search user roles
Declaration
public virtual async Task<UserRoleSearchResult> SearchAsync(UserRoleSearchRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
UserRoleSearchRequest
request
User role search request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<UserRoleSearchResult>
Result of the user role search |
UpdateAsync(String, UserRoleEditable, CancellationToken)
Update user role
Declaration
public virtual async Task<UserRoleDetail> UpdateAsync(string id, UserRoleEditable request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
User role ID. |
UserRoleEditable
request
Request containing information needed to update the user role. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<UserRoleDetail>
Represents a user role, which associates users with user rights. |
Remarks
Updates the user role specified by the ID and based on supplied request.
UpdateManyAsync(UserRoleUpdateManyRequest, CancellationToken)
Update multiple user roles
Declaration
public virtual async Task<BulkResponse> UpdateManyAsync(UserRoleUpdateManyRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
UserRoleUpdateManyRequest
request
Request containing information needed to update the user role. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BulkResponse>
Response to a bulk operation |
Remarks
Updates the user roles specified by the IDs and based on supplied requests.