internal static CredentialStore FromDto(CredentialStoreDto dto) => new CredentialStore { Id = dto.Id.Value, Name = dto.Name, Type = dto.Type, AdditionalConfiguration = dto.AdditionalConfiguration, IsReadOnly = dto.Details?.IsReadOnly };
/// <summary> /// Creates a new Credential Store. /// </summary> /// <remarks> /// Required permissions: Settings.Create. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='credentialStoreDto'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CredentialStoreDto> PostAsync(this ICredentialStores operations, CredentialStoreDto credentialStoreDto, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.PostWithHttpMessagesAsync(credentialStoreDto, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates a Credential Store. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Settings or Settings.Write. /// /// Required permissions: Settings.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='key'> /// </param> /// <param name='body'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PutByIdAsync(this ICredentialStores operations, long key, CredentialStoreDto body = default(CredentialStoreDto), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.PutByIdWithHttpMessagesAsync(key, body, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Updates a Credential Store. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Settings or Settings.Write. /// /// Required permissions: Settings.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='key'> /// </param> /// <param name='body'> /// </param> public static void PutById(this ICredentialStores operations, long key, CredentialStoreDto body = default(CredentialStoreDto)) { operations.PutByIdAsync(key, body).GetAwaiter().GetResult(); }
/// <summary> /// Creates a new Credential Store. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Settings or Settings.Write. /// /// Required permissions: Settings.Create. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> public static CredentialStoreDto Post(this ICredentialStores operations, CredentialStoreDto body = default(CredentialStoreDto)) { return(operations.PostAsync(body).GetAwaiter().GetResult()); }
/// <summary> /// Updates a Credential Store. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Settings or Settings.Write. /// /// Required permissions: Settings.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='credentialStoreDto'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task PutByIdAsync(this ICredentialStores operations, long id, CredentialStoreDto credentialStoreDto, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { (await operations.PutByIdWithHttpMessagesAsync(id, credentialStoreDto, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Updates a Credential Store. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Settings or Settings.Write. /// /// Required permissions: Settings.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='credentialStoreDto'> /// </param> public static void PutById(this ICredentialStores operations, long id, CredentialStoreDto credentialStoreDto) { operations.PutByIdAsync(id, credentialStoreDto).GetAwaiter().GetResult(); }
/// <summary> /// Creates a new Credential Store. /// </summary> /// <remarks> /// Client Credentials Flow required permissions: Settings or Settings.Write. /// /// Required permissions: Settings.Create. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='credentialStoreDto'> /// </param> public static CredentialStoreDto Post(this ICredentialStores operations, CredentialStoreDto credentialStoreDto) { return(operations.PostAsync(credentialStoreDto).GetAwaiter().GetResult()); }
/// <summary> /// Updates a Credential Store. /// </summary> /// <remarks> /// Required permissions: Settings.Edit. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// key: Id /// </param> /// <param name='credentialStoreDto'> /// </param> public static object PutById(this ICredentialStores operations, long id, CredentialStoreDto credentialStoreDto) { return(operations.PutByIdAsync(id, credentialStoreDto).GetAwaiter().GetResult()); }