Violation

interface Violation

A message type used to describe a single precondition failure.

Properties

Link copied to clipboard
abstract val description: String

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

Link copied to clipboard
abstract val subject: String

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.

Link copied to clipboard
abstract val type: 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".

Functions

Link copied to clipboard
fun PreconditionFailure.Violation.copy(body: <Error class: unknown class>.() -> Unit = {}): PreconditionFailure.Violation

Copies the original message, including unknown fields.