v20200727

package
v1.0.941 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// 操作失败。
	FAILEDOPERATION = "FailedOperation"

	// 数据库查询错误。
	FAILEDOPERATION_DATABASEFINDERROR = "FailedOperation.DatabaseFindError"

	// 文件不存在。
	FAILEDOPERATION_FILENOTEXISTS = "FailedOperation.FileNotExists"

	// 权限不足。
	FAILEDOPERATION_INSUFFICIENTPRIVILEGE = "FailedOperation.InsufficientPrivilege"

	// 指定的服务不存在。
	FAILEDOPERATION_SERVICENOTFOUND = "FailedOperation.ServiceNotFound"

	// 内部错误。
	INTERNALERROR = "InternalError"

	// 参数错误。
	INVALIDPARAMETER = "InvalidParameter"

	// 参数值不能为空。
	INVALIDPARAMETER_EMPTYPARAMETERS = "InvalidParameter.EmptyParameters"

	// 文件格式解析失败。
	INVALIDPARAMETER_INVALIDFILEFORMAT = "InvalidParameter.InvalidFileFormat"

	// 文件大小不符合要求。
	INVALIDPARAMETER_INVALIDFILESIZE = "InvalidParameter.InvalidFileSize"

	// 参数取值错误。
	INVALIDPARAMETER_INVALIDPARAMETERVALUE = "InvalidParameter.InvalidParameterValue"

	// 参数解析失败。
	INVALIDPARAMETER_REQUESTPARSEERROR = "InvalidParameter.RequestParseError"
)
View Source
const APIVersion = "2020-07-27"

Variables

This section is empty.

Functions

This section is empty.

Types

type AlgorithmResult

type AlgorithmResult struct {
	// 算法ID
	AlgoId *string `json:"AlgoId,omitnil,omitempty" name:"AlgoId"`

	// 算法名称
	// 注意:此字段可能返回 null,表示取不到有效值。
	AlgoName *string `json:"AlgoName,omitnil,omitempty" name:"AlgoName"`

	// 算法返回的结果。
	// - 当算法类型为“OCR(1)”时,结果为文本字符串
	// - 当算法类型为“文本分类(2)”时,结果字符串为json对象数组:
	//   Class:分类结果
	//   Confidence:置信度
	// - 算法类型为“情感分析(3)”时,结果字符串为json对象:
	//   Positive:正面情感概率
	//   Negative:负面情感概率
	//   Neutral:中性情感概率
	// - 当算法类型为“合同要素抽取(4)”时,结果字符串为json对象数组:
	//   NodeName:一级要素名称
	//   ItemName:二级要素名称
	//   Content:要素文本内容
	// - 当算法类型为“实体识别(5)”时,结果字符串为json对象数组:
	//   - Entity:实体类型
	//   - Content:实体文本内容
	// 注意:此字段可能返回 null,表示取不到有效值。
	Result *string `json:"Result,omitnil,omitempty" name:"Result"`

	// 算法调用错误信息
	// 注意:此字段可能返回 null,表示取不到有效值。
	Error *string `json:"Error,omitnil,omitempty" name:"Error"`

	// 算法类型:
	// 1:OCR算法
	// 2:文本分类算法
	// 3:情感分析算法
	// 4:合同要素抽取算法
	// 5、实体识别算法
	// 注意:此字段可能返回 null,表示取不到有效值。
	AlgoType *int64 `json:"AlgoType,omitnil,omitempty" name:"AlgoType"`
}

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error)

func NewClientWithSecretId

func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error)

Deprecated

func (*Client) DescribeInvocationResult

func (c *Client) DescribeInvocationResult(request *DescribeInvocationResultRequest) (response *DescribeInvocationResultResponse, err error)

DescribeInvocationResult 产品控制台已经下线

获取服务调用结果。和InvokeService接口配置合适,其InvokeId参数为InvokeService接口返回的RequestId。

可能返回的错误码:

FAILEDOPERATION = "FailedOperation"
FAILEDOPERATION_DATABASEFINDERROR = "FailedOperation.DatabaseFindError"
INTERNALERROR = "InternalError"
INVALIDPARAMETER = "InvalidParameter"
INVALIDPARAMETER_INVALIDPARAMETERVALUE = "InvalidParameter.InvalidParameterValue"
INVALIDPARAMETER_REQUESTPARSEERROR = "InvalidParameter.RequestParseError"

func (*Client) DescribeInvocationResultWithContext added in v1.0.324

func (c *Client) DescribeInvocationResultWithContext(ctx context.Context, request *DescribeInvocationResultRequest) (response *DescribeInvocationResultResponse, err error)

DescribeInvocationResult 产品控制台已经下线

获取服务调用结果。和InvokeService接口配置合适,其InvokeId参数为InvokeService接口返回的RequestId。

可能返回的错误码:

FAILEDOPERATION = "FailedOperation"
FAILEDOPERATION_DATABASEFINDERROR = "FailedOperation.DatabaseFindError"
INTERNALERROR = "InternalError"
INVALIDPARAMETER = "InvalidParameter"
INVALIDPARAMETER_INVALIDPARAMETERVALUE = "InvalidParameter.InvalidParameterValue"
INVALIDPARAMETER_REQUESTPARSEERROR = "InvalidParameter.RequestParseError"

func (*Client) InvokeService

func (c *Client) InvokeService(request *InvokeServiceRequest) (response *InvokeServiceResponse, err error)

InvokeService 产品控制台已经下线

通过传入文档url,测试服务算法。此接口需要和DescribeInvocationResult接口配置使用,该接口使用InvokeService返回的RequestId作为InvokeId参数,用于查询调用结果。

可能返回的错误码:

FAILEDOPERATION = "FailedOperation"
FAILEDOPERATION_FILENOTEXISTS = "FailedOperation.FileNotExists"
FAILEDOPERATION_INSUFFICIENTPRIVILEGE = "FailedOperation.InsufficientPrivilege"
FAILEDOPERATION_SERVICENOTFOUND = "FailedOperation.ServiceNotFound"
INVALIDPARAMETER = "InvalidParameter"
INVALIDPARAMETER_EMPTYPARAMETERS = "InvalidParameter.EmptyParameters"
INVALIDPARAMETER_INVALIDFILEFORMAT = "InvalidParameter.InvalidFileFormat"
INVALIDPARAMETER_INVALIDFILESIZE = "InvalidParameter.InvalidFileSize"
INVALIDPARAMETER_INVALIDPARAMETERVALUE = "InvalidParameter.InvalidParameterValue"
INVALIDPARAMETER_REQUESTPARSEERROR = "InvalidParameter.RequestParseError"

func (*Client) InvokeServiceWithContext added in v1.0.324

func (c *Client) InvokeServiceWithContext(ctx context.Context, request *InvokeServiceRequest) (response *InvokeServiceResponse, err error)

InvokeService 产品控制台已经下线

通过传入文档url,测试服务算法。此接口需要和DescribeInvocationResult接口配置使用,该接口使用InvokeService返回的RequestId作为InvokeId参数,用于查询调用结果。

可能返回的错误码:

FAILEDOPERATION = "FailedOperation"
FAILEDOPERATION_FILENOTEXISTS = "FailedOperation.FileNotExists"
FAILEDOPERATION_INSUFFICIENTPRIVILEGE = "FailedOperation.InsufficientPrivilege"
FAILEDOPERATION_SERVICENOTFOUND = "FailedOperation.ServiceNotFound"
INVALIDPARAMETER = "InvalidParameter"
INVALIDPARAMETER_EMPTYPARAMETERS = "InvalidParameter.EmptyParameters"
INVALIDPARAMETER_INVALIDFILEFORMAT = "InvalidParameter.InvalidFileFormat"
INVALIDPARAMETER_INVALIDFILESIZE = "InvalidParameter.InvalidFileSize"
INVALIDPARAMETER_INVALIDPARAMETERVALUE = "InvalidParameter.InvalidParameterValue"
INVALIDPARAMETER_REQUESTPARSEERROR = "InvalidParameter.RequestParseError"

type DescribeInvocationResultRequest

type DescribeInvocationResultRequest struct {
	*tchttp.BaseRequest

	// 调用id,为调用InvokeService接口返回的RequestId
	InvokeId *string `json:"InvokeId,omitnil,omitempty" name:"InvokeId"`
}

func NewDescribeInvocationResultRequest

func NewDescribeInvocationResultRequest() (request *DescribeInvocationResultRequest)

func (*DescribeInvocationResultRequest) FromJsonString

func (r *DescribeInvocationResultRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DescribeInvocationResultRequest) ToJsonString

func (r *DescribeInvocationResultRequest) ToJsonString() string

type DescribeInvocationResultRequestParams added in v1.0.426

type DescribeInvocationResultRequestParams struct {
	// 调用id,为调用InvokeService接口返回的RequestId
	InvokeId *string `json:"InvokeId,omitnil,omitempty" name:"InvokeId"`
}

Predefined struct for user

type DescribeInvocationResultResponse

type DescribeInvocationResultResponse struct {
	*tchttp.BaseResponse
	Response *DescribeInvocationResultResponseParams `json:"Response"`
}

func NewDescribeInvocationResultResponse

func NewDescribeInvocationResultResponse() (response *DescribeInvocationResultResponse)

func (*DescribeInvocationResultResponse) FromJsonString

func (r *DescribeInvocationResultResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*DescribeInvocationResultResponse) ToJsonString

func (r *DescribeInvocationResultResponse) ToJsonString() string

type DescribeInvocationResultResponseParams added in v1.0.426

type DescribeInvocationResultResponseParams struct {
	// 服务的调用结果
	Results []*AlgorithmResult `json:"Results,omitnil,omitempty" name:"Results"`

	// 0:获取结果失败
	// 1:结果还没有生成,继续轮询
	// 2:获取结果成功
	Status *int64 `json:"Status,omitnil,omitempty" name:"Status"`

	// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

Predefined struct for user

type InvokeServiceRequest

type InvokeServiceRequest struct {
	*tchttp.BaseRequest

	// 待调用的服务ID。
	ServiceId *string `json:"ServiceId,omitnil,omitempty" name:"ServiceId"`

	// 要调用服务的状态:0表示调试版本,1表示上线版本
	ServiceStatus *int64 `json:"ServiceStatus,omitnil,omitempty" name:"ServiceStatus"`

	// 用于测试的文档的URL。
	FileUrl *string `json:"FileUrl,omitnil,omitempty" name:"FileUrl"`

	// 用于测试的文本,当此值不为空时,调用内容以此参数的值为准。
	Input *string `json:"Input,omitnil,omitempty" name:"Input"`
}

func NewInvokeServiceRequest

func NewInvokeServiceRequest() (request *InvokeServiceRequest)

func (*InvokeServiceRequest) FromJsonString

func (r *InvokeServiceRequest) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*InvokeServiceRequest) ToJsonString

func (r *InvokeServiceRequest) ToJsonString() string

type InvokeServiceRequestParams added in v1.0.426

type InvokeServiceRequestParams struct {
	// 待调用的服务ID。
	ServiceId *string `json:"ServiceId,omitnil,omitempty" name:"ServiceId"`

	// 要调用服务的状态:0表示调试版本,1表示上线版本
	ServiceStatus *int64 `json:"ServiceStatus,omitnil,omitempty" name:"ServiceStatus"`

	// 用于测试的文档的URL。
	FileUrl *string `json:"FileUrl,omitnil,omitempty" name:"FileUrl"`

	// 用于测试的文本,当此值不为空时,调用内容以此参数的值为准。
	Input *string `json:"Input,omitnil,omitempty" name:"Input"`
}

Predefined struct for user

type InvokeServiceResponse

type InvokeServiceResponse struct {
	*tchttp.BaseResponse
	Response *InvokeServiceResponseParams `json:"Response"`
}

func NewInvokeServiceResponse

func NewInvokeServiceResponse() (response *InvokeServiceResponse)

func (*InvokeServiceResponse) FromJsonString

func (r *InvokeServiceResponse) FromJsonString(s string) error

FromJsonString It is highly **NOT** recommended to use this function because it has no param check, nor strict type check

func (*InvokeServiceResponse) ToJsonString

func (r *InvokeServiceResponse) ToJsonString() string

type InvokeServiceResponseParams added in v1.0.426

type InvokeServiceResponseParams struct {
	// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
	RequestId *string `json:"RequestId,omitnil,omitempty" name:"RequestId"`
}

Predefined struct for user

Jump to

Keyboard shortcuts

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