All Downloads are FREE. Search and download functionalities are using the official Maven repository.

odata.msgraph.client.entity.Contact Maven / Gradle / Ivy

package odata.msgraph.client.entity;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.github.davidmoten.odata.client.ClientException;
import com.github.davidmoten.odata.client.CollectionPage;
import com.github.davidmoten.odata.client.HttpRequestOptions;
import com.github.davidmoten.odata.client.NameValue;
import com.github.davidmoten.odata.client.ODataEntityType;
import com.github.davidmoten.odata.client.RequestOptions;
import com.github.davidmoten.odata.client.UnmappedFields;
import com.github.davidmoten.odata.client.Util;
import com.github.davidmoten.odata.client.annotation.NavigationProperty;
import com.github.davidmoten.odata.client.annotation.Property;
import com.github.davidmoten.odata.client.internal.ChangedFields;
import com.github.davidmoten.odata.client.internal.RequestHelper;
import com.github.davidmoten.odata.client.internal.UnmappedFieldsImpl;

import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.StringBuilder;
import java.time.OffsetDateTime;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;

import odata.msgraph.client.complex.EmailAddress;
import odata.msgraph.client.complex.PhysicalAddress;
import odata.msgraph.client.entity.collection.request.ExtensionCollectionRequest;
import odata.msgraph.client.entity.collection.request.MultiValueLegacyExtendedPropertyCollectionRequest;
import odata.msgraph.client.entity.collection.request.SingleValueLegacyExtendedPropertyCollectionRequest;
import odata.msgraph.client.entity.request.ProfilePhotoRequest;

@JsonPropertyOrder({
    "@odata.type", 
    "assistantName", 
    "birthday", 
    "businessAddress", 
    "businessHomePage", 
    "businessPhones", 
    "children", 
    "companyName", 
    "department", 
    "displayName", 
    "emailAddresses", 
    "fileAs", 
    "generation", 
    "givenName", 
    "homeAddress", 
    "homePhones", 
    "imAddresses", 
    "initials", 
    "jobTitle", 
    "manager", 
    "middleName", 
    "mobilePhone", 
    "nickName", 
    "officeLocation", 
    "otherAddress", 
    "parentFolderId", 
    "personalNotes", 
    "profession", 
    "spouseName", 
    "surname", 
    "title", 
    "yomiCompanyName", 
    "yomiGivenName", 
    "yomiSurname"})
@JsonInclude(Include.NON_NULL)
public class Contact extends OutlookItem implements ODataEntityType {

    @Override
    public String odataTypeName() {
        return "microsoft.graph.contact";
    }

    @JsonProperty("assistantName")
    protected String assistantName;

    @JsonProperty("birthday")
    protected OffsetDateTime birthday;

    @JsonProperty("businessAddress")
    protected PhysicalAddress businessAddress;

    @JsonProperty("businessHomePage")
    protected String businessHomePage;

    @JsonProperty("businessPhones")
    protected List businessPhones;

    @JsonProperty("businessPhones@nextLink")
    protected String businessPhonesNextLink;

    @JsonProperty("children")
    protected List children;

    @JsonProperty("children@nextLink")
    protected String childrenNextLink;

    @JsonProperty("companyName")
    protected String companyName;

    @JsonProperty("department")
    protected String department;

    @JsonProperty("displayName")
    protected String displayName;

    @JsonProperty("emailAddresses")
    protected List emailAddresses;

    @JsonProperty("emailAddresses@nextLink")
    protected String emailAddressesNextLink;

    @JsonProperty("fileAs")
    protected String fileAs;

    @JsonProperty("generation")
    protected String generation;

    @JsonProperty("givenName")
    protected String givenName;

    @JsonProperty("homeAddress")
    protected PhysicalAddress homeAddress;

    @JsonProperty("homePhones")
    protected List homePhones;

    @JsonProperty("homePhones@nextLink")
    protected String homePhonesNextLink;

    @JsonProperty("imAddresses")
    protected List imAddresses;

    @JsonProperty("imAddresses@nextLink")
    protected String imAddressesNextLink;

    @JsonProperty("initials")
    protected String initials;

    @JsonProperty("jobTitle")
    protected String jobTitle;

    @JsonProperty("manager")
    protected String manager;

    @JsonProperty("middleName")
    protected String middleName;

    @JsonProperty("mobilePhone")
    protected String mobilePhone;

    @JsonProperty("nickName")
    protected String nickName;

