Class ResourceReference.Builder

  • All Implemented Interfaces:
    ResourceReferenceOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.lang.Cloneable
    Enclosing class:
    ResourceReference

    public static final class ResourceReference.Builder
    extends com.google.protobuf.GeneratedMessage.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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ResourceReference build()  
      ResourceReference buildPartial()  
      ResourceReference.Builder clear()  
      ResourceReference.Builder clearChildType()
      The resource type of a child collection that the annotated field references.
      ResourceReference.Builder clearType()
      The resource type that the annotated field references.
      java.lang.String getChildType()
      The resource type of a child collection that the annotated field references.
      com.google.protobuf.ByteString getChildTypeBytes()
      The resource type of a child collection that the annotated field references.
      ResourceReference getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      com.google.protobuf.Descriptors.Descriptor getDescriptorForType()  
      java.lang.String getType()
      The resource type that the annotated field references.
      com.google.protobuf.ByteString getTypeBytes()
      The resource type that the annotated field references.
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      ResourceReference.Builder mergeFrom​(ResourceReference other)  
      ResourceReference.Builder mergeFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      ResourceReference.Builder mergeFrom​(com.google.protobuf.Message other)  
      ResourceReference.Builder setChildType​(java.lang.String value)
      The resource type of a child collection that the annotated field references.
      ResourceReference.Builder setChildTypeBytes​(com.google.protobuf.ByteString value)
      The resource type of a child collection that the annotated field references.
      ResourceReference.Builder setType​(java.lang.String value)
      The resource type that the annotated field references.
      ResourceReference.Builder setTypeBytes​(com.google.protobuf.ByteString value)
      The resource type that the annotated field references.
      • Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

        addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, 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 Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.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>
      • isInitialized

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

        public ResourceReference.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                   com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                            throws java.io.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:
        java.io.IOException
      • getType

        public java.lang.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​(java.lang.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 java.lang.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​(java.lang.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.