Class PreconditionFailure.Violation.Builder

  • All Implemented Interfaces:
    com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, PreconditionFailure.ViolationOrBuilder, java.lang.Cloneable
    Enclosing class:
    PreconditionFailure.Violation

    public static final class PreconditionFailure.Violation.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<PreconditionFailure.Violation.Builder>
    implements PreconditionFailure.ViolationOrBuilder
     A message type used to describe a single precondition failure.
     
    Protobuf type google.rpc.PreconditionFailure.Violation
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Overrides:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<PreconditionFailure.Violation.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<PreconditionFailure.Violation.Builder>
      • getDefaultInstanceForType

        public PreconditionFailure.Violation getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

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

        public PreconditionFailure.Violation buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • setRepeatedField

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

        public PreconditionFailure.Violation.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                      java.lang.Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<PreconditionFailure.Violation.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessage.ExtendableBuilder<com.google.protobuf.GeneratedMessageV3,​PreconditionFailure.Violation.Builder>
      • mergeFrom

        public PreconditionFailure.Violation.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<PreconditionFailure.Violation.Builder>
        Throws:
        java.io.IOException
      • getType

        public java.lang.String getType()
         The type of PreconditionFailure. We recommend using a service-specific
         enum type to define the supported precondition violation subjects. For
         example, "TOS" for "Terms of Service violation".
         
        string type = 1;
        Specified by:
        getType in interface PreconditionFailure.ViolationOrBuilder
        Returns:
        The type.
      • getTypeBytes

        public com.google.protobuf.ByteString getTypeBytes()
         The type of PreconditionFailure. We recommend using a service-specific
         enum type to define the supported precondition violation subjects. For
         example, "TOS" for "Terms of Service violation".
         
        string type = 1;
        Specified by:
        getTypeBytes in interface PreconditionFailure.ViolationOrBuilder
        Returns:
        The bytes for type.
      • setType

        public PreconditionFailure.Violation.Builder setType​(java.lang.String value)
         The type of PreconditionFailure. We recommend using a service-specific
         enum type to define the supported precondition violation subjects. For
         example, "TOS" for "Terms of Service violation".
         
        string type = 1;
        Parameters:
        value - The type to set.
        Returns:
        This builder for chaining.
      • clearType

        public PreconditionFailure.Violation.Builder clearType()
         The type of PreconditionFailure. We recommend using a service-specific
         enum type to define the supported precondition violation subjects. For
         example, "TOS" for "Terms of Service violation".
         
        string type = 1;
        Returns:
        This builder for chaining.
      • setTypeBytes

        public PreconditionFailure.Violation.Builder setTypeBytes​(com.google.protobuf.ByteString value)
         The type of PreconditionFailure. We recommend using a service-specific
         enum type to define the supported precondition violation subjects. For
         example, "TOS" for "Terms of Service violation".
         
        string type = 1;
        Parameters:
        value - The bytes for type to set.
        Returns:
        This builder for chaining.
      • getSubject

        public java.lang.String getSubject()
         The subject, relative to the type, that failed.
         For example, "google.com/cloud" relative to the "TOS" type would indicate
         which terms of service is being referenced.
         
        string subject = 2;
        Specified by:
        getSubject in interface PreconditionFailure.ViolationOrBuilder
        Returns:
        The subject.
      • getSubjectBytes

        public com.google.protobuf.ByteString getSubjectBytes()
         The subject, relative to the type, that failed.
         For example, "google.com/cloud" relative to the "TOS" type would indicate
         which terms of service is being referenced.
         
        string subject = 2;
        Specified by:
        getSubjectBytes in interface PreconditionFailure.ViolationOrBuilder
        Returns:
        The bytes for subject.
      • setSubject

        public PreconditionFailure.Violation.Builder setSubject​(java.lang.String value)
         The subject, relative to the type, that failed.
         For example, "google.com/cloud" relative to the "TOS" type would indicate
         which terms of service is being referenced.
         
        string subject = 2;
        Parameters:
        value - The subject to set.
        Returns:
        This builder for chaining.
      • clearSubject

        public PreconditionFailure.Violation.Builder clearSubject()
         The subject, relative to the type, that failed.
         For example, "google.com/cloud" relative to the "TOS" type would indicate
         which terms of service is being referenced.
         
        string subject = 2;
        Returns:
        This builder for chaining.
      • setSubjectBytes

        public PreconditionFailure.Violation.Builder setSubjectBytes​(com.google.protobuf.ByteString value)
         The subject, relative to the type, that failed.
         For example, "google.com/cloud" relative to the "TOS" type would indicate
         which terms of service is being referenced.
         
        string subject = 2;
        Parameters:
        value - The bytes for subject to set.
        Returns:
        This builder for chaining.
      • getDescription

        public java.lang.String getDescription()
         A description of how the precondition failed. Developers can use this
         description to understand how to fix the failure.
        
         For example: "Terms of service not accepted".
         
        string description = 3;
        Specified by:
        getDescription in interface PreconditionFailure.ViolationOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         A description of how the precondition failed. Developers can use this
         description to understand how to fix the failure.
        
         For example: "Terms of service not accepted".
         
        string description = 3;
        Specified by:
        getDescriptionBytes in interface PreconditionFailure.ViolationOrBuilder
        Returns:
        The bytes for description.
      • setDescription

        public PreconditionFailure.Violation.Builder setDescription​(java.lang.String value)
         A description of how the precondition failed. Developers can use this
         description to understand how to fix the failure.
        
         For example: "Terms of service not accepted".
         
        string description = 3;
        Parameters:
        value - The description to set.
        Returns:
        This builder for chaining.
      • clearDescription

        public PreconditionFailure.Violation.Builder clearDescription()
         A description of how the precondition failed. Developers can use this
         description to understand how to fix the failure.
        
         For example: "Terms of service not accepted".
         
        string description = 3;
        Returns:
        This builder for chaining.
      • setDescriptionBytes

        public PreconditionFailure.Violation.Builder setDescriptionBytes​(com.google.protobuf.ByteString value)
         A description of how the precondition failed. Developers can use this
         description to understand how to fix the failure.
        
         For example: "Terms of service not accepted".
         
        string description = 3;
        Parameters:
        value - The bytes for description to set.
        Returns:
        This builder for chaining.