    @JsonProperty("officeLocation")
    protected String officeLocation;

    @JsonProperty("otherAddress")
    protected PhysicalAddress otherAddress;

    @JsonProperty("parentFolderId")
    protected String parentFolderId;

    @JsonProperty("personalNotes")
    protected String personalNotes;

    @JsonProperty("profession")
    protected String profession;

    @JsonProperty("spouseName")
    protected String spouseName;

    @JsonProperty("surname")
    protected String surname;

    @JsonProperty("title")
    protected String title;

    @JsonProperty("yomiCompanyName")
    protected String yomiCompanyName;

    @JsonProperty("yomiGivenName")
    protected String yomiGivenName;

    @JsonProperty("yomiSurname")
    protected String yomiSurname;

    protected Contact() {
        super();
    }

    /**
     * Returns a builder which is used to create a new
     * instance of this class (given that this class is immutable).
     *
     * @return a new Builder for this class
     */
    // Suffix used on builder factory method to differentiate the method
    // from static builder methods on superclasses
    public static Builder builderContact() {
        return new Builder();
    }

    public static final class Builder {
        private String id;
        private List categories;
        private String categoriesNextLink;
        private String changeKey;
        private OffsetDateTime createdDateTime;
        private OffsetDateTime lastModifiedDateTime;
        private String assistantName;
        private OffsetDateTime birthday;
        private PhysicalAddress businessAddress;
        private String businessHomePage;
        private List businessPhones;
        private String businessPhonesNextLink;
        private List children;
        private String childrenNextLink;
        private String companyName;
        private String department;
        private String displayName;
        private List emailAddresses;
        private String emailAddressesNextLink;
        private String fileAs;
        private String generation;
        private String givenName;
        private PhysicalAddress homeAddress;
        private List homePhones;
        private String homePhonesNextLink;
        private List imAddresses;
        private String imAddressesNextLink;
        private String initials;
        private String jobTitle;
        private String manager;
        private String middleName;
        private String mobilePhone;
        private String nickName;
        private String officeLocation;
        private PhysicalAddress otherAddress;
        private String parentFolderId;
        private String personalNotes;
        private String profession;
        private String spouseName;
        private String surname;
        private String title;
        private String yomiCompanyName;
        private String yomiGivenName;
        private String yomiSurname;
        private ChangedFields changedFields = ChangedFields.EMPTY;

        Builder() {
            // prevent instantiation
        }

        public Builder id(String id) {
            this.id = id;
            this.changedFields = changedFields.add("id");
            return this;
        }

        public Builder categories(List categories) {
            this.categories = categories;
            this.changedFields = changedFields.add("categories");
            return this;
        }

        public Builder categories(String... categories) {
            return categories(Arrays.asList(categories));
        }

        public Builder categoriesNextLink(String categoriesNextLink) {
            this.categoriesNextLink = categoriesNextLink;
            this.changedFields = changedFields.add("categories");
            return this;
        }

        public Builder changeKey(String changeKey) {
            this.changeKey = changeKey;
            this.changedFields = changedFields.add("changeKey");
            return this;
        }

        public Builder createdDateTime(OffsetDateTime createdDateTime) {
            this.createdDateTime = createdDateTime;
            this.changedFields = changedFields.add("createdDateTime");
            return this;
        }

        public Builder lastModifiedDateTime(OffsetDateTime lastModifiedDateTime) {
            this.lastModifiedDateTime = lastModifiedDateTime;
            this.changedFields = changedFields.add("lastModifiedDateTime");
            return this;
        }

        public Builder assistantName(String assistantName) {
            this.assistantName = assistantName;
            this.changedFields = changedFields.add("assistantName");
            return this;
        }

        public Builder birthday(OffsetDateTime birthday) {
            this.birthday = birthday;
            this.changedFields = changedFields.add("birthday");
            return this;
        }

        public Builder businessAddress(PhysicalAddress businessAddress) {
            this.businessAddress = businessAddress;
            this.changedFields = changedFields.add("businessAddress");
            return this;
        }

        public Builder businessHomePage(String businessHomePage) {
            this.businessHomePage = businessHomePage;
            this.changedFields = changedFields.add("businessHomePage");
            return this;
        }

        public Builder businessPhones(List businessPhones) {
            this.businessPhones = businessPhones;
            this.changedFields = changedFields.add("businessPhones");
            return this;
        }

        public Builder businessPhones(String... businessPhones) {
            return businessPhones(Arrays.asList(businessPhones));
        }

