Class ResourceReference.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<ResourceReference.Builder>
com.google.api.ResourceReference.Builder
All Implemented Interfaces:
ResourceReferenceOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ResourceReference

public static final class ResourceReference.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<ResourceReference.Builder> implements ResourceReferenceOrBuilder
 Defines a proto annotation that describes a string field that refers to
 an API resource.
 
Protobuf type google.api.ResourceReference
  • 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.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    The resource type that the annotated field references.
    com.google.protobuf.ByteString
    The resource type that the annotated field references.
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
     
    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.
    setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
     

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

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFieldSetBuilder, setUnknownFieldsProto3

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

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

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

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceReference.Builder>
    • clear

      public ResourceReference.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceReference.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceReference.Builder>
    • getDefaultInstanceForType

      public ResourceReference getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public ResourceReference build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public ResourceReference buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public ResourceReference.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ResourceReference.Builder>
    • mergeFrom

      public ResourceReference.Builder mergeFrom(ResourceReference other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceReference.Builder>
    • mergeFrom

      public ResourceReference.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ResourceReference.Builder>
      Throws:
      IOException
    • 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;
      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;
      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;
      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;
      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;
      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;
      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;
      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;
      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;
      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;
      Parameters:
      value - The bytes for childType to set.
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final ResourceReference.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceReference.Builder>
    • mergeUnknownFields

      public final ResourceReference.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceReference.Builder>