Documentation

Violation extends Message
in package

A message type used to describe a single precondition failure.

Generated from protobuf message google.rpc.PreconditionFailure.Violation

Table of Contents

Properties

$description  : mixed
A description of how the precondition failed. Developers can use this description to understand how to fix the failure.
$subject  : mixed
The subject, relative to the type, that failed.
$type  : mixed
The type of PreconditionFailure. We recommend using a service-specific enum type to define the supported precondition violation subjects. For example, "TOS" for "Terms of Service violation".

Methods

__construct()  : mixed
Constructor.
getDescription()  : string
A description of how the precondition failed. Developers can use this description to understand how to fix the failure.
getSubject()  : string
The subject, relative to the type, that failed.
getType()  : string
The type of PreconditionFailure. We recommend using a service-specific enum type to define the supported precondition violation subjects. For example, "TOS" for "Terms of Service violation".
setDescription()  : $this
A description of how the precondition failed. Developers can use this description to understand how to fix the failure.
setSubject()  : $this
The subject, relative to the type, that failed.
setType()  : $this
The type of PreconditionFailure. We recommend using a service-specific enum type to define the supported precondition violation subjects. For example, "TOS" for "Terms of Service violation".

Properties

$description

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

protected mixed $description = ''

For example: "Terms of service not accepted".

Generated from protobuf field string description = 3 [json_name = "description"];

$subject

The subject, relative to the type, that failed.

protected mixed $subject = ''

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 [json_name = "subject"];

$type

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

protected mixed $type = ''

Generated from protobuf field string type = 1 [json_name = "type"];

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $data = NULL ]) : mixed
Parameters
$data : array<string|int, mixed> = NULL

{ 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 subjects. 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".

}

getDescription()

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

public getDescription() : string

For example: "Terms of service not accepted".

Generated from protobuf field string description = 3 [json_name = "description"];

Return values
string

getSubject()

The subject, relative to the type, that failed.

public getSubject() : string

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 [json_name = "subject"];

Return values
string

getType()

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

public getType() : string

Generated from protobuf field string type = 1 [json_name = "type"];

Return values
string

setDescription()

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

public setDescription(string $var) : $this

For example: "Terms of service not accepted".

Generated from protobuf field string description = 3 [json_name = "description"];

Parameters
$var : string
Return values
$this

setSubject()

The subject, relative to the type, that failed.

public setSubject(string $var) : $this

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 [json_name = "subject"];

Parameters
$var : string
Return values
$this

setType()

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

public setType(string $var) : $this

Generated from protobuf field string type = 1 [json_name = "type"];

Parameters
$var : string
Return values
$this

        
On this page

Search results