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

// DeleteContactJobLevel 该接口用于删除职级。
//
// doc: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/job_level/delete
// new doc: https://open.feishu.cn/document/server-docs/contact-v3/job_level/delete
func (r *ContactService) DeleteContactJobLevel(ctx context.Context, request *DeleteContactJobLevelReq, options ...MethodOptionFunc) (*DeleteContactJobLevelResp, *Response, error) {
	if r.cli.mock.mockContactDeleteContactJobLevel != nil {
		r.cli.Log(ctx, LogLevelDebug, "[lark] Contact#DeleteContactJobLevel mock enable")
		return r.cli.mock.mockContactDeleteContactJobLevel(ctx, request, options...)
	}

	req := &RawRequestReq{
		Scope:                 "Contact",
		API:                   "DeleteContactJobLevel",
		Method:                "DELETE",
		URL:                   r.cli.openBaseURL + "/open-apis/contact/v3/job_levels/:job_level_id",
		Body:                  request,
		MethodOption:          newMethodOption(options),
		NeedTenantAccessToken: true,
	}
	resp := new(deleteContactJobLevelResp)

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

// MockContactDeleteContactJobLevel mock ContactDeleteContactJobLevel method
func (r *Mock) MockContactDeleteContactJobLevel(f func(ctx context.Context, request *DeleteContactJobLevelReq, options ...MethodOptionFunc) (*DeleteContactJobLevelResp, *Response, error)) {
	r.mockContactDeleteContactJobLevel = f
}

// UnMockContactDeleteContactJobLevel un-mock ContactDeleteContactJobLevel method
func (r *Mock) UnMockContactDeleteContactJobLevel() {
	r.mockContactDeleteContactJobLevel = nil
}

// DeleteContactJobLevelReq ...
type DeleteContactJobLevelReq struct {
	JobLevelID string `path:"job_level_id" json:"-"` // 职级ID, 示例值: "mga5oa8ayjlp9rb"
}

// DeleteContactJobLevelResp ...
type DeleteContactJobLevelResp struct {
}

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