Copied!

A backend rule provides configuration for an individual API element.

Generated from protobuf message google.api.BackendRule

CloneableInstantiable
Methods
public __construct( $data = NULL)
 

Constructor.

  • param array $data { Optional. Data for populating the Message object.
    @type string $selector
          Selects the methods to which this rule applies.
          Refer to [selector][google.api.DocumentationRule.selector] for syntax
          details.
    @type string $address
          The address of the API backend.
          The scheme is used to determine the backend protocol and security.
          The following schemes are accepted:
             SCHEME        PROTOCOL    SECURITY
             http://       HTTP        None
             https://      HTTP        TLS
             grpc://       gRPC        None
             grpcs://      gRPC        TLS
          It is recommended to explicitly include a scheme. Leaving out the scheme
          may cause constrasting behaviors across platforms.
          If the port is unspecified, the default is:
          - 80 for schemes without TLS
          - 443 for schemes with TLS
          For HTTP backends, use [protocol][google.api.BackendRule.protocol]
          to specify the protocol version.
    @type float $deadline
          The number of seconds to wait for a response from a request. The default
          varies based on the request protocol and deployment environment.
    @type float $min_deadline
          Deprecated, do not use.
    @type float $operation_deadline
          The number of seconds to wait for the completion of a long running
          operation. The default is no deadline.
    @type int $path_translation
    @type string $jwt_audience
          The JWT audience is used when generating a JWT ID token for the backend.
          This ID token will be added in the HTTP "authorization" header, and sent
          to the backend.
    @type bool $disable_auth
          When disable_auth is true, a JWT ID token won't be generated and the
          original "Authorization" HTTP header will be preserved. If the header is
          used to carry the original token and is expected by the backend, this
          field must be set to true to preserve the header.
    @type string $protocol
          The protocol used for sending a request to the backend.
          The supported values are "http/1.1" and "h2".
          The default value is inferred from the scheme in the
          [address][google.api.BackendRule.address] field:
             SCHEME        PROTOCOL
             http://       http/1.1
             https://      http/1.1
             grpc://       h2
             grpcs://      h2
          For secure HTTP backends (https://) that support HTTP/2, set this field
          to "h2" for improved performance.
          Configuring this field to non-default values is only supported for secure
          HTTP backends. This field will be ignored for all other backends.
          See
          https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
          for more details on the supported values.
    @type array|\Google\Protobuf\Internal\MapField $overrides_by_request_protocol
          The map between request protocol and the backend address.
    
    }
public Google\Protobuf\Internal\Message::__debugInfo()
public Google\Protobuf\Internal\Message::byteSize()
 
  • ignore
public Google\Protobuf\Internal\Message::clear()
 

Clear all containing fields.

  • return null
public Google\Protobuf\Internal\Message::discardUnknownFields()
 

Clear all unknown fields previously parsed.

  • return null
public getAddress()
 

The address of the API backend.

The scheme is used to determine the backend protocol and security. The following schemes are accepted: SCHEME PROTOCOL SECURITY http:// HTTP None https:// HTTP TLS grpc:// gRPC None grpcs:// gRPC TLS It is recommended to explicitly include a scheme. Leaving out the scheme may cause constrasting behaviors across platforms. If the port is unspecified, the default is:

  • 80 for schemes without TLS
  • 443 for schemes with TLS For HTTP backends, use [protocol][google.api.BackendRule.protocol] to specify the protocol version.

Generated from protobuf field string address = 2;

  • return string
public getAuthentication()
 
  • return string
public getDeadline()
 

The number of seconds to wait for a response from a request. The default varies based on the request protocol and deployment environment.

Generated from protobuf field double deadline = 3;

  • return float
public getDisableAuth()
 

When disable_auth is true, a JWT ID token won't be generated and the original "Authorization" HTTP header will be preserved. If the header is used to carry the original token and is expected by the backend, this field must be set to true to preserve the header.

Generated from protobuf field bool disable_auth = 8;

  • return bool
public getJwtAudience()
 

The JWT audience is used when generating a JWT ID token for the backend.

This ID token will be added in the HTTP "authorization" header, and sent to the backend.

Generated from protobuf field string jwt_audience = 7;

  • return string
public getMinDeadline()
 

Deprecated, do not use.

Generated from protobuf field double min_deadline = 4 [deprecated = true];

  • return float
  • deprecated
public getOperationDeadline()
 

The number of seconds to wait for the completion of a long running operation. The default is no deadline.

Generated from protobuf field double operation_deadline = 5;

  • return float
public getOverridesByRequestProtocol()
 

The map between request protocol and the backend address.

Generated from protobuf field map<string, .google.api.BackendRule> overrides_by_request_protocol = 10;

  • return \Google\Protobuf\Internal\MapField
public getPathTranslation()
 

Generated from protobuf field .google.api.BackendRule.PathTranslation path_translation = 6;

  • return int
public getProtocol()
 

The protocol used for sending a request to the backend.

The supported values are "http/1.1" and "h2". The default value is inferred from the scheme in the [address][google.api.BackendRule.address] field: SCHEME PROTOCOL https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-idshttps://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-idsnon-default values is only supported for secure HTTP backends. This field will be ignored for all other backends. See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for more details on the supported values.

Generated from protobuf field string protocol = 9;

  • return string
public getSelector()
 

Selects the methods to which this rule applies.

Refer to [selector][google.api.DocumentationRule.selector] for syntax details.

Generated from protobuf field string selector = 1;

  • return string
public hasDisableAuth()
public hasJwtAudience()
public Google\Protobuf\Internal\Message::jsonByteSize( $options = 0)
 
  • ignore
public Google\Protobuf\Internal\Message::mergeFrom( $msg)
 

Merges the contents of the specified message into current message.

This method merges the contents of the specified message into the current message. Singular fields that are set in the specified message overwrite the corresponding fields in the current message. Repeated fields are appended. Map fields key-value pairs are overwritten. Singular/Oneof sub-messages are recursively merged. All overwritten sub-messages are deep-copied.

  • param object $msg Protobuf message to be merged from.
  • return null
public Google\Protobuf\Internal\Message::mergeFromJsonString( $data, $ignore_unknown = false)
 

Parses a json string to protobuf message.

This function takes a string in the json wire format, matching the encoding output by serializeToJsonString(). See mergeFrom() for merging behavior, if the field is already set in the specified message.

  • param string $data Json protobuf data.
  • param bool $ignore_unknown
  • return null
  • throws \Exception Invalid data.
public Google\Protobuf\Internal\Message::mergeFromString( $data)
 

Parses a protocol buffer contained in a string.

This function takes a string in the (non-human-readable) binary wire format, matching the encoding output by serializeToString(). See mergeFrom() for merging behavior, if the field is already set in the specified message.

  • param string $data Binary protobuf data.
  • return null
  • throws \Exception Invalid data.
public Google\Protobuf\Internal\Message::parseFromJsonStream( $input, $ignore_unknown)
 
  • ignore
public Google\Protobuf\Internal\Message::parseFromStream( $input)
 
  • ignore
public Google\Protobuf\Internal\Message::serializeToJsonStream( $output)
 
  • ignore
public Google\Protobuf\Internal\Message::serializeToJsonString( $options = 0)
 

Serialize the message to json string.

  • return string Serialized json protobuf data.
public Google\Protobuf\Internal\Message::serializeToStream( $output)
 
  • ignore
public Google\Protobuf\Internal\Message::serializeToString()
 

Serialize the message to string.

  • return string Serialized binary protobuf data.
public setAddress( $var)
 

The address of the API backend.

The scheme is used to determine the backend protocol and security. The following schemes are accepted: SCHEME PROTOCOL SECURITY http:// HTTP None https:// HTTP TLS grpc:// gRPC None grpcs:// gRPC TLS It is recommended to explicitly include a scheme. Leaving out the scheme may cause constrasting behaviors across platforms. If the port is unspecified, the default is:

  • 80 for schemes without TLS
  • 443 for schemes with TLS For HTTP backends, use [protocol][google.api.BackendRule.protocol] to specify the protocol version.

Generated from protobuf field string address = 2;

  • param string $var
  • return $this
public setDeadline( $var)
 

The number of seconds to wait for a response from a request. The default varies based on the request protocol and deployment environment.

Generated from protobuf field double deadline = 3;

  • param float $var
  • return $this
public setDisableAuth( $var)
 

When disable_auth is true, a JWT ID token won't be generated and the original "Authorization" HTTP header will be preserved. If the header is used to carry the original token and is expected by the backend, this field must be set to true to preserve the header.

Generated from protobuf field bool disable_auth = 8;

  • param bool $var
  • return $this
public setJwtAudience( $var)
 

The JWT audience is used when generating a JWT ID token for the backend.

This ID token will be added in the HTTP "authorization" header, and sent to the backend.

Generated from protobuf field string jwt_audience = 7;

  • param string $var
  • return $this
public setMinDeadline( $var)
 

Deprecated, do not use.

Generated from protobuf field double min_deadline = 4 [deprecated = true];

  • param float $var
  • return $this
  • deprecated
public setOperationDeadline( $var)
 

The number of seconds to wait for the completion of a long running operation. The default is no deadline.

Generated from protobuf field double operation_deadline = 5;

  • param float $var
  • return $this
public setOverridesByRequestProtocol( $var)
 

The map between request protocol and the backend address.

Generated from protobuf field map<string, .google.api.BackendRule> overrides_by_request_protocol = 10;

  • param array|\Google\Protobuf\Internal\MapField $var
  • return $this
public setPathTranslation( $var)
 

Generated from protobuf field .google.api.BackendRule.PathTranslation path_translation = 6;

  • param int $var
  • return $this
public setProtocol( $var)
 

The protocol used for sending a request to the backend.

The supported values are "http/1.1" and "h2". The default value is inferred from the scheme in the [address][google.api.BackendRule.address] field: SCHEME PROTOCOL https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-idshttps://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-idsnon-default values is only supported for secure HTTP backends. This field will be ignored for all other backends. See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for more details on the supported values.

Generated from protobuf field string protocol = 9;

  • param string $var
  • return $this
public setSelector( $var)
 

Selects the methods to which this rule applies.

Refer to [selector][google.api.DocumentationRule.selector] for syntax details.

Generated from protobuf field string selector = 1;

  • param string $var
  • return $this
Properties
protected $address = ''
 

The address of the API backend.

The scheme is used to determine the backend protocol and security. The following schemes are accepted: SCHEME PROTOCOL SECURITY http:// HTTP None https:// HTTP TLS grpc:// gRPC None grpcs:// gRPC TLS It is recommended to explicitly include a scheme. Leaving out the scheme may cause constrasting behaviors across platforms. If the port is unspecified, the default is:

  • 80 for schemes without TLS
  • 443 for schemes with TLS For HTTP backends, use [protocol][google.api.BackendRule.protocol] to specify the protocol version.

Generated from protobuf field string address = 2;

protected $authentication = NULL
protected $deadline = 0
 

The number of seconds to wait for a response from a request. The default varies based on the request protocol and deployment environment.

Generated from protobuf field double deadline = 3;

protected $min_deadline = 0
 

Deprecated, do not use.

Generated from protobuf field double min_deadline = 4 [deprecated = true];

  • deprecated
protected $operation_deadline = 0
 

The number of seconds to wait for the completion of a long running operation. The default is no deadline.

Generated from protobuf field double operation_deadline = 5;

protected $path_translation = 0
 

Generated from protobuf field .google.api.BackendRule.PathTranslation path_translation = 6;

protected $protocol = ''
 

The protocol used for sending a request to the backend.

The supported values are "http/1.1" and "h2". The default value is inferred from the scheme in the [address][google.api.BackendRule.address] field: SCHEME PROTOCOL https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-idshttps://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-idsnon-default values is only supported for secure HTTP backends. This field will be ignored for all other backends. See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for more details on the supported values.

Generated from protobuf field string protocol = 9;

protected $selector = ''
 

Selects the methods to which this rule applies.

Refer to [selector][google.api.DocumentationRule.selector] for syntax details.

Generated from protobuf field string selector = 1;

Methods
protected Google\Protobuf\Internal\Message::hasOneof( $number)
protected Google\Protobuf\Internal\Message::mergeFromArray(array $array)
 

Populates the message from a user-supplied PHP array. Array keys correspond to Message properties and nested message properties.

Example:

$message->mergeFromArray([
    'name' => 'This is a message name',
    'interval' => [
         'startTime' => time() - 60,
         'endTime' => time(),
    ]
]);

This method will trigger an error if it is passed data that cannot be converted to the correct type. For example, a StringValue field must receive data that is either a string or a StringValue object.

  • param array $array An array containing message properties and values.
  • return null
protected Google\Protobuf\Internal\Message::mergeFromJsonArray( $array, $ignore_unknown)
protected Google\Protobuf\Internal\Message::readOneof( $number)
protected Google\Protobuf\Internal\Message::readWrapperValue( $member)
protected Google\Protobuf\Internal\Message::whichOneof( $oneof_name)
protected Google\Protobuf\Internal\Message::writeOneof( $number, $value)
protected Google\Protobuf\Internal\Message::writeWrapperValue( $member, $value)
Properties
private $overrides_by_request_protocol = NULL
 

The map between request protocol and the backend address.

Generated from protobuf field map<string, .google.api.BackendRule> overrides_by_request_protocol = 10;

© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration