/* tslint:disable */
/* eslint-disable */
/**
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document:
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import {
  DUMMY_BASE_URL,
  assertParamExists,
  setApiKeyToObject,
  setBasicAuthToObject,
  setBearerAuthToObject,
  setOAuthToObject,
  setSearchParams,
  serializeDataIfNeeded,
  toPathString,
  createRequestFunction
} from '../common';
// @ts-ignore
import {
  BASE_PATH,
  COLLECTION_FORMATS,
  type RequestArgs,
  BaseAPI,
  RequiredError,
  operationServerMap
} from '../base';
// @ts-ignore
import type { KamiApiJdCookieV1BatchCreateReq } from '../models';
// @ts-ignore
import type { KamiApiJdCookieV1BatchCreateRes } from '../models';
// @ts-ignore
import type { KamiApiJdCookieV1BatchValidateCookieReq } from '../models';
// @ts-ignore
import type { KamiApiJdCookieV1BatchValidateCookieRes } from '../models';
// @ts-ignore
import type { KamiApiJdCookieV1CreateAccountReq } from '../models';
// @ts-ignore
import type { KamiApiJdCookieV1CreateAccountRes } from '../models';
// @ts-ignore
import type { KamiApiJdCookieV1DeleteInvalidRes } from '../models';
// @ts-ignore
import type { KamiApiJdCookieV1GetAccountRes } from '../models';
// @ts-ignore
import type { KamiApiJdCookieV1ListAccountRes } from '../models';
// @ts-ignore
import type { KamiApiJdCookieV1UpdateAccountReq } from '../models';
// @ts-ignore
import type { KamiApiJdCookieV1ValidateCookieReq } from '../models';
// @ts-ignore
import type { KamiApiJdCookieV1ValidateCookieRes } from '../models';
/**
 * JDCookieManagementApi - axios parameter creator
 */
export const JDCookieManagementApiAxiosParamCreator = function (
  configuration?: Configuration
) {
  return {
    /**
     *
     * @summary Batch Create Cookie Accounts
     * @param {KamiApiJdCookieV1BatchCreateReq} [kamiApiJdCookieV1BatchCreateReq]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    apiJdCookieAccountBatchCreatePost: async (
      kamiApiJdCookieV1BatchCreateReq?: KamiApiJdCookieV1BatchCreateReq,
      options: RawAxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      const localVarPath = `/api/jd-cookie/account/batch-create`;
      // use dummy base URL string because the URL constructor only accepts absolute URLs.
      const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
      let baseOptions;
      if (configuration) {
        baseOptions = configuration.baseOptions;
      }

      const localVarRequestOptions = {
        method: 'POST',
        ...baseOptions,
        ...options
      };
      const localVarHeaderParameter = {} as any;
      const localVarQueryParameter = {} as any;

      localVarHeaderParameter['Content-Type'] = 'application/json';

      setSearchParams(localVarUrlObj, localVarQueryParameter);
      let headersFromBaseOptions =
        baseOptions && baseOptions.headers ? baseOptions.headers : {};
      localVarRequestOptions.headers = {
        ...localVarHeaderParameter,
        ...headersFromBaseOptions,
        ...options.headers
      };
      localVarRequestOptions.data = serializeDataIfNeeded(
        kamiApiJdCookieV1BatchCreateReq,
        localVarRequestOptions,
        configuration
      );

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions
      };
    },
    /**
     *
     * @summary Batch Validate Cookies
     * @param {KamiApiJdCookieV1BatchValidateCookieReq} [kamiApiJdCookieV1BatchValidateCookieReq]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    apiJdCookieAccountBatchValidatePost: async (
      kamiApiJdCookieV1BatchValidateCookieReq?: KamiApiJdCookieV1BatchValidateCookieReq,
      options: RawAxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      const localVarPath = `/api/jd-cookie/account/batch-validate`;
      // use dummy base URL string because the URL constructor only accepts absolute URLs.
      const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
      let baseOptions;
      if (configuration) {
        baseOptions = configuration.baseOptions;
      }

      const localVarRequestOptions = {
        method: 'POST',
        ...baseOptions,
        ...options
      };
      const localVarHeaderParameter = {} as any;
      const localVarQueryParameter = {} as any;

      localVarHeaderParameter['Content-Type'] = 'application/json';

      setSearchParams(localVarUrlObj, localVarQueryParameter);
      let headersFromBaseOptions =
        baseOptions && baseOptions.headers ? baseOptions.headers : {};
      localVarRequestOptions.headers = {
        ...localVarHeaderParameter,
        ...headersFromBaseOptions,
        ...options.headers
      };
      localVarRequestOptions.data = serializeDataIfNeeded(
        kamiApiJdCookieV1BatchValidateCookieReq,
        localVarRequestOptions,
        configuration
      );

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions
      };
    },
    /**
     *
     * @summary Create Cookie Account
     * @param {KamiApiJdCookieV1CreateAccountReq} [kamiApiJdCookieV1CreateAccountReq]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    apiJdCookieAccountCreatePost: async (
      kamiApiJdCookieV1CreateAccountReq?: KamiApiJdCookieV1CreateAccountReq,
      options: RawAxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      const localVarPath = `/api/jd-cookie/account/create`;
      // use dummy base URL string because the URL constructor only accepts absolute URLs.
      const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
      let baseOptions;
      if (configuration) {
        baseOptions = configuration.baseOptions;
      }

      const localVarRequestOptions = {
        method: 'POST',
        ...baseOptions,
        ...options
      };
      const localVarHeaderParameter = {} as any;
      const localVarQueryParameter = {} as any;

      localVarHeaderParameter['Content-Type'] = 'application/json';

      setSearchParams(localVarUrlObj, localVarQueryParameter);
      let headersFromBaseOptions =
        baseOptions && baseOptions.headers ? baseOptions.headers : {};
      localVarRequestOptions.headers = {
        ...localVarHeaderParameter,
        ...headersFromBaseOptions,
        ...options.headers
      };
      localVarRequestOptions.data = serializeDataIfNeeded(
        kamiApiJdCookieV1CreateAccountReq,
        localVarRequestOptions,
        configuration
      );

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions
      };
    },
    /**
     *
     * @summary Delete Cookie Account
     * @param {string} cookieId Cookie ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    apiJdCookieAccountDeleteDelete: async (
      cookieId: string,
      options: RawAxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      // verify required parameter 'cookieId' is not null or undefined
      assertParamExists('apiJdCookieAccountDeleteDelete', 'cookieId', cookieId);
      const localVarPath = `/api/jd-cookie/account/delete`;
      // use dummy base URL string because the URL constructor only accepts absolute URLs.
      const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
      let baseOptions;
      if (configuration) {
        baseOptions = configuration.baseOptions;
      }

      const localVarRequestOptions = {
        method: 'DELETE',
        ...baseOptions,
        ...options
      };
      const localVarHeaderParameter = {} as any;
      const localVarQueryParameter = {} as any;

      if (cookieId !== undefined) {
        localVarQueryParameter['cookieId'] = cookieId;
      }

      setSearchParams(localVarUrlObj, localVarQueryParameter);
      let headersFromBaseOptions =
        baseOptions && baseOptions.headers ? baseOptions.headers : {};
      localVarRequestOptions.headers = {
        ...localVarHeaderParameter,
        ...headersFromBaseOptions,
        ...options.headers
      };

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions
      };
    },
    /**
     *
     * @summary Delete All Invalid Cookies
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    apiJdCookieAccountDeleteInvalidDelete: async (
      options: RawAxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      const localVarPath = `/api/jd-cookie/account/delete-invalid`;
      // use dummy base URL string because the URL constructor only accepts absolute URLs.
      const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
      let baseOptions;
      if (configuration) {
        baseOptions = configuration.baseOptions;
      }

      const localVarRequestOptions = {
        method: 'DELETE',
        ...baseOptions,
        ...options
      };
      const localVarHeaderParameter = {} as any;
      const localVarQueryParameter = {} as any;

      setSearchParams(localVarUrlObj, localVarQueryParameter);
      let headersFromBaseOptions =
        baseOptions && baseOptions.headers ? baseOptions.headers : {};
      localVarRequestOptions.headers = {
        ...localVarHeaderParameter,
        ...headersFromBaseOptions,
        ...options.headers
      };

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions
      };
    },
    /**
     *
     * @summary Get Single Cookie Account
     * @param {string} cookieId Cookie ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    apiJdCookieAccountGetGet: async (
      cookieId: string,
      options: RawAxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      // verify required parameter 'cookieId' is not null or undefined
      assertParamExists('apiJdCookieAccountGetGet', 'cookieId', cookieId);
      const localVarPath = `/api/jd-cookie/account/get`;
      // use dummy base URL string because the URL constructor only accepts absolute URLs.
      const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
      let baseOptions;
      if (configuration) {
        baseOptions = configuration.baseOptions;
      }

      const localVarRequestOptions = {
        method: 'GET',
        ...baseOptions,
        ...options
      };
      const localVarHeaderParameter = {} as any;
      const localVarQueryParameter = {} as any;

      if (cookieId !== undefined) {
        localVarQueryParameter['cookieId'] = cookieId;
      }

      setSearchParams(localVarUrlObj, localVarQueryParameter);
      let headersFromBaseOptions =
        baseOptions && baseOptions.headers ? baseOptions.headers : {};
      localVarRequestOptions.headers = {
        ...localVarHeaderParameter,
        ...headersFromBaseOptions,
        ...options.headers
      };

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions
      };
    },
    /**
     *
     * @summary Query Cookie Account List
     * @param {number} [page] 页码
     * @param {number} [size] 每页大小
     * @param {ApiJdCookieAccountListGetStatusEnum} [status] 状态筛选
     * @param {string} [keyword] 关键字搜索
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    apiJdCookieAccountListGet: async (
      page?: number,
      size?: number,
      status?: ApiJdCookieAccountListGetStatusEnum,
      keyword?: string,
      options: RawAxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      const localVarPath = `/api/jd-cookie/account/list`;
      // use dummy base URL string because the URL constructor only accepts absolute URLs.
      const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
      let baseOptions;
      if (configuration) {
        baseOptions = configuration.baseOptions;
      }

      const localVarRequestOptions = {
        method: 'GET',
        ...baseOptions,
        ...options
      };
      const localVarHeaderParameter = {} as any;
      const localVarQueryParameter = {} as any;

      if (page !== undefined) {
        localVarQueryParameter['page'] = page;
      }

      if (size !== undefined) {
        localVarQueryParameter['size'] = size;
      }

      if (status !== undefined) {
        localVarQueryParameter['status'] = status;
      }

      if (keyword !== undefined) {
        localVarQueryParameter['keyword'] = keyword;
      }

      setSearchParams(localVarUrlObj, localVarQueryParameter);
      let headersFromBaseOptions =
        baseOptions && baseOptions.headers ? baseOptions.headers : {};
      localVarRequestOptions.headers = {
        ...localVarHeaderParameter,
        ...headersFromBaseOptions,
        ...options.headers
      };

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions
      };
    },
    /**
     *
     * @summary Update Cookie Account
     * @param {KamiApiJdCookieV1UpdateAccountReq} [kamiApiJdCookieV1UpdateAccountReq]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    apiJdCookieAccountUpdatePut: async (
      kamiApiJdCookieV1UpdateAccountReq?: KamiApiJdCookieV1UpdateAccountReq,
      options: RawAxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      const localVarPath = `/api/jd-cookie/account/update`;
      // use dummy base URL string because the URL constructor only accepts absolute URLs.
      const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
      let baseOptions;
      if (configuration) {
        baseOptions = configuration.baseOptions;
      }

      const localVarRequestOptions = {
        method: 'PUT',
        ...baseOptions,
        ...options
      };
      const localVarHeaderParameter = {} as any;
      const localVarQueryParameter = {} as any;

      localVarHeaderParameter['Content-Type'] = 'application/json';

      setSearchParams(localVarUrlObj, localVarQueryParameter);
      let headersFromBaseOptions =
        baseOptions && baseOptions.headers ? baseOptions.headers : {};
      localVarRequestOptions.headers = {
        ...localVarHeaderParameter,
        ...headersFromBaseOptions,
        ...options.headers
      };
      localVarRequestOptions.data = serializeDataIfNeeded(
        kamiApiJdCookieV1UpdateAccountReq,
        localVarRequestOptions,
        configuration
      );

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions
      };
    },
    /**
     *
     * @summary Validate Cookie
     * @param {KamiApiJdCookieV1ValidateCookieReq} [kamiApiJdCookieV1ValidateCookieReq]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    apiJdCookieAccountValidatePost: async (
      kamiApiJdCookieV1ValidateCookieReq?: KamiApiJdCookieV1ValidateCookieReq,
      options: RawAxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      const localVarPath = `/api/jd-cookie/account/validate`;
      // use dummy base URL string because the URL constructor only accepts absolute URLs.
      const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
      let baseOptions;
      if (configuration) {
        baseOptions = configuration.baseOptions;
      }

      const localVarRequestOptions = {
        method: 'POST',
        ...baseOptions,
        ...options
      };
      const localVarHeaderParameter = {} as any;
      const localVarQueryParameter = {} as any;

      localVarHeaderParameter['Content-Type'] = 'application/json';

      setSearchParams(localVarUrlObj, localVarQueryParameter);
      let headersFromBaseOptions =
        baseOptions && baseOptions.headers ? baseOptions.headers : {};
      localVarRequestOptions.headers = {
        ...localVarHeaderParameter,
        ...headersFromBaseOptions,
        ...options.headers
      };
      localVarRequestOptions.data = serializeDataIfNeeded(
        kamiApiJdCookieV1ValidateCookieReq,
        localVarRequestOptions,
        configuration
      );

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions
      };
    }
  };
};

/**
 * JDCookieManagementApi - functional programming interface
 */
export const JDCookieManagementApiFp = function (
  configuration?: Configuration
) {
  const localVarAxiosParamCreator =
    JDCookieManagementApiAxiosParamCreator(configuration);
  return {
    /**
     *
     * @summary Batch Create Cookie Accounts
     * @param {KamiApiJdCookieV1BatchCreateReq} [kamiApiJdCookieV1BatchCreateReq]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async apiJdCookieAccountBatchCreatePost(
      kamiApiJdCookieV1BatchCreateReq?: KamiApiJdCookieV1BatchCreateReq,
      options?: RawAxiosRequestConfig
    ): Promise<
      (
        axios?: AxiosInstance,
        basePath?: string
      ) => AxiosPromise<KamiApiJdCookieV1BatchCreateRes>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.apiJdCookieAccountBatchCreatePost(
          kamiApiJdCookieV1BatchCreateReq,
          options
        );
      const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
      const localVarOperationServerBasePath =
        operationServerMap[
          'JDCookieManagementApi.apiJdCookieAccountBatchCreatePost'
        ]?.[localVarOperationServerIndex]?.url;
      return (axios, basePath) =>
        createRequestFunction(
          localVarAxiosArgs,
          globalAxios,
          BASE_PATH,
          configuration
        )(axios, localVarOperationServerBasePath || basePath);
    },
    /**
     *
     * @summary Batch Validate Cookies
     * @param {KamiApiJdCookieV1BatchValidateCookieReq} [kamiApiJdCookieV1BatchValidateCookieReq]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async apiJdCookieAccountBatchValidatePost(
      kamiApiJdCookieV1BatchValidateCookieReq?: KamiApiJdCookieV1BatchValidateCookieReq,
      options?: RawAxiosRequestConfig
    ): Promise<
      (
        axios?: AxiosInstance,
        basePath?: string
      ) => AxiosPromise<KamiApiJdCookieV1BatchValidateCookieRes>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.apiJdCookieAccountBatchValidatePost(
          kamiApiJdCookieV1BatchValidateCookieReq,
          options
        );
      const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
      const localVarOperationServerBasePath =
        operationServerMap[
          'JDCookieManagementApi.apiJdCookieAccountBatchValidatePost'
        ]?.[localVarOperationServerIndex]?.url;
      return (axios, basePath) =>
        createRequestFunction(
          localVarAxiosArgs,
          globalAxios,
          BASE_PATH,
          configuration
        )(axios, localVarOperationServerBasePath || basePath);
    },
    /**
     *
     * @summary Create Cookie Account
     * @param {KamiApiJdCookieV1CreateAccountReq} [kamiApiJdCookieV1CreateAccountReq]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async apiJdCookieAccountCreatePost(
      kamiApiJdCookieV1CreateAccountReq?: KamiApiJdCookieV1CreateAccountReq,
      options?: RawAxiosRequestConfig
    ): Promise<
      (
        axios?: AxiosInstance,
        basePath?: string
      ) => AxiosPromise<KamiApiJdCookieV1CreateAccountRes>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.apiJdCookieAccountCreatePost(
          kamiApiJdCookieV1CreateAccountReq,
          options
        );
      const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
      const localVarOperationServerBasePath =
        operationServerMap[
          'JDCookieManagementApi.apiJdCookieAccountCreatePost'
        ]?.[localVarOperationServerIndex]?.url;
      return (axios, basePath) =>
        createRequestFunction(
          localVarAxiosArgs,
          globalAxios,
          BASE_PATH,
          configuration
        )(axios, localVarOperationServerBasePath || basePath);
    },
    /**
     *
     * @summary Delete Cookie Account
     * @param {string} cookieId Cookie ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async apiJdCookieAccountDeleteDelete(
      cookieId: string,
      options?: RawAxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.apiJdCookieAccountDeleteDelete(
          cookieId,
          options
        );
      const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
      const localVarOperationServerBasePath =
        operationServerMap[
          'JDCookieManagementApi.apiJdCookieAccountDeleteDelete'
        ]?.[localVarOperationServerIndex]?.url;
      return (axios, basePath) =>
        createRequestFunction(
          localVarAxiosArgs,
          globalAxios,
          BASE_PATH,
          configuration
        )(axios, localVarOperationServerBasePath || basePath);
    },
    /**
     *
     * @summary Delete All Invalid Cookies
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async apiJdCookieAccountDeleteInvalidDelete(
      options?: RawAxiosRequestConfig
    ): Promise<
      (
        axios?: AxiosInstance,
        basePath?: string
      ) => AxiosPromise<KamiApiJdCookieV1DeleteInvalidRes>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.apiJdCookieAccountDeleteInvalidDelete(
          options
        );
      const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
      const localVarOperationServerBasePath =
        operationServerMap[
          'JDCookieManagementApi.apiJdCookieAccountDeleteInvalidDelete'
        ]?.[localVarOperationServerIndex]?.url;
      return (axios, basePath) =>
        createRequestFunction(
          localVarAxiosArgs,
          globalAxios,
          BASE_PATH,
          configuration
        )(axios, localVarOperationServerBasePath || basePath);
    },
    /**
     *
     * @summary Get Single Cookie Account
     * @param {string} cookieId Cookie ID
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async apiJdCookieAccountGetGet(
      cookieId: string,
      options?: RawAxiosRequestConfig
    ): Promise<
      (
        axios?: AxiosInstance,
        basePath?: string
      ) => AxiosPromise<KamiApiJdCookieV1GetAccountRes>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.apiJdCookieAccountGetGet(
          cookieId,
          options
        );
      const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
      const localVarOperationServerBasePath =
        operationServerMap['JDCookieManagementApi.apiJdCookieAccountGetGet']?.[
          localVarOperationServerIndex
        ]?.url;
      return (axios, basePath) =>
        createRequestFunction(
          localVarAxiosArgs,
          globalAxios,
          BASE_PATH,
          configuration
        )(axios, localVarOperationServerBasePath || basePath);
    },
    /**
     *
     * @summary Query Cookie Account List
     * @param {number} [page] 页码
     * @param {number} [size] 每页大小
     * @param {ApiJdCookieAccountListGetStatusEnum} [status] 状态筛选
     * @param {string} [keyword] 关键字搜索
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async apiJdCookieAccountListGet(
      page?: number,
      size?: number,
      status?: ApiJdCookieAccountListGetStatusEnum,
      keyword?: string,
      options?: RawAxiosRequestConfig
    ): Promise<
      (
        axios?: AxiosInstance,
        basePath?: string
      ) => AxiosPromise<KamiApiJdCookieV1ListAccountRes>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.apiJdCookieAccountListGet(
          page,
          size,
          status,
          keyword,
          options
        );
      const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
      const localVarOperationServerBasePath =
        operationServerMap['JDCookieManagementApi.apiJdCookieAccountListGet']?.[
          localVarOperationServerIndex
        ]?.url;
      return (axios, basePath) =>
        createRequestFunction(
          localVarAxiosArgs,
          globalAxios,
          BASE_PATH,
          configuration
        )(axios, localVarOperationServerBasePath || basePath);
    },
    /**
     *
     * @summary Update Cookie Account
     * @param {KamiApiJdCookieV1UpdateAccountReq} [kamiApiJdCookieV1UpdateAccountReq]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async apiJdCookieAccountUpdatePut(
      kamiApiJdCookieV1UpdateAccountReq?: KamiApiJdCookieV1UpdateAccountReq,
      options?: RawAxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.apiJdCookieAccountUpdatePut(
          kamiApiJdCookieV1UpdateAccountReq,
          options
        );
      const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
      const localVarOperationServerBasePath =
        operationServerMap[
          'JDCookieManagementApi.apiJdCookieAccountUpdatePut'
        ]?.[localVarOperationServerIndex]?.url;
      return (axios, basePath) =>
        createRequestFunction(
          localVarAxiosArgs,
          globalAxios,
          BASE_PATH,
          configuration
        )(axios, localVarOperationServerBasePath || basePath);
    },
    /**
     *
     * @summary Validate Cookie
     * @param {KamiApiJdCookieV1ValidateCookieReq} [kamiApiJdCookieV1ValidateCookieReq]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async apiJdCookieAccountValidatePost(
      kamiApiJdCookieV1ValidateCookieReq?: KamiApiJdCookieV1ValidateCookieReq,
      options?: RawAxiosRequestConfig
    ): Promise<
      (
        axios?: AxiosInstance,
        basePath?: string
      ) => AxiosPromise<KamiApiJdCookieV1ValidateCookieRes>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.apiJdCookieAccountValidatePost(
          kamiApiJdCookieV1ValidateCookieReq,
          options
        );
      const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
      const localVarOperationServerBasePath =
        operationServerMap[
          'JDCookieManagementApi.apiJdCookieAccountValidatePost'
        ]?.[localVarOperationServerIndex]?.url;
      return (axios, basePath) =>
        createRequestFunction(
          localVarAxiosArgs,
          globalAxios,
          BASE_PATH,
          configuration
        )(axios, localVarOperationServerBasePath || basePath);
    }
  };
};

/**
 * JDCookieManagementApi - factory interface
 */
export const JDCookieManagementApiFactory = function (
  configuration?: Configuration,
  basePath?: string,
  axios?: AxiosInstance
) {
  const localVarFp = JDCookieManagementApiFp(configuration);
  return {
    /**
     *
     * @summary Batch Create Cookie Accounts
     * @param {JDCookieManagementApiApiJdCookieAccountBatchCreatePostRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    apiJdCookieAccountBatchCreatePost(
      requestParameters: JDCookieManagementApiApiJdCookieAccountBatchCreatePostRequest = {},
      options?: RawAxiosRequestConfig
    ): AxiosPromise<KamiApiJdCookieV1BatchCreateRes> {
      return localVarFp
        .apiJdCookieAccountBatchCreatePost(
          requestParameters.kamiApiJdCookieV1BatchCreateReq,
          options
        )
        .then(request => request(axios, basePath));
    },
    /**
     *
     * @summary Batch Validate Cookies
     * @param {JDCookieManagementApiApiJdCookieAccountBatchValidatePostRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    apiJdCookieAccountBatchValidatePost(
      requestParameters: JDCookieManagementApiApiJdCookieAccountBatchValidatePostRequest = {},
      options?: RawAxiosRequestConfig
    ): AxiosPromise<KamiApiJdCookieV1BatchValidateCookieRes> {
      return localVarFp
        .apiJdCookieAccountBatchValidatePost(
          requestParameters.kamiApiJdCookieV1BatchValidateCookieReq,
          options
        )
        .then(request => request(axios, basePath));
    },
    /**
     *
     * @summary Create Cookie Account
     * @param {JDCookieManagementApiApiJdCookieAccountCreatePostRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    apiJdCookieAccountCreatePost(
      requestParameters: JDCookieManagementApiApiJdCookieAccountCreatePostRequest = {},
      options?: RawAxiosRequestConfig
    ): AxiosPromise<KamiApiJdCookieV1CreateAccountRes> {
      return localVarFp
        .apiJdCookieAccountCreatePost(
          requestParameters.kamiApiJdCookieV1CreateAccountReq,
          options
        )
        .then(request => request(axios, basePath));
    },
    /**
     *
     * @summary Delete Cookie Account
     * @param {JDCookieManagementApiApiJdCookieAccountDeleteDeleteRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    apiJdCookieAccountDeleteDelete(
      requestParameters: JDCookieManagementApiApiJdCookieAccountDeleteDeleteRequest,
      options?: RawAxiosRequestConfig
    ): AxiosPromise<object> {
      return localVarFp
        .apiJdCookieAccountDeleteDelete(requestParameters.cookieId, options)
        .then(request => request(axios, basePath));
    },
    /**
     *
     * @summary Delete All Invalid Cookies
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    apiJdCookieAccountDeleteInvalidDelete(
      options?: RawAxiosRequestConfig
    ): AxiosPromise<KamiApiJdCookieV1DeleteInvalidRes> {
      return localVarFp
        .apiJdCookieAccountDeleteInvalidDelete(options)
        .then(request => request(axios, basePath));
    },
    /**
     *
     * @summary Get Single Cookie Account
     * @param {JDCookieManagementApiApiJdCookieAccountGetGetRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    apiJdCookieAccountGetGet(
      requestParameters: JDCookieManagementApiApiJdCookieAccountGetGetRequest,
      options?: RawAxiosRequestConfig
    ): AxiosPromise<KamiApiJdCookieV1GetAccountRes> {
      return localVarFp
        .apiJdCookieAccountGetGet(requestParameters.cookieId, options)
        .then(request => request(axios, basePath));
    },
    /**
     *
     * @summary Query Cookie Account List
     * @param {JDCookieManagementApiApiJdCookieAccountListGetRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    apiJdCookieAccountListGet(
      requestParameters: JDCookieManagementApiApiJdCookieAccountListGetRequest = {},
      options?: RawAxiosRequestConfig
    ): AxiosPromise<KamiApiJdCookieV1ListAccountRes> {
      return localVarFp
        .apiJdCookieAccountListGet(
          requestParameters.page,
          requestParameters.size,
          requestParameters.status,
          requestParameters.keyword,
          options
        )
        .then(request => request(axios, basePath));
    },
    /**
     *
     * @summary Update Cookie Account
     * @param {JDCookieManagementApiApiJdCookieAccountUpdatePutRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    apiJdCookieAccountUpdatePut(
      requestParameters: JDCookieManagementApiApiJdCookieAccountUpdatePutRequest = {},
      options?: RawAxiosRequestConfig
    ): AxiosPromise<object> {
      return localVarFp
        .apiJdCookieAccountUpdatePut(
          requestParameters.kamiApiJdCookieV1UpdateAccountReq,
          options
        )
        .then(request => request(axios, basePath));
    },
    /**
     *
     * @summary Validate Cookie
     * @param {JDCookieManagementApiApiJdCookieAccountValidatePostRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    apiJdCookieAccountValidatePost(
      requestParameters: JDCookieManagementApiApiJdCookieAccountValidatePostRequest = {},
      options?: RawAxiosRequestConfig
    ): AxiosPromise<KamiApiJdCookieV1ValidateCookieRes> {
      return localVarFp
        .apiJdCookieAccountValidatePost(
          requestParameters.kamiApiJdCookieV1ValidateCookieReq,
          options
        )
        .then(request => request(axios, basePath));
    }
  };
};

/**
 * JDCookieManagementApi - interface
 */
export interface JDCookieManagementApiInterface {
  /**
   *
   * @summary Batch Create Cookie Accounts
   * @param {JDCookieManagementApiApiJdCookieAccountBatchCreatePostRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   */
  apiJdCookieAccountBatchCreatePost(
    requestParameters?: JDCookieManagementApiApiJdCookieAccountBatchCreatePostRequest,
    options?: RawAxiosRequestConfig
  ): AxiosPromise<KamiApiJdCookieV1BatchCreateRes>;

  /**
   *
   * @summary Batch Validate Cookies
   * @param {JDCookieManagementApiApiJdCookieAccountBatchValidatePostRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   */
  apiJdCookieAccountBatchValidatePost(
    requestParameters?: JDCookieManagementApiApiJdCookieAccountBatchValidatePostRequest,
    options?: RawAxiosRequestConfig
  ): AxiosPromise<KamiApiJdCookieV1BatchValidateCookieRes>;

  /**
   *
   * @summary Create Cookie Account
   * @param {JDCookieManagementApiApiJdCookieAccountCreatePostRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   */
  apiJdCookieAccountCreatePost(
    requestParameters?: JDCookieManagementApiApiJdCookieAccountCreatePostRequest,
    options?: RawAxiosRequestConfig
  ): AxiosPromise<KamiApiJdCookieV1CreateAccountRes>;

  /**
   *
   * @summary Delete Cookie Account
   * @param {JDCookieManagementApiApiJdCookieAccountDeleteDeleteRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   */
  apiJdCookieAccountDeleteDelete(
    requestParameters: JDCookieManagementApiApiJdCookieAccountDeleteDeleteRequest,
    options?: RawAxiosRequestConfig
  ): AxiosPromise<object>;

  /**
   *
   * @summary Delete All Invalid Cookies
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   */
  apiJdCookieAccountDeleteInvalidDelete(
    options?: RawAxiosRequestConfig
  ): AxiosPromise<KamiApiJdCookieV1DeleteInvalidRes>;

  /**
   *
   * @summary Get Single Cookie Account
   * @param {JDCookieManagementApiApiJdCookieAccountGetGetRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   */
  apiJdCookieAccountGetGet(
    requestParameters: JDCookieManagementApiApiJdCookieAccountGetGetRequest,
    options?: RawAxiosRequestConfig
  ): AxiosPromise<KamiApiJdCookieV1GetAccountRes>;

  /**
   *
   * @summary Query Cookie Account List
   * @param {JDCookieManagementApiApiJdCookieAccountListGetRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   */
  apiJdCookieAccountListGet(
    requestParameters?: JDCookieManagementApiApiJdCookieAccountListGetRequest,
    options?: RawAxiosRequestConfig
  ): AxiosPromise<KamiApiJdCookieV1ListAccountRes>;

  /**
   *
   * @summary Update Cookie Account
   * @param {JDCookieManagementApiApiJdCookieAccountUpdatePutRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   */
  apiJdCookieAccountUpdatePut(
    requestParameters?: JDCookieManagementApiApiJdCookieAccountUpdatePutRequest,
    options?: RawAxiosRequestConfig
  ): AxiosPromise<object>;

  /**
   *
   * @summary Validate Cookie
   * @param {JDCookieManagementApiApiJdCookieAccountValidatePostRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   */
  apiJdCookieAccountValidatePost(
    requestParameters?: JDCookieManagementApiApiJdCookieAccountValidatePostRequest,
    options?: RawAxiosRequestConfig
  ): AxiosPromise<KamiApiJdCookieV1ValidateCookieRes>;
}

/**
 * Request parameters for apiJdCookieAccountBatchCreatePost operation in JDCookieManagementApi.
 */
export interface JDCookieManagementApiApiJdCookieAccountBatchCreatePostRequest {
  readonly kamiApiJdCookieV1BatchCreateReq?: KamiApiJdCookieV1BatchCreateReq;
}

/**
 * Request parameters for apiJdCookieAccountBatchValidatePost operation in JDCookieManagementApi.
 */
export interface JDCookieManagementApiApiJdCookieAccountBatchValidatePostRequest {
  readonly kamiApiJdCookieV1BatchValidateCookieReq?: KamiApiJdCookieV1BatchValidateCookieReq;
}

/**
 * Request parameters for apiJdCookieAccountCreatePost operation in JDCookieManagementApi.
 */
export interface JDCookieManagementApiApiJdCookieAccountCreatePostRequest {
  readonly kamiApiJdCookieV1CreateAccountReq?: KamiApiJdCookieV1CreateAccountReq;
}

/**
 * Request parameters for apiJdCookieAccountDeleteDelete operation in JDCookieManagementApi.
 */
export interface JDCookieManagementApiApiJdCookieAccountDeleteDeleteRequest {
  /**
   * Cookie ID
   */
  readonly cookieId: string;
}

/**
 * Request parameters for apiJdCookieAccountGetGet operation in JDCookieManagementApi.
 */
export interface JDCookieManagementApiApiJdCookieAccountGetGetRequest {
  /**
   * Cookie ID
   */
  readonly cookieId: string;
}

/**
 * Request parameters for apiJdCookieAccountListGet operation in JDCookieManagementApi.
 */
export interface JDCookieManagementApiApiJdCookieAccountListGetRequest {
  /**
   * 页码
   */
  readonly page?: number;

  /**
   * 每页大小
   */
  readonly size?: number;

  /**
   * 状态筛选
   */
  readonly status?: ApiJdCookieAccountListGetStatusEnum;

  /**
   * 关键字搜索
   */
  readonly keyword?: string;
}

/**
 * Request parameters for apiJdCookieAccountUpdatePut operation in JDCookieManagementApi.
 */
export interface JDCookieManagementApiApiJdCookieAccountUpdatePutRequest {
  readonly kamiApiJdCookieV1UpdateAccountReq?: KamiApiJdCookieV1UpdateAccountReq;
}

/**
 * Request parameters for apiJdCookieAccountValidatePost operation in JDCookieManagementApi.
 */
export interface JDCookieManagementApiApiJdCookieAccountValidatePostRequest {
  readonly kamiApiJdCookieV1ValidateCookieReq?: KamiApiJdCookieV1ValidateCookieReq;
}

/**
 * JDCookieManagementApi - object-oriented interface
 */
export class JDCookieManagementApi
  extends BaseAPI
  implements JDCookieManagementApiInterface
{
  /**
   *
   * @summary Batch Create Cookie Accounts
   * @param {JDCookieManagementApiApiJdCookieAccountBatchCreatePostRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   */
  public apiJdCookieAccountBatchCreatePost(
    requestParameters: JDCookieManagementApiApiJdCookieAccountBatchCreatePostRequest = {},
    options?: RawAxiosRequestConfig
  ) {
    return JDCookieManagementApiFp(this.configuration)
      .apiJdCookieAccountBatchCreatePost(
        requestParameters.kamiApiJdCookieV1BatchCreateReq,
        options
      )
      .then(request => request(this.axios, this.basePath));
  }

  /**
   *
   * @summary Batch Validate Cookies
   * @param {JDCookieManagementApiApiJdCookieAccountBatchValidatePostRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   */
  public apiJdCookieAccountBatchValidatePost(
    requestParameters: JDCookieManagementApiApiJdCookieAccountBatchValidatePostRequest = {},
    options?: RawAxiosRequestConfig
  ) {
    return JDCookieManagementApiFp(this.configuration)
      .apiJdCookieAccountBatchValidatePost(
        requestParameters.kamiApiJdCookieV1BatchValidateCookieReq,
        options
      )
      .then(request => request(this.axios, this.basePath));
  }

  /**
   *
   * @summary Create Cookie Account
   * @param {JDCookieManagementApiApiJdCookieAccountCreatePostRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   */
  public apiJdCookieAccountCreatePost(
    requestParameters: JDCookieManagementApiApiJdCookieAccountCreatePostRequest = {},
    options?: RawAxiosRequestConfig
  ) {
    return JDCookieManagementApiFp(this.configuration)
      .apiJdCookieAccountCreatePost(
        requestParameters.kamiApiJdCookieV1CreateAccountReq,
        options
      )
      .then(request => request(this.axios, this.basePath));
  }

  /**
   *
   * @summary Delete Cookie Account
   * @param {JDCookieManagementApiApiJdCookieAccountDeleteDeleteRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   */
  public apiJdCookieAccountDeleteDelete(
    requestParameters: JDCookieManagementApiApiJdCookieAccountDeleteDeleteRequest,
    options?: RawAxiosRequestConfig
  ) {
    return JDCookieManagementApiFp(this.configuration)
      .apiJdCookieAccountDeleteDelete(requestParameters.cookieId, options)
      .then(request => request(this.axios, this.basePath));
  }

  /**
   *
   * @summary Delete All Invalid Cookies
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   */
  public apiJdCookieAccountDeleteInvalidDelete(
    options?: RawAxiosRequestConfig
  ) {
    return JDCookieManagementApiFp(this.configuration)
      .apiJdCookieAccountDeleteInvalidDelete(options)
      .then(request => request(this.axios, this.basePath));
  }

  /**
   *
   * @summary Get Single Cookie Account
   * @param {JDCookieManagementApiApiJdCookieAccountGetGetRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   */
  public apiJdCookieAccountGetGet(
    requestParameters: JDCookieManagementApiApiJdCookieAccountGetGetRequest,
    options?: RawAxiosRequestConfig
  ) {
    return JDCookieManagementApiFp(this.configuration)
      .apiJdCookieAccountGetGet(requestParameters.cookieId, options)
      .then(request => request(this.axios, this.basePath));
  }

  /**
   *
   * @summary Query Cookie Account List
   * @param {JDCookieManagementApiApiJdCookieAccountListGetRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   */
  public apiJdCookieAccountListGet(
    requestParameters: JDCookieManagementApiApiJdCookieAccountListGetRequest = {},
    options?: RawAxiosRequestConfig
  ) {
    return JDCookieManagementApiFp(this.configuration)
      .apiJdCookieAccountListGet(
        requestParameters.page,
        requestParameters.size,
        requestParameters.status,
        requestParameters.keyword,
        options
      )
      .then(request => request(this.axios, this.basePath));
  }

  /**
   *
   * @summary Update Cookie Account
   * @param {JDCookieManagementApiApiJdCookieAccountUpdatePutRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   */
  public apiJdCookieAccountUpdatePut(
    requestParameters: JDCookieManagementApiApiJdCookieAccountUpdatePutRequest = {},
    options?: RawAxiosRequestConfig
  ) {
    return JDCookieManagementApiFp(this.configuration)
      .apiJdCookieAccountUpdatePut(
        requestParameters.kamiApiJdCookieV1UpdateAccountReq,
        options
      )
      .then(request => request(this.axios, this.basePath));
  }

  /**
   *
   * @summary Validate Cookie
   * @param {JDCookieManagementApiApiJdCookieAccountValidatePostRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   */
  public apiJdCookieAccountValidatePost(
    requestParameters: JDCookieManagementApiApiJdCookieAccountValidatePostRequest = {},
    options?: RawAxiosRequestConfig
  ) {
    return JDCookieManagementApiFp(this.configuration)
      .apiJdCookieAccountValidatePost(
        requestParameters.kamiApiJdCookieV1ValidateCookieReq,
        options
      )
      .then(request => request(this.axios, this.basePath));
  }
}

export enum ApiJdCookieAccountListGetStatusEnum {
  NUMBER_3 = 3,
  NUMBER_1 = 1,
  NUMBER_2 = 2,
  NUMBER_0 = 0
}
