Compute V1 Client - Class Errors (1.11.1)

Reference documentation and code samples for the Compute V1 Client class Errors.

Generated from protobuf message google.cloud.compute.v1.Errors

Namespace

Google \ Cloud \ Compute \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ code string

[Output Only] The error type identifier for this error.

↳ error_details array<Google\Cloud\Compute\V1\ErrorDetails>

[Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.

↳ location string

[Output Only] Indicates the field in the request that caused the error. This property is optional.

↳ message string

[Output Only] An optional, human-readable error message.

getCode

[Output Only] The error type identifier for this error.

Returns
TypeDescription
string

hasCode

clearCode

setCode

[Output Only] The error type identifier for this error.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getErrorDetails

[Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setErrorDetails

[Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.

Parameter
NameDescription
var array<Google\Cloud\Compute\V1\ErrorDetails>
Returns
TypeDescription
$this

getLocation

[Output Only] Indicates the field in the request that caused the error. This property is optional.

Returns
TypeDescription
string

hasLocation

clearLocation

setLocation

[Output Only] Indicates the field in the request that caused the error. This property is optional.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getMessage

[Output Only] An optional, human-readable error message.

Returns
TypeDescription
string

hasMessage

clearMessage

setMessage

[Output Only] An optional, human-readable error message.

Parameter
NameDescription
var string
Returns
TypeDescription
$this