class UsageRule extends Message

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

Generated from protobuf message google.api.UsageRule

Methods

__construct(array $data = NULL)

Constructor.

string
getSelector()

Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs.

$this
setSelector(string $var)

Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs.

bool
getAllowUnregisteredCalls()

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

$this
setAllowUnregisteredCalls(bool $var)

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

bool
getSkipServiceControl()

If true, the selected method should skip service control and the control plane features, such as quota and billing, will not be available.

$this
setSkipServiceControl(bool $var)

If true, the selected method should skip service control and the control plane features, such as quota and billing, will not be available.

Details

at line 80
__construct(array $data = NULL)

Constructor.

Parameters

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

@type string $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.
@type bool $allow_unregistered_calls
      If true, the selected method allows unregistered calls, e.g. calls
      that don't identify any user or application.
@type bool $skip_service_control
      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.

}

at line 93
string getSelector()

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.

Generated from protobuf field string selector = 1;

Return Value

string

at line 107
$this setSelector(string $var)

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.

Generated from protobuf field string selector = 1;

Parameters

string $var

Return Value

$this

at line 122
bool getAllowUnregisteredCalls()

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

Generated from protobuf field bool allow_unregistered_calls = 2;

Return Value

bool

at line 135
$this setAllowUnregisteredCalls(bool $var)

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

Generated from protobuf field bool allow_unregistered_calls = 2;

Parameters

bool $var

Return Value

$this

at line 152
bool getSkipServiceControl()

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.

Generated from protobuf field bool skip_service_control = 3;

Return Value

bool

at line 167
$this setSkipServiceControl(bool $var)

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.

Generated from protobuf field bool skip_service_control = 3;

Parameters

bool $var

Return Value

$this