Class EnumValue._Builder

    • Constructor Detail

      • _Builder

        public _Builder()
        Make a p_model.EnumValue builder instance.
      • _Builder

        public _Builder​(EnumValue base)
        Make a mutating builder off a base p_model.EnumValue.
        Parameters:
        base - The base EnumValue
    • Method Detail

      • merge

        @Nonnull
        public EnumValue._Builder merge​(EnumValue from)
        Description copied from class: PMessageBuilder
        Merges the provided message into the builder. Contained messages should in turn be merged and not replaced wholesale. Sets are unioned (addAll) and maps will overwrite / replace on a per-key basis (putAll).
        Specified by:
        merge in class PMessageBuilder<EnumValue>
        Parameters:
        from - The message to merge values from.
        Returns:
        The builder itself.
      • setDocumentation

        @Nonnull
        public EnumValue._Builder setDocumentation​(java.lang.String value)
        Set the documentation field value.
        Specified by:
        setDocumentation in interface Decl._Builder
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetDocumentation

        public boolean isSetDocumentation()
        Checks for explicit presence of the documentation field.
        Returns:
        True if documentation has been set.
      • hasDocumentation

        public boolean hasDocumentation()
        Checks for presence of the documentation field.
        Specified by:
        hasDocumentation in interface Decl
        Returns:
        True if documentation is present.
      • isModifiedDocumentation

        public boolean isModifiedDocumentation()
        Checks if the documentation field has been modified since the builder was created.
        Returns:
        True if documentation has been modified.
      • getDocumentation

        public java.lang.String getDocumentation()
        Description copied from interface: Decl
        Documentation for the specific declaration.
        Specified by:
        getDocumentation in interface Decl
        Returns:
        The documentation field value
      • optionalDocumentation

        @Nonnull
        public java.util.Optional<java.lang.String> optionalDocumentation()
        Description copied from interface: Decl
        Documentation for the specific declaration.
        Specified by:
        optionalDocumentation in interface Decl
        Returns:
        Optional documentation field value
      • setName

        @Nonnull
        public EnumValue._Builder setName​(java.lang.String value)
        Set the name field value.
        Specified by:
        setName in interface Decl._Builder
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetName

        public boolean isSetName()
        Checks for explicit presence of the name field.
        Returns:
        True if name has been set.
      • hasName

        public boolean hasName()
        Checks for presence of the name field.
        Specified by:
        hasName in interface Decl
        Returns:
        True if name is present.
      • isModifiedName

        public boolean isModifiedName()
        Checks if the name field has been modified since the builder was created.
        Returns:
        True if name has been modified.
      • getName

        public java.lang.String getName()
        Description copied from interface: Decl
        Name of the type, constant or service.
        Specified by:
        getName in interface Decl
        Returns:
        The name field value
      • setId

        @Nonnull
        public EnumValue._Builder setId​(java.lang.Integer value)
        Set the id field value.
        Parameters:
        value - The new value
        Returns:
        The builder
      • setId

        @Nonnull
        public EnumValue._Builder setId​(int value)
        Set the id field value.
        Parameters:
        value - The new value
        Returns:
        The builder
      • isSetId

        public boolean isSetId()
        Checks for explicit presence of the id field.
        Returns:
        True if id has been set.
      • hasId

        public boolean hasId()
        Checks for presence of the id field.
        Specified by:
        hasId in interface EnumValue_OrBuilder
        Returns:
        True if id is present.
      • isModifiedId

        public boolean isModifiedId()
        Checks if the id field has been modified since the builder was created.
        Returns:
        True if id has been modified.
      • clearId

        @Nonnull
        public EnumValue._Builder clearId()
        Clear the id field.
        Returns:
        The builder
      • optionalId

        @Nonnull
        public java.util.Optional<java.lang.Integer> optionalId()
        Specified by:
        optionalId in interface EnumValue_OrBuilder
        Returns:
        Optional id field value
      • setAnnotations

        @Nonnull
        public EnumValue._Builder setAnnotations​(java.util.Map<java.lang.String,​java.lang.String> value)
        Set the annotations field value.
        Parameters:
        value - The new value
        Returns:
        The builder
      • putInAnnotations

        @Nonnull
        public EnumValue._Builder putInAnnotations​(java.lang.String key,
                                                   java.lang.String value)
        Adds a mapping to the annotations map.
        Parameters:
        key - The inserted key
        value - The inserted value
        Returns:
        The builder
      • isSetAnnotations

        public boolean isSetAnnotations()
        Checks for explicit presence of the annotations field.
        Returns:
        True if annotations has been set.
      • hasAnnotations

        public boolean hasAnnotations()
        Checks for presence of the annotations field.
        Specified by:
        hasAnnotations in interface EnumValue_OrBuilder
        Returns:
        True if annotations is present.
      • isModifiedAnnotations

        public boolean isModifiedAnnotations()
        Checks if the annotations field has been modified since the builder was created.
        Returns:
        True if annotations has been modified.
      • clearAnnotations

        @Nonnull
        public EnumValue._Builder clearAnnotations()
        Clear the annotations field.
        Returns:
        The builder
      • mutableAnnotations

        public java.util.Map<java.lang.String,​java.lang.String> mutableAnnotations()
        Returns:
        The mutable annotations container
      • getAnnotations

        public java.util.Map<java.lang.String,​java.lang.String> getAnnotations()
        Specified by:
        getAnnotations in interface EnumValue_OrBuilder
        Returns:
        The annotations field value
      • optionalAnnotations

        @Nonnull
        public java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>> optionalAnnotations()
        Specified by:
        optionalAnnotations in interface EnumValue_OrBuilder
        Returns:
        Optional annotations field value
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • mutator

        public PMessageBuilder mutator​(int key)
        Description copied from class: PMessageBuilder
        Get the builder for the given message contained in this builder. If the sub-builder does not exist, create, either from existing instance or from scratch.
        Specified by:
        mutator in class PMessageBuilder<EnumValue>
        Parameters:
        key - The field key.
        Returns:
        The field builder.
      • set

        @Nonnull
        public EnumValue._Builder set​(int key,
                                      java.lang.Object value)
        Description copied from class: PMessageBuilder
        Set the provided field value.
        Specified by:
        set in class PMessageBuilder<EnumValue>
        Parameters:
        key - The key of the field to set.
        value - The value to be set.
        Returns:
        The message builder.
      • isSet

        public boolean isSet​(int key)
        Description copied from class: PMessageBuilder
        Checks if a specific field is set on the builder.
        Specified by:
        isSet in class PMessageBuilder<EnumValue>
        Parameters:
        key - The key of the field to check.
        Returns:
        True if the field is set.
      • isModified

        public boolean isModified​(int key)
        Description copied from class: PMessageBuilder
        Checks if a specific field is modified on the builder.
        Specified by:
        isModified in class PMessageBuilder<EnumValue>
        Parameters:
        key - The key of the field to check.
        Returns:
        True if the field is modified.
      • get

        public <T> T get​(int key)
        Specified by:
        get in interface PMessageOrBuilder<EnumValue>
        Type Parameters:
        T - The return type.
        Parameters:
        key - The key of the field.
        Returns:
        The value of the field.
      • has

        public boolean has​(int key)
        Specified by:
        has in interface PMessageOrBuilder<EnumValue>
        Parameters:
        key - The key of the field.
        Returns:
        Whether the field is present.
      • addTo

        @Nonnull
        public EnumValue._Builder addTo​(int key,
                                        java.lang.Object value)
        Description copied from class: PMessageBuilder
        Adds a value to a set or list container.
        Specified by:
        addTo in class PMessageBuilder<EnumValue>
        Parameters:
        key - The key of the container field to add too.
        value - The value to add.
        Returns:
        The builder itself.
      • valid

        public boolean valid()
        Description copied from class: PMessageBuilder
        Checks if the current set data is enough to make a valid struct. It will check for all required fields, and if any are missing it will return false.
        Specified by:
        valid in class PMessageBuilder<EnumValue>
        Returns:
        True for a valid message.
      • validate

        public EnumValue._Builder validate()
        Description copied from class: PMessageBuilder
        Checks if the current set data is enough to make a valid struct. It will check for all required fields, and if any are missing it will throw an IllegalStateException with an appropriate error message.
        Specified by:
        validate in class PMessageBuilder<EnumValue>
        Returns:
        The builder itself.
      • readBinary

        public void readBinary​(net.morimekta.util.io.BigEndianBinaryReader reader,
                               boolean strict)
                        throws java.io.IOException
        Description copied from interface: BinaryReader
        Read the binary content into the current builder. NOTE: This method is not intended to be used directly. Instead use the BinarySerializer.deserialize(InputStream, PMessageDescriptor) call.
        Specified by:
        readBinary in interface BinaryReader
        Parameters:
        reader - The reader to read from.
        strict - If content should be handled strictly. True means to fail on everything that Apache thrift failed read() on.
        Throws:
        java.io.IOException - When unable to read message for any reason.