/// <summary> /// Updates the feature state if allowed. /// </summary> /// <exception cref="IO.FeatureHub.SSE.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="sdkUrl">The SDK key for the Model.Environment and service account</param> /// <param name="featureKey">The key you wish to update/action</param> /// <param name="featureStateUpdate"></param> /// <returns>Task of ApiResponse (object)</returns> public async System.Threading.Tasks.Task <IO.FeatureHub.SSE.Client.ApiResponse <object> > SetFeatureStateAsyncWithHttpInfo(string sdkUrl, string featureKey, FeatureStateUpdate featureStateUpdate) { // verify the required parameter 'sdkUrl' is set if (sdkUrl == null) { throw new IO.FeatureHub.SSE.Client.ApiException(400, "Missing required parameter 'sdkUrl' when calling FeatureServiceApi->SetFeatureState"); } // verify the required parameter 'featureKey' is set if (featureKey == null) { throw new IO.FeatureHub.SSE.Client.ApiException(400, "Missing required parameter 'featureKey' when calling FeatureServiceApi->SetFeatureState"); } // verify the required parameter 'featureStateUpdate' is set if (featureStateUpdate == null) { throw new IO.FeatureHub.SSE.Client.ApiException(400, "Missing required parameter 'featureStateUpdate' when calling FeatureServiceApi->SetFeatureState"); } IO.FeatureHub.SSE.Client.RequestOptions localVarRequestOptions = new IO.FeatureHub.SSE.Client.RequestOptions(); String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] _accepts = new String[] { "application/json" }; foreach (var _contentType in _contentTypes) { localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); } foreach (var _accept in _accepts) { localVarRequestOptions.HeaderParameters.Add("Accept", _accept); } localVarRequestOptions.PathParameters.Add("sdkUrl", IO.FeatureHub.SSE.Client.ClientUtils.ParameterToString(sdkUrl)); // path parameter localVarRequestOptions.PathParameters.Add("featureKey", IO.FeatureHub.SSE.Client.ClientUtils.ParameterToString(featureKey)); // path parameter localVarRequestOptions.Data = featureStateUpdate; // make the HTTP request var localVarResponse = await this.AsynchronousClient.PutAsync <object>("/features/{sdkUrl}/{featureKey}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SetFeatureState", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }
/// <summary> /// Updates the feature state if allowed. /// </summary> /// <exception cref="IO.FeatureHub.SSE.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="sdkUrl">The SDK key for the Model.Environment and service account</param> /// <param name="featureKey">The key you wish to update/action</param> /// <param name="featureStateUpdate"></param> /// <returns>Task of object</returns> public async System.Threading.Tasks.Task <object> SetFeatureStateAsync(string sdkUrl, string featureKey, FeatureStateUpdate featureStateUpdate) { IO.FeatureHub.SSE.Client.ApiResponse <object> localVarResponse = await SetFeatureStateAsyncWithHttpInfo(sdkUrl, featureKey, featureStateUpdate); return(localVarResponse.Data); }
/// <summary> /// Updates the feature state if allowed. /// </summary> /// <exception cref="IO.FeatureHub.SSE.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="sdkUrl">The SDK key for the environment and service account</param> /// <param name="featureKey">The key you wish to update/action</param> /// <param name="featureStateUpdate"></param> /// <returns>Task of object</returns> public async Task <object> SetFeatureStateAsync(string sdkUrl, string featureKey, FeatureStateUpdate featureStateUpdate) { ApiResponse <object> localVarResponse = await SetFeatureStateAsyncWithHttpInfo(sdkUrl, featureKey, featureStateUpdate); return(localVarResponse.Data); }
/// <summary> /// Updates the feature state if allowed. /// </summary> /// <exception cref="IO.FeatureHub.SSE.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="sdkUrl">The SDK key for the Model.Environment and service account</param> /// <param name="featureKey">The key you wish to update/action</param> /// <param name="featureStateUpdate"></param> /// <returns>object</returns> public object SetFeatureState(string sdkUrl, string featureKey, FeatureStateUpdate featureStateUpdate) { IO.FeatureHub.SSE.Client.ApiResponse <object> localVarResponse = SetFeatureStateWithHttpInfo(sdkUrl, featureKey, featureStateUpdate); return(localVarResponse.Data); }
/// <summary> /// Updates the feature state if allowed. /// </summary> /// <exception cref="IO.FeatureHub.SSE.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="sdkUrl">The SDK key for the environment and service account</param> /// <param name="featureKey">The key you wish to update/action</param> /// <param name="featureStateUpdate"></param> /// <returns>ApiResponse of object</returns> public ApiResponse <object> SetFeatureStateWithHttpInfo(string sdkUrl, string featureKey, FeatureStateUpdate featureStateUpdate) { // verify the required parameter 'sdkUrl' is set if (sdkUrl == null) { throw new ApiException(400, "Missing required parameter 'sdkUrl' when calling FeatureServiceApi->SetFeatureState"); } // verify the required parameter 'featureKey' is set if (featureKey == null) { throw new ApiException(400, "Missing required parameter 'featureKey' when calling FeatureServiceApi->SetFeatureState"); } // verify the required parameter 'featureStateUpdate' is set if (featureStateUpdate == null) { throw new ApiException(400, "Missing required parameter 'featureStateUpdate' when calling FeatureServiceApi->SetFeatureState"); } RequestOptions localVarRequestOptions = new RequestOptions(); String[] _contentTypes = new String[] { "application/json" }; // to determine the Accept header String[] _accepts = new String[] { "application/json" }; var localVarContentType = ClientUtils.SelectHeaderContentType(_contentTypes); if (localVarContentType != null) { localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); } var localVarAccept = ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) { localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } localVarRequestOptions.PathParameters.Add("sdkUrl", ClientUtils.ParameterToString(sdkUrl)); // path parameter localVarRequestOptions.PathParameters.Add("featureKey", ClientUtils.ParameterToString(featureKey)); // path parameter localVarRequestOptions.Data = featureStateUpdate; // make the HTTP request var localVarResponse = this.Client.Put <object>("/features/{sdkUrl}/{featureKey}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("SetFeatureState", localVarResponse); if (_exception != null) { throw _exception; } } return(localVarResponse); }