// 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"
)

// BatchDeleteHireEcoAccountCustomField 删除用户在服务商处的身份标示字段（如用户在服务商处的租户 ID）。删除后, 不影响已添加帐号对应的自定义字段的值。但在添加新帐号时, 将不能再使用此自定义字段。删除不支持撤销, 对应的 key 将无法再次复用。
//
// doc: https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/batch_delete
// new doc: https://open.feishu.cn/document/server-docs/hire-v1/ecological-docking/eco_account_custom_field/batch_delete
func (r *HireService) BatchDeleteHireEcoAccountCustomField(ctx context.Context, request *BatchDeleteHireEcoAccountCustomFieldReq, options ...MethodOptionFunc) (*BatchDeleteHireEcoAccountCustomFieldResp, *Response, error) {
	if r.cli.mock.mockHireBatchDeleteHireEcoAccountCustomField != nil {
		r.cli.Log(ctx, LogLevelDebug, "[lark] Hire#BatchDeleteHireEcoAccountCustomField mock enable")
		return r.cli.mock.mockHireBatchDeleteHireEcoAccountCustomField(ctx, request, options...)
	}

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

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

// MockHireBatchDeleteHireEcoAccountCustomField mock HireBatchDeleteHireEcoAccountCustomField method
func (r *Mock) MockHireBatchDeleteHireEcoAccountCustomField(f func(ctx context.Context, request *BatchDeleteHireEcoAccountCustomFieldReq, options ...MethodOptionFunc) (*BatchDeleteHireEcoAccountCustomFieldResp, *Response, error)) {
	r.mockHireBatchDeleteHireEcoAccountCustomField = f
}

// UnMockHireBatchDeleteHireEcoAccountCustomField un-mock HireBatchDeleteHireEcoAccountCustomField method
func (r *Mock) UnMockHireBatchDeleteHireEcoAccountCustomField() {
	r.mockHireBatchDeleteHireEcoAccountCustomField = nil
}

// BatchDeleteHireEcoAccountCustomFieldReq ...
type BatchDeleteHireEcoAccountCustomFieldReq struct {
	Scope              *int64   `json:"scope,omitempty"`                 // 适用范围, 示例值: 1, 可选值有: 1: 背调, 2: 笔试
	CustomFieldKeyList []string `json:"custom_field_key_list,omitempty"` // 要删除的自定义字段的 key 列表, 示例值: ["7230753910687080000"]
}

// BatchDeleteHireEcoAccountCustomFieldResp ...
type BatchDeleteHireEcoAccountCustomFieldResp struct {
}

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