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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateResponseBody

type CreateResponseBody struct {

	// 创建出的服务作业ID
	Id string `json:"id"`
}

func (CreateResponseBody) String

func (o CreateResponseBody) String() string

type CreateTasksRequest

type CreateTasksRequest struct {

	// 服务API,具体API名称见园区智能体提供的API参考列表中URI描述[API列表](https://support.huaweicloud.com/api-campusgo/campusgo_03_0013.html)
	ServiceName string `json:"service_name"`

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

CreateTasksRequest Request Object

func (CreateTasksRequest) String

func (o CreateTasksRequest) String() string

type CreateTasksRequestBody

type CreateTasksRequestBody struct {

	// 作业的名称
	Name string `json:"name"`

	// 作业的描述
	Description *string `json:"description,omitempty"`

	Input *TaskInput `json:"input"`

	Output *TaskOutput `json:"output"`

	// 作业对应服务的版本号
	ServiceVersion string `json:"service_version"`

	// 仅边缘作业需填且必填,作业运行指定的边缘运行池ID
	EdgePoolId *string `json:"edge_pool_id,omitempty"`

	// 作业指定的算法能力包包周期订单ID
	ResourceOrderId *string `json:"resource_order_id,omitempty"`

	ServiceConfig *TaskServiceConfig `json:"service_config,omitempty"`
}

func (CreateTasksRequestBody) String

func (o CreateTasksRequestBody) String() string

type CreateTasksResponse

type CreateTasksResponse struct {
	Body           *[]CreateResponseBody `json:"body,omitempty"`
	HttpStatusCode int                   `json:"-"`
}

CreateTasksResponse Response Object

func (CreateTasksResponse) String

func (o CreateTasksResponse) String() string

type DeleteTaskRequest

type DeleteTaskRequest struct {

	// 服务名称
	ServiceName string `json:"service_name"`

	// 指定的服务作业ID
	TaskId string `json:"task_id"`
}

DeleteTaskRequest Request Object

func (DeleteTaskRequest) String

func (o DeleteTaskRequest) String() string

type DeleteTaskResponse

type DeleteTaskResponse struct {
	HttpStatusCode int `json:"-"`
}

DeleteTaskResponse Response Object

func (DeleteTaskResponse) String

func (o DeleteTaskResponse) String() string

type ListTasksDetailsRequest

type ListTasksDetailsRequest struct {

	// 服务名称
	ServiceName string `json:"service_name"`

	// 目标服务作业对应的服务版本号
	ServiceVersion *string `json:"service_version,omitempty"`

	// 目标服务作业的状态,分别为PENDING(等待中),RECOVERING(恢复中),STARTING(启动中),UPGRADING(升级中),CREATE_FAILED(创建失败),START_FAILED(启动失败),RUNNING(运行中),STOPPING(停止中),STOPPED(已停止),ABNORMAL(异常),SUCCEEDED(运行成功),FAILED(运行失败),DELETING(删除中),FREEZING(冻结中),FROZEN(已冻结)
	State *ListTasksDetailsRequestState `json:"state,omitempty"`

	// 目标服务作业的名称,支持模糊匹配
	NameLike *string `json:"name_like,omitempty"`

	// 目标服务作业的ID,支持模糊匹配
	IdLike *string `json:"id_like,omitempty"`

	// 目标服务作业的创建起始时间
	CreatedSince *int64 `json:"created_since,omitempty"`

	// 目标服务作业的创建截止时间
	CreatedUntil *int64 `json:"created_until,omitempty"`

	// 展示服务作业时的排序字段和顺序,分别为name:ASC(按名称顺序排序),name:DESC(按名称倒序排序),created_at:ASC(按创建时间正序排序),created_at:DESC(按创建时间倒序排序),updated_at:ASC(按更新时间正序排序),updated_at:DESC(按更新时间倒序排序)
	Order *ListTasksDetailsRequestOrder `json:"order,omitempty"`

	// 首个展示的服务作业的偏移量
	Offset *int32 `json:"offset,omitempty"`

	// 展示服务作业的数量
	Limit *int32 `json:"limit,omitempty"`
}

ListTasksDetailsRequest Request Object

func (ListTasksDetailsRequest) String

func (o ListTasksDetailsRequest) String() string

type ListTasksDetailsRequestOrder

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

func (ListTasksDetailsRequestOrder) MarshalJSON

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

func (*ListTasksDetailsRequestOrder) UnmarshalJSON

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

func (ListTasksDetailsRequestOrder) Value

type ListTasksDetailsRequestOrderEnum

type ListTasksDetailsRequestOrderEnum struct {
	NAMEASC        ListTasksDetailsRequestOrder
	NAMEDESC       ListTasksDetailsRequestOrder
	CREATED_ATASC  ListTasksDetailsRequestOrder
	CREATED_ATDESC ListTasksDetailsRequestOrder
	UPDATED_ATASC  ListTasksDetailsRequestOrder
	UPDATED_ATDESC ListTasksDetailsRequestOrder
}

func GetListTasksDetailsRequestOrderEnum

func GetListTasksDetailsRequestOrderEnum() ListTasksDetailsRequestOrderEnum

type ListTasksDetailsRequestState

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

func (ListTasksDetailsRequestState) MarshalJSON

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

func (*ListTasksDetailsRequestState) UnmarshalJSON

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

func (ListTasksDetailsRequestState) Value

type ListTasksDetailsResponse

type ListTasksDetailsResponse struct {

	// 符合检索条件的总条目数
	Count *int64 `json:"count,omitempty"`

	// 检索到的服务作业条目
	Tasks          *[]TaskDetails `json:"tasks,omitempty"`
	HttpStatusCode int            `json:"-"`
}

ListTasksDetailsResponse Response Object

func (ListTasksDetailsResponse) String

func (o ListTasksDetailsResponse) String() string

type ShowTaskRequest

type ShowTaskRequest struct {

	// 服务名称
	ServiceName string `json:"service_name"`

	// 指定的服务作业ID
	TaskId string `json:"task_id"`
}

ShowTaskRequest Request Object

func (ShowTaskRequest) String

func (o ShowTaskRequest) String() string

type ShowTaskResponse

type ShowTaskResponse struct {

	// 作业ID
	Id string `json:"id"`

	// 作业的名称
	Name string `json:"name"`

	// 作业创建者的用户名
	Creator string `json:"creator"`

	// 作业创建者的项目ID
	ProjectId string `json:"project_id"`

	// 作业的描述
	Description *string `json:"description,omitempty"`

	// 作业对应服务的名称
	ServiceName string `json:"service_name"`

	// 作业对应服务的版本号
	ServiceVersion string `json:"service_version"`

	ServiceTitle *TaskDetailsServiceTitle `json:"service_title"`

	// 仅边缘作业会出现,作业运行所在的边缘运行池ID
	EdgePoolId *string `json:"edge_pool_id,omitempty"`

	// 作业指定的算法能力包包周期订单ID
	ResourceOrderId *string `json:"resource_order_id,omitempty"`

	// 作业创建的时间
	CreatedAt *sdktime.SdkTime `json:"created_at"`

	// 作业最近一次状态更新的时间
	UpdatedAt *sdktime.SdkTime `json:"updated_at"`

	// 作业当前的状态,分别为PENDING(等待中),RECOVERING(恢复中),STARTING(启动中),UPGRADING(升级中),CREATE_FAILED(创建失败),START_FAILED(启动失败),RUNNING(运行中),STOPPING(停止中),STOPPED(已停止),ABNORMAL(异常),SUCCEEDED(运行成功),FAILED(运行失败),DELETING(删除中),FREEZING(冻结中),FROZEN(已冻结)
	State ShowTaskResponseState `json:"state"`

	// 作业状态的详情信息,仅部分状态会有详情信息
	Status *string `json:"status,omitempty"`

	Error *TaskDetailsError `json:"error,omitempty"`

	Input *TaskInput `json:"input"`

	Output *TaskOutputForDisplay `json:"output"`

	ServiceConfig  *TaskServiceConfig `json:"service_config,omitempty"`
	HttpStatusCode int                `json:"-"`
}

ShowTaskResponse Response Object

func (ShowTaskResponse) String

func (o ShowTaskResponse) String() string

type ShowTaskResponseState

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

func (ShowTaskResponseState) MarshalJSON

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

func (*ShowTaskResponseState) UnmarshalJSON

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

func (ShowTaskResponseState) Value

func (c ShowTaskResponseState) Value() string

type TaskDetails

type TaskDetails struct {

	// 作业ID
	Id string `json:"id"`

	// 作业的名称
	Name string `json:"name"`

	// 作业创建者的用户名
	Creator string `json:"creator"`

	// 作业创建者的项目ID
	ProjectId string `json:"project_id"`

	// 作业的描述
	Description *string `json:"description,omitempty"`

	// 作业对应服务的名称
	ServiceName string `json:"service_name"`

	// 作业对应服务的版本号
	ServiceVersion string `json:"service_version"`

	ServiceTitle *TaskDetailsServiceTitle `json:"service_title"`

	// 仅边缘作业会出现,作业运行所在的边缘运行池ID
	EdgePoolId *string `json:"edge_pool_id,omitempty"`

	// 作业指定的算法能力包包周期订单ID
	ResourceOrderId *string `json:"resource_order_id,omitempty"`

	// 作业创建的时间
	CreatedAt *sdktime.SdkTime `json:"created_at"`

	// 作业最近一次状态更新的时间
	UpdatedAt *sdktime.SdkTime `json:"updated_at"`

	// 作业当前的状态,分别为PENDING(等待中),RECOVERING(恢复中),STARTING(启动中),UPGRADING(升级中),CREATE_FAILED(创建失败),START_FAILED(启动失败),RUNNING(运行中),STOPPING(停止中),STOPPED(已停止),ABNORMAL(异常),SUCCEEDED(运行成功),FAILED(运行失败),DELETING(删除中),FREEZING(冻结中),FROZEN(已冻结)
	State TaskDetailsState `json:"state"`

	// 作业状态的详情信息,仅部分状态会有详情信息
	Status *string `json:"status,omitempty"`

	Error *TaskDetailsError `json:"error,omitempty"`

	Input *TaskInput `json:"input"`

	Output *TaskOutputForDisplay `json:"output"`

	ServiceConfig *TaskServiceConfig `json:"service_config,omitempty"`
}

func (TaskDetails) String

func (o TaskDetails) String() string

type TaskDetailsError

type TaskDetailsError struct {

	// 算法服务定义的错误码
	Code string `json:"code"`

	// 算法服务反馈的错误信息
	Message string `json:"message"`
}

TaskDetailsError 作业运行失败时收集到的错误信息

func (TaskDetailsError) String

func (o TaskDetailsError) String() string

type TaskDetailsServiceTitle

type TaskDetailsServiceTitle struct {

	// 作业对应服务的中文标题
	Zh *string `json:"zh,omitempty"`

	// 作业对应服务的英文标题
	En *string `json:"en,omitempty"`
}

TaskDetailsServiceTitle 作业对应服务的标题

func (TaskDetailsServiceTitle) String

func (o TaskDetailsServiceTitle) String() string

type TaskDetailsState

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

func (TaskDetailsState) MarshalJSON

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

func (*TaskDetailsState) UnmarshalJSON

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

func (TaskDetailsState) Value

func (c TaskDetailsState) Value() string

type TaskDetailsStateEnum

type TaskDetailsStateEnum struct {
	PENDING       TaskDetailsState
	RECOVERING    TaskDetailsState
	STARTING      TaskDetailsState
	UPGRADING     TaskDetailsState
	CREATE_FAILED TaskDetailsState
	START_FAILED  TaskDetailsState
	RUNNING       TaskDetailsState
	STOPPING      TaskDetailsState
	STOPPED       TaskDetailsState
	ABNORMAL      TaskDetailsState
	SUCCEEDED     TaskDetailsState
	FAILED        TaskDetailsState
	DELETING      TaskDetailsState
	FREEZING      TaskDetailsState
	FROZEN        TaskDetailsState
}

func GetTaskDetailsStateEnum

func GetTaskDetailsStateEnum() TaskDetailsStateEnum

type TaskInput

type TaskInput struct {

	// 作业的输入类型,必填。可选类型有obs(对象存储服务存储的文件),vis(视频接入服务的视频流),url(指定的文件地址或取流地址),edgecamera(绑定在IEF的边缘摄像头),edgerestful(从自定义的流媒体服务器通过Restful接口获取取流地址),vcn(VCN设备)。
	Type TaskInputType `json:"type"`

	// 作业的输入详情,针对不同的输入类型有不同的配置。创建时允许填写多路输入,但更新时,obs以外其余的输入类型只允许填写一路输入
	Data []TaskInputData `json:"data"`

	Vcn *TaskInputVcn `json:"vcn,omitempty"`
}

TaskInput 作业的输入配置

func (TaskInput) String

func (o TaskInput) String() string

type TaskInputData

type TaskInputData struct {

	// VIS的视频流名称,当输入为vis类型时必选
	StreamName *string `json:"stream_name,omitempty"`

	// OBS桶名,当输入为obs类型是必选
	Bucket *string `json:"bucket,omitempty"`

	// OBS的路径,当输入为obs类型时必选
	Path *string `json:"path,omitempty"`

	// url输入源的地址或者获取视频流地址的restful请求地址,当输入为url或者edgerestful类型时必选
	Url *string `json:"url,omitempty"`

	// 获取视频流的restful请求携带的请求头,当输入为edgerestful类型时可选
	Headers *interface{} `json:"headers,omitempty"`

	// 是否需要对https请求进行证书校验,当输入为edgerestful类型时必选
	CertificateCheck *bool `json:"certificate_check,omitempty"`

	// restful请求返回的body中,视频流地址的路径,当输入为edgerestful类型时必选
	RtspPathInResponse *string `json:"rtsp_path_in_response,omitempty"`

	// VCN设备ID,当输入为vcn类型时必选
	DeviceId *string `json:"device_id,omitempty"`

	// 准备进行分析的码流,其中1代表主码流,2代表子码流1,3代表子码流2,当输入为vcn类型时可选
	StreamType *int32 `json:"stream_type,omitempty"`

	// IEF挂载的边缘设备的ID,当输入为edgecamera类型时必选
	Id *string `json:"id,omitempty"`

	// 可选,当前输入的序号,从0开始递增,不可重复
	Index *int32 `json:"index,omitempty"`
}

TaskInputData 输入数据的配置信息

func (TaskInputData) String

func (o TaskInputData) String() string

type TaskInputType

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

func (TaskInputType) MarshalJSON

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

func (*TaskInputType) UnmarshalJSON

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

func (TaskInputType) Value

func (c TaskInputType) Value() string

type TaskInputTypeEnum

type TaskInputTypeEnum struct {
	OBS         TaskInputType
	VIS         TaskInputType
	URL         TaskInputType
	EDGECAMERA  TaskInputType
	EDGERESTFUL TaskInputType
	VCN         TaskInputType
}

func GetTaskInputTypeEnum

func GetTaskInputTypeEnum() TaskInputTypeEnum

type TaskInputVcn

type TaskInputVcn struct {

	// VCN服务器的IP地址
	Ip string `json:"ip"`

	// VCN服务器的端口号
	Port int32 `json:"port"`

	// VCN服务器的账号名
	Username string `json:"username"`

	// VCN服务器的与账号对应的密码
	Password string `json:"password"`
}

TaskInputVcn VCN服务器信息,只有输入为vcn时才可以且必须使用

func (TaskInputVcn) String

func (o TaskInputVcn) String() string

type TaskOutput

type TaskOutput struct {
	Obs *TaskOutputObs `json:"obs,omitempty"`

	Dis *TaskOutputDis `json:"dis,omitempty"`

	Webhook *TaskOutputWebhook `json:"webhook,omitempty"`

	Localpath *TaskOutputLocalpath `json:"localpath,omitempty"`
}

TaskOutput 作业的输出配置

func (TaskOutput) String

func (o TaskOutput) String() string

type TaskOutputDis

type TaskOutputDis struct {

	// DIS流名称
	StreamName string `json:"stream_name"`

	// 作业输出数据类别的列表,当输出类型下有这个列表时,表示希望这个输出类型下存放dataCategory列表内的数据,部分服务需要
	DataCategory *[]string `json:"data_category,omitempty"`
}

TaskOutputDis 输出为dis类型时的配置信息

func (TaskOutputDis) String

func (o TaskOutputDis) String() string

type TaskOutputForDisplay

type TaskOutputForDisplay struct {
	Obs *TaskOutputObs `json:"obs,omitempty"`

	Dis *TaskOutputDis `json:"dis,omitempty"`

	Webhook *TaskOutputWebhook `json:"webhook,omitempty"`

	Localpath *TaskOutputLocalpath `json:"localpath,omitempty"`
}

TaskOutputForDisplay 作业的输出配置展示

func (TaskOutputForDisplay) String

func (o TaskOutputForDisplay) String() string

type TaskOutputLocalpath

type TaskOutputLocalpath struct {

	// 挂载的源路径,存放作业运行结果的路径,必须为linux路径
	MountSourcePath string `json:"mount_source_path"`

	// 作业输出数据类别的列表,当输出类型下有这个列表时,表示希望这个输出类型下存放dataCategory列表内的数据,部分服务需要
	DataCategory *[]string `json:"data_category,omitempty"`
}

TaskOutputLocalpath 输出为localpath类型时的配置信息

func (TaskOutputLocalpath) String

func (o TaskOutputLocalpath) String() string

type TaskOutputObs

type TaskOutputObs struct {

	// OBS桶名
	Bucket string `json:"bucket"`

	// OBS的路径
	Path string `json:"path"`

	// 作业输出数据类别的列表,当输出类型下有这个列表时,表示希望这个输出类型下存放dataCategory列表内的数据,部分服务需要
	DataCategory *[]string `json:"data_category,omitempty"`
}

TaskOutputObs 输出为obs类型时的配置信息

func (TaskOutputObs) String

func (o TaskOutputObs) String() string

type TaskOutputWebhook

type TaskOutputWebhook struct {

	// 结果回调地址
	Url string `json:"url"`

	// 结果回调时需要携带的请求头
	Headers *interface{} `json:"headers"`

	// 作业输出数据类别的列表,当输出类型下有这个列表时,表示希望这个输出类型下存放dataCategory列表内的数据,部分服务需要
	DataCategory *[]string `json:"data_category,omitempty"`
}

TaskOutputWebhook 输出为webhook类型时的配置信息

func (TaskOutputWebhook) String

func (o TaskOutputWebhook) String() string

type TaskServiceConfig

type TaskServiceConfig struct {

	// 根据不同服务,填写对应的服务配置参数json结构体
	Common *interface{} `json:"common,omitempty"`
}

TaskServiceConfig 作业运行时指定的算法配置参数,见园区智能体API参考文档[API参考文档](https://support.huaweicloud.com/api-campusgo/campusgo_03_0013.html)

func (TaskServiceConfig) String

func (o TaskServiceConfig) String() string

Jump to

Keyboard shortcuts

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