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

// DeleteSheetFloatImage 删除 float_image_id 对应的浮动图片。
//
// doc: https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-float_image/delete
// new doc: https://open.feishu.cn/document/server-docs/docs/sheets-v3/spreadsheet-sheet-float_image/delete
func (r *DriveService) DeleteSheetFloatImage(ctx context.Context, request *DeleteSheetFloatImageReq, options ...MethodOptionFunc) (*DeleteSheetFloatImageResp, *Response, error) {
	if r.cli.mock.mockDriveDeleteSheetFloatImage != nil {
		r.cli.Log(ctx, LogLevelDebug, "[lark] Drive#DeleteSheetFloatImage mock enable")
		return r.cli.mock.mockDriveDeleteSheetFloatImage(ctx, request, options...)
	}

	req := &RawRequestReq{
		Scope:                 "Drive",
		API:                   "DeleteSheetFloatImage",
		Method:                "DELETE",
		URL:                   r.cli.openBaseURL + "/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/float_images/:float_image_id",
		Body:                  request,
		MethodOption:          newMethodOption(options),
		NeedTenantAccessToken: true,
		NeedUserAccessToken:   true,
	}
	resp := new(deleteSheetFloatImageResp)

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

// MockDriveDeleteSheetFloatImage mock DriveDeleteSheetFloatImage method
func (r *Mock) MockDriveDeleteSheetFloatImage(f func(ctx context.Context, request *DeleteSheetFloatImageReq, options ...MethodOptionFunc) (*DeleteSheetFloatImageResp, *Response, error)) {
	r.mockDriveDeleteSheetFloatImage = f
}

// UnMockDriveDeleteSheetFloatImage un-mock DriveDeleteSheetFloatImage method
func (r *Mock) UnMockDriveDeleteSheetFloatImage() {
	r.mockDriveDeleteSheetFloatImage = nil
}

// DeleteSheetFloatImageReq ...
type DeleteSheetFloatImageReq struct {
	SpreadSheetToken string `path:"spreadsheet_token" json:"-"` // 表格 token, 示例值: "shtcnmBA*yGehy8"
	SheetID          string `path:"sheet_id" json:"-"`          // 子表 id, 示例值: "0b**12"
	FloatImageID     string `path:"float_image_id" json:"-"`    // 浮动图片 id, 示例值: "ye06SS14ph"
}

// DeleteSheetFloatImageResp ...
type DeleteSheetFloatImageResp struct {
}

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