/// <summary> /// Get AlarmGroup by id /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// Id of entity to retrieve /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <object> GetAsyncByidAsync(this IAlarmGroups operations, int id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetAsyncByidWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get all AlarmGroups /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orderby'> /// <p><a href='#queryoptions'>Sorts</a> the result in /// ascending order by the supplied property.</p><p>Valid values /// are: <strong>AlarmGroupId</strong> /// (default).</p><p>Note: <strong>orderby</strong> /// and <strong>orderbydesc</strong> are mutually /// exclusive.</p> /// </param> /// <param name='orderbydesc'> /// <p><a href='#queryoptions'>Sorts</a> the result in /// descending order by the supplied property.</p><p>Valid values /// are: <strong>AlarmGroupId</strong> /// (default).</p><p>Note: <strong>orderby</strong> /// and <strong>orderbydesc</strong> are mutually /// exclusive.</p> /// </param> /// <param name='accountAccountId'> /// <p><a href="#queryoptions">Filters</a> the result by /// Account.AccountId using the supplied operation and /// value.</p><p>Valid operations are: /// <strong>eq(int)</strong></p> /// </param> /// <param name='top'> /// <a href="#queryoptions">Query paging</a> Returns the maximum /// number of entities. Default and max value is 10000 /// </param> /// <param name='skip'> /// <a href="#queryoptions">Query paging</a> Skips this number of /// entities /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <object> GetCollectionAsyncByqueryOptionsAsync(this IAlarmGroups operations, string orderby = "AlarmGroupId", string orderbydesc = default(string), string accountAccountId = default(string), int?top = 10000, int?skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetCollectionAsyncByqueryOptionsWithHttpMessagesAsync(orderby, orderbydesc, accountAccountId, top, skip, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get all AlarmGroups /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orderby'> /// <p><a href='#queryoptions'>Sorts</a> the result in /// ascending order by the supplied property.</p><p>Valid values /// are: <strong>AlarmGroupId</strong> /// (default).</p><p>Note: <strong>orderby</strong> /// and <strong>orderbydesc</strong> are mutually /// exclusive.</p> /// </param> /// <param name='orderbydesc'> /// <p><a href='#queryoptions'>Sorts</a> the result in /// descending order by the supplied property.</p><p>Valid values /// are: <strong>AlarmGroupId</strong> /// (default).</p><p>Note: <strong>orderby</strong> /// and <strong>orderbydesc</strong> are mutually /// exclusive.</p> /// </param> /// <param name='accountAccountId'> /// <p><a href="#queryoptions">Filters</a> the result by /// Account.AccountId using the supplied operation and /// value.</p><p>Valid operations are: /// <strong>eq(int)</strong></p> /// </param> /// <param name='top'> /// <a href="#queryoptions">Query paging</a> Returns the maximum /// number of entities. Default and max value is 10000 /// </param> /// <param name='skip'> /// <a href="#queryoptions">Query paging</a> Skips this number of /// entities /// </param> public static object GetCollectionAsyncByqueryOptions(this IAlarmGroups operations, string orderby = "AlarmGroupId", string orderbydesc = default(string), string accountAccountId = default(string), int?top = 10000, int?skip = default(int?)) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IAlarmGroups)s).GetCollectionAsyncByqueryOptionsAsync(orderby, orderbydesc, accountAccountId, top, skip), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Updates an AlarmGroup /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The id of the AlarmGroup /// </param> /// <param name='alarmGroup'> /// The changes to apply /// </param> public static object PatchAsyncByidalarmGroup(this IAlarmGroups operations, int id, EditAlarmGroupDto alarmGroup) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IAlarmGroups)s).PatchAsyncByidalarmGroupAsync(id, alarmGroup), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Create new AlarmGroup /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='newAlarmGroup'> /// The entity to create /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <object> PostBynewAlarmGroupAsync(this IAlarmGroups operations, CreateAlarmGroupDto newAlarmGroup, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.PostBynewAlarmGroupWithHttpMessagesAsync(newAlarmGroup, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create new AlarmGroup /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='newAlarmGroup'> /// The entity to create /// </param> public static object PostBynewAlarmGroup(this IAlarmGroups operations, CreateAlarmGroupDto newAlarmGroup) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IAlarmGroups)s).PostBynewAlarmGroupAsync(newAlarmGroup), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }