model

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddPictureRequestReq

type AddPictureRequestReq struct {

	// 图片文件Base64编码字符串,仅支持JPEG/JPG/PNG/BMP格式,图片最小边不小于100px,最大边不超过2048px。
	File *string `json:"file,omitempty"`

	// 图片的URL路径,作为图片库中索引图片的ID,是必选参数。  > - 当file字段不为空时,图片从file获取,path作为图片索引ID使用;当file字段不存在或者为空时,图片需要通过下载获取,此时path作为下载图片的地址(当前仅支持从华为云图像搜索服务所在区域的OBS下载图片),同时,path也作为图片索引ID。
	Path string `json:"path"`

	// 图片自定义标签。格式为key:value对,所有图片的key总数最多不超过10个,但是每个key对应的value不限制个数,例如:key为动物,对应的value可以是猫、狗、鸟等多个。  标签名(key)添加方式:   - 登录管理控制台,单击“创建实例”,自定义标签名。    - 登录管理控制台,在“实例管理”页签,单击实例名称,进入“基础信息”页添加自定义标签。
	Tags *interface{} `json:"tags,omitempty"`
}

AddPictureRequestReq 添加图片body体

func (AddPictureRequestReq) String

func (o AddPictureRequestReq) String() string

type CreateInstanceReq

type CreateInstanceReq struct {

	// 实例名称。  - 仅支持小写字母(a-z)、数字,横杠和下划线。  - 以字母开头,长度在16位以内。
	Name string `json:"name"`

	// 模型名称,支持如下模型名称:  - common-search,通用图片搜索,适用于图片库中搜索相似内容或类别的图片。  - image-recommend,版权图片推荐,适用于版权摄影图片库中查找并推荐相同或相似版权图片。  - image-copyright,图片版权,适用于从海量图片库中快速识别侵权盗用图片。
	Model string `json:"model"`

	// 描述。
	Description *string `json:"description,omitempty"`

	// 规格,即实例的图片数量规格。默认为30000000(单位:张),当前仅支持默认规格。
	Level *int32 `json:"level,omitempty"`

	// 图片自定义标签,每个实例最多支持10个标签,自定义标签不支持英文字母大写。
	Tags *[]string `json:"tags,omitempty"`
}

CreateInstanceReq 创建实例的body体

func (CreateInstanceReq) String

func (o CreateInstanceReq) String() string

type DeletePictureReq

type DeletePictureReq struct {

	// 图片URL路径,作为图片库中索引图片的ID。
	Path *string `json:"path,omitempty"`
}

func (DeletePictureReq) String

func (o DeletePictureReq) String() string

type RunAddPictureRequest

type RunAddPictureRequest struct {

	// 用户的project_id 登陆华为云 -> 用户中心 -> 我的凭证 -> api凭证 即可查看对应区域的项目ID。
	ProjectId string `json:"project_id"`

	// 实例名称。
	InstanceName string `json:"instance_name"`

	Body *AddPictureRequestReq `json:"body,omitempty"`
}

RunAddPictureRequest Request Object

func (RunAddPictureRequest) String

func (o RunAddPictureRequest) String() string

type RunAddPictureResponse

type RunAddPictureResponse struct {

	// 调用成功时表示调用结果。  调用失败时无此字段。
	Result         *string `json:"result,omitempty"`
	HttpStatusCode int     `json:"-"`
}

RunAddPictureResponse Response Object

func (RunAddPictureResponse) String

func (o RunAddPictureResponse) String() string

type RunCheckPictureRequest

type RunCheckPictureRequest struct {

	// 实例名称。
	InstanceName string `json:"instance_name"`

	// 用户的project_id 登陆华为云 -> 用户中心 -> 我的凭证 -> api凭证 即可查看对应区域的项目ID。
	ProjectId string `json:"project_id"`

	Body *DeletePictureReq `json:"body,omitempty"`
}

RunCheckPictureRequest Request Object

func (RunCheckPictureRequest) String

func (o RunCheckPictureRequest) String() string

type RunCheckPictureResponse

type RunCheckPictureResponse struct {

	// 调用成功时表示调用结果。  调用失败时无此字段。  - true表示图像索引库中存在查询的图片。  - false表示图像索引库中不存在查询的图片。
	Exist          *string `json:"exist,omitempty"`
	HttpStatusCode int     `json:"-"`
}

RunCheckPictureResponse Response Object

func (RunCheckPictureResponse) String

func (o RunCheckPictureResponse) String() string

type RunCreateInstanceRequest

type RunCreateInstanceRequest struct {

	// 用户的project_id  登陆华为云 -> 用户中心 -> 我的凭证 -> api凭证 即可查看对应区域的项目ID。
	ProjectId string `json:"project_id"`

	Body *CreateInstanceReq `json:"body,omitempty"`
}

RunCreateInstanceRequest Request Object

func (RunCreateInstanceRequest) String

func (o RunCreateInstanceRequest) String() string

type RunCreateInstanceResponse

type RunCreateInstanceResponse struct {

	// 模型展示名或领域名称。
	Domain *string `json:"domain,omitempty"`

	// 描述。
	Desc *string `json:"desc,omitempty"`

	// 注册时间。
	RegisterDate *int64 `json:"registerDate,omitempty"`

	// 过期时间,-1表示永不过期。
	ExpiredDate *int64 `json:"expiredDate,omitempty"`

	// 规格,即实例的图片数量规格,默认为30000000(单位:张)。
	Level *int32 `json:"level,omitempty"`

	// 图片自定义标签。
	Tags *[]string `json:"tags,omitempty"`

	// 实例的状态,有以下状态信息:   - NORMAL:正常。   - ARREARAGE:欠费。   - CREATION:创建中。   - CREATION_FAILD:创建失败。   - DELETING:删除中。   - DELETING_FAILED:删除失败。   - ABNORMAL:异常。
	Status *RunCreateInstanceResponseStatus `json:"status,omitempty"`

	// 实例名称。
	InstanceName   *string `json:"instanceName,omitempty"`
	HttpStatusCode int     `json:"-"`
}

RunCreateInstanceResponse Response Object

func (RunCreateInstanceResponse) String

func (o RunCreateInstanceResponse) String() string

type RunCreateInstanceResponseStatus

type RunCreateInstanceResponseStatus struct {
	// contains filtered or unexported fields
}

func (RunCreateInstanceResponseStatus) MarshalJSON

func (c RunCreateInstanceResponseStatus) MarshalJSON() ([]byte, error)

func (*RunCreateInstanceResponseStatus) UnmarshalJSON

func (c *RunCreateInstanceResponseStatus) UnmarshalJSON(b []byte) error

func (RunCreateInstanceResponseStatus) Value

type RunDeleteInstanceRequest

type RunDeleteInstanceRequest struct {

	// 实例名称。
	InstanceName string `json:"instance_name"`

	// 用户的project_id 登陆华为云 -> 用户中心 -> 我的凭证 -> api凭证 即可查看对应区域的项目ID。
	ProjectId string `json:"project_id"`
}

RunDeleteInstanceRequest Request Object

func (RunDeleteInstanceRequest) String

func (o RunDeleteInstanceRequest) String() string

type RunDeleteInstanceResponse

type RunDeleteInstanceResponse struct {

	// 调用成功时表示调用结果。  调用失败时无此字段。
	Result         *string `json:"result,omitempty"`
	HttpStatusCode int     `json:"-"`
}

RunDeleteInstanceResponse Response Object

func (RunDeleteInstanceResponse) String

func (o RunDeleteInstanceResponse) String() string

type RunDeletePictureRequest

type RunDeletePictureRequest struct {

	// 实例名称。
	InstanceName string `json:"instance_name"`

	// 用户的project_id 登陆华为云 -> 用户中心 -> 我的凭证 -> api凭证 即可查看对应区域的项目ID。
	ProjectId string `json:"project_id"`

	Body *DeletePictureReq `json:"body,omitempty"`
}

RunDeletePictureRequest Request Object

func (RunDeletePictureRequest) String

func (o RunDeletePictureRequest) String() string

type RunDeletePictureResponse

type RunDeletePictureResponse struct {

	// 调用成功时表示调用结果。  调用失败时无此字段。
	Result         *string `json:"result,omitempty"`
	HttpStatusCode int     `json:"-"`
}

RunDeletePictureResponse Response Object

func (RunDeletePictureResponse) String

func (o RunDeletePictureResponse) String() string

type RunModifyPictureReq

type RunModifyPictureReq struct {

	// 图片URL路径,作为图片库中索引图片的ID。
	Path string `json:"path"`

	// 自定义标签,格式为key:value对,其中: - 标签名(key值)须存在于实例中; - 标签内容(value值)为自定义标签值。
	Tags *interface{} `json:"tags"`
}

RunModifyPictureReq 修改图片信息的请求体

func (RunModifyPictureReq) String

func (o RunModifyPictureReq) String() string

type RunModifyPictureRequest

type RunModifyPictureRequest struct {

	// 实例名称。
	InstanceName string `json:"instance_name"`

	// 用户的project_id 登陆华为云 -> 用户中心 -> 我的凭证 -> api凭证 即可查看对应区域的项目ID。
	ProjectId string `json:"project_id"`

	Body *RunModifyPictureReq `json:"body,omitempty"`
}

RunModifyPictureRequest Request Object

func (RunModifyPictureRequest) String

func (o RunModifyPictureRequest) String() string

type RunModifyPictureResponse

type RunModifyPictureResponse struct {

	// 调用成功时表示调用结果。  调用失败时无此字段。
	Result         *string `json:"result,omitempty"`
	HttpStatusCode int     `json:"-"`
}

RunModifyPictureResponse Response Object

func (RunModifyPictureResponse) String

func (o RunModifyPictureResponse) String() string

type RunQueryInstanceRequest

type RunQueryInstanceRequest struct {

	// 实例名称。
	InstanceName string `json:"instance_name"`

	// 用户的project_id 登陆华为云 -> 用户中心 -> 我的凭证 -> api凭证 即可查看对应区域的项目ID。
	ProjectId string `json:"project_id"`
}

RunQueryInstanceRequest Request Object

func (RunQueryInstanceRequest) String

func (o RunQueryInstanceRequest) String() string

type RunQueryInstanceResponse

type RunQueryInstanceResponse struct {

	// 模型展示名或领域名称。
	Domain *string `json:"domain,omitempty"`

	// 描述。
	Desc *string `json:"desc,omitempty"`

	// 注册时间。
	RegisterDate *int64 `json:"registerDate,omitempty"`

	// 过期时间,-1表示永不过期。
	ExpiredDate *int64 `json:"expiredDate,omitempty"`

	// 规格,即实例的图片数量规格,默认为30000000(单位:张)。
	Level *int32 `json:"level,omitempty"`

	// 图片自定义标签。
	Tags *[]string `json:"tags,omitempty"`

	// 实例的状态,有以下状态信息:   - NORMAL:正常。   - ARREARAGE:欠费。   - CREATION:创建中。   - CREATION_FAILD:创建失败。   - DELETING:删除中。   - DELETING_FAILED:删除失败。   - ABNORMAL:异常。
	Status *RunQueryInstanceResponseStatus `json:"status,omitempty"`

	// 实例名称。
	InstanceName   *string `json:"instanceName,omitempty"`
	HttpStatusCode int     `json:"-"`
}

RunQueryInstanceResponse Response Object

func (RunQueryInstanceResponse) String

func (o RunQueryInstanceResponse) String() string

type RunQueryInstanceResponseStatus

type RunQueryInstanceResponseStatus struct {
	// contains filtered or unexported fields
}

func (RunQueryInstanceResponseStatus) MarshalJSON

func (c RunQueryInstanceResponseStatus) MarshalJSON() ([]byte, error)

func (*RunQueryInstanceResponseStatus) UnmarshalJSON

func (c *RunQueryInstanceResponseStatus) UnmarshalJSON(b []byte) error

func (RunQueryInstanceResponseStatus) Value

type RunSearchPictureRequest

type RunSearchPictureRequest struct {

	// 实例名称。
	InstanceName string `json:"instance_name"`

	// 用户的project_id 登陆华为云 -> 用户中心 -> 我的凭证 -> api凭证 即可查看对应区域的项目ID。
	ProjectId string `json:"project_id"`

	Body *SearchPictureReq `json:"body,omitempty"`
}

RunSearchPictureRequest Request Object

func (RunSearchPictureRequest) String

func (o RunSearchPictureRequest) String() string

type RunSearchPictureResponse

type RunSearchPictureResponse struct {

	// 搜索结果总数。
	Count *int32 `json:"count,omitempty"`

	// 搜索结果详情。
	Result         *[]SearchPictureItem `json:"result,omitempty"`
	HttpStatusCode int                  `json:"-"`
}

RunSearchPictureResponse Response Object

func (RunSearchPictureResponse) String

func (o RunSearchPictureResponse) String() string

type SearchBoxDetail

type SearchBoxDetail struct {

	// 区域中x坐标的最小值,单位:像素。
	X *int32 `json:"x,omitempty"`

	// 区域中y坐标的最小值,单位:像素。
	Y *int32 `json:"y,omitempty"`

	// 区域的宽度,单位:像素。
	Width *int32 `json:"width,omitempty"`

	// 区域的高度,单位:像素。
	Height *int32 `json:"height,omitempty"`
}

func (SearchBoxDetail) String

func (o SearchBoxDetail) String() string

type SearchPictureItem

type SearchPictureItem struct {

	// 被搜索图片的路径。
	Path *string `json:"path,omitempty"`

	// 查询图片和被搜索图片的相似度,值越接近1表示越相似。
	Sim *float32 `json:"sim,omitempty"`

	// 自定义的标签名称和标签内容。
	Tags *interface{} `json:"tags,omitempty"`
}

SearchPictureItem 搜索结果详情。

func (SearchPictureItem) String

func (o SearchPictureItem) String() string

type SearchPictureReq

type SearchPictureReq struct {

	// 图片文件Base64编码字符串,仅支持JPEG/JPG/PNG/BMP格式,图片最小边不小于100px,最大边不超过2048px。该参数与path二选一,如果两个参数都存在,则以file为主。
	File *string `json:"file,omitempty"`

	// 图片的URL路径,图片库中的图片索引ID。该参数与file二选一,如果两个参数都存在,则以file为主。
	Path *string `json:"path,omitempty"`

	// 返回被检索图像的数量,取值为1~100的整数,默认为10。
	Limit *int32 `json:"limit,omitempty"`

	// 偏移量,指定搜索结果返回起始位置,取值为大于或等于0的整数,默认为0。
	Offset *int32 `json:"offset,omitempty"`

	// 图片自定义标签,最多不超过10个,格式为key:value对。 标签名(key)添加方式:   - 登录管理控制台,单击“创建实例”,自定义标签名。   - 登录管理控制台,在“实例管理”页签,单击实例名称,进入“基础信息”页添加自定义标签。 使用图片标签搜索时该参数必选。
	Tags *interface{} `json:"tags,omitempty"`

	// 是否用图片中指定区域(参数box)进行搜索。默认为false,该参数目前仅对某些特定模型有效,其他模型暂不支持目标检测。 - true:用图片中指定区域(参数box)进行搜索。 - false:用全图进行搜索。
	IsCrop *bool `json:"is_crop,omitempty"`

	Box *SearchBoxDetail `json:"box,omitempty"`
}

func (SearchPictureReq) String

func (o SearchPictureReq) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL