odata.msgraph.client.entity.VirtualEventWebinar Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of odata-client-msgraph Show documentation
Show all versions of odata-client-msgraph Show documentation
Java client for use with the Microsoft Graph v1.0 endpoint
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.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import odata.msgraph.client.complex.CommunicationsIdentitySet;
import odata.msgraph.client.complex.CommunicationsUserIdentity;
import odata.msgraph.client.complex.DateTimeTimeZone;
import odata.msgraph.client.complex.ItemBody;
import odata.msgraph.client.entity.collection.request.VirtualEventRegistrationCollectionRequest;
import odata.msgraph.client.enums.MeetingAudience;
import odata.msgraph.client.enums.VirtualEventStatus;
@JsonPropertyOrder({
"@odata.type",
"audience",
"coOrganizers",
"registrations"})
@JsonInclude(Include.NON_NULL)
public class VirtualEventWebinar extends VirtualEvent implements ODataEntityType {
@Override
public String odataTypeName() {
return "microsoft.graph.virtualEventWebinar";
}
@JsonProperty("audience")
protected MeetingAudience audience;
@JsonProperty("coOrganizers")
protected List coOrganizers;
@JsonProperty("coOrganizers@nextLink")
protected String coOrganizersNextLink;
@JsonProperty("registrations")
protected List registrations;
protected VirtualEventWebinar() {
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 builderVirtualEventWebinar() {
return new Builder();
}
public static final class Builder {
private String id;
private CommunicationsIdentitySet createdBy;
private ItemBody description;
private String displayName;
private DateTimeTimeZone endDateTime;
private DateTimeTimeZone startDateTime;
private VirtualEventStatus status;
private List sessions;
private MeetingAudience audience;
private List coOrganizers;
private String coOrganizersNextLink;
private List registrations;
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 createdBy(CommunicationsIdentitySet createdBy) {
this.createdBy = createdBy;
this.changedFields = changedFields.add("createdBy");
return this;
}
public Builder description(ItemBody description) {
this.description = description;
this.changedFields = changedFields.add("description");
return this;
}
public Builder displayName(String displayName) {
this.displayName = displayName;
this.changedFields = changedFields.add("displayName");
return this;
}
public Builder endDateTime(DateTimeTimeZone endDateTime) {
this.endDateTime = endDateTime;
this.changedFields = changedFields.add("endDateTime");
return this;
}
public Builder startDateTime(DateTimeTimeZone startDateTime) {
this.startDateTime = startDateTime;
this.changedFields = changedFields.add("startDateTime");
return this;
}
public Builder status(VirtualEventStatus status) {
this.status = status;
this.changedFields = changedFields.add("status");
return this;
}
public Builder sessions(List sessions) {
this.sessions = sessions;
this.changedFields = changedFields.add("sessions");
return this;
}
public Builder sessions(VirtualEventSession... sessions) {
return sessions(Arrays.asList(sessions));
}
public Builder audience(MeetingAudience audience) {
this.audience = audience;
this.changedFields = changedFields.add("audience");
return this;
}
public Builder coOrganizers(List coOrganizers) {
this.coOrganizers = coOrganizers;
this.changedFields = changedFields.add("coOrganizers");
return this;
}
public Builder coOrganizers(CommunicationsUserIdentity... coOrganizers) {
return coOrganizers(Arrays.asList(coOrganizers));
}
public Builder coOrganizersNextLink(String coOrganizersNextLink) {
this.coOrganizersNextLink = coOrganizersNextLink;
this.changedFields = changedFields.add("coOrganizers");
return this;
}
public Builder registrations(List registrations) {
this.registrations = registrations;
this.changedFields = changedFields.add("registrations");
return this;
}
public Builder registrations(VirtualEventRegistration... registrations) {
return registrations(Arrays.asList(registrations));
}
public VirtualEventWebinar build() {
VirtualEventWebinar _x = new VirtualEventWebinar();
_x.contextPath = null;
_x.changedFields = changedFields;
_x.unmappedFields = new UnmappedFieldsImpl();
_x.odataType = "microsoft.graph.virtualEventWebinar";
_x.id = id;
_x.createdBy = createdBy;
_x.description = description;
_x.displayName = displayName;
_x.endDateTime = endDateTime;
_x.startDateTime = startDateTime;
_x.status = status;
_x.sessions = sessions;
_x.audience = audience;
_x.coOrganizers = coOrganizers;
_x.coOrganizersNextLink = coOrganizersNextLink;
_x.registrations = registrations;
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, String.class));
}
}
@Property(name="audience")
@JsonIgnore
public Optional getAudience() {
return Optional.ofNullable(audience);
}
public VirtualEventWebinar withAudience(MeetingAudience audience) {
VirtualEventWebinar _x = _copy();
_x.changedFields = changedFields.add("audience");
_x.odataType = Util.nvl(odataType, "microsoft.graph.virtualEventWebinar");
_x.audience = audience;
return _x;
}
@Property(name="coOrganizers")
@JsonIgnore
public CollectionPage getCoOrganizers() {
return new CollectionPage(contextPath, CommunicationsUserIdentity.class, this.coOrganizers, Optional.ofNullable(coOrganizersNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
}
public VirtualEventWebinar withCoOrganizers(List coOrganizers) {
VirtualEventWebinar _x = _copy();
_x.changedFields = changedFields.add("coOrganizers");
_x.odataType = Util.nvl(odataType, "microsoft.graph.virtualEventWebinar");
_x.coOrganizers = coOrganizers;
return _x;
}
@Property(name="coOrganizers")
@JsonIgnore
public CollectionPage getCoOrganizers(HttpRequestOptions options) {
return new CollectionPage(contextPath, CommunicationsUserIdentity.class, this.coOrganizers, Optional.ofNullable(coOrganizersNextLink), Collections.emptyList(), options);
}
public VirtualEventWebinar withUnmappedField(String name, Object value) {
VirtualEventWebinar _x = _copy();
_x.setUnmappedField(name, value);
return _x;
}
@NavigationProperty(name="registrations")
@JsonIgnore
public VirtualEventRegistrationCollectionRequest getRegistrations() {
return new VirtualEventRegistrationCollectionRequest(
contextPath.addSegment("registrations"), Optional.ofNullable(registrations));
}
public VirtualEventWebinar withRegistrations(List registrations) {
VirtualEventWebinar _x = _copy();
_x.changedFields = changedFields.add("registrations");
_x.odataType = Util.nvl(odataType, "microsoft.graph.virtualEventWebinar");
_x.registrations = registrations;
return _x;
}
@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 VirtualEventWebinar patch() {
RequestHelper.patch(this, contextPath, RequestOptions.EMPTY);
VirtualEventWebinar _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 VirtualEventWebinar put() {
RequestHelper.put(this, contextPath, RequestOptions.EMPTY);
VirtualEventWebinar _x = _copy();
_x.changedFields = null;
return _x;
}
private VirtualEventWebinar _copy() {
VirtualEventWebinar _x = new VirtualEventWebinar();
_x.contextPath = contextPath;
_x.changedFields = changedFields;
_x.unmappedFields = unmappedFields.copy();
_x.odataType = odataType;
_x.id = id;
_x.createdBy = createdBy;
_x.description = description;
_x.displayName = displayName;
_x.endDateTime = endDateTime;
_x.startDateTime = startDateTime;
_x.status = status;
_x.sessions = sessions;
_x.audience = audience;
_x.coOrganizers = coOrganizers;
_x.registrations = registrations;
return _x;
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("VirtualEventWebinar[");
b.append("id=");
b.append(this.id);
b.append(", ");
b.append("createdBy=");
b.append(this.createdBy);
b.append(", ");
b.append("description=");
b.append(this.description);
b.append(", ");
b.append("displayName=");
b.append(this.displayName);
b.append(", ");
b.append("endDateTime=");
b.append(this.endDateTime);
b.append(", ");
b.append("startDateTime=");
b.append(this.startDateTime);
b.append(", ");
b.append("status=");
b.append(this.status);
b.append(", ");
b.append("sessions=");
b.append(this.sessions);
b.append(", ");
b.append("audience=");
b.append(this.audience);
b.append(", ");
b.append("coOrganizers=");
b.append(this.coOrganizers);
b.append(", ");
b.append("registrations=");
b.append(this.registrations);
b.append("]");
b.append(",unmappedFields=");
b.append(unmappedFields);
b.append(",odataType=");
b.append(odataType);
return b.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy