UsageRule

com.google.api.usage.UsageRule
See theUsageRule companion object
final case class UsageRule(selector: String, allowUnregisteredCalls: Boolean, skipServiceControl: Boolean, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[UsageRule]

Usage configuration rules for the service.

NOTE: Under development.

Use this rule to configure unregistered calls for the service. Unregistered calls are calls that do not contain consumer project identity. (Example: calls that do not contain an API key). By default, API methods do not allow unregistered calls, and each method call must be identified by a consumer project identity. Use this rule to allow/disallow unregistered calls.

Example of an API that wants to allow unregistered calls for entire service.

usage: rules:

  • selector: "*" allow_unregistered_calls: true

Example of a method that wants to allow unregistered calls.

usage: rules:

  • selector: "google.example.library.v1.LibraryService.CreateBook" allow_unregistered_calls: true

Value parameters

allowUnregisteredCalls

If true, the selected method allows unregistered calls, e.g. calls that don't identify any user or application.

selector

Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to [selector][google.api.DocumentationRule.selector] for syntax details.

skipServiceControl

If true, the selected method should skip service control and the control plane features, such as quota and billing, will not be available. This flag is used by Google Cloud Endpoints to bypass checks for internal methods, such as service health check methods.

Attributes

Companion
object
Source
UsageRule.scala
Graph
Supertypes
trait Updatable[UsageRule]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def companion: UsageRule.type

Attributes

Source
UsageRule.scala
def getField(`__field`: FieldDescriptor): PValue

Attributes

Source
UsageRule.scala
def getFieldByNumber(`__fieldNumber`: Int): Any

Attributes

Source
UsageRule.scala
override def serializedSize: Int

Attributes

Definition Classes
GeneratedMessage
Source
UsageRule.scala
def toProtoString: String

Returns a human-readable ASCII format representation of this message.

Returns a human-readable ASCII format representation of this message.

The original message can be decoded from this format by using fromAscii on the companion object.

Attributes

Returns

human-readable representation of this message.

Source
UsageRule.scala
def withAllowUnregisteredCalls(`__v`: Boolean): UsageRule

Attributes

Source
UsageRule.scala
def withSelector(`__v`: String): UsageRule

Attributes

Source
UsageRule.scala
def withSkipServiceControl(`__v`: Boolean): UsageRule

Attributes

Source
UsageRule.scala
def withUnknownFields(`__v`: UnknownFieldSet): UsageRule

Attributes

Source
UsageRule.scala
def writeTo(`_output__`: CodedOutputStream): Unit

Serializes the message into the given coded output stream

Serializes the message into the given coded output stream

Attributes

Source
UsageRule.scala

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
final def toByteArray: Array[Byte]

Serializes the message and returns a byte array containing its raw bytes

Serializes the message and returns a byte array containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
final def toByteString: ByteString

Serializes the message and returns a ByteString containing its raw bytes

Serializes the message and returns a ByteString containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
final def toPMessage: PMessage

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
def update(ms: Lens[UsageRule, UsageRule] => () => UsageRule*): A

Attributes

Inherited from:
Updatable
Source
Lenses.scala
final def writeDelimitedTo(output: OutputStream): Unit

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala
final def writeTo(output: OutputStream): Unit

Serializes the message into the given output stream

Serializes the message into the given output stream

Attributes

Inherited from:
GeneratedMessage
Source
GeneratedMessageCompanion.scala