/// <summary>
        /// trace Trace
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="body"></param>
        /// <param name="token"></param>
        /// <param name="serverWebAdaptor"></param>
        /// <param name="utilityNetworkName"></param>
        /// <returns>Task of ApiResponse (TraceResultsSet)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <TraceResultsSet> > TraceAsyncWithHttpInfo(Body1 body, string token, string serverWebAdaptor, string utilityNetworkName)
        {
            // verify the required parameter 'body' is set
            if (body == null)
            {
                throw new ApiException(400, "Missing required parameter 'body' when calling UtilityNetworkServiceApi->Trace");
            }
            // verify the required parameter 'token' is set
            if (token == null)
            {
                throw new ApiException(400, "Missing required parameter 'token' when calling UtilityNetworkServiceApi->Trace");
            }
            // verify the required parameter 'serverWebAdaptor' is set
            if (serverWebAdaptor == null)
            {
                throw new ApiException(400, "Missing required parameter 'serverWebAdaptor' when calling UtilityNetworkServiceApi->Trace");
            }
            // verify the required parameter 'utilityNetworkName' is set
            if (utilityNetworkName == null)
            {
                throw new ApiException(400, "Missing required parameter 'utilityNetworkName' when calling UtilityNetworkServiceApi->Trace");
            }

            var    localVarPath         = "/{ServerWebAdaptor}/rest/services/{UtilityNetworkName}/UtilityNetworkServer/trace";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new List <KeyValuePair <String, String> >();
            var    localVarHeaderParams = new Dictionary <String, String>(this.Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object localVarPostBody     = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            if (serverWebAdaptor != null)
            {
                localVarPathParams.Add("ServerWebAdaptor", this.Configuration.ApiClient.ParameterToString(serverWebAdaptor));                           // path parameter
            }
            if (utilityNetworkName != null)
            {
                localVarPathParams.Add("UtilityNetworkName", this.Configuration.ApiClient.ParameterToString(utilityNetworkName));                             // path parameter
            }
            if (token != null)
            {
                localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", token));                // query parameter
            }
            if (body != null && body.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
            }
            else
            {
                localVarPostBody = body; // byte array
            }

            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await this.Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                            Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                            localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("Trace", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <TraceResultsSet>(localVarStatusCode,
                                                     localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
                                                     (TraceResultsSet)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(TraceResultsSet))));
        }
Пример #2
0
        /// <summary>
        /// Login Upon successful authentication, this method returns a session identifier cookie that can be used to authenticate subsequent API calls.
        /// </summary>
        /// <exception cref="CloudEndure.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="body">Login info</param>
        /// <returns>Task of ApiResponse (User)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <User> > LoginPostAsyncWithHttpInfo(Body1 body)
        {
            // verify the required parameter 'body' is set
            if (body == null)
            {
                throw new ApiException(400, "Missing required parameter 'body' when calling AuthenticationApi->LoginPost");
            }

            var    localVarPath         = "./login";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new List <KeyValuePair <String, String> >();
            var    localVarHeaderParams = new Dictionary <String, String>(this.Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object localVarPostBody     = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            if (body != null && body.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
            }
            else
            {
                localVarPostBody = body; // byte array
            }

            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await this.Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                            Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                            localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("LoginPost", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <User>(localVarStatusCode,
                                          localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)),
                                          (User)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(User))));
        }
        /// <summary>
        /// Update a Instrument Identifier
        /// </summary>
        /// <exception cref="CyberSource.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="profileId">The id of a profile containing user specific TMS configuration.</param>
        /// <param name="tokenId">The TokenId of an Instrument Identifier.</param>
        /// <param name="body">Please specify the previous transaction Id to update.</param>
        /// <returns>Task of ApiResponse (TmsV1InstrumentidentifiersPost200Response)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <TmsV1InstrumentidentifiersPost200Response> > TmsV1InstrumentidentifiersTokenIdPatchAsyncWithHttpInfo(string profileId, string tokenId, Body1 body)
        {
            // verify the required parameter 'profileId' is set
            if (profileId == null)
            {
                throw new ApiException(400, "Missing required parameter 'profileId' when calling InstrumentIdentifierApi->TmsV1InstrumentidentifiersTokenIdPatch");
            }
            // verify the required parameter 'tokenId' is set
            if (tokenId == null)
            {
                throw new ApiException(400, "Missing required parameter 'tokenId' when calling InstrumentIdentifierApi->TmsV1InstrumentidentifiersTokenIdPatch");
            }
            // verify the required parameter 'body' is set
            if (body == null)
            {
                throw new ApiException(400, "Missing required parameter 'body' when calling InstrumentIdentifierApi->TmsV1InstrumentidentifiersTokenIdPatch");
            }

            var    localVarPath         = $"/tms/v1/instrumentidentifiers/{tokenId}";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new Dictionary <String, String>();
            var    localVarHeaderParams = new Dictionary <String, String>(Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object localVarPostBody     = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json;charset=utf-8"
            };
            String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] { "*/*" };
            String   localVarHttpHeaderAccept  = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            if (tokenId != null)
            {
                localVarPathParams.Add("tokenId", Configuration.ApiClient.ParameterToString(tokenId));                  // path parameter
            }
            if (profileId != null)
            {
                localVarHeaderParams.Add("profile-id", Configuration.ApiClient.ParameterToString(profileId));                    // header parameter
            }
            if (body != null && body.GetType() != typeof(byte[]))
            {
                localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
            }
            else
            {
                localVarPostBody = body; // byte array
            }


            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                       Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                       localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("TmsV1InstrumentidentifiersTokenIdPatch", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <TmsV1InstrumentidentifiersPost200Response>(localVarStatusCode,
                                                                               localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                                                               (TmsV1InstrumentidentifiersPost200Response)Configuration.ApiClient.Deserialize(localVarResponse, typeof(TmsV1InstrumentidentifiersPost200Response))));
        }
Пример #4
0
        /// <summary>
        /// Generates a server library Accepts a &#x60;GeneratorInput&#x60; options map for spec location and generation options.
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="framework">framework</param>
        /// <param name="body">parameters</param>
        /// <returns>Task of ApiResponse (InlineResponse2001)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <InlineResponse2001> > GenerateServerForLanguageAsyncWithHttpInfo(string framework, Body1 body)
        {
            // verify the required parameter 'framework' is set
            if (framework == null)
            {
                throw new ApiException(400, "Missing required parameter 'framework' when calling ServersApi->GenerateServerForLanguage");
            }
            // verify the required parameter 'body' is set
            if (body == null)
            {
                throw new ApiException(400, "Missing required parameter 'body' when calling ServersApi->GenerateServerForLanguage");
            }

            var    localVarPath         = "/gen/servers/{framework}";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new Dictionary <String, String>();
            var    localVarHeaderParams = new Dictionary <String, String>(Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object localVarPostBody     = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType    = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
            };
            String localVarHttpHeaderAccept    = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            // set "format" to json by default
            // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
            localVarPathParams.Add("format", "json");
            if (framework != null)
            {
                localVarPathParams.Add("framework", Configuration.ApiClient.ParameterToString(framework));                    // path parameter
            }
            if (body != null && body.GetType() != typeof(byte[]))
            {
                localVarPostBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter
            }
            else
            {
                localVarPostBody = body; // byte array
            }


            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                       Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                       localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("GenerateServerForLanguage", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <InlineResponse2001>(localVarStatusCode,
                                                        localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                                        (InlineResponse2001)Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse2001))));
        }
Пример #5
0
        /// <summary>
        /// Create new Webhook Create a new Webhook
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="body">default response (optional)</param>
        /// <returns>Task of ApiResponse (WebhookIdResponse)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <WebhookIdResponse> > AddWebHookAsyncWithHttpInfo(Body1 body = null)
        {
            var    localVarPath         = "/v2/webhooks";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new List <KeyValuePair <String, String> >();
            var    localVarHeaderParams = new Dictionary <String, String>(this.Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object localVarPostBody     = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            if (body != null && body.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
            }
            else
            {
                localVarPostBody = body; // byte array
            }
            // authentication (ApiKey) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("ApiKey")))
            {
                localVarHeaderParams["ApiKey"] = this.Configuration.GetApiKeyWithPrefix("ApiKey");
            }

            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await this.Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                            Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                            localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("AddWebHook", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <WebhookIdResponse>(localVarStatusCode,
                                                       localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
                                                       (WebhookIdResponse)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(WebhookIdResponse))));
        }