/// <summary> /// Update a Time Window /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> /// <param name='body'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> PutTimeWindowAsync(this IFeatureManagementAppTierAPI operations, System.Guid id, TimeWindow body = default(TimeWindow), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PutTimeWindowWithHttpMessagesAsync(id, body, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
public async Task <IActionResult> Put(Guid id, TimeWindow timeWindow) { if (id == Guid.Empty) { return(BadRequest("Invalid Id")); } if (timeWindow == null) { return(BadRequest("TimeWindow is required")); } using (IFeatureManagementAppTierAPI api = CreateFeatureManagementApi()) { HttpOperationResponse <object> result = await api.PutTimeWindowWithHttpMessagesAsync(id, timeWindow); return(CreateResponse <TimeWindow>(result)); } }