Class ResourceReference.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<ResourceReference,ResourceReference.Builder>
com.google.api.ResourceReference.Builder
All Implemented Interfaces:
ResourceReferenceOrBuilder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, Cloneable
Enclosing class:
ResourceReference

public static final class ResourceReference.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<ResourceReference,ResourceReference.Builder> implements ResourceReferenceOrBuilder
 Defines a proto annotation that describes a string field that refers to
 an API resource.
 
Protobuf type google.api.ResourceReference
  • Field Summary

    Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder

    instance
  • Method Summary

    Modifier and Type
    Method
    Description
    The resource type of a child collection that the annotated field references.
    The resource type that the annotated field references.
    The resource type of a child collection that the annotated field references.
    com.google.protobuf.ByteString
    The resource type of a child collection that the annotated field references.
    The resource type that the annotated field references.
    com.google.protobuf.ByteString
    The resource type that the annotated field references.
    The resource type of a child collection that the annotated field references.
    setChildTypeBytes(com.google.protobuf.ByteString value)
    The resource type of a child collection that the annotated field references.
    setType(String value)
    The resource type that the annotated field references.
    setTypeBytes(com.google.protobuf.ByteString value)
    The resource type that the annotated field references.

    Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder

    build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    getDefaultInstanceForType, isInitialized
  • Method Details

    • getType

      public String getType()
       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: "*"
       }];
       }
       
      string type = 1 [json_name = "type"];
      Specified by:
      getType in interface ResourceReferenceOrBuilder
      Returns:
      The type.
    • getTypeBytes

      public com.google.protobuf.ByteString getTypeBytes()
       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: "*"
       }];
       }
       
      string type = 1 [json_name = "type"];
      Specified by:
      getTypeBytes in interface ResourceReferenceOrBuilder
      Returns:
      The bytes for type.
    • setType

      public ResourceReference.Builder setType(String value)
       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: "*"
       }];
       }
       
      string type = 1 [json_name = "type"];
      Parameters:
      value - The type to set.
      Returns:
      This builder for chaining.
    • clearType

      public ResourceReference.Builder clearType()
       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: "*"
       }];
       }
       
      string type = 1 [json_name = "type"];
      Returns:
      This builder for chaining.
    • setTypeBytes

      public ResourceReference.Builder setTypeBytes(com.google.protobuf.ByteString value)
       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: "*"
       }];
       }
       
      string type = 1 [json_name = "type"];
      Parameters:
      value - The bytes for type to set.
      Returns:
      This builder for chaining.
    • getChildType

      public String 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.
      
       Example:
      
       message ListLogEntriesRequest {
       string parent = 1 [(google.api.resource_reference) = {
       child_type: "logging.googleapis.com/LogEntry"
       };
       }
       
      string child_type = 2 [json_name = "childType"];
      Specified by:
      getChildType in interface ResourceReferenceOrBuilder
      Returns:
      The childType.
    • getChildTypeBytes

      public com.google.protobuf.ByteString getChildTypeBytes()
       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"
       };
       }
       
      string child_type = 2 [json_name = "childType"];
      Specified by:
      getChildTypeBytes in interface ResourceReferenceOrBuilder
      Returns:
      The bytes for childType.
    • setChildType

      public ResourceReference.Builder setChildType(String value)
       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"
       };
       }
       
      string child_type = 2 [json_name = "childType"];
      Parameters:
      value - The childType to set.
      Returns:
      This builder for chaining.
    • clearChildType

      public ResourceReference.Builder clearChildType()
       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"
       };
       }
       
      string child_type = 2 [json_name = "childType"];
      Returns:
      This builder for chaining.
    • setChildTypeBytes

      public ResourceReference.Builder setChildTypeBytes(com.google.protobuf.ByteString value)
       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"
       };
       }
       
      string child_type = 2 [json_name = "childType"];
      Parameters:
      value - The bytes for childType to set.
      Returns:
      This builder for chaining.