Class NewCar.Builder

  • All Implemented Interfaces:
    org.apache.avro.data.RecordBuilder<NewCar>
    Enclosing class:
    NewCar

    public static class NewCar.Builder
    extends org.apache.avro.specific.SpecificRecordBuilderBase<NewCar>
    implements org.apache.avro.data.RecordBuilder<NewCar>
    RecordBuilder for NewCar instances.
    • Method Detail

      • getYear

        public long getYear()
        Gets the value of the 'year' field.
        Returns:
        The value.
      • setYear

        public NewCar.Builder setYear​(long value)
        Sets the value of the 'year' field.
        Parameters:
        value - The value of 'year'.
        Returns:
        This builder.
      • hasYear

        public boolean hasYear()
        Checks whether the 'year' field has been set.
        Returns:
        True if the 'year' field has been set, false otherwise.
      • clearYear

        public NewCar.Builder clearYear()
        Clears the value of the 'year' field.
        Returns:
        This builder.
      • getRegistration

        public String getRegistration()
        Gets the value of the 'registration' field.
        Returns:
        The value.
      • setRegistration

        public NewCar.Builder setRegistration​(String value)
        Sets the value of the 'registration' field.
        Parameters:
        value - The value of 'registration'.
        Returns:
        This builder.
      • hasRegistration

        public boolean hasRegistration()
        Checks whether the 'registration' field has been set.
        Returns:
        True if the 'registration' field has been set, false otherwise.
      • clearRegistration

        public NewCar.Builder clearRegistration()
        Clears the value of the 'registration' field.
        Returns:
        This builder.
      • getBrand

        public String getBrand()
        Gets the value of the 'brand' field.
        Returns:
        The value.
      • setBrand

        public NewCar.Builder setBrand​(String value)
        Sets the value of the 'brand' field.
        Parameters:
        value - The value of 'brand'.
        Returns:
        This builder.
      • hasBrand

        public boolean hasBrand()
        Checks whether the 'brand' field has been set.
        Returns:
        True if the 'brand' field has been set, false otherwise.
      • clearBrand

        public NewCar.Builder clearBrand()
        Clears the value of the 'brand' field.
        Returns:
        This builder.
      • getModel

        public String getModel()
        Gets the value of the 'model' field.
        Returns:
        The value.
      • setModel

        public NewCar.Builder setModel​(String value)
        Sets the value of the 'model' field.
        Parameters:
        value - The value of 'model'.
        Returns:
        This builder.
      • hasModel

        public boolean hasModel()
        Checks whether the 'model' field has been set.
        Returns:
        True if the 'model' field has been set, false otherwise.
      • clearModel

        public NewCar.Builder clearModel()
        Clears the value of the 'model' field.
        Returns:
        This builder.
      • getVin

        public Vin getVin()
        Gets the value of the 'vin' field.
        Returns:
        The value.
      • setVin

        public NewCar.Builder setVin​(Vin value)
        Sets the value of the 'vin' field.
        Parameters:
        value - The value of 'vin'.
        Returns:
        This builder.
      • hasVin

        public boolean hasVin()
        Checks whether the 'vin' field has been set.
        Returns:
        True if the 'vin' field has been set, false otherwise.
      • clearVin

        public NewCar.Builder clearVin()
        Clears the value of the 'vin' field.
        Returns:
        This builder.
      • getDoors

        public long getDoors()
        Gets the value of the 'doors' field.
        Returns:
        The value.
      • setDoors

        public NewCar.Builder setDoors​(long value)
        Sets the value of the 'doors' field.
        Parameters:
        value - The value of 'doors'.
        Returns:
        This builder.
      • hasDoors

        public boolean hasDoors()
        Checks whether the 'doors' field has been set.
        Returns:
        True if the 'doors' field has been set, false otherwise.
      • clearDoors

        public NewCar.Builder clearDoors()
        Clears the value of the 'doors' field.
        Returns:
        This builder.
      • getEngine

        public Engine getEngine()
        Gets the value of the 'engine' field.
        Returns:
        The value.
      • setEngine

        public NewCar.Builder setEngine​(Engine value)
        Sets the value of the 'engine' field.
        Parameters:
        value - The value of 'engine'.
        Returns:
        This builder.
      • hasEngine

        public boolean hasEngine()
        Checks whether the 'engine' field has been set.
        Returns:
        True if the 'engine' field has been set, false otherwise.
      • getEngineBuilder

        public Engine.Builder getEngineBuilder()
        Gets the Builder instance for the 'engine' field and creates one if it doesn't exist yet.
        Returns:
        This builder.
      • setEngineBuilder

        public NewCar.Builder setEngineBuilder​(Engine.Builder value)
        Sets the Builder instance for the 'engine' field
        Parameters:
        value - The builder instance that must be set.
        Returns:
        This builder.
      • hasEngineBuilder

        public boolean hasEngineBuilder()
        Checks whether the 'engine' field has an active Builder instance
        Returns:
        True if the 'engine' field has an active Builder instance
      • clearEngine

        public NewCar.Builder clearEngine()
        Clears the value of the 'engine' field.
        Returns:
        This builder.
      • getOptionalExtra

        public Object getOptionalExtra()
        Gets the value of the 'optionalExtra' field.
        Returns:
        The value.
      • setOptionalExtra

        public NewCar.Builder setOptionalExtra​(Object value)
        Sets the value of the 'optionalExtra' field.
        Parameters:
        value - The value of 'optionalExtra'.
        Returns:
        This builder.
      • hasOptionalExtra

        public boolean hasOptionalExtra()
        Checks whether the 'optionalExtra' field has been set.
        Returns:
        True if the 'optionalExtra' field has been set, false otherwise.
      • clearOptionalExtra

        public NewCar.Builder clearOptionalExtra()
        Clears the value of the 'optionalExtra' field.
        Returns:
        This builder.
      • getServiceHistory

        public List<Service> getServiceHistory()
        Gets the value of the 'serviceHistory' field.
        Returns:
        The value.
      • setServiceHistory

        public NewCar.Builder setServiceHistory​(List<Service> value)
        Sets the value of the 'serviceHistory' field.
        Parameters:
        value - The value of 'serviceHistory'.
        Returns:
        This builder.
      • hasServiceHistory

        public boolean hasServiceHistory()
        Checks whether the 'serviceHistory' field has been set.
        Returns:
        True if the 'serviceHistory' field has been set, false otherwise.
      • clearServiceHistory

        public NewCar.Builder clearServiceHistory()
        Clears the value of the 'serviceHistory' field.
        Returns:
        This builder.
      • getOpt

        public int getOpt()
        Gets the value of the 'opt' field.
        Returns:
        The value.
      • setOpt

        public NewCar.Builder setOpt​(int value)
        Sets the value of the 'opt' field.
        Parameters:
        value - The value of 'opt'.
        Returns:
        This builder.
      • hasOpt

        public boolean hasOpt()
        Checks whether the 'opt' field has been set.
        Returns:
        True if the 'opt' field has been set, false otherwise.
      • clearOpt

        public NewCar.Builder clearOpt()
        Clears the value of the 'opt' field.
        Returns:
        This builder.
      • getDescription

        public String getDescription()
        Gets the value of the 'description' field.
        Returns:
        The value.
      • setDescription

        public NewCar.Builder setDescription​(String value)
        Sets the value of the 'description' field.
        Parameters:
        value - The value of 'description'.
        Returns:
        This builder.
      • hasDescription

        public boolean hasDescription()
        Checks whether the 'description' field has been set.
        Returns:
        True if the 'description' field has been set, false otherwise.
      • clearDescription

        public NewCar.Builder clearDescription()
        Clears the value of the 'description' field.
        Returns:
        This builder.
      • build

        public NewCar build()
        Specified by:
        build in interface org.apache.avro.data.RecordBuilder<NewCar>