class Violation extends Message

A message type used to describe a single precondition failure.

Generated from protobuf message google.rpc.PreconditionFailure.Violation

Methods

__construct(array $data = NULL)

Constructor.

string
getType()

The type of PreconditionFailure. We recommend using a service-specific enum type to define the supported precondition violation types. For example, "TOS" for "Terms of Service violation".

$this
setType(string $var)

The type of PreconditionFailure. We recommend using a service-specific enum type to define the supported precondition violation types. For example, "TOS" for "Terms of Service violation".

string
getSubject()

The subject, relative to the type, that failed.

$this
setSubject(string $var)

The subject, relative to the type, that failed.

string
getDescription()

A description of how the precondition failed. Developers can use this description to understand how to fix the failure.

$this
setDescription(string $var)

A description of how the precondition failed. Developers can use this description to understand how to fix the failure.

Details

at line 63
__construct(array $data = NULL)

Constructor.

Parameters

array $data { Optional. Data for populating the Message object.

@type string $type
      The type of PreconditionFailure. We recommend using a service-specific
      enum type to define the supported precondition violation types. For
      example, "TOS" for "Terms of Service violation".
@type string $subject
      The subject, relative to the type, that failed.
      For example, "google.com/cloud" relative to the "TOS" type would
      indicate which terms of service is being referenced.
@type string $description
      A description of how the precondition failed. Developers can use this
      description to understand how to fix the failure.
      For example: "Terms of service not accepted".

}

at line 76
string getType()

The type of PreconditionFailure. We recommend using a service-specific enum type to define the supported precondition violation types. For example, "TOS" for "Terms of Service violation".

Generated from protobuf field string type = 1;

Return Value

string

at line 90
$this setType(string $var)

The type of PreconditionFailure. We recommend using a service-specific enum type to define the supported precondition violation types. For example, "TOS" for "Terms of Service violation".

Generated from protobuf field string type = 1;

Parameters

string $var

Return Value

$this

at line 106
string getSubject()

The subject, relative to the type, that failed.

For example, "google.com/cloud" relative to the "TOS" type would indicate which terms of service is being referenced.

Generated from protobuf field string subject = 2;

Return Value

string

at line 120
$this setSubject(string $var)

The subject, relative to the type, that failed.

For example, "google.com/cloud" relative to the "TOS" type would indicate which terms of service is being referenced.

Generated from protobuf field string subject = 2;

Parameters

string $var

Return Value

$this

at line 136
string getDescription()

A description of how the precondition failed. Developers can use this description to understand how to fix the failure.

For example: "Terms of service not accepted".

Generated from protobuf field string description = 3;

Return Value

string

at line 150
$this setDescription(string $var)

A description of how the precondition failed. Developers can use this description to understand how to fix the failure.

For example: "Terms of service not accepted".

Generated from protobuf field string description = 3;

Parameters

string $var

Return Value

$this