/// <summary> /// Creates a new switch. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='boardId'> /// The board identifier. /// </param> /// <param name='switchPostModel'> /// The switch model. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <SwitchModel> CreateSwitchAsync(this ISoftheonSwitchboard operations, int boardId, SwitchPostModel switchPostModel = default(SwitchPostModel), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateSwitchWithHttpMessagesAsync(boardId, switchPostModel, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the users by filter. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='boardId'> /// The board identifier. /// </param> /// <param name='model'> /// The model. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IList <SwitchModel> > GetSwitchesByFilterAsync(this ISoftheonSwitchboard operations, int boardId, SwitchFilterModel model = default(SwitchFilterModel), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetSwitchesByFilterWithHttpMessagesAsync(boardId, model, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Posts the specified model. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='model'> /// The model. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <BoardModel> CreateBoardAsync(this ISoftheonSwitchboard operations, BoardPostModel model = default(BoardPostModel), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateBoardWithHttpMessagesAsync(model, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all boards. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IList <BoardModel> > GetAllBoardsAsync(this ISoftheonSwitchboard operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetAllBoardsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a specific previous switch version. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The identifier. /// </param> /// <param name='boardId'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <SwitchHistoryModel> GetSwitchHistoryAsync(this ISoftheonSwitchboard operations, int id, string boardId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetSwitchHistoryWithHttpMessagesAsync(id, boardId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes a switch and place it in the history table. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The identifier. /// </param> /// <param name='boardId'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteSwitchVersionAsync(this ISoftheonSwitchboard operations, int id, string boardId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteSwitchVersionWithHttpMessagesAsync(id, boardId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Deletes a switch and place it in the history table. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The identifier. /// </param> /// <param name='boardId'> /// </param> public static void DeleteSwitchVersion(this ISoftheonSwitchboard operations, int id, string boardId) { operations.DeleteSwitchVersionAsync(id, boardId).GetAwaiter().GetResult(); }
/// <summary> /// Deletes the specified identifier. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The identifier. /// </param> public static void DeleteBoard(this ISoftheonSwitchboard operations, int id) { operations.DeleteBoardAsync(id).GetAwaiter().GetResult(); }
/// <summary> /// Rollback to a previous switch. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='switchId'> /// The switch identifier. /// </param> /// <param name='switchHistoryId'> /// The switch history identifier. /// </param> /// <param name='boardId'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task RollbackSwitchAsync(this ISoftheonSwitchboard operations, int switchId, int switchHistoryId, string boardId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.RollbackSwitchWithHttpMessagesAsync(switchId, switchHistoryId, boardId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Gets all boards. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IList <BoardModel> GetAllBoards(this ISoftheonSwitchboard operations) { return(operations.GetAllBoardsAsync().GetAwaiter().GetResult()); }
/// <summary> /// Gets all of the previous switches for a switch. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='switchId'> /// The switch identifier. /// </param> /// <param name='boardId'> /// </param> public static IList <SwitchHistoryModel> GetAllSwitchHistoryBySwitch(this ISoftheonSwitchboard operations, int switchId, string boardId) { return(operations.GetAllSwitchHistoryBySwitchAsync(switchId, boardId).GetAwaiter().GetResult()); }
/// <summary> /// Gets all of the previous switches for a board. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='boardId'> /// The board identifier. /// </param> public static IList <SwitchHistoryModel> GetAllSwitchHistoryByBoard(this ISoftheonSwitchboard operations, int boardId) { return(operations.GetAllSwitchHistoryByBoardAsync(boardId).GetAwaiter().GetResult()); }
/// <summary> /// Gets the boards by filter. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='model'> /// The model. /// </param> public static IList <BoardModel> GetBoardsByFilter(this ISoftheonSwitchboard operations, BoardFilterModel model = default(BoardFilterModel)) { return(operations.GetBoardsByFilterAsync(model).GetAwaiter().GetResult()); }
/// <summary> /// Gets the board history. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The identifier. /// </param> public static BoardHistoryModel GetBoardHistoryById(this ISoftheonSwitchboard operations, int id) { return(operations.GetBoardHistoryByIdAsync(id).GetAwaiter().GetResult()); }
/// <summary> /// Gets all board history for account. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IList <BoardHistoryModel> GetAllBoardHistoryForTheAccount(this ISoftheonSwitchboard operations) { return(operations.GetAllBoardHistoryForTheAccountAsync().GetAwaiter().GetResult()); }
/// <summary> /// Posts the specified model. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='model'> /// The model. /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse <BoardModel> CreateBoardWithHttpMessages(this ISoftheonSwitchboard operations, BoardPostModel model = default(BoardPostModel), Dictionary <string, List <string> > customHeaders = null) { return(operations.CreateBoardWithHttpMessagesAsync(model, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }
/// <summary> /// Posts the specified model. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='model'> /// The model. /// </param> public static BoardModel CreateBoard(this ISoftheonSwitchboard operations, BoardPostModel model = default(BoardPostModel)) { return(operations.CreateBoardAsync(model).GetAwaiter().GetResult()); }
/// <summary> /// Gets a specific previous switch version. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The identifier. /// </param> /// <param name='boardId'> /// </param> public static SwitchHistoryModel GetSwitchHistory(this ISoftheonSwitchboard operations, int id, string boardId) { return(operations.GetSwitchHistoryAsync(id, boardId).GetAwaiter().GetResult()); }
/// <summary> /// Creates a new switch. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='boardId'> /// The board identifier. /// </param> /// <param name='switchPostModel'> /// The switch model. /// </param> public static SwitchModel CreateSwitch(this ISoftheonSwitchboard operations, int boardId, SwitchPostModel switchPostModel = default(SwitchPostModel)) { return(operations.CreateSwitchAsync(boardId, switchPostModel).GetAwaiter().GetResult()); }
/// <summary> /// Gets the users by filter. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='boardId'> /// The board identifier. /// </param> /// <param name='model'> /// The model. /// </param> public static IList <SwitchModel> GetSwitchesByFilter(this ISoftheonSwitchboard operations, int boardId, SwitchFilterModel model = default(SwitchFilterModel)) { return(operations.GetSwitchesByFilterAsync(boardId, model).GetAwaiter().GetResult()); }
/// <summary> /// Gets all of the previous switches for a board. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='boardId'> /// The board identifier. /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse <IList <SwitchHistoryModel> > GetAllSwitchHistoryByBoardWithHttpMessages(this ISoftheonSwitchboard operations, int boardId, Dictionary <string, List <string> > customHeaders = null) { return(operations.GetAllSwitchHistoryByBoardWithHttpMessagesAsync(boardId, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }
/// <summary> /// Gets the users by filter. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='boardId'> /// The board identifier. /// </param> /// <param name='model'> /// The model. /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse <IList <SwitchModel> > GetSwitchesByFilterWithHttpMessages(this ISoftheonSwitchboard operations, int boardId, SwitchFilterModel model = default(SwitchFilterModel), Dictionary <string, List <string> > customHeaders = null) { return(operations.GetSwitchesByFilterWithHttpMessagesAsync(boardId, model, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }
/// <summary> /// Puts the specified model. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The identifier. /// </param> /// <param name='model'> /// The model. /// </param> public static void UpdateBoard(this ISoftheonSwitchboard operations, int id, BoardPutModel model = default(BoardPutModel)) { operations.UpdateBoardAsync(id, model).GetAwaiter().GetResult(); }
/// <summary> /// Deletes the specified identifier. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The identifier. /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse DeleteBoardWithHttpMessages(this ISoftheonSwitchboard operations, int id, Dictionary <string, List <string> > customHeaders = null) { return(operations.DeleteBoardWithHttpMessagesAsync(id, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }
/// <summary> /// Updates the switch and places the old version in the history table. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The identifier. /// </param> /// <param name='boardId'> /// </param> /// <param name='switchPutModel'> /// The switch model. /// </param> public static void UpdateSwitch(this ISoftheonSwitchboard operations, int id, string boardId, SwitchPutModel switchPutModel = default(SwitchPutModel)) { operations.UpdateSwitchAsync(id, boardId, switchPutModel).GetAwaiter().GetResult(); }
/// <summary> /// Updates the switch and places the old version in the history table. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The identifier. /// </param> /// <param name='boardId'> /// </param> /// <param name='switchPutModel'> /// The switch model. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task UpdateSwitchAsync(this ISoftheonSwitchboard operations, int id, string boardId, SwitchPutModel switchPutModel = default(SwitchPutModel), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.UpdateSwitchWithHttpMessagesAsync(id, boardId, switchPutModel, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Rollback to a previous switch. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='switchId'> /// The switch identifier. /// </param> /// <param name='switchHistoryId'> /// The switch history identifier. /// </param> /// <param name='boardId'> /// </param> public static void RollbackSwitch(this ISoftheonSwitchboard operations, int switchId, int switchHistoryId, string boardId) { operations.RollbackSwitchAsync(switchId, switchHistoryId, boardId).GetAwaiter().GetResult(); }
/// <summary> /// Updates the switch and places the old version in the history table. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The identifier. /// </param> /// <param name='boardId'> /// </param> /// <param name='switchPutModel'> /// The switch model. /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse UpdateSwitchWithHttpMessages(this ISoftheonSwitchboard operations, int id, string boardId, SwitchPutModel switchPutModel = default(SwitchPutModel), Dictionary <string, List <string> > customHeaders = null) { return(operations.UpdateSwitchWithHttpMessagesAsync(id, boardId, switchPutModel, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }
/// <summary> /// Rollback to a previous switch. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='switchId'> /// The switch identifier. /// </param> /// <param name='switchHistoryId'> /// The switch history identifier. /// </param> /// <param name='boardId'> /// </param> /// <param name='customHeaders'> /// Headers that will be added to request. /// </param> public static HttpOperationResponse RollbackSwitchWithHttpMessages(this ISoftheonSwitchboard operations, int switchId, int switchHistoryId, string boardId, Dictionary <string, List <string> > customHeaders = null) { return(operations.RollbackSwitchWithHttpMessagesAsync(switchId, switchHistoryId, boardId, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult()); }
/// <summary> /// Puts the specified model. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The identifier. /// </param> /// <param name='model'> /// The model. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task UpdateBoardAsync(this ISoftheonSwitchboard operations, int id, BoardPutModel model = default(BoardPutModel), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.UpdateBoardWithHttpMessagesAsync(id, model, null, cancellationToken).ConfigureAwait(false)).Dispose(); }