# 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 V1agrochemicalAnalysisRequestApi(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 agrochemical_analysis_request_create_agrochemical_analysis_request_create(self, body, **kwargs):  # noqa: E501
        """agrochemical_analysis_request_create_agrochemical_analysis_request_create  # noqa: E501

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

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

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

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

        :param async_req bool
        :param RosselkhozBankCreateAgrochemicalAnalysisRequestCommand body: (required)
        :return: RosselkhozBankCreateAgrochemicalAnalysisRequestCommand
                 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 agrochemical_analysis_request_create_agrochemical_analysis_request_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 `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'request_uid' in params:
            form_params.append(('request_uid', params['request_uid']))  # noqa: E501
        if 'client_uid' in params:
            form_params.append(('client_uid', params['client_uid']))  # noqa: E501
        if 'sampling_date' in params:
            form_params.append(('sampling_date', params['sampling_date']))  # noqa: E501
        if 'name' in params:
            form_params.append(('name', params['name']))  # noqa: E501
        if 'phone' in params:
            form_params.append(('phone', params['phone']))  # noqa: E501
        if 'region' in params:
            form_params.append(('region', params['region']))  # noqa: E501
        if 'district' in params:
            form_params.append(('district', params['district']))  # noqa: E501
        if 'address' in params:
            form_params.append(('address', params['address']))  # noqa: E501
        if 'field_number' in params:
            form_params.append(('field_number', params['field_number']))  # noqa: E501
        if 'sampling_coordinates' in params:
            form_params.append(('sampling_coordinates', params['sampling_coordinates']))  # noqa: E501
        if 'sampling_depth' in params:
            form_params.append(('sampling_depth', params['sampling_depth']))  # noqa: E501
        if 'request_uid' in params:
            form_params.append(('request_uid', params['request_uid']))  # noqa: E501
        if 'client_uid' in params:
            form_params.append(('client_uid', params['client_uid']))  # noqa: E501
        if 'sampling_date' in params:
            form_params.append(('sampling_date', params['sampling_date']))  # noqa: E501
        if 'name' in params:
            form_params.append(('name', params['name']))  # noqa: E501
        if 'phone' in params:
            form_params.append(('phone', params['phone']))  # noqa: E501
        if 'region' in params:
            form_params.append(('region', params['region']))  # noqa: E501
        if 'district' in params:
            form_params.append(('district', params['district']))  # noqa: E501
        if 'address' in params:
            form_params.append(('address', params['address']))  # noqa: E501
        if 'field_number' in params:
            form_params.append(('field_number', params['field_number']))  # noqa: E501
        if 'sampling_coordinates' in params:
            form_params.append(('sampling_coordinates', params['sampling_coordinates']))  # noqa: E501
        if 'sampling_depth' in params:
            form_params.append(('sampling_depth', params['sampling_depth']))  # 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/rosselkhoz_bank/agrochemical_analysis_request/create_agrochemical_analysis_request/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RosselkhozBankCreateAgrochemicalAnalysisRequestCommand',  # 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 agrochemical_analysis_request_create_agrochemical_analysis_request_create(self, request_uid2, client_uid2, sampling_date2, name2, phone2, region2, district2, address2, field_number2, sampling_coordinates2, sampling_depth2, request_uid, client_uid, sampling_date, name, phone, region, district, address, field_number, sampling_coordinates, sampling_depth, **kwargs):  # noqa: E501
        """agrochemical_analysis_request_create_agrochemical_analysis_request_create  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.agrochemical_analysis_request_create_agrochemical_analysis_request_create(request_uid2, client_uid2, sampling_date2, name2, phone2, region2, district2, address2, field_number2, sampling_coordinates2, sampling_depth2, request_uid, client_uid, sampling_date, name, phone, region, district, address, field_number, sampling_coordinates, sampling_depth, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str request_uid2: (required)
        :param str client_uid2: (required)
        :param date sampling_date2: (required)
        :param str name2: (required)
        :param str phone2: (required)
        :param int region2: (required)
        :param str district2: (required)
        :param str address2: (required)
        :param str field_number2: (required)
        :param str sampling_coordinates2: (required)
        :param int sampling_depth2: (required)
        :param str request_uid: (required)
        :param str client_uid: (required)
        :param date sampling_date: (required)
        :param str name: (required)
        :param str phone: (required)
        :param int region: (required)
        :param str district: (required)
        :param str address: (required)
        :param str field_number: (required)
        :param str sampling_coordinates: (required)
        :param int sampling_depth: (required)
        :return: RosselkhozBankCreateAgrochemicalAnalysisRequestCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.agrochemical_analysis_request_create_agrochemical_analysis_request_create_with_http_info(request_uid2, client_uid2, sampling_date2, name2, phone2, region2, district2, address2, field_number2, sampling_coordinates2, sampling_depth2, request_uid, client_uid, sampling_date, name, phone, region, district, address, field_number, sampling_coordinates, sampling_depth, **kwargs)  # noqa: E501
        else:
            (data) = self.agrochemical_analysis_request_create_agrochemical_analysis_request_create_with_http_info(request_uid2, client_uid2, sampling_date2, name2, phone2, region2, district2, address2, field_number2, sampling_coordinates2, sampling_depth2, request_uid, client_uid, sampling_date, name, phone, region, district, address, field_number, sampling_coordinates, sampling_depth, **kwargs)  # noqa: E501
            return data

    def agrochemical_analysis_request_create_agrochemical_analysis_request_create_with_http_info(self, request_uid2, client_uid2, sampling_date2, name2, phone2, region2, district2, address2, field_number2, sampling_coordinates2, sampling_depth2, request_uid, client_uid, sampling_date, name, phone, region, district, address, field_number, sampling_coordinates, sampling_depth, **kwargs):  # noqa: E501
        """agrochemical_analysis_request_create_agrochemical_analysis_request_create  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.agrochemical_analysis_request_create_agrochemical_analysis_request_create_with_http_info(request_uid2, client_uid2, sampling_date2, name2, phone2, region2, district2, address2, field_number2, sampling_coordinates2, sampling_depth2, request_uid, client_uid, sampling_date, name, phone, region, district, address, field_number, sampling_coordinates, sampling_depth, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str request_uid2: (required)
        :param str client_uid2: (required)
        :param date sampling_date2: (required)
        :param str name2: (required)
        :param str phone2: (required)
        :param int region2: (required)
        :param str district2: (required)
        :param str address2: (required)
        :param str field_number2: (required)
        :param str sampling_coordinates2: (required)
        :param int sampling_depth2: (required)
        :param str request_uid: (required)
        :param str client_uid: (required)
        :param date sampling_date: (required)
        :param str name: (required)
        :param str phone: (required)
        :param int region: (required)
        :param str district: (required)
        :param str address: (required)
        :param str field_number: (required)
        :param str sampling_coordinates: (required)
        :param int sampling_depth: (required)
        :return: RosselkhozBankCreateAgrochemicalAnalysisRequestCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['request_uid2', 'client_uid2', 'sampling_date2', 'name2', 'phone2', 'region2', 'district2', 'address2', 'field_number2', 'sampling_coordinates2', 'sampling_depth2', 'request_uid', 'client_uid', 'sampling_date', 'name', 'phone', 'region', 'district', 'address', 'field_number', 'sampling_coordinates', 'sampling_depth']  # 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 agrochemical_analysis_request_create_agrochemical_analysis_request_create" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'request_uid2' is set
        if ('request_uid2' not in params or
                params['request_uid2'] is None):
            raise ValueError("Missing the required parameter `request_uid2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'client_uid2' is set
        if ('client_uid2' not in params or
                params['client_uid2'] is None):
            raise ValueError("Missing the required parameter `client_uid2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'sampling_date2' is set
        if ('sampling_date2' not in params or
                params['sampling_date2'] is None):
            raise ValueError("Missing the required parameter `sampling_date2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # 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 `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'phone2' is set
        if ('phone2' not in params or
                params['phone2'] is None):
            raise ValueError("Missing the required parameter `phone2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'region2' is set
        if ('region2' not in params or
                params['region2'] is None):
            raise ValueError("Missing the required parameter `region2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'district2' is set
        if ('district2' not in params or
                params['district2'] is None):
            raise ValueError("Missing the required parameter `district2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'address2' is set
        if ('address2' not in params or
                params['address2'] is None):
            raise ValueError("Missing the required parameter `address2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'field_number2' is set
        if ('field_number2' not in params or
                params['field_number2'] is None):
            raise ValueError("Missing the required parameter `field_number2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'sampling_coordinates2' is set
        if ('sampling_coordinates2' not in params or
                params['sampling_coordinates2'] is None):
            raise ValueError("Missing the required parameter `sampling_coordinates2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'sampling_depth2' is set
        if ('sampling_depth2' not in params or
                params['sampling_depth2'] is None):
            raise ValueError("Missing the required parameter `sampling_depth2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'request_uid' is set
        if ('request_uid' not in params or
                params['request_uid'] is None):
            raise ValueError("Missing the required parameter `request_uid` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'client_uid' is set
        if ('client_uid' not in params or
                params['client_uid'] is None):
            raise ValueError("Missing the required parameter `client_uid` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'sampling_date' is set
        if ('sampling_date' not in params or
                params['sampling_date'] is None):
            raise ValueError("Missing the required parameter `sampling_date` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_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 `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'phone' is set
        if ('phone' not in params or
                params['phone'] is None):
            raise ValueError("Missing the required parameter `phone` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'region' is set
        if ('region' not in params or
                params['region'] is None):
            raise ValueError("Missing the required parameter `region` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'district' is set
        if ('district' not in params or
                params['district'] is None):
            raise ValueError("Missing the required parameter `district` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'address' is set
        if ('address' not in params or
                params['address'] is None):
            raise ValueError("Missing the required parameter `address` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'field_number' is set
        if ('field_number' not in params or
                params['field_number'] is None):
            raise ValueError("Missing the required parameter `field_number` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'sampling_coordinates' is set
        if ('sampling_coordinates' not in params or
                params['sampling_coordinates'] is None):
            raise ValueError("Missing the required parameter `sampling_coordinates` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'sampling_depth' is set
        if ('sampling_depth' not in params or
                params['sampling_depth'] is None):
            raise ValueError("Missing the required parameter `sampling_depth` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'request_uid' in params:
            form_params.append(('request_uid', params['request_uid']))  # noqa: E501
        if 'client_uid' in params:
            form_params.append(('client_uid', params['client_uid']))  # noqa: E501
        if 'sampling_date' in params:
            form_params.append(('sampling_date', params['sampling_date']))  # noqa: E501
        if 'name' in params:
            form_params.append(('name', params['name']))  # noqa: E501
        if 'phone' in params:
            form_params.append(('phone', params['phone']))  # noqa: E501
        if 'region' in params:
            form_params.append(('region', params['region']))  # noqa: E501
        if 'district' in params:
            form_params.append(('district', params['district']))  # noqa: E501
        if 'address' in params:
            form_params.append(('address', params['address']))  # noqa: E501
        if 'field_number' in params:
            form_params.append(('field_number', params['field_number']))  # noqa: E501
        if 'sampling_coordinates' in params:
            form_params.append(('sampling_coordinates', params['sampling_coordinates']))  # noqa: E501
        if 'sampling_depth' in params:
            form_params.append(('sampling_depth', params['sampling_depth']))  # noqa: E501
        if 'request_uid' in params:
            form_params.append(('request_uid', params['request_uid']))  # noqa: E501
        if 'client_uid' in params:
            form_params.append(('client_uid', params['client_uid']))  # noqa: E501
        if 'sampling_date' in params:
            form_params.append(('sampling_date', params['sampling_date']))  # noqa: E501
        if 'name' in params:
            form_params.append(('name', params['name']))  # noqa: E501
        if 'phone' in params:
            form_params.append(('phone', params['phone']))  # noqa: E501
        if 'region' in params:
            form_params.append(('region', params['region']))  # noqa: E501
        if 'district' in params:
            form_params.append(('district', params['district']))  # noqa: E501
        if 'address' in params:
            form_params.append(('address', params['address']))  # noqa: E501
        if 'field_number' in params:
            form_params.append(('field_number', params['field_number']))  # noqa: E501
        if 'sampling_coordinates' in params:
            form_params.append(('sampling_coordinates', params['sampling_coordinates']))  # noqa: E501
        if 'sampling_depth' in params:
            form_params.append(('sampling_depth', params['sampling_depth']))  # 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/rosselkhoz_bank/agrochemical_analysis_request/create_agrochemical_analysis_request/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RosselkhozBankCreateAgrochemicalAnalysisRequestCommand',  # 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 agrochemical_analysis_request_create_agrochemical_analysis_request_create(self, request_uid2, client_uid2, sampling_date2, name2, phone2, region2, district2, address2, field_number2, sampling_coordinates2, sampling_depth2, request_uid, client_uid, sampling_date, name, phone, region, district, address, field_number, sampling_coordinates, sampling_depth, **kwargs):  # noqa: E501
        """agrochemical_analysis_request_create_agrochemical_analysis_request_create  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.agrochemical_analysis_request_create_agrochemical_analysis_request_create(request_uid2, client_uid2, sampling_date2, name2, phone2, region2, district2, address2, field_number2, sampling_coordinates2, sampling_depth2, request_uid, client_uid, sampling_date, name, phone, region, district, address, field_number, sampling_coordinates, sampling_depth, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str request_uid2: (required)
        :param str client_uid2: (required)
        :param date sampling_date2: (required)
        :param str name2: (required)
        :param str phone2: (required)
        :param int region2: (required)
        :param str district2: (required)
        :param str address2: (required)
        :param str field_number2: (required)
        :param str sampling_coordinates2: (required)
        :param int sampling_depth2: (required)
        :param str request_uid: (required)
        :param str client_uid: (required)
        :param date sampling_date: (required)
        :param str name: (required)
        :param str phone: (required)
        :param int region: (required)
        :param str district: (required)
        :param str address: (required)
        :param str field_number: (required)
        :param str sampling_coordinates: (required)
        :param int sampling_depth: (required)
        :return: RosselkhozBankCreateAgrochemicalAnalysisRequestCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.agrochemical_analysis_request_create_agrochemical_analysis_request_create_with_http_info(request_uid2, client_uid2, sampling_date2, name2, phone2, region2, district2, address2, field_number2, sampling_coordinates2, sampling_depth2, request_uid, client_uid, sampling_date, name, phone, region, district, address, field_number, sampling_coordinates, sampling_depth, **kwargs)  # noqa: E501
        else:
            (data) = self.agrochemical_analysis_request_create_agrochemical_analysis_request_create_with_http_info(request_uid2, client_uid2, sampling_date2, name2, phone2, region2, district2, address2, field_number2, sampling_coordinates2, sampling_depth2, request_uid, client_uid, sampling_date, name, phone, region, district, address, field_number, sampling_coordinates, sampling_depth, **kwargs)  # noqa: E501
            return data

    def agrochemical_analysis_request_create_agrochemical_analysis_request_create_with_http_info(self, request_uid2, client_uid2, sampling_date2, name2, phone2, region2, district2, address2, field_number2, sampling_coordinates2, sampling_depth2, request_uid, client_uid, sampling_date, name, phone, region, district, address, field_number, sampling_coordinates, sampling_depth, **kwargs):  # noqa: E501
        """agrochemical_analysis_request_create_agrochemical_analysis_request_create  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.agrochemical_analysis_request_create_agrochemical_analysis_request_create_with_http_info(request_uid2, client_uid2, sampling_date2, name2, phone2, region2, district2, address2, field_number2, sampling_coordinates2, sampling_depth2, request_uid, client_uid, sampling_date, name, phone, region, district, address, field_number, sampling_coordinates, sampling_depth, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str request_uid2: (required)
        :param str client_uid2: (required)
        :param date sampling_date2: (required)
        :param str name2: (required)
        :param str phone2: (required)
        :param int region2: (required)
        :param str district2: (required)
        :param str address2: (required)
        :param str field_number2: (required)
        :param str sampling_coordinates2: (required)
        :param int sampling_depth2: (required)
        :param str request_uid: (required)
        :param str client_uid: (required)
        :param date sampling_date: (required)
        :param str name: (required)
        :param str phone: (required)
        :param int region: (required)
        :param str district: (required)
        :param str address: (required)
        :param str field_number: (required)
        :param str sampling_coordinates: (required)
        :param int sampling_depth: (required)
        :return: RosselkhozBankCreateAgrochemicalAnalysisRequestCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['request_uid2', 'client_uid2', 'sampling_date2', 'name2', 'phone2', 'region2', 'district2', 'address2', 'field_number2', 'sampling_coordinates2', 'sampling_depth2', 'request_uid', 'client_uid', 'sampling_date', 'name', 'phone', 'region', 'district', 'address', 'field_number', 'sampling_coordinates', 'sampling_depth']  # 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 agrochemical_analysis_request_create_agrochemical_analysis_request_create" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'request_uid2' is set
        if ('request_uid2' not in params or
                params['request_uid2'] is None):
            raise ValueError("Missing the required parameter `request_uid2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'client_uid2' is set
        if ('client_uid2' not in params or
                params['client_uid2'] is None):
            raise ValueError("Missing the required parameter `client_uid2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'sampling_date2' is set
        if ('sampling_date2' not in params or
                params['sampling_date2'] is None):
            raise ValueError("Missing the required parameter `sampling_date2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # 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 `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'phone2' is set
        if ('phone2' not in params or
                params['phone2'] is None):
            raise ValueError("Missing the required parameter `phone2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'region2' is set
        if ('region2' not in params or
                params['region2'] is None):
            raise ValueError("Missing the required parameter `region2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'district2' is set
        if ('district2' not in params or
                params['district2'] is None):
            raise ValueError("Missing the required parameter `district2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'address2' is set
        if ('address2' not in params or
                params['address2'] is None):
            raise ValueError("Missing the required parameter `address2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'field_number2' is set
        if ('field_number2' not in params or
                params['field_number2'] is None):
            raise ValueError("Missing the required parameter `field_number2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'sampling_coordinates2' is set
        if ('sampling_coordinates2' not in params or
                params['sampling_coordinates2'] is None):
            raise ValueError("Missing the required parameter `sampling_coordinates2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'sampling_depth2' is set
        if ('sampling_depth2' not in params or
                params['sampling_depth2'] is None):
            raise ValueError("Missing the required parameter `sampling_depth2` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'request_uid' is set
        if ('request_uid' not in params or
                params['request_uid'] is None):
            raise ValueError("Missing the required parameter `request_uid` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'client_uid' is set
        if ('client_uid' not in params or
                params['client_uid'] is None):
            raise ValueError("Missing the required parameter `client_uid` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'sampling_date' is set
        if ('sampling_date' not in params or
                params['sampling_date'] is None):
            raise ValueError("Missing the required parameter `sampling_date` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_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 `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'phone' is set
        if ('phone' not in params or
                params['phone'] is None):
            raise ValueError("Missing the required parameter `phone` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'region' is set
        if ('region' not in params or
                params['region'] is None):
            raise ValueError("Missing the required parameter `region` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'district' is set
        if ('district' not in params or
                params['district'] is None):
            raise ValueError("Missing the required parameter `district` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'address' is set
        if ('address' not in params or
                params['address'] is None):
            raise ValueError("Missing the required parameter `address` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'field_number' is set
        if ('field_number' not in params or
                params['field_number'] is None):
            raise ValueError("Missing the required parameter `field_number` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'sampling_coordinates' is set
        if ('sampling_coordinates' not in params or
                params['sampling_coordinates'] is None):
            raise ValueError("Missing the required parameter `sampling_coordinates` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'sampling_depth' is set
        if ('sampling_depth' not in params or
                params['sampling_depth'] is None):
            raise ValueError("Missing the required parameter `sampling_depth` when calling `agrochemical_analysis_request_create_agrochemical_analysis_request_create`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'request_uid' in params:
            form_params.append(('request_uid', params['request_uid']))  # noqa: E501
        if 'client_uid' in params:
            form_params.append(('client_uid', params['client_uid']))  # noqa: E501
        if 'sampling_date' in params:
            form_params.append(('sampling_date', params['sampling_date']))  # noqa: E501
        if 'name' in params:
            form_params.append(('name', params['name']))  # noqa: E501
        if 'phone' in params:
            form_params.append(('phone', params['phone']))  # noqa: E501
        if 'region' in params:
            form_params.append(('region', params['region']))  # noqa: E501
        if 'district' in params:
            form_params.append(('district', params['district']))  # noqa: E501
        if 'address' in params:
            form_params.append(('address', params['address']))  # noqa: E501
        if 'field_number' in params:
            form_params.append(('field_number', params['field_number']))  # noqa: E501
        if 'sampling_coordinates' in params:
            form_params.append(('sampling_coordinates', params['sampling_coordinates']))  # noqa: E501
        if 'sampling_depth' in params:
            form_params.append(('sampling_depth', params['sampling_depth']))  # noqa: E501
        if 'request_uid' in params:
            form_params.append(('request_uid', params['request_uid']))  # noqa: E501
        if 'client_uid' in params:
            form_params.append(('client_uid', params['client_uid']))  # noqa: E501
        if 'sampling_date' in params:
            form_params.append(('sampling_date', params['sampling_date']))  # noqa: E501
        if 'name' in params:
            form_params.append(('name', params['name']))  # noqa: E501
        if 'phone' in params:
            form_params.append(('phone', params['phone']))  # noqa: E501
        if 'region' in params:
            form_params.append(('region', params['region']))  # noqa: E501
        if 'district' in params:
            form_params.append(('district', params['district']))  # noqa: E501
        if 'address' in params:
            form_params.append(('address', params['address']))  # noqa: E501
        if 'field_number' in params:
            form_params.append(('field_number', params['field_number']))  # noqa: E501
        if 'sampling_coordinates' in params:
            form_params.append(('sampling_coordinates', params['sampling_coordinates']))  # noqa: E501
        if 'sampling_depth' in params:
            form_params.append(('sampling_depth', params['sampling_depth']))  # 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/rosselkhoz_bank/agrochemical_analysis_request/create_agrochemical_analysis_request/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RosselkhozBankCreateAgrochemicalAnalysisRequestCommand',  # 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 agrochemical_analysis_request_list(self, **kwargs):  # noqa: E501
        """agrochemical_analysis_request_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.agrochemical_analysis_request_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: PaginatedRosselkhozBankAgrochemicalAnalysisRequestList
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.agrochemical_analysis_request_list_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.agrochemical_analysis_request_list_with_http_info(**kwargs)  # noqa: E501
            return data

    def agrochemical_analysis_request_list_with_http_info(self, **kwargs):  # noqa: E501
        """agrochemical_analysis_request_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.agrochemical_analysis_request_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: PaginatedRosselkhozBankAgrochemicalAnalysisRequestList
                 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 agrochemical_analysis_request_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/rosselkhoz_bank/agrochemical_analysis_request/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PaginatedRosselkhozBankAgrochemicalAnalysisRequestList',  # 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 agrochemical_analysis_request_retrieve(self, id, **kwargs):  # noqa: E501
        """agrochemical_analysis_request_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.agrochemical_analysis_request_retrieve(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: A unique integer value identifying this Заявка на агрохим анализ. (required)
        :return: RosselkhozBankAgrochemicalAnalysisRequest
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.agrochemical_analysis_request_retrieve_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.agrochemical_analysis_request_retrieve_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def agrochemical_analysis_request_retrieve_with_http_info(self, id, **kwargs):  # noqa: E501
        """agrochemical_analysis_request_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.agrochemical_analysis_request_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: RosselkhozBankAgrochemicalAnalysisRequest
                 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 agrochemical_analysis_request_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 `agrochemical_analysis_request_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/rosselkhoz_bank/agrochemical_analysis_request/{id}/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RosselkhozBankAgrochemicalAnalysisRequest',  # 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 agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create(self, body, request_uid, **kwargs):  # noqa: E501
        """agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create  # noqa: E501

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

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

    def agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create_with_http_info(self, body, request_uid, **kwargs):  # noqa: E501
        """agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create  # noqa: E501

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

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

        all_params = ['body', 'request_uid']  # 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 agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_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 `agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'request_uid' is set
        if ('request_uid' not in params or
                params['request_uid'] is None):
            raise ValueError("Missing the required parameter `request_uid` when calling `agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'delivery_method' in params:
            form_params.append(('delivery_method', params['delivery_method']))  # noqa: E501
        if 'pickup_address' in params:
            form_params.append(('pickup_address', params['pickup_address']))  # noqa: E501
        if 'delivery_method' in params:
            form_params.append(('delivery_method', params['delivery_method']))  # noqa: E501
        if 'pickup_address' in params:
            form_params.append(('pickup_address', params['pickup_address']))  # 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/rosselkhoz_bank/agrochemical_analysis_request/{request_uid}/set_delivery_method_for_agrochemical_analysis_request/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RosselkhozBankSetDeliveryMethodForAgrochemicalAnalysisRequestCommand',  # 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 agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create(self, delivery_method2, pickup_address2, delivery_method, pickup_address, request_uid, **kwargs):  # noqa: E501
        """agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create(delivery_method2, pickup_address2, delivery_method, pickup_address, request_uid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str delivery_method2: (required)
        :param str pickup_address2: (required)
        :param str delivery_method: (required)
        :param str pickup_address: (required)
        :param str request_uid: (required)
        :return: RosselkhozBankSetDeliveryMethodForAgrochemicalAnalysisRequestCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create_with_http_info(delivery_method2, pickup_address2, delivery_method, pickup_address, request_uid, **kwargs)  # noqa: E501
        else:
            (data) = self.agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create_with_http_info(delivery_method2, pickup_address2, delivery_method, pickup_address, request_uid, **kwargs)  # noqa: E501
            return data

    def agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create_with_http_info(self, delivery_method2, pickup_address2, delivery_method, pickup_address, request_uid, **kwargs):  # noqa: E501
        """agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create_with_http_info(delivery_method2, pickup_address2, delivery_method, pickup_address, request_uid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str delivery_method2: (required)
        :param str pickup_address2: (required)
        :param str delivery_method: (required)
        :param str pickup_address: (required)
        :param str request_uid: (required)
        :return: RosselkhozBankSetDeliveryMethodForAgrochemicalAnalysisRequestCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['delivery_method2', 'pickup_address2', 'delivery_method', 'pickup_address', 'request_uid']  # 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 agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'delivery_method2' is set
        if ('delivery_method2' not in params or
                params['delivery_method2'] is None):
            raise ValueError("Missing the required parameter `delivery_method2` when calling `agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'pickup_address2' is set
        if ('pickup_address2' not in params or
                params['pickup_address2'] is None):
            raise ValueError("Missing the required parameter `pickup_address2` when calling `agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'delivery_method' is set
        if ('delivery_method' not in params or
                params['delivery_method'] is None):
            raise ValueError("Missing the required parameter `delivery_method` when calling `agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'pickup_address' is set
        if ('pickup_address' not in params or
                params['pickup_address'] is None):
            raise ValueError("Missing the required parameter `pickup_address` when calling `agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'request_uid' is set
        if ('request_uid' not in params or
                params['request_uid'] is None):
            raise ValueError("Missing the required parameter `request_uid` when calling `agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'delivery_method' in params:
            form_params.append(('delivery_method', params['delivery_method']))  # noqa: E501
        if 'pickup_address' in params:
            form_params.append(('pickup_address', params['pickup_address']))  # noqa: E501
        if 'delivery_method' in params:
            form_params.append(('delivery_method', params['delivery_method']))  # noqa: E501
        if 'pickup_address' in params:
            form_params.append(('pickup_address', params['pickup_address']))  # 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/rosselkhoz_bank/agrochemical_analysis_request/{request_uid}/set_delivery_method_for_agrochemical_analysis_request/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RosselkhozBankSetDeliveryMethodForAgrochemicalAnalysisRequestCommand',  # 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 agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create(self, delivery_method2, pickup_address2, delivery_method, pickup_address, request_uid, **kwargs):  # noqa: E501
        """agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create(delivery_method2, pickup_address2, delivery_method, pickup_address, request_uid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str delivery_method2: (required)
        :param str pickup_address2: (required)
        :param str delivery_method: (required)
        :param str pickup_address: (required)
        :param str request_uid: (required)
        :return: RosselkhozBankSetDeliveryMethodForAgrochemicalAnalysisRequestCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create_with_http_info(delivery_method2, pickup_address2, delivery_method, pickup_address, request_uid, **kwargs)  # noqa: E501
        else:
            (data) = self.agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create_with_http_info(delivery_method2, pickup_address2, delivery_method, pickup_address, request_uid, **kwargs)  # noqa: E501
            return data

    def agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create_with_http_info(self, delivery_method2, pickup_address2, delivery_method, pickup_address, request_uid, **kwargs):  # noqa: E501
        """agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create_with_http_info(delivery_method2, pickup_address2, delivery_method, pickup_address, request_uid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str delivery_method2: (required)
        :param str pickup_address2: (required)
        :param str delivery_method: (required)
        :param str pickup_address: (required)
        :param str request_uid: (required)
        :return: RosselkhozBankSetDeliveryMethodForAgrochemicalAnalysisRequestCommand
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['delivery_method2', 'pickup_address2', 'delivery_method', 'pickup_address', 'request_uid']  # 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 agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'delivery_method2' is set
        if ('delivery_method2' not in params or
                params['delivery_method2'] is None):
            raise ValueError("Missing the required parameter `delivery_method2` when calling `agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'pickup_address2' is set
        if ('pickup_address2' not in params or
                params['pickup_address2'] is None):
            raise ValueError("Missing the required parameter `pickup_address2` when calling `agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'delivery_method' is set
        if ('delivery_method' not in params or
                params['delivery_method'] is None):
            raise ValueError("Missing the required parameter `delivery_method` when calling `agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'pickup_address' is set
        if ('pickup_address' not in params or
                params['pickup_address'] is None):
            raise ValueError("Missing the required parameter `pickup_address` when calling `agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create`")  # noqa: E501
        # verify the required parameter 'request_uid' is set
        if ('request_uid' not in params or
                params['request_uid'] is None):
            raise ValueError("Missing the required parameter `request_uid` when calling `agrochemical_analysis_request_set_delivery_method_for_agrochemical_analysis_request_create`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'delivery_method' in params:
            form_params.append(('delivery_method', params['delivery_method']))  # noqa: E501
        if 'pickup_address' in params:
            form_params.append(('pickup_address', params['pickup_address']))  # noqa: E501
        if 'delivery_method' in params:
            form_params.append(('delivery_method', params['delivery_method']))  # noqa: E501
        if 'pickup_address' in params:
            form_params.append(('pickup_address', params['pickup_address']))  # 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/rosselkhoz_bank/agrochemical_analysis_request/{request_uid}/set_delivery_method_for_agrochemical_analysis_request/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='RosselkhozBankSetDeliveryMethodForAgrochemicalAnalysisRequestCommand',  # 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)
