Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="factory.api.client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="offset"> (optional, default to 0)</param>
        /// <param name="limit"> (optional, default to 50)</param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <factory.api.client.Client.ApiResponse <Object> > OperationsGetOperationsAsyncWithHttpInfo(int?offset = null, int?limit = null)
        {
            factory.api.client.Client.RequestOptions requestOptions = new factory.api.client.Client.RequestOptions();

            String[] @contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] @accepts = new String[] {
                "application/json"
            };

            foreach (var contentType in @contentTypes)
            {
                requestOptions.HeaderParameters.Add("Content-Type", contentType);
            }

            foreach (var accept in @accepts)
            {
                requestOptions.HeaderParameters.Add("Accept", accept);
            }

            if (offset != null)
            {
                foreach (var kvp in factory.api.client.Client.ClientUtils.ParameterToMultiMap("", "offset", offset))
                {
                    foreach (var value in kvp.Value)
                    {
                        requestOptions.QueryParameters.Add(kvp.Key, value);
                    }
                }
            }
            if (limit != null)
            {
                foreach (var kvp in factory.api.client.Client.ClientUtils.ParameterToMultiMap("", "limit", limit))
                {
                    foreach (var value in kvp.Value)
                    {
                        requestOptions.QueryParameters.Add(kvp.Key, value);
                    }
                }
            }


            // make the HTTP request

            var response = await this.AsynchronousClient.GetAsync <Object>("/api/v1/operations", requestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception exception = this.ExceptionFactory("OperationsGetOperations", response);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(response);
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="factory.api.client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="id"></param>
        /// <param name="inOperationDTO"></param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <factory.api.client.Client.ApiResponse <Object> > OperationsPutAsyncWithHttpInfo(int id, InOperationDTO inOperationDTO)
        {
            // verify the required parameter 'id' is set
            if (id == null)
            {
                throw new factory.api.client.Client.ApiException(400, "Missing required parameter 'id' when calling OperationsApi->OperationsPut");
            }

            // verify the required parameter 'inOperationDTO' is set
            if (inOperationDTO == null)
            {
                throw new factory.api.client.Client.ApiException(400, "Missing required parameter 'inOperationDTO' when calling OperationsApi->OperationsPut");
            }


            factory.api.client.Client.RequestOptions requestOptions = new factory.api.client.Client.RequestOptions();

            String[] @contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] @accepts = new String[] {
                "application/json"
            };

            foreach (var contentType in @contentTypes)
            {
                requestOptions.HeaderParameters.Add("Content-Type", contentType);
            }

            foreach (var accept in @accepts)
            {
                requestOptions.HeaderParameters.Add("Accept", accept);
            }

            if (id != null)
            {
                requestOptions.PathParameters.Add("id", factory.api.client.Client.ClientUtils.ParameterToString(id)); // path parameter
            }
            requestOptions.Data = inOperationDTO;


            // make the HTTP request

            var response = await this.AsynchronousClient.PutAsync <Object>("/api/v1/operations/{id}", requestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception exception = this.ExceptionFactory("OperationsPut", response);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(response);
        }
Esempio n. 3
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="factory.api.client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="inOperationDTO"></param>
        /// <returns>ApiResponse of Object(void)</returns>
        public factory.api.client.Client.ApiResponse <Object> OperationsPostWithHttpInfo(InOperationDTO inOperationDTO)
        {
            // verify the required parameter 'inOperationDTO' is set
            if (inOperationDTO == null)
            {
                throw new factory.api.client.Client.ApiException(400, "Missing required parameter 'inOperationDTO' when calling OperationsApi->OperationsPost");
            }

            factory.api.client.Client.RequestOptions requestOptions = new factory.api.client.Client.RequestOptions();

            String[] @contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] @accepts = new String[] {
                "application/json"
            };

            var localVarContentType = factory.api.client.Client.ClientUtils.SelectHeaderContentType(@contentTypes);

            if (localVarContentType != null)
            {
                requestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = factory.api.client.Client.ClientUtils.SelectHeaderAccept(@accepts);

            if (localVarAccept != null)
            {
                requestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            requestOptions.Data = inOperationDTO;


            // make the HTTP request

            var response = this.Client.Post <Object>("/api/v1/operations", requestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception exception = this.ExceptionFactory("OperationsPost", response);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(response);
        }
Esempio n. 4
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="factory.api.client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="id"></param>
        /// <returns>ApiResponse of Object(void)</returns>
        public factory.api.client.Client.ApiResponse <Object> OperationsGetOperationWithHttpInfo(int id)
        {
            // verify the required parameter 'id' is set
            if (id == null)
            {
                throw new factory.api.client.Client.ApiException(400, "Missing required parameter 'id' when calling OperationsApi->OperationsGetOperation");
            }

            factory.api.client.Client.RequestOptions requestOptions = new factory.api.client.Client.RequestOptions();

            String[] @contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] @accepts = new String[] {
                "application/json"
            };

            var localVarContentType = factory.api.client.Client.ClientUtils.SelectHeaderContentType(@contentTypes);

            if (localVarContentType != null)
            {
                requestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = factory.api.client.Client.ClientUtils.SelectHeaderAccept(@accepts);

            if (localVarAccept != null)
            {
                requestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            if (id != null)
            {
                requestOptions.PathParameters.Add("id", factory.api.client.Client.ClientUtils.ParameterToString(id)); // path parameter
            }
            // make the HTTP request

            var response = this.Client.Get <Object>("/api/v1/operations/{id}", requestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception exception = this.ExceptionFactory("OperationsGetOperation", response);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(response);
        }
Esempio n. 5
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="factory.api.client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="inProductionLineDTO"></param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <factory.api.client.Client.ApiResponse <Object> > ProductionLinesPostAsyncWithHttpInfo(InProductionLineDTO inProductionLineDTO)
        {
            // verify the required parameter 'inProductionLineDTO' is set
            if (inProductionLineDTO == null)
            {
                throw new factory.api.client.Client.ApiException(400, "Missing required parameter 'inProductionLineDTO' when calling ProductionLinesApi->ProductionLinesPost");
            }


            factory.api.client.Client.RequestOptions requestOptions = new factory.api.client.Client.RequestOptions();

            String[] @contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] @accepts = new String[] {
                "application/json"
            };

            foreach (var contentType in @contentTypes)
            {
                requestOptions.HeaderParameters.Add("Content-Type", contentType);
            }

            foreach (var accept in @accepts)
            {
                requestOptions.HeaderParameters.Add("Accept", accept);
            }

            requestOptions.Data = inProductionLineDTO;


            // make the HTTP request

            var response = await this.AsynchronousClient.PostAsync <Object>("/api/v1/production-lines", requestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception exception = this.ExceptionFactory("ProductionLinesPost", response);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(response);
        }
Esempio n. 6
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="factory.api.client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="id"></param>
        /// <returns>Task of ApiResponse (System.IO.Stream)</returns>
        public async System.Threading.Tasks.Task <factory.api.client.Client.ApiResponse <System.IO.Stream> > MachinesDeleteAsyncWithHttpInfo(int id)
        {
            // verify the required parameter 'id' is set
            if (id == null)
            {
                throw new factory.api.client.Client.ApiException(400, "Missing required parameter 'id' when calling MachinesApi->MachinesDelete");
            }


            factory.api.client.Client.RequestOptions requestOptions = new factory.api.client.Client.RequestOptions();

            String[] @contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] @accepts = new String[] {
                "application/octet-stream"
            };

            foreach (var contentType in @contentTypes)
            {
                requestOptions.HeaderParameters.Add("Content-Type", contentType);
            }

            foreach (var accept in @accepts)
            {
                requestOptions.HeaderParameters.Add("Accept", accept);
            }

            if (id != null)
            {
                requestOptions.PathParameters.Add("id", factory.api.client.Client.ClientUtils.ParameterToString(id)); // path parameter
            }
            // make the HTTP request

            var response = await this.AsynchronousClient.DeleteAsync <System.IO.Stream>("/api/v1/machines/{id}", requestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception exception = this.ExceptionFactory("MachinesDelete", response);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(response);
        }
Esempio n. 7
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="factory.api.client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="offset"> (optional, default to 0)</param>
        /// <param name="limit"> (optional, default to 50)</param>
        /// <returns>ApiResponse of Object(void)</returns>
        public factory.api.client.Client.ApiResponse <Object> OperationsGetOperationsWithHttpInfo(int?offset = null, int?limit = null)
        {
            factory.api.client.Client.RequestOptions requestOptions = new factory.api.client.Client.RequestOptions();

            String[] @contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] @accepts = new String[] {
                "application/json"
            };

            var localVarContentType = factory.api.client.Client.ClientUtils.SelectHeaderContentType(@contentTypes);

            if (localVarContentType != null)
            {
                requestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = factory.api.client.Client.ClientUtils.SelectHeaderAccept(@accepts);

            if (localVarAccept != null)
            {
                requestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            if (offset != null)
            {
                foreach (var kvp in factory.api.client.Client.ClientUtils.ParameterToMultiMap("", "offset", offset))
                {
                    foreach (var value in kvp.Value)
                    {
                        requestOptions.QueryParameters.Add(kvp.Key, value);
                    }
                }
            }
            if (limit != null)
            {
                foreach (var kvp in factory.api.client.Client.ClientUtils.ParameterToMultiMap("", "limit", limit))
                {
                    foreach (var value in kvp.Value)
                    {
                        requestOptions.QueryParameters.Add(kvp.Key, value);
                    }
                }
            }


            // make the HTTP request

            var response = this.Client.Get <Object>("/api/v1/operations", requestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception exception = this.ExceptionFactory("OperationsGetOperations", response);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(response);
        }
Esempio n. 8
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="factory.api.client.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="id"></param>
        /// <param name="inMachineDTO"></param>
        /// <returns>ApiResponse of System.IO.Stream</returns>
        public factory.api.client.Client.ApiResponse <System.IO.Stream> MachinesPutWithHttpInfo(int id, InMachineDTO inMachineDTO)
        {
            // verify the required parameter 'id' is set
            if (id == null)
            {
                throw new factory.api.client.Client.ApiException(400, "Missing required parameter 'id' when calling MachinesApi->MachinesPut");
            }

            // verify the required parameter 'inMachineDTO' is set
            if (inMachineDTO == null)
            {
                throw new factory.api.client.Client.ApiException(400, "Missing required parameter 'inMachineDTO' when calling MachinesApi->MachinesPut");
            }

            factory.api.client.Client.RequestOptions requestOptions = new factory.api.client.Client.RequestOptions();

            String[] @contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] @accepts = new String[] {
                "application/octet-stream"
            };

            var localVarContentType = factory.api.client.Client.ClientUtils.SelectHeaderContentType(@contentTypes);

            if (localVarContentType != null)
            {
                requestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = factory.api.client.Client.ClientUtils.SelectHeaderAccept(@accepts);

            if (localVarAccept != null)
            {
                requestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            if (id != null)
            {
                requestOptions.PathParameters.Add("id", factory.api.client.Client.ClientUtils.ParameterToString(id)); // path parameter
            }
            requestOptions.Data = inMachineDTO;


            // make the HTTP request

            var response = this.Client.Put <System.IO.Stream>("/api/v1/machines/{id}", requestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception exception = this.ExceptionFactory("MachinesPut", response);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(response);
        }