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, 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 Detail

      • 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
      • clone

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

        public ResourceReference.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                  Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceReference.Builder>
      • clearField

        public ResourceReference.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceReference.Builder>
      • clearOneof

        public ResourceReference.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceReference.Builder>
      • setRepeatedField

        public ResourceReference.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                          int index,
                                                          Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceReference.Builder>
      • addRepeatedField

        public ResourceReference.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                          Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceReference.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.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>