        public Builder businessPhonesNextLink(String businessPhonesNextLink) {
            this.businessPhonesNextLink = businessPhonesNextLink;
            this.changedFields = changedFields.add("businessPhones");
            return this;
        }

        public Builder children(List children) {
            this.children = children;
            this.changedFields = changedFields.add("children");
            return this;
        }

        public Builder children(String... children) {
            return children(Arrays.asList(children));
        }

        public Builder childrenNextLink(String childrenNextLink) {
            this.childrenNextLink = childrenNextLink;
            this.changedFields = changedFields.add("children");
            return this;
        }

        public Builder companyName(String companyName) {
            this.companyName = companyName;
            this.changedFields = changedFields.add("companyName");
            return this;
        }

        public Builder department(String department) {
            this.department = department;
            this.changedFields = changedFields.add("department");
            return this;
        }

        public Builder displayName(String displayName) {
            this.displayName = displayName;
            this.changedFields = changedFields.add("displayName");
            return this;
        }

        public Builder emailAddresses(List emailAddresses) {
            this.emailAddresses = emailAddresses;
            this.changedFields = changedFields.add("emailAddresses");
            return this;
        }

        public Builder emailAddresses(EmailAddress... emailAddresses) {
            return emailAddresses(Arrays.asList(emailAddresses));
        }

        public Builder emailAddressesNextLink(String emailAddressesNextLink) {
            this.emailAddressesNextLink = emailAddressesNextLink;
            this.changedFields = changedFields.add("emailAddresses");
            return this;
        }

        public Builder fileAs(String fileAs) {
            this.fileAs = fileAs;
            this.changedFields = changedFields.add("fileAs");
            return this;
        }

        public Builder generation(String generation) {
            this.generation = generation;
            this.changedFields = changedFields.add("generation");
            return this;
        }

        public Builder givenName(String givenName) {
            this.givenName = givenName;
            this.changedFields = changedFields.add("givenName");
            return this;
        }

        public Builder homeAddress(PhysicalAddress homeAddress) {
            this.homeAddress = homeAddress;
            this.changedFields = changedFields.add("homeAddress");
            return this;
        }

        public Builder homePhones(List homePhones) {
            this.homePhones = homePhones;
            this.changedFields = changedFields.add("homePhones");
            return this;
        }

        public Builder homePhones(String... homePhones) {
            return homePhones(Arrays.asList(homePhones));
        }

        public Builder homePhonesNextLink(String homePhonesNextLink) {
            this.homePhonesNextLink = homePhonesNextLink;
            this.changedFields = changedFields.add("homePhones");
            return this;
        }

        public Builder imAddresses(List imAddresses) {
            this.imAddresses = imAddresses;
            this.changedFields = changedFields.add("imAddresses");
            return this;
        }

        public Builder imAddresses(String... imAddresses) {
            return imAddresses(Arrays.asList(imAddresses));
        }

        public Builder imAddressesNextLink(String imAddressesNextLink) {
            this.imAddressesNextLink = imAddressesNextLink;
            this.changedFields = changedFields.add("imAddresses");
            return this;
        }

        public Builder initials(String initials) {
            this.initials = initials;
            this.changedFields = changedFields.add("initials");
            return this;
        }

        public Builder jobTitle(String jobTitle) {
            this.jobTitle = jobTitle;
            this.changedFields = changedFields.add("jobTitle");
            return this;
        }

        public Builder manager(String manager) {
            this.manager = manager;
            this.changedFields = changedFields.add("manager");
            return this;
        }

        public Builder middleName(String middleName) {
            this.middleName = middleName;
            this.changedFields = changedFields.add("middleName");
            return this;
        }

        public Builder mobilePhone(String mobilePhone) {
            this.mobilePhone = mobilePhone;
            this.changedFields = changedFields.add("mobilePhone");
            return this;
        }

        public Builder nickName(String nickName) {
            this.nickName = nickName;
            this.changedFields = changedFields.add("nickName");
            return this;
        }

        public Builder officeLocation(String officeLocation) {
            this.officeLocation = officeLocation;
            this.changedFields = changedFields.add("officeLocation");
            return this;
        }

        public Builder otherAddress(PhysicalAddress otherAddress) {
            this.otherAddress = otherAddress;
            this.changedFields = changedFields.add("otherAddress");
            return this;
        }

        public Builder parentFolderId(String parentFolderId) {
            this.parentFolderId = parentFolderId;
            this.changedFields = changedFields.add("parentFolderId");
            return this;
        }

        public Builder personalNotes(String personalNotes) {
            this.personalNotes = personalNotes;
            this.changedFields = changedFields.add("personalNotes");
            return this;
        }

        public Builder profession(String profession) {
            this.profession = profession;
            this.changedFields = changedFields.add("profession");
            return this;
        }

        public Builder spouseName(String spouseName) {
            this.spouseName = spouseName;
            this.changedFields = changedFields.add("spouseName");
            return this;
        }

        public Builder surname(String surname) {
            this.surname = surname;
            this.changedFields = changedFields.add("surname");
            return this;
        }

        public Builder title(String title) {
            this.title = title;
            this.changedFields = changedFields.add("title");
            return this;
        }

        public Builder yomiCompanyName(String yomiCompanyName) {
            this.yomiCompanyName = yomiCompanyName;
            this.changedFields = changedFields.add("yomiCompanyName");
            return this;
        }

        public Builder yomiGivenName(String yomiGivenName) {
            this.yomiGivenName = yomiGivenName;
            this.changedFields = changedFields.add("yomiGivenName");
            return this;
        }

        public Builder yomiSurname(String yomiSurname) {
            this.yomiSurname = yomiSurname;
            this.changedFields = changedFields.add("yomiSurname");
            return this;
        }

        public Contact build() {
            Contact _x = new Contact();
            _x.contextPath = null;
            _x.changedFields = changedFields;
            _x.unmappedFields = new UnmappedFieldsImpl();
            _x.odataType = "microsoft.graph.contact";
            _x.id = id;
            _x.categories = categories;
            _x.categoriesNextLink = categoriesNextLink;
            _x.changeKey = changeKey;
            _x.createdDateTime = createdDateTime;
            _x.lastModifiedDateTime = lastModifiedDateTime;
            _x.assistantName = assistantName;
            _x.birthday = birthday;
            _x.businessAddress = businessAddress;
            _x.businessHomePage = businessHomePage;
            _x.businessPhones = businessPhones;
            _x.businessPhonesNextLink = businessPhonesNextLink;
            _x.children = children;
            _x.childrenNextLink = childrenNextLink;
            _x.companyName = companyName;
            _x.department = department;
            _x.displayName = displayName;
            _x.emailAddresses = emailAddresses;
            _x.emailAddressesNextLink = emailAddressesNextLink;
            _x.fileAs = fileAs;
            _x.generation = generation;
            _x.givenName = givenName;
            _x.homeAddress = homeAddress;
            _x.homePhones = homePhones;
            _x.homePhonesNextLink = homePhonesNextLink;
            _x.imAddresses = imAddresses;
            _x.imAddressesNextLink = imAddressesNextLink;
            _x.initials = initials;
            _x.jobTitle = jobTitle;
            _x.manager = manager;
            _x.middleName = middleName;
            _x.mobilePhone = mobilePhone;
            _x.nickName = nickName;
            _x.officeLocation = officeLocation;
            _x.otherAddress = otherAddress;
            _x.parentFolderId = parentFolderId;
            _x.personalNotes = personalNotes;
            _x.profession = profession;
            _x.spouseName = spouseName;
            _x.surname = surname;
            _x.title = title;
            _x.yomiCompanyName = yomiCompanyName;
            _x.yomiGivenName = yomiGivenName;
            _x.yomiSurname = yomiSurname;
            return _x;
        }
    }

    @Override
    @JsonIgnore
    public ChangedFields getChangedFields() {
        return changedFields;
    }

    @Override
    public void postInject(boolean addKeysToContextPath) {
        if (addKeysToContextPath && id != null) {
            contextPath = contextPath.clearQueries().addKeys(new NameValue(id.toString()));
        }
    }

    @Property(name="assistantName")
    @JsonIgnore
    public Optional getAssistantName() {
        return Optional.ofNullable(assistantName);
    }

    public Contact withAssistantName(String assistantName) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("assistantName");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.assistantName = assistantName;
        return _x;
    }

    @Property(name="birthday")
    @JsonIgnore
    public Optional getBirthday() {
        return Optional.ofNullable(birthday);
    }

    public Contact withBirthday(OffsetDateTime birthday) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("birthday");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.birthday = birthday;
        return _x;
    }

    @Property(name="businessAddress")
    @JsonIgnore
    public Optional getBusinessAddress() {
        return Optional.ofNullable(businessAddress);
    }

    public Contact withBusinessAddress(PhysicalAddress businessAddress) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("businessAddress");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.businessAddress = businessAddress;
        return _x;
    }

    @Property(name="businessHomePage")
    @JsonIgnore
    public Optional getBusinessHomePage() {
        return Optional.ofNullable(businessHomePage);
    }

    public Contact withBusinessHomePage(String businessHomePage) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("businessHomePage");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.businessHomePage = businessHomePage;
        return _x;
    }

    @Property(name="businessPhones")
    @JsonIgnore
    public CollectionPage getBusinessPhones() {
        return new CollectionPage(contextPath, String.class, this.businessPhones, Optional.ofNullable(businessPhonesNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
    }

    public Contact withBusinessPhones(List businessPhones) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("businessPhones");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.businessPhones = businessPhones;
        return _x;
    }

    @Property(name="businessPhones")
    @JsonIgnore
    public CollectionPage getBusinessPhones(HttpRequestOptions options) {
        return new CollectionPage(contextPath, String.class, this.businessPhones, Optional.ofNullable(businessPhonesNextLink), Collections.emptyList(), options);
    }

    @Property(name="children")
    @JsonIgnore
    public CollectionPage getChildren() {
        return new CollectionPage(contextPath, String.class, this.children, Optional.ofNullable(childrenNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
    }

    public Contact withChildren(List children) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("children");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.children = children;
        return _x;
    }

    @Property(name="children")
    @JsonIgnore
    public CollectionPage getChildren(HttpRequestOptions options) {
        return new CollectionPage(contextPath, String.class, this.children, Optional.ofNullable(childrenNextLink), Collections.emptyList(), options);
    }

    @Property(name="companyName")
    @JsonIgnore
    public Optional getCompanyName() {
        return Optional.ofNullable(companyName);
    }

    public Contact withCompanyName(String companyName) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("companyName");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.companyName = companyName;
        return _x;
    }

    @Property(name="department")
    @JsonIgnore
    public Optional getDepartment() {
        return Optional.ofNullable(department);
    }

    public Contact withDepartment(String department) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("department");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.department = department;
        return _x;
    }

    @Property(name="displayName")
    @JsonIgnore
    public Optional getDisplayName() {
        return Optional.ofNullable(displayName);
    }

    public Contact withDisplayName(String displayName) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("displayName");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.displayName = displayName;
        return _x;
    }

    @Property(name="emailAddresses")
    @JsonIgnore
    public CollectionPage getEmailAddresses() {
        return new CollectionPage(contextPath, EmailAddress.class, this.emailAddresses, Optional.ofNullable(emailAddressesNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
    }

    public Contact withEmailAddresses(List emailAddresses) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("emailAddresses");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.emailAddresses = emailAddresses;
        return _x;
    }

    @Property(name="emailAddresses")
    @JsonIgnore
    public CollectionPage getEmailAddresses(HttpRequestOptions options) {
        return new CollectionPage(contextPath, EmailAddress.class, this.emailAddresses, Optional.ofNullable(emailAddressesNextLink), Collections.emptyList(), options);
    }

    @Property(name="fileAs")
    @JsonIgnore
    public Optional getFileAs() {
        return Optional.ofNullable(fileAs);
    }

    public Contact withFileAs(String fileAs) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("fileAs");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.fileAs = fileAs;
        return _x;
    }

    @Property(name="generation")
    @JsonIgnore
    public Optional getGeneration() {
        return Optional.ofNullable(generation);
    }

    public Contact withGeneration(String generation) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("generation");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.generation = generation;
        return _x;
    }

    @Property(name="givenName")
    @JsonIgnore
    public Optional getGivenName() {
        return Optional.ofNullable(givenName);
    }

    public Contact withGivenName(String givenName) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("givenName");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.givenName = givenName;
        return _x;
    }

    @Property(name="homeAddress")
    @JsonIgnore
    public Optional getHomeAddress() {
        return Optional.ofNullable(homeAddress);
    }

    public Contact withHomeAddress(PhysicalAddress homeAddress) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("homeAddress");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.homeAddress = homeAddress;
        return _x;
    }

    @Property(name="homePhones")
    @JsonIgnore
    public CollectionPage getHomePhones() {
        return new CollectionPage(contextPath, String.class, this.homePhones, Optional.ofNullable(homePhonesNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
    }

    public Contact withHomePhones(List homePhones) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("homePhones");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.homePhones = homePhones;
        return _x;
    }

    @Property(name="homePhones")
    @JsonIgnore
    public CollectionPage getHomePhones(HttpRequestOptions options) {
        return new CollectionPage(contextPath, String.class, this.homePhones, Optional.ofNullable(homePhonesNextLink), Collections.emptyList(), options);
    }

    @Property(name="imAddresses")
    @JsonIgnore
    public CollectionPage getImAddresses() {
        return new CollectionPage(contextPath, String.class, this.imAddresses, Optional.ofNullable(imAddressesNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
    }

    public Contact withImAddresses(List imAddresses) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("imAddresses");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.imAddresses = imAddresses;
        return _x;
    }

    @Property(name="imAddresses")
    @JsonIgnore
    public CollectionPage getImAddresses(HttpRequestOptions options) {
        return new CollectionPage(contextPath, String.class, this.imAddresses, Optional.ofNullable(imAddressesNextLink), Collections.emptyList(), options);
    }

    @Property(name="initials")
    @JsonIgnore
    public Optional getInitials() {
        return Optional.ofNullable(initials);
    }

    public Contact withInitials(String initials) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("initials");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.initials = initials;
        return _x;
    }

    @Property(name="jobTitle")
    @JsonIgnore
    public Optional getJobTitle() {
        return Optional.ofNullable(jobTitle);
    }

    public Contact withJobTitle(String jobTitle) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("jobTitle");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.jobTitle = jobTitle;
        return _x;
    }

    @Property(name="manager")
    @JsonIgnore
    public Optional getManager() {
        return Optional.ofNullable(manager);
    }

    public Contact withManager(String manager) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("manager");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.manager = manager;
        return _x;
    }

    @Property(name="middleName")
    @JsonIgnore
    public Optional getMiddleName() {
        return Optional.ofNullable(middleName);
    }

    public Contact withMiddleName(String middleName) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("middleName");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.middleName = middleName;
        return _x;
    }

    @Property(name="mobilePhone")
    @JsonIgnore
    public Optional getMobilePhone() {
        return Optional.ofNullable(mobilePhone);
    }

    public Contact withMobilePhone(String mobilePhone) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("mobilePhone");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.mobilePhone = mobilePhone;
        return _x;
    }

    @Property(name="nickName")
    @JsonIgnore
    public Optional getNickName() {
        return Optional.ofNullable(nickName);
    }

    public Contact withNickName(String nickName) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("nickName");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.nickName = nickName;
        return _x;
    }

    @Property(name="officeLocation")
    @JsonIgnore
    public Optional getOfficeLocation() {
        return Optional.ofNullable(officeLocation);
    }

    public Contact withOfficeLocation(String officeLocation) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("officeLocation");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.officeLocation = officeLocation;
        return _x;
    }

    @Property(name="otherAddress")
    @JsonIgnore
    public Optional getOtherAddress() {
        return Optional.ofNullable(otherAddress);
    }

    public Contact withOtherAddress(PhysicalAddress otherAddress) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("otherAddress");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.otherAddress = otherAddress;
        return _x;
    }

    @Property(name="parentFolderId")
    @JsonIgnore
    public Optional getParentFolderId() {
        return Optional.ofNullable(parentFolderId);
    }

    public Contact withParentFolderId(String parentFolderId) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("parentFolderId");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.parentFolderId = parentFolderId;
        return _x;
    }

    @Property(name="personalNotes")
    @JsonIgnore
    public Optional getPersonalNotes() {
        return Optional.ofNullable(personalNotes);
    }

    public Contact withPersonalNotes(String personalNotes) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("personalNotes");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.personalNotes = personalNotes;
        return _x;
    }

    @Property(name="profession")
    @JsonIgnore
    public Optional getProfession() {
        return Optional.ofNullable(profession);
    }

    public Contact withProfession(String profession) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("profession");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.profession = profession;
        return _x;
    }

    @Property(name="spouseName")
    @JsonIgnore
    public Optional getSpouseName() {
        return Optional.ofNullable(spouseName);
    }

    public Contact withSpouseName(String spouseName) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("spouseName");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.spouseName = spouseName;
        return _x;
    }

    @Property(name="surname")
    @JsonIgnore
    public Optional getSurname() {
        return Optional.ofNullable(surname);
    }

    public Contact withSurname(String surname) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("surname");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.surname = surname;
        return _x;
    }

    @Property(name="title")
    @JsonIgnore
    public Optional getTitle() {
        return Optional.ofNullable(title);
    }

    public Contact withTitle(String title) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("title");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.title = title;
        return _x;
    }

    @Property(name="yomiCompanyName")
    @JsonIgnore
    public Optional getYomiCompanyName() {
        return Optional.ofNullable(yomiCompanyName);
    }

    public Contact withYomiCompanyName(String yomiCompanyName) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("yomiCompanyName");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.yomiCompanyName = yomiCompanyName;
        return _x;
    }

    @Property(name="yomiGivenName")
    @JsonIgnore
    public Optional getYomiGivenName() {
        return Optional.ofNullable(yomiGivenName);
    }

    public Contact withYomiGivenName(String yomiGivenName) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("yomiGivenName");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.yomiGivenName = yomiGivenName;
        return _x;
    }

    @Property(name="yomiSurname")
    @JsonIgnore
    public Optional getYomiSurname() {
        return Optional.ofNullable(yomiSurname);
    }

    public Contact withYomiSurname(String yomiSurname) {
        Contact _x = _copy();
        _x.changedFields = changedFields.add("yomiSurname");
        _x.odataType = Util.nvl(odataType, "microsoft.graph.contact");
        _x.yomiSurname = yomiSurname;
        return _x;
    }

    public Contact withUnmappedField(String name, String value) {
        Contact _x = _copy();
        _x.setUnmappedField(name, value);
        return _x;
    }

    /**
     * 

* Org.OData.Capabilities.V1.ChangeTracking *

* Supported = false *

* Org.OData.Capabilities.V1.SearchRestrictions *

* Searchable = false * * @return navigational property extensions */ @NavigationProperty(name="extensions") @JsonIgnore public ExtensionCollectionRequest getExtensions() { return new ExtensionCollectionRequest( contextPath.addSegment("extensions"), RequestHelper.getValue(unmappedFields, "extensions")); } @NavigationProperty(name="multiValueExtendedProperties") @JsonIgnore public MultiValueLegacyExtendedPropertyCollectionRequest getMultiValueExtendedProperties() { return new MultiValueLegacyExtendedPropertyCollectionRequest( contextPath.addSegment("multiValueExtendedProperties"), RequestHelper.getValue(unmappedFields, "multiValueExtendedProperties")); } /** *

* Org.OData.Capabilities.V1.ChangeTracking *

* Supported = false *

* Org.OData.Capabilities.V1.DeleteRestrictions *

* Deletable = false *

* Org.OData.Capabilities.V1.ExpandRestrictions *

* Expandable = false *

* Org.OData.Capabilities.V1.InsertRestrictions *

* Insertable = false *

* Org.OData.Capabilities.V1.SearchRestrictions *

* Searchable = false * * @return navigational property photo */ @NavigationProperty(name="photo") @JsonIgnore public ProfilePhotoRequest getPhoto() { return new ProfilePhotoRequest(contextPath.addSegment("photo"), RequestHelper.getValue(unmappedFields, "photo")); } @NavigationProperty(name="singleValueExtendedProperties") @JsonIgnore public SingleValueLegacyExtendedPropertyCollectionRequest getSingleValueExtendedProperties() { return new SingleValueLegacyExtendedPropertyCollectionRequest( contextPath.addSegment("singleValueExtendedProperties"), RequestHelper.getValue(unmappedFields, "singleValueExtendedProperties")); } @JsonAnySetter private void setUnmappedField(String name, Object value) { if (unmappedFields == null) { unmappedFields = new UnmappedFieldsImpl(); } unmappedFields.put(name, value); } @JsonAnyGetter private UnmappedFieldsImpl unmappedFields() { return unmappedFields == null ? UnmappedFieldsImpl.EMPTY : unmappedFields; } @Override public UnmappedFields getUnmappedFields() { return unmappedFields(); } /** * Submits only changed fields for update and returns an * immutable copy of {@code this} with changed fields reset. * * @return a copy of {@code this} with changed fields reset * @throws ClientException if HTTP response is not as expected */ public Contact patch() { RequestHelper.patch(this, contextPath, RequestOptions.EMPTY); Contact _x = _copy(); _x.changedFields = null; return _x; } /** * Submits all fields for update and returns an immutable copy of {@code this} * with changed fields reset (they were ignored anyway). * * @return a copy of {@code this} with changed fields reset * @throws ClientException if HTTP response is not as expected */ public Contact put() { RequestHelper.put(this, contextPath, RequestOptions.EMPTY); Contact _x = _copy(); _x.changedFields = null; return _x; } private Contact _copy() { Contact _x = new Contact(); _x.contextPath = contextPath; _x.changedFields = changedFields; _x.unmappedFields = unmappedFields.copy(); _x.odataType = odataType; _x.id = id; _x.categories = categories; _x.changeKey = changeKey; _x.createdDateTime = createdDateTime; _x.lastModifiedDateTime = lastModifiedDateTime; _x.assistantName = assistantName; _x.birthday = birthday; _x.businessAddress = businessAddress; _x.businessHomePage = businessHomePage; _x.businessPhones = businessPhones; _x.children = children; _x.companyName = companyName; _x.department = department; _x.displayName = displayName; _x.emailAddresses = emailAddresses; _x.fileAs = fileAs; _x.generation = generation; _x.givenName = givenName; _x.homeAddress = homeAddress; _x.homePhones = homePhones; _x.imAddresses = imAddresses; _x.initials = initials; _x.jobTitle = jobTitle; _x.manager = manager; _x.middleName = middleName; _x.mobilePhone = mobilePhone; _x.nickName = nickName; _x.officeLocation = officeLocation; _x.otherAddress = otherAddress; _x.parentFolderId = parentFolderId; _x.personalNotes = personalNotes; _x.profession = profession; _x.spouseName = spouseName; _x.surname = surname; _x.title = title; _x.yomiCompanyName = yomiCompanyName; _x.yomiGivenName = yomiGivenName; _x.yomiSurname = yomiSurname; return _x; } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("Contact["); b.append("id="); b.append(this.id); b.append(", "); b.append("categories="); b.append(this.categories); b.append(", "); b.append("changeKey="); b.append(this.changeKey); b.append(", "); b.append("createdDateTime="); b.append(this.createdDateTime); b.append(", "); b.append("lastModifiedDateTime="); b.append(this.lastModifiedDateTime); b.append(", "); b.append("assistantName="); b.append(this.assistantName); b.append(", "); b.append("birthday="); b.append(this.birthday); b.append(", "); b.append("businessAddress="); b.append(this.businessAddress); b.append(", "); b.append("businessHomePage="); b.append(this.businessHomePage); b.append(", "); b.append("businessPhones="); b.append(this.businessPhones); b.append(", "); b.append("children="); b.append(this.children); b.append(", "); b.append("companyName="); b.append(this.companyName); b.append(", "); b.append("department="); b.append(this.department); b.append(", "); b.append("displayName="); b.append(this.displayName); b.append(", "); b.append("emailAddresses="); b.append(this.emailAddresses); b.append(", "); b.append("fileAs="); b.append(this.fileAs); b.append(", "); b.append("generation="); b.append(this.generation); b.append(", "); b.append("givenName="); b.append(this.givenName); b.append(", "); b.append("homeAddress="); b.append(this.homeAddress); b.append(", "); b.append("homePhones="); b.append(this.homePhones); b.append(", "); b.append("imAddresses="); b.append(this.imAddresses); b.append(", "); b.append("initials="); b.append(this.initials); b.append(", "); b.append("jobTitle="); b.append(this.jobTitle); b.append(", "); b.append("manager="); b.append(this.manager); b.append(", "); b.append("middleName="); b.append(this.middleName); b.append(", "); b.append("mobilePhone="); b.append(this.mobilePhone); b.append(", "); b.append("nickName="); b.append(this.nickName); b.append(", "); b.append("officeLocation="); b.append(this.officeLocation); b.append(", "); b.append("otherAddress="); b.append(this.otherAddress); b.append(", "); b.append("parentFolderId="); b.append(this.parentFolderId); b.append(", "); b.append("personalNotes="); b.append(this.personalNotes); b.append(", "); b.append("profession="); b.append(this.profession); b.append(", "); b.append("spouseName="); b.append(this.spouseName); b.append(", "); b.append("surname="); b.append(this.surname); b.append(", "); b.append("title="); b.append(this.title); b.append(", "); b.append("yomiCompanyName="); b.append(this.yomiCompanyName); b.append(", "); b.append("yomiGivenName="); b.append(this.yomiGivenName); b.append(", "); b.append("yomiSurname="); b.append(this.yomiSurname); b.append("]"); b.append(",unmappedFields="); b.append(unmappedFields); b.append(",odataType="); b.append(odataType); return b.toString(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy