// Code generated by lark_sdk_gen. DO NOT EDIT.
/**
 * Copyright 2022 chyroc
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package lark

import (
	"context"
)

// BatchDeleteHireEcoBackgroundCheckCustomField 删除用户在发起背调时的自定义字段, 删除不影响已创建的背调, 删除后对应的自定义字段的 key 不能再复用。
//
// doc: https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check_custom_field/batch_delete
// new doc: https://open.feishu.cn/document/server-docs/hire-v1/ecological-docking/eco_background_check_custom_field/batch_delete
func (r *HireService) BatchDeleteHireEcoBackgroundCheckCustomField(ctx context.Context, request *BatchDeleteHireEcoBackgroundCheckCustomFieldReq, options ...MethodOptionFunc) (*BatchDeleteHireEcoBackgroundCheckCustomFieldResp, *Response, error) {
	if r.cli.mock.mockHireBatchDeleteHireEcoBackgroundCheckCustomField != nil {
		r.cli.Log(ctx, LogLevelDebug, "[lark] Hire#BatchDeleteHireEcoBackgroundCheckCustomField mock enable")
		return r.cli.mock.mockHireBatchDeleteHireEcoBackgroundCheckCustomField(ctx, request, options...)
	}

	req := &RawRequestReq{
		Scope:                 "Hire",
		API:                   "BatchDeleteHireEcoBackgroundCheckCustomField",
		Method:                "POST",
		URL:                   r.cli.openBaseURL + "/open-apis/hire/v1/eco_background_check_custom_fields/batch_delete",
		Body:                  request,
		MethodOption:          newMethodOption(options),
		NeedTenantAccessToken: true,
	}
	resp := new(batchDeleteHireEcoBackgroundCheckCustomFieldResp)

	response, err := r.cli.RawRequest(ctx, req, resp)
	return resp.Data, response, err
}

// MockHireBatchDeleteHireEcoBackgroundCheckCustomField mock HireBatchDeleteHireEcoBackgroundCheckCustomField method
func (r *Mock) MockHireBatchDeleteHireEcoBackgroundCheckCustomField(f func(ctx context.Context, request *BatchDeleteHireEcoBackgroundCheckCustomFieldReq, options ...MethodOptionFunc) (*BatchDeleteHireEcoBackgroundCheckCustomFieldResp, *Response, error)) {
	r.mockHireBatchDeleteHireEcoBackgroundCheckCustomField = f
}

// UnMockHireBatchDeleteHireEcoBackgroundCheckCustomField un-mock HireBatchDeleteHireEcoBackgroundCheckCustomField method
func (r *Mock) UnMockHireBatchDeleteHireEcoBackgroundCheckCustomField() {
	r.mockHireBatchDeleteHireEcoBackgroundCheckCustomField = nil
}

// BatchDeleteHireEcoBackgroundCheckCustomFieldReq ...
type BatchDeleteHireEcoBackgroundCheckCustomFieldReq struct {
	AccountID string `json:"account_id,omitempty"` // 背调账号 ID, 可在「账号绑定」事件中获取, 示例值: "a001"
}

// BatchDeleteHireEcoBackgroundCheckCustomFieldResp ...
type BatchDeleteHireEcoBackgroundCheckCustomFieldResp struct {
}

// batchDeleteHireEcoBackgroundCheckCustomFieldResp ...
type batchDeleteHireEcoBackgroundCheckCustomFieldResp struct {
	Code  int64                                             `json:"code,omitempty"` // 错误码, 非 0 表示失败
	Msg   string                                            `json:"msg,omitempty"`  // 错误描述
	Data  *BatchDeleteHireEcoBackgroundCheckCustomFieldResp `json:"data,omitempty"`
	Error *ErrorDetail                                      `json:"error,omitempty"`
}
