Documentation

ResourceReference extends Message
in package

Defines a proto annotation that describes a string field that refers to an API resource.

Generated from protobuf message google.api.ResourceReference

Table of Contents

Properties

$child_type  : mixed
The resource type of a child collection that the annotated field references. This is useful for annotating the `parent` field that doesn't have a fixed resource type.
$type  : mixed
The resource type that the annotated field references.

Methods

__construct()  : mixed
Constructor.
getChildType()  : string
The resource type of a child collection that the annotated field references. This is useful for annotating the `parent` field that doesn't have a fixed resource type.
getType()  : string
The resource type that the annotated field references.
setChildType()  : $this
The resource type of a child collection that the annotated field references. This is useful for annotating the `parent` field that doesn't have a fixed resource type.
setType()  : $this
The resource type that the annotated field references.

Properties

$child_type

The resource type of a child collection that the annotated field references. This is useful for annotating the `parent` field that doesn't have a fixed resource type.

protected mixed $child_type = ''

Example: message ListLogEntriesRequest { string parent = 1 [(google.api.resource_reference) = { child_type: "logging.googleapis.com/LogEntry" }; }

Generated from protobuf field string child_type = 2 [json_name = "childType"];

$type

The resource type that the annotated field references.

protected mixed $type = ''

Example: message Subscription { string topic = 2 [(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }]; } Occasionally, a field may reference an arbitrary resource. In this case, APIs use the special value * in their resource reference. Example: message GetIamPolicyRequest { string resource = 2 [(google.api.resource_reference) = { 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 resource type that the annotated field references.
      Example:
          message Subscription {
            string topic = 2 [(google.api.resource_reference) = {
              type: "pubsub.googleapis.com/Topic"
            }];
          }
      Occasionally, a field may reference an arbitrary resource. In this case,
      APIs use the special value * in their resource reference.
      Example:
          message GetIamPolicyRequest {
            string resource = 2 [(google.api.resource_reference) = {
              type: "*"
            }];
          }
@type string $child_type
      The resource type of a child collection that the annotated field
      references. This is useful for annotating the `parent` field that
      doesn't have a fixed resource type.
      Example:
          message ListLogEntriesRequest {
            string parent = 1 [(google.api.resource_reference) = {
              child_type: "logging.googleapis.com/LogEntry"
            };
          }

}

getChildType()

The resource type of a child collection that the annotated field references. This is useful for annotating the `parent` field that doesn't have a fixed resource type.

public getChildType() : string

Example: message ListLogEntriesRequest { string parent = 1 [(google.api.resource_reference) = { child_type: "logging.googleapis.com/LogEntry" }; }

Generated from protobuf field string child_type = 2 [json_name = "childType"];

Return values
string

getType()

The resource type that the annotated field references.

public getType() : string

Example: message Subscription { string topic = 2 [(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }]; } Occasionally, a field may reference an arbitrary resource. In this case, APIs use the special value * in their resource reference. Example: message GetIamPolicyRequest { string resource = 2 [(google.api.resource_reference) = { type: "*" }]; }

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

Return values
string

setChildType()

The resource type of a child collection that the annotated field references. This is useful for annotating the `parent` field that doesn't have a fixed resource type.

public setChildType(string $var) : $this

Example: message ListLogEntriesRequest { string parent = 1 [(google.api.resource_reference) = { child_type: "logging.googleapis.com/LogEntry" }; }

Generated from protobuf field string child_type = 2 [json_name = "childType"];

Parameters
$var : string
Return values
$this

setType()

The resource type that the annotated field references.

public setType(string $var) : $this

Example: message Subscription { string topic = 2 [(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }]; } Occasionally, a field may reference an arbitrary resource. In this case, APIs use the special value * in their resource reference. Example: message GetIamPolicyRequest { string resource = 2 [(google.api.resource_reference) = { type: "*" }]; }

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

Parameters
$var : string
Return values
$this

        
On this page

Search results