Class BookingPerson

  • All Implemented Interfaces:
    com.github.davidmoten.odata.client.ODataEntityType, com.github.davidmoten.odata.client.ODataType
    Direct Known Subclasses:
    BookingCustomer, BookingStaffMember

    public class BookingPerson
    extends BookingNamedEntity
    implements com.github.davidmoten.odata.client.ODataEntityType
    “Represents a booking customer or staff member.”
    • Field Detail

      • emailAddress

        protected String emailAddress
    • Constructor Detail

      • BookingPerson

        protected BookingPerson()
    • Method Detail

      • odataTypeName

        public String odataTypeName()
        Specified by:
        odataTypeName in interface com.github.davidmoten.odata.client.ODataType
        Overrides:
        odataTypeName in class BookingNamedEntity
      • builderBookingPerson

        public static BookingPerson.Builder builderBookingPerson()
        Returns a builder which is used to create a new instance of this class (given that this class is immutable).
        Returns:
        a new Builder for this class
      • getChangedFields

        public com.github.davidmoten.odata.client.internal.ChangedFields getChangedFields()
        Specified by:
        getChangedFields in interface com.github.davidmoten.odata.client.ODataEntityType
        Overrides:
        getChangedFields in class BookingNamedEntity
      • postInject

        public void postInject​(boolean addKeysToContextPath)
        Specified by:
        postInject in interface com.github.davidmoten.odata.client.ODataType
        Overrides:
        postInject in class BookingNamedEntity
      • getEmailAddress

        public Optional<String> getEmailAddress()
        “The e-mail address of this person.”
        Returns:
        property emailAddress
      • withEmailAddress

        public BookingPerson withEmailAddress​(String emailAddress)
        Returns an immutable copy of this with just the emailAddress field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this. patch() is called (if available)on the returned object only the changed fields are submitted.

        “The e-mail address of this person.”

        Parameters:
        emailAddress - new value of emailAddress field (as defined in service metadata)
        Returns:
        immutable copy of this with just the emailAddress field changed
      • getUnmappedFields

        public com.github.davidmoten.odata.client.UnmappedFields getUnmappedFields()
        Specified by:
        getUnmappedFields in interface com.github.davidmoten.odata.client.ODataType
        Overrides:
        getUnmappedFields in class BookingNamedEntity
      • patch

        public BookingPerson patch()
        Submits only changed fields for update and returns an immutable copy of this with changed fields reset.
        Overrides:
        patch in class BookingNamedEntity
        Returns:
        a copy of this with changed fields reset
        Throws:
        com.github.davidmoten.odata.client.ClientException - if HTTP response is not as expected
      • put

        public BookingPerson put()
        Submits all fields for update and returns an immutable copy of this with changed fields reset (they were ignored anyway).
        Overrides:
        put in class BookingNamedEntity
        Returns:
        a copy of this with changed fields reset
        Throws:
        com.github.davidmoten.odata.client.ClientException - if HTTP response is not as expected