Reference documentation and code samples for the Compute V1 Client class LocalizedMessage.
Provides a localized error message that is safe to return to the user which can be attached to an RPC error.
Generated from protobuf message google.cloud.compute.v1.LocalizedMessage
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ locale |
string
The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX" |
↳ message |
string
The localized error message in the above locale. |
getLocale
The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX"
Generated from protobuf field optional string locale = 513150554;
Returns | |
---|---|
Type | Description |
string |
hasLocale
clearLocale
setLocale
The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX"
Generated from protobuf field optional string locale = 513150554;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getMessage
The localized error message in the above locale.
Generated from protobuf field optional string message = 418054151;
Returns | |
---|---|
Type | Description |
string |
hasMessage
clearMessage
setMessage
The localized error message in the above locale.
Generated from protobuf field optional string message = 418054151;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |