com.microsoft.graph.beta.generated.models.CartToClassAssociation Maven / Gradle / Ivy
package com.microsoft.graph.beta.models;
import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParseNode;
import com.microsoft.kiota.serialization.SerializationWriter;
import java.time.OffsetDateTime;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/**
* CartToClassAssociation for associating device carts with classrooms.
*/
@jakarta.annotation.Generated("com.microsoft.kiota")
public class CartToClassAssociation extends Entity implements Parsable {
/**
* Instantiates a new {@link CartToClassAssociation} and sets the default values.
*/
public CartToClassAssociation() {
super();
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a {@link CartToClassAssociation}
*/
@jakarta.annotation.Nonnull
public static CartToClassAssociation createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new CartToClassAssociation();
}
/**
* Gets the classroomIds property value. Identifiers of classrooms to be associated with device carts.
* @return a {@link java.util.List}
*/
@jakarta.annotation.Nullable
public java.util.List getClassroomIds() {
return this.backingStore.get("classroomIds");
}
/**
* Gets the createdDateTime property value. DateTime the object was created.
* @return a {@link OffsetDateTime}
*/
@jakarta.annotation.Nullable
public OffsetDateTime getCreatedDateTime() {
return this.backingStore.get("createdDateTime");
}
/**
* Gets the description property value. Admin provided description of the CartToClassAssociation.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getDescription() {
return this.backingStore.get("description");
}
/**
* Gets the deviceCartIds property value. Identifiers of device carts to be associated with classes.
* @return a {@link java.util.List}
*/
@jakarta.annotation.Nullable
public java.util.List getDeviceCartIds() {
return this.backingStore.get("deviceCartIds");
}
/**
* Gets the displayName property value. Admin provided name of the device configuration.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getDisplayName() {
return this.backingStore.get("displayName");
}
/**
* The deserialization information for the current model
* @return a {@link Map>}
*/
@jakarta.annotation.Nonnull
public Map> getFieldDeserializers() {
final HashMap> deserializerMap = new HashMap>(super.getFieldDeserializers());
deserializerMap.put("classroomIds", (n) -> { this.setClassroomIds(n.getCollectionOfPrimitiveValues(String.class)); });
deserializerMap.put("createdDateTime", (n) -> { this.setCreatedDateTime(n.getOffsetDateTimeValue()); });
deserializerMap.put("description", (n) -> { this.setDescription(n.getStringValue()); });
deserializerMap.put("deviceCartIds", (n) -> { this.setDeviceCartIds(n.getCollectionOfPrimitiveValues(String.class)); });
deserializerMap.put("displayName", (n) -> { this.setDisplayName(n.getStringValue()); });
deserializerMap.put("lastModifiedDateTime", (n) -> { this.setLastModifiedDateTime(n.getOffsetDateTimeValue()); });
deserializerMap.put("version", (n) -> { this.setVersion(n.getIntegerValue()); });
return deserializerMap;
}
/**
* Gets the lastModifiedDateTime property value. DateTime the object was last modified.
* @return a {@link OffsetDateTime}
*/
@jakarta.annotation.Nullable
public OffsetDateTime getLastModifiedDateTime() {
return this.backingStore.get("lastModifiedDateTime");
}
/**
* Gets the version property value. Version of the CartToClassAssociation.
* @return a {@link Integer}
*/
@jakarta.annotation.Nullable
public Integer getVersion() {
return this.backingStore.get("version");
}
/**
* Serializes information the current object
* @param writer Serialization writer to use to serialize this model
*/
public void serialize(@jakarta.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
super.serialize(writer);
writer.writeCollectionOfPrimitiveValues("classroomIds", this.getClassroomIds());
writer.writeOffsetDateTimeValue("createdDateTime", this.getCreatedDateTime());
writer.writeStringValue("description", this.getDescription());
writer.writeCollectionOfPrimitiveValues("deviceCartIds", this.getDeviceCartIds());
writer.writeStringValue("displayName", this.getDisplayName());
writer.writeOffsetDateTimeValue("lastModifiedDateTime", this.getLastModifiedDateTime());
writer.writeIntegerValue("version", this.getVersion());
}
/**
* Sets the classroomIds property value. Identifiers of classrooms to be associated with device carts.
* @param value Value to set for the classroomIds property.
*/
public void setClassroomIds(@jakarta.annotation.Nullable final java.util.List value) {
this.backingStore.set("classroomIds", value);
}
/**
* Sets the createdDateTime property value. DateTime the object was created.
* @param value Value to set for the createdDateTime property.
*/
public void setCreatedDateTime(@jakarta.annotation.Nullable final OffsetDateTime value) {
this.backingStore.set("createdDateTime", value);
}
/**
* Sets the description property value. Admin provided description of the CartToClassAssociation.
* @param value Value to set for the description property.
*/
public void setDescription(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("description", value);
}
/**
* Sets the deviceCartIds property value. Identifiers of device carts to be associated with classes.
* @param value Value to set for the deviceCartIds property.
*/
public void setDeviceCartIds(@jakarta.annotation.Nullable final java.util.List value) {
this.backingStore.set("deviceCartIds", value);
}
/**
* Sets the displayName property value. Admin provided name of the device configuration.
* @param value Value to set for the displayName property.
*/
public void setDisplayName(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("displayName", value);
}
/**
* Sets the lastModifiedDateTime property value. DateTime the object was last modified.
* @param value Value to set for the lastModifiedDateTime property.
*/
public void setLastModifiedDateTime(@jakarta.annotation.Nullable final OffsetDateTime value) {
this.backingStore.set("lastModifiedDateTime", value);
}
/**
* Sets the version property value. Version of the CartToClassAssociation.
* @param value Value to set for the version property.
*/
public void setVersion(@jakarta.annotation.Nullable final Integer value) {
this.backingStore.set("version", value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy