Operation

An operation is a long running service operation created after an API call.

Field

Data Type

Description

name

string

Required

The full name of the operation resource. It is unique within the service the operation exists in.

Read-only after creation

operationId

string

Required

A server generated string identifier for the operation.

Read-only after creation

done

boolean

Required

Denotes whether the operation has been completed. If the value is false, it means the operation is still in progress and the result is null. If true, the operation is completed, and either the result error or response is available.

Read-write

metadata

object

( Labels )

Required

Service specific metadata associated with the operation.

Read-write

result

object

( OperationResult

)

Required

The operation result, which can be either an error or a valid response.

If done == false, both error and response are null. If done == true, exactly one of error or response is set.

Read-write

OperationResult

Describes the result of a completed operation.

Field

Data Type

Description

error

object

( OperationError )

| null

Required

Describes an operation error.

Read-write

response

string

Required

The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is an empty object or string. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type <methodName>Response, where <methodName> is the original method name. For example, if the original method name is GetOffers, the inferred response type is GetOffersResponse.

Read-write

OperationError

Describes the result of a completed operation.

Field

Data Type

Description

code

number

Required

The service specific numeric error code for service exceptions or a HTTP status code in the case of HTTP exceptions.

Read-only after creation

subject

string

Required

The specific exception type. For example, LendingProductNotFound.

Read-only after creation

detail

string

Required

The message carrying the error detail(s).

Read-only after creation