# coding: utf-8

"""
    Teleagronom

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 1.1.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from swagger_client.api_client import ApiClient


class V1rbCalculatorApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def rb_calculator_close_create(self, id, **kwargs):  # noqa: E501
        """rb_calculator_close_create  # noqa: E501

         Завершает работу с калькулятором       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_close_create(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.rb_calculator_close_create_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.rb_calculator_close_create_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def rb_calculator_close_create_with_http_info(self, id, **kwargs):  # noqa: E501
        """rb_calculator_close_create  # noqa: E501

         Завершает работу с калькулятором       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_close_create_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method rb_calculator_close_create" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `rb_calculator_close_create`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['jwtAuth', 'tokenAuth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/rb_calculator/rb_calculator/{id}/close/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RbCalculatorDetail',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def rb_calculator_create_calculator_create(self, body, **kwargs):  # noqa: E501
        """rb_calculator_create_calculator_create  # noqa: E501

         Создает расчетно балансовый калькулятор, для выбранных типов удобрений       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_create_calculator_create(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param RbcalculatorCreateCalculator body: (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.rb_calculator_create_calculator_create_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.rb_calculator_create_calculator_create_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def rb_calculator_create_calculator_create_with_http_info(self, body, **kwargs):  # noqa: E501
        """rb_calculator_create_calculator_create  # noqa: E501

         Создает расчетно балансовый калькулятор, для выбранных типов удобрений       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_create_calculator_create_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param RbcalculatorCreateCalculator body: (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method rb_calculator_create_calculator_create" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `rb_calculator_create_calculator_create`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'name' in params:
            form_params.append(('name', params['name']))  # noqa: E501
        if 'fertilizer_types' in params:
            form_params.append(('fertilizer_types', params['fertilizer_types']))  # noqa: E501
            collection_formats['fertilizer_types'] = 'multi'  # noqa: E501
        if 'name' in params:
            form_params.append(('name', params['name']))  # noqa: E501
        if 'fertilizer_types' in params:
            form_params.append(('fertilizer_types', params['fertilizer_types']))  # noqa: E501
            collection_formats['fertilizer_types'] = 'multi'  # noqa: E501

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['jwtAuth', 'tokenAuth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/rb_calculator/rb_calculator/create_calculator/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RbCalculatorDetail',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def rb_calculator_create_calculator_create(self, name2, fertilizer_types2, name, fertilizer_types, **kwargs):  # noqa: E501
        """rb_calculator_create_calculator_create  # noqa: E501

         Создает расчетно балансовый калькулятор, для выбранных типов удобрений       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_create_calculator_create(name2, fertilizer_types2, name, fertilizer_types, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str name2: (required)
        :param list[int] fertilizer_types2: (required)
        :param str name: (required)
        :param list[int] fertilizer_types: (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.rb_calculator_create_calculator_create_with_http_info(name2, fertilizer_types2, name, fertilizer_types, **kwargs)  # noqa: E501
        else:
            (data) = self.rb_calculator_create_calculator_create_with_http_info(name2, fertilizer_types2, name, fertilizer_types, **kwargs)  # noqa: E501
            return data

    def rb_calculator_create_calculator_create_with_http_info(self, name2, fertilizer_types2, name, fertilizer_types, **kwargs):  # noqa: E501
        """rb_calculator_create_calculator_create  # noqa: E501

         Создает расчетно балансовый калькулятор, для выбранных типов удобрений       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_create_calculator_create_with_http_info(name2, fertilizer_types2, name, fertilizer_types, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str name2: (required)
        :param list[int] fertilizer_types2: (required)
        :param str name: (required)
        :param list[int] fertilizer_types: (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['name2', 'fertilizer_types2', 'name', 'fertilizer_types']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method rb_calculator_create_calculator_create" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'name2' is set
        if ('name2' not in params or
                params['name2'] is None):
            raise ValueError("Missing the required parameter `name2` when calling `rb_calculator_create_calculator_create`")  # noqa: E501
        # verify the required parameter 'fertilizer_types2' is set
        if ('fertilizer_types2' not in params or
                params['fertilizer_types2'] is None):
            raise ValueError("Missing the required parameter `fertilizer_types2` when calling `rb_calculator_create_calculator_create`")  # noqa: E501
        # verify the required parameter 'name' is set
        if ('name' not in params or
                params['name'] is None):
            raise ValueError("Missing the required parameter `name` when calling `rb_calculator_create_calculator_create`")  # noqa: E501
        # verify the required parameter 'fertilizer_types' is set
        if ('fertilizer_types' not in params or
                params['fertilizer_types'] is None):
            raise ValueError("Missing the required parameter `fertilizer_types` when calling `rb_calculator_create_calculator_create`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'name' in params:
            form_params.append(('name', params['name']))  # noqa: E501
        if 'fertilizer_types' in params:
            form_params.append(('fertilizer_types', params['fertilizer_types']))  # noqa: E501
            collection_formats['fertilizer_types'] = 'multi'  # noqa: E501
        if 'name' in params:
            form_params.append(('name', params['name']))  # noqa: E501
        if 'fertilizer_types' in params:
            form_params.append(('fertilizer_types', params['fertilizer_types']))  # noqa: E501
            collection_formats['fertilizer_types'] = 'multi'  # noqa: E501

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['jwtAuth', 'tokenAuth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/rb_calculator/rb_calculator/create_calculator/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RbCalculatorDetail',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def rb_calculator_create_calculator_create(self, name2, fertilizer_types2, name, fertilizer_types, **kwargs):  # noqa: E501
        """rb_calculator_create_calculator_create  # noqa: E501

         Создает расчетно балансовый калькулятор, для выбранных типов удобрений       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_create_calculator_create(name2, fertilizer_types2, name, fertilizer_types, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str name2: (required)
        :param list[int] fertilizer_types2: (required)
        :param str name: (required)
        :param list[int] fertilizer_types: (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.rb_calculator_create_calculator_create_with_http_info(name2, fertilizer_types2, name, fertilizer_types, **kwargs)  # noqa: E501
        else:
            (data) = self.rb_calculator_create_calculator_create_with_http_info(name2, fertilizer_types2, name, fertilizer_types, **kwargs)  # noqa: E501
            return data

    def rb_calculator_create_calculator_create_with_http_info(self, name2, fertilizer_types2, name, fertilizer_types, **kwargs):  # noqa: E501
        """rb_calculator_create_calculator_create  # noqa: E501

         Создает расчетно балансовый калькулятор, для выбранных типов удобрений       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_create_calculator_create_with_http_info(name2, fertilizer_types2, name, fertilizer_types, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str name2: (required)
        :param list[int] fertilizer_types2: (required)
        :param str name: (required)
        :param list[int] fertilizer_types: (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['name2', 'fertilizer_types2', 'name', 'fertilizer_types']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method rb_calculator_create_calculator_create" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'name2' is set
        if ('name2' not in params or
                params['name2'] is None):
            raise ValueError("Missing the required parameter `name2` when calling `rb_calculator_create_calculator_create`")  # noqa: E501
        # verify the required parameter 'fertilizer_types2' is set
        if ('fertilizer_types2' not in params or
                params['fertilizer_types2'] is None):
            raise ValueError("Missing the required parameter `fertilizer_types2` when calling `rb_calculator_create_calculator_create`")  # noqa: E501
        # verify the required parameter 'name' is set
        if ('name' not in params or
                params['name'] is None):
            raise ValueError("Missing the required parameter `name` when calling `rb_calculator_create_calculator_create`")  # noqa: E501
        # verify the required parameter 'fertilizer_types' is set
        if ('fertilizer_types' not in params or
                params['fertilizer_types'] is None):
            raise ValueError("Missing the required parameter `fertilizer_types` when calling `rb_calculator_create_calculator_create`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'name' in params:
            form_params.append(('name', params['name']))  # noqa: E501
        if 'fertilizer_types' in params:
            form_params.append(('fertilizer_types', params['fertilizer_types']))  # noqa: E501
            collection_formats['fertilizer_types'] = 'multi'  # noqa: E501
        if 'name' in params:
            form_params.append(('name', params['name']))  # noqa: E501
        if 'fertilizer_types' in params:
            form_params.append(('fertilizer_types', params['fertilizer_types']))  # noqa: E501
            collection_formats['fertilizer_types'] = 'multi'  # noqa: E501

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['jwtAuth', 'tokenAuth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/rb_calculator/rb_calculator/create_calculator/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RbCalculatorDetail',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def rb_calculator_destroy(self, id, **kwargs):  # noqa: E501
        """rb_calculator_destroy  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_destroy(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.rb_calculator_destroy_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.rb_calculator_destroy_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def rb_calculator_destroy_with_http_info(self, id, **kwargs):  # noqa: E501
        """rb_calculator_destroy  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_destroy_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method rb_calculator_destroy" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `rb_calculator_destroy`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['jwtAuth', 'tokenAuth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/rb_calculator/rb_calculator/{id}/', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def rb_calculator_list(self, **kwargs):  # noqa: E501
        """rb_calculator_list  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_list(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str distinct: Example: ?distinct
        :param str filter: ?filter={\"id\":1}&filter={\"id\":[1,2,9],\"text\":[\"any\",\"text\"]}
        :param int page: A page number within the paginated result set.
        :param int page_size: Number of results to return per page.
        :param str sort: Example: ?sort=[\"id\",\"ASC\"]&sort=[\"name\",\"DESC\"]&sort=[\"title\"] default: DESC
        :return: PaginatedRbCalculatorList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.rb_calculator_list_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.rb_calculator_list_with_http_info(**kwargs)  # noqa: E501
            return data

    def rb_calculator_list_with_http_info(self, **kwargs):  # noqa: E501
        """rb_calculator_list  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_list_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str distinct: Example: ?distinct
        :param str filter: ?filter={\"id\":1}&filter={\"id\":[1,2,9],\"text\":[\"any\",\"text\"]}
        :param int page: A page number within the paginated result set.
        :param int page_size: Number of results to return per page.
        :param str sort: Example: ?sort=[\"id\",\"ASC\"]&sort=[\"name\",\"DESC\"]&sort=[\"title\"] default: DESC
        :return: PaginatedRbCalculatorList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['distinct', 'filter', 'page', 'page_size', 'sort']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method rb_calculator_list" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'distinct' in params:
            query_params.append(('distinct', params['distinct']))  # noqa: E501
        if 'filter' in params:
            query_params.append(('filter', params['filter']))  # noqa: E501
        if 'page' in params:
            query_params.append(('page', params['page']))  # noqa: E501
        if 'page_size' in params:
            query_params.append(('page_size', params['page_size']))  # noqa: E501
        if 'sort' in params:
            query_params.append(('sort', params['sort']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['jwtAuth', 'tokenAuth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/rb_calculator/rb_calculator/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PaginatedRbCalculatorList',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def rb_calculator_retrieve(self, id, **kwargs):  # noqa: E501
        """rb_calculator_retrieve  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_retrieve(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.rb_calculator_retrieve_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.rb_calculator_retrieve_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def rb_calculator_retrieve_with_http_info(self, id, **kwargs):  # noqa: E501
        """rb_calculator_retrieve  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_retrieve_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method rb_calculator_retrieve" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `rb_calculator_retrieve`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['jwtAuth', 'tokenAuth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/rb_calculator/rb_calculator/{id}/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RbCalculatorDetail',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def rb_calculator_set_calculation_parameters_create(self, body, id, **kwargs):  # noqa: E501
        """rb_calculator_set_calculation_parameters_create  # noqa: E501

         Устанавливает входные параметры расчета для РБ калькулятора.          Рассчитывает значение для полей:           Запас подвижных форм питательного элемента в пахотном слое почвы (nutrients_in_topsoil)           Норма внесения действующего вещества (rate_of_fertilization)         если все необходимые для расчета значения указаны       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_set_calculation_parameters_create(body, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param RbcalculatorSetCalculationParameters body: (required)
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.rb_calculator_set_calculation_parameters_create_with_http_info(body, id, **kwargs)  # noqa: E501
        else:
            (data) = self.rb_calculator_set_calculation_parameters_create_with_http_info(body, id, **kwargs)  # noqa: E501
            return data

    def rb_calculator_set_calculation_parameters_create_with_http_info(self, body, id, **kwargs):  # noqa: E501
        """rb_calculator_set_calculation_parameters_create  # noqa: E501

         Устанавливает входные параметры расчета для РБ калькулятора.          Рассчитывает значение для полей:           Запас подвижных форм питательного элемента в пахотном слое почвы (nutrients_in_topsoil)           Норма внесения действующего вещества (rate_of_fertilization)         если все необходимые для расчета значения указаны       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_set_calculation_parameters_create_with_http_info(body, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param RbcalculatorSetCalculationParameters body: (required)
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method rb_calculator_set_calculation_parameters_create" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `rb_calculator_set_calculation_parameters_create`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `rb_calculator_set_calculation_parameters_create`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'calculation_parameters' in params:
            form_params.append(('calculation_parameters', params['calculation_parameters']))  # noqa: E501
        if 'calculation_parameters' in params:
            form_params.append(('calculation_parameters', params['calculation_parameters']))  # noqa: E501

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['jwtAuth', 'tokenAuth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/rb_calculator/rb_calculator/{id}/set_calculation_parameters/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RbCalculatorDetail',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def rb_calculator_set_calculation_parameters_create(self, calculation_parameters2, calculation_parameters, id, **kwargs):  # noqa: E501
        """rb_calculator_set_calculation_parameters_create  # noqa: E501

         Устанавливает входные параметры расчета для РБ калькулятора.          Рассчитывает значение для полей:           Запас подвижных форм питательного элемента в пахотном слое почвы (nutrients_in_topsoil)           Норма внесения действующего вещества (rate_of_fertilization)         если все необходимые для расчета значения указаны       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_set_calculation_parameters_create(calculation_parameters2, calculation_parameters, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param RbCalculatorParametersDtoSerializer_ calculation_parameters2: (required)
        :param RbCalculatorParametersDtoSerializer_ calculation_parameters: (required)
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.rb_calculator_set_calculation_parameters_create_with_http_info(calculation_parameters2, calculation_parameters, id, **kwargs)  # noqa: E501
        else:
            (data) = self.rb_calculator_set_calculation_parameters_create_with_http_info(calculation_parameters2, calculation_parameters, id, **kwargs)  # noqa: E501
            return data

    def rb_calculator_set_calculation_parameters_create_with_http_info(self, calculation_parameters2, calculation_parameters, id, **kwargs):  # noqa: E501
        """rb_calculator_set_calculation_parameters_create  # noqa: E501

         Устанавливает входные параметры расчета для РБ калькулятора.          Рассчитывает значение для полей:           Запас подвижных форм питательного элемента в пахотном слое почвы (nutrients_in_topsoil)           Норма внесения действующего вещества (rate_of_fertilization)         если все необходимые для расчета значения указаны       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_set_calculation_parameters_create_with_http_info(calculation_parameters2, calculation_parameters, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param RbCalculatorParametersDtoSerializer_ calculation_parameters2: (required)
        :param RbCalculatorParametersDtoSerializer_ calculation_parameters: (required)
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['calculation_parameters2', 'calculation_parameters', 'id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method rb_calculator_set_calculation_parameters_create" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'calculation_parameters2' is set
        if ('calculation_parameters2' not in params or
                params['calculation_parameters2'] is None):
            raise ValueError("Missing the required parameter `calculation_parameters2` when calling `rb_calculator_set_calculation_parameters_create`")  # noqa: E501
        # verify the required parameter 'calculation_parameters' is set
        if ('calculation_parameters' not in params or
                params['calculation_parameters'] is None):
            raise ValueError("Missing the required parameter `calculation_parameters` when calling `rb_calculator_set_calculation_parameters_create`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `rb_calculator_set_calculation_parameters_create`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'calculation_parameters' in params:
            form_params.append(('calculation_parameters', params['calculation_parameters']))  # noqa: E501
        if 'calculation_parameters' in params:
            form_params.append(('calculation_parameters', params['calculation_parameters']))  # noqa: E501

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['jwtAuth', 'tokenAuth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/rb_calculator/rb_calculator/{id}/set_calculation_parameters/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RbCalculatorDetail',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def rb_calculator_set_calculation_parameters_create(self, calculation_parameters2, calculation_parameters, id, **kwargs):  # noqa: E501
        """rb_calculator_set_calculation_parameters_create  # noqa: E501

         Устанавливает входные параметры расчета для РБ калькулятора.          Рассчитывает значение для полей:           Запас подвижных форм питательного элемента в пахотном слое почвы (nutrients_in_topsoil)           Норма внесения действующего вещества (rate_of_fertilization)         если все необходимые для расчета значения указаны       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_set_calculation_parameters_create(calculation_parameters2, calculation_parameters, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param RbCalculatorParametersDtoSerializer_ calculation_parameters2: (required)
        :param RbCalculatorParametersDtoSerializer_ calculation_parameters: (required)
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.rb_calculator_set_calculation_parameters_create_with_http_info(calculation_parameters2, calculation_parameters, id, **kwargs)  # noqa: E501
        else:
            (data) = self.rb_calculator_set_calculation_parameters_create_with_http_info(calculation_parameters2, calculation_parameters, id, **kwargs)  # noqa: E501
            return data

    def rb_calculator_set_calculation_parameters_create_with_http_info(self, calculation_parameters2, calculation_parameters, id, **kwargs):  # noqa: E501
        """rb_calculator_set_calculation_parameters_create  # noqa: E501

         Устанавливает входные параметры расчета для РБ калькулятора.          Рассчитывает значение для полей:           Запас подвижных форм питательного элемента в пахотном слое почвы (nutrients_in_topsoil)           Норма внесения действующего вещества (rate_of_fertilization)         если все необходимые для расчета значения указаны       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_set_calculation_parameters_create_with_http_info(calculation_parameters2, calculation_parameters, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param RbCalculatorParametersDtoSerializer_ calculation_parameters2: (required)
        :param RbCalculatorParametersDtoSerializer_ calculation_parameters: (required)
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['calculation_parameters2', 'calculation_parameters', 'id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method rb_calculator_set_calculation_parameters_create" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'calculation_parameters2' is set
        if ('calculation_parameters2' not in params or
                params['calculation_parameters2'] is None):
            raise ValueError("Missing the required parameter `calculation_parameters2` when calling `rb_calculator_set_calculation_parameters_create`")  # noqa: E501
        # verify the required parameter 'calculation_parameters' is set
        if ('calculation_parameters' not in params or
                params['calculation_parameters'] is None):
            raise ValueError("Missing the required parameter `calculation_parameters` when calling `rb_calculator_set_calculation_parameters_create`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `rb_calculator_set_calculation_parameters_create`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'calculation_parameters' in params:
            form_params.append(('calculation_parameters', params['calculation_parameters']))  # noqa: E501
        if 'calculation_parameters' in params:
            form_params.append(('calculation_parameters', params['calculation_parameters']))  # noqa: E501

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['jwtAuth', 'tokenAuth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/rb_calculator/rb_calculator/{id}/set_calculation_parameters/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RbCalculatorDetail',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def rb_calculator_set_feeding_plan_create(self, body, id, **kwargs):  # noqa: E501
        """rb_calculator_set_feeding_plan_create  # noqa: E501

         Устанавливает схему распределения удобрения по сезону       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_set_feeding_plan_create(body, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param RbcalculatorSetFeedingPlan body: (required)
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.rb_calculator_set_feeding_plan_create_with_http_info(body, id, **kwargs)  # noqa: E501
        else:
            (data) = self.rb_calculator_set_feeding_plan_create_with_http_info(body, id, **kwargs)  # noqa: E501
            return data

    def rb_calculator_set_feeding_plan_create_with_http_info(self, body, id, **kwargs):  # noqa: E501
        """rb_calculator_set_feeding_plan_create  # noqa: E501

         Устанавливает схему распределения удобрения по сезону       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_set_feeding_plan_create_with_http_info(body, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param RbcalculatorSetFeedingPlan body: (required)
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method rb_calculator_set_feeding_plan_create" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `rb_calculator_set_feeding_plan_create`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `rb_calculator_set_feeding_plan_create`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'feeding_plans' in params:
            form_params.append(('feeding_plans', params['feeding_plans']))  # noqa: E501
            collection_formats['feeding_plans'] = 'multi'  # noqa: E501
        if 'feeding_plans' in params:
            form_params.append(('feeding_plans', params['feeding_plans']))  # noqa: E501
            collection_formats['feeding_plans'] = 'multi'  # noqa: E501

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['jwtAuth', 'tokenAuth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/rb_calculator/rb_calculator/{id}/set_feeding_plan/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RbCalculatorDetail',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def rb_calculator_set_feeding_plan_create(self, feeding_plans2, feeding_plans, id, **kwargs):  # noqa: E501
        """rb_calculator_set_feeding_plan_create  # noqa: E501

         Устанавливает схему распределения удобрения по сезону       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_set_feeding_plan_create(feeding_plans2, feeding_plans, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[RbCalculatorFertilizerFeedingPlanDtoSerializer_] feeding_plans2: (required)
        :param list[RbCalculatorFertilizerFeedingPlanDtoSerializer_] feeding_plans: (required)
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.rb_calculator_set_feeding_plan_create_with_http_info(feeding_plans2, feeding_plans, id, **kwargs)  # noqa: E501
        else:
            (data) = self.rb_calculator_set_feeding_plan_create_with_http_info(feeding_plans2, feeding_plans, id, **kwargs)  # noqa: E501
            return data

    def rb_calculator_set_feeding_plan_create_with_http_info(self, feeding_plans2, feeding_plans, id, **kwargs):  # noqa: E501
        """rb_calculator_set_feeding_plan_create  # noqa: E501

         Устанавливает схему распределения удобрения по сезону       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_set_feeding_plan_create_with_http_info(feeding_plans2, feeding_plans, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[RbCalculatorFertilizerFeedingPlanDtoSerializer_] feeding_plans2: (required)
        :param list[RbCalculatorFertilizerFeedingPlanDtoSerializer_] feeding_plans: (required)
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['feeding_plans2', 'feeding_plans', 'id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method rb_calculator_set_feeding_plan_create" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'feeding_plans2' is set
        if ('feeding_plans2' not in params or
                params['feeding_plans2'] is None):
            raise ValueError("Missing the required parameter `feeding_plans2` when calling `rb_calculator_set_feeding_plan_create`")  # noqa: E501
        # verify the required parameter 'feeding_plans' is set
        if ('feeding_plans' not in params or
                params['feeding_plans'] is None):
            raise ValueError("Missing the required parameter `feeding_plans` when calling `rb_calculator_set_feeding_plan_create`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `rb_calculator_set_feeding_plan_create`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'feeding_plans' in params:
            form_params.append(('feeding_plans', params['feeding_plans']))  # noqa: E501
            collection_formats['feeding_plans'] = 'multi'  # noqa: E501
        if 'feeding_plans' in params:
            form_params.append(('feeding_plans', params['feeding_plans']))  # noqa: E501
            collection_formats['feeding_plans'] = 'multi'  # noqa: E501

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['jwtAuth', 'tokenAuth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/rb_calculator/rb_calculator/{id}/set_feeding_plan/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RbCalculatorDetail',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def rb_calculator_set_feeding_plan_create(self, feeding_plans2, feeding_plans, id, **kwargs):  # noqa: E501
        """rb_calculator_set_feeding_plan_create  # noqa: E501

         Устанавливает схему распределения удобрения по сезону       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_set_feeding_plan_create(feeding_plans2, feeding_plans, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[RbCalculatorFertilizerFeedingPlanDtoSerializer_] feeding_plans2: (required)
        :param list[RbCalculatorFertilizerFeedingPlanDtoSerializer_] feeding_plans: (required)
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.rb_calculator_set_feeding_plan_create_with_http_info(feeding_plans2, feeding_plans, id, **kwargs)  # noqa: E501
        else:
            (data) = self.rb_calculator_set_feeding_plan_create_with_http_info(feeding_plans2, feeding_plans, id, **kwargs)  # noqa: E501
            return data

    def rb_calculator_set_feeding_plan_create_with_http_info(self, feeding_plans2, feeding_plans, id, **kwargs):  # noqa: E501
        """rb_calculator_set_feeding_plan_create  # noqa: E501

         Устанавливает схему распределения удобрения по сезону       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_set_feeding_plan_create_with_http_info(feeding_plans2, feeding_plans, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[RbCalculatorFertilizerFeedingPlanDtoSerializer_] feeding_plans2: (required)
        :param list[RbCalculatorFertilizerFeedingPlanDtoSerializer_] feeding_plans: (required)
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['feeding_plans2', 'feeding_plans', 'id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method rb_calculator_set_feeding_plan_create" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'feeding_plans2' is set
        if ('feeding_plans2' not in params or
                params['feeding_plans2'] is None):
            raise ValueError("Missing the required parameter `feeding_plans2` when calling `rb_calculator_set_feeding_plan_create`")  # noqa: E501
        # verify the required parameter 'feeding_plans' is set
        if ('feeding_plans' not in params or
                params['feeding_plans'] is None):
            raise ValueError("Missing the required parameter `feeding_plans` when calling `rb_calculator_set_feeding_plan_create`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `rb_calculator_set_feeding_plan_create`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'feeding_plans' in params:
            form_params.append(('feeding_plans', params['feeding_plans']))  # noqa: E501
            collection_formats['feeding_plans'] = 'multi'  # noqa: E501
        if 'feeding_plans' in params:
            form_params.append(('feeding_plans', params['feeding_plans']))  # noqa: E501
            collection_formats['feeding_plans'] = 'multi'  # noqa: E501

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['jwtAuth', 'tokenAuth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/rb_calculator/rb_calculator/{id}/set_feeding_plan/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RbCalculatorDetail',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def rb_calculator_set_fertilizer_create(self, body, id, **kwargs):  # noqa: E501
        """rb_calculator_set_fertilizer_create  # noqa: E501

         Сохраняет выбранное пользователем удобрение.          Производит расчет нормы внесения удобрения (required_volumes)       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_set_fertilizer_create(body, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param RbcalculatorSetFertilizer body: (required)
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.rb_calculator_set_fertilizer_create_with_http_info(body, id, **kwargs)  # noqa: E501
        else:
            (data) = self.rb_calculator_set_fertilizer_create_with_http_info(body, id, **kwargs)  # noqa: E501
            return data

    def rb_calculator_set_fertilizer_create_with_http_info(self, body, id, **kwargs):  # noqa: E501
        """rb_calculator_set_fertilizer_create  # noqa: E501

         Сохраняет выбранное пользователем удобрение.          Производит расчет нормы внесения удобрения (required_volumes)       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_set_fertilizer_create_with_http_info(body, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param RbcalculatorSetFertilizer body: (required)
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method rb_calculator_set_fertilizer_create" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `rb_calculator_set_fertilizer_create`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `rb_calculator_set_fertilizer_create`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'fertilizers' in params:
            form_params.append(('fertilizers', params['fertilizers']))  # noqa: E501
            collection_formats['fertilizers'] = 'multi'  # noqa: E501
        if 'fertilizers' in params:
            form_params.append(('fertilizers', params['fertilizers']))  # noqa: E501
            collection_formats['fertilizers'] = 'multi'  # noqa: E501

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['jwtAuth', 'tokenAuth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/rb_calculator/rb_calculator/{id}/set_fertilizer/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RbCalculatorDetail',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def rb_calculator_set_fertilizer_create(self, fertilizers2, fertilizers, id, **kwargs):  # noqa: E501
        """rb_calculator_set_fertilizer_create  # noqa: E501

         Сохраняет выбранное пользователем удобрение.          Производит расчет нормы внесения удобрения (required_volumes)       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_set_fertilizer_create(fertilizers2, fertilizers, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[RbCalculatorFertilizerDtoSerializer_] fertilizers2: (required)
        :param list[RbCalculatorFertilizerDtoSerializer_] fertilizers: (required)
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.rb_calculator_set_fertilizer_create_with_http_info(fertilizers2, fertilizers, id, **kwargs)  # noqa: E501
        else:
            (data) = self.rb_calculator_set_fertilizer_create_with_http_info(fertilizers2, fertilizers, id, **kwargs)  # noqa: E501
            return data

    def rb_calculator_set_fertilizer_create_with_http_info(self, fertilizers2, fertilizers, id, **kwargs):  # noqa: E501
        """rb_calculator_set_fertilizer_create  # noqa: E501

         Сохраняет выбранное пользователем удобрение.          Производит расчет нормы внесения удобрения (required_volumes)       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_set_fertilizer_create_with_http_info(fertilizers2, fertilizers, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[RbCalculatorFertilizerDtoSerializer_] fertilizers2: (required)
        :param list[RbCalculatorFertilizerDtoSerializer_] fertilizers: (required)
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['fertilizers2', 'fertilizers', 'id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method rb_calculator_set_fertilizer_create" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'fertilizers2' is set
        if ('fertilizers2' not in params or
                params['fertilizers2'] is None):
            raise ValueError("Missing the required parameter `fertilizers2` when calling `rb_calculator_set_fertilizer_create`")  # noqa: E501
        # verify the required parameter 'fertilizers' is set
        if ('fertilizers' not in params or
                params['fertilizers'] is None):
            raise ValueError("Missing the required parameter `fertilizers` when calling `rb_calculator_set_fertilizer_create`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `rb_calculator_set_fertilizer_create`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'fertilizers' in params:
            form_params.append(('fertilizers', params['fertilizers']))  # noqa: E501
            collection_formats['fertilizers'] = 'multi'  # noqa: E501
        if 'fertilizers' in params:
            form_params.append(('fertilizers', params['fertilizers']))  # noqa: E501
            collection_formats['fertilizers'] = 'multi'  # noqa: E501

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['jwtAuth', 'tokenAuth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/rb_calculator/rb_calculator/{id}/set_fertilizer/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RbCalculatorDetail',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def rb_calculator_set_fertilizer_create(self, fertilizers2, fertilizers, id, **kwargs):  # noqa: E501
        """rb_calculator_set_fertilizer_create  # noqa: E501

         Сохраняет выбранное пользователем удобрение.          Производит расчет нормы внесения удобрения (required_volumes)       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_set_fertilizer_create(fertilizers2, fertilizers, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[RbCalculatorFertilizerDtoSerializer_] fertilizers2: (required)
        :param list[RbCalculatorFertilizerDtoSerializer_] fertilizers: (required)
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.rb_calculator_set_fertilizer_create_with_http_info(fertilizers2, fertilizers, id, **kwargs)  # noqa: E501
        else:
            (data) = self.rb_calculator_set_fertilizer_create_with_http_info(fertilizers2, fertilizers, id, **kwargs)  # noqa: E501
            return data

    def rb_calculator_set_fertilizer_create_with_http_info(self, fertilizers2, fertilizers, id, **kwargs):  # noqa: E501
        """rb_calculator_set_fertilizer_create  # noqa: E501

         Сохраняет выбранное пользователем удобрение.          Производит расчет нормы внесения удобрения (required_volumes)       # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.rb_calculator_set_fertilizer_create_with_http_info(fertilizers2, fertilizers, id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[RbCalculatorFertilizerDtoSerializer_] fertilizers2: (required)
        :param list[RbCalculatorFertilizerDtoSerializer_] fertilizers: (required)
        :param int id: A unique integer value identifying this Расчетно балансовый калькулятор. (required)
        :return: RbCalculatorDetail
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['fertilizers2', 'fertilizers', 'id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method rb_calculator_set_fertilizer_create" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'fertilizers2' is set
        if ('fertilizers2' not in params or
                params['fertilizers2'] is None):
            raise ValueError("Missing the required parameter `fertilizers2` when calling `rb_calculator_set_fertilizer_create`")  # noqa: E501
        # verify the required parameter 'fertilizers' is set
        if ('fertilizers' not in params or
                params['fertilizers'] is None):
            raise ValueError("Missing the required parameter `fertilizers` when calling `rb_calculator_set_fertilizer_create`")  # noqa: E501
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `rb_calculator_set_fertilizer_create`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'fertilizers' in params:
            form_params.append(('fertilizers', params['fertilizers']))  # noqa: E501
            collection_formats['fertilizers'] = 'multi'  # noqa: E501
        if 'fertilizers' in params:
            form_params.append(('fertilizers', params['fertilizers']))  # noqa: E501
            collection_formats['fertilizers'] = 'multi'  # noqa: E501

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])  # noqa: E501

        # Authentication setting
        auth_settings = ['jwtAuth', 'tokenAuth']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/rb_calculator/rb_calculator/{id}/set_fertilizer/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RbCalculatorDetail',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)
