com.microsoft.graph.generated.models.LicenseAssignmentState Maven / Gradle / Ivy
package com.microsoft.graph.models;
import com.microsoft.kiota.serialization.AdditionalDataHolder;
import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParseNode;
import com.microsoft.kiota.serialization.SerializationWriter;
import com.microsoft.kiota.store.BackedModel;
import com.microsoft.kiota.store.BackingStore;
import com.microsoft.kiota.store.BackingStoreFactorySingleton;
import java.time.OffsetDateTime;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.UUID;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class LicenseAssignmentState implements AdditionalDataHolder, BackedModel, Parsable {
/**
* Stores model information.
*/
@jakarta.annotation.Nonnull
protected BackingStore backingStore;
/**
* Instantiates a new {@link LicenseAssignmentState} and sets the default values.
*/
public LicenseAssignmentState() {
this.backingStore = BackingStoreFactorySingleton.instance.createBackingStore();
this.setAdditionalData(new HashMap<>());
}
/**
* 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 LicenseAssignmentState}
*/
@jakarta.annotation.Nonnull
public static LicenseAssignmentState createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new LicenseAssignmentState();
}
/**
* Gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return a {@link Map}
*/
@jakarta.annotation.Nonnull
public Map getAdditionalData() {
Map value = this.backingStore.get("additionalData");
if(value == null) {
value = new HashMap<>();
this.setAdditionalData(value);
}
return value;
}
/**
* Gets the assignedByGroup property value. The assignedByGroup property
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getAssignedByGroup() {
return this.backingStore.get("assignedByGroup");
}
/**
* Gets the backingStore property value. Stores model information.
* @return a {@link BackingStore}
*/
@jakarta.annotation.Nonnull
public BackingStore getBackingStore() {
return this.backingStore;
}
/**
* Gets the disabledPlans property value. The disabledPlans property
* @return a {@link java.util.List}
*/
@jakarta.annotation.Nullable
public java.util.List getDisabledPlans() {
return this.backingStore.get("disabledPlans");
}
/**
* Gets the error property value. The error property
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getError() {
return this.backingStore.get("error");
}
/**
* The deserialization information for the current model
* @return a {@link Map>}
*/
@jakarta.annotation.Nonnull
public Map> getFieldDeserializers() {
final HashMap> deserializerMap = new HashMap>(7);
deserializerMap.put("assignedByGroup", (n) -> { this.setAssignedByGroup(n.getStringValue()); });
deserializerMap.put("disabledPlans", (n) -> { this.setDisabledPlans(n.getCollectionOfPrimitiveValues(UUID.class)); });
deserializerMap.put("error", (n) -> { this.setError(n.getStringValue()); });
deserializerMap.put("lastUpdatedDateTime", (n) -> { this.setLastUpdatedDateTime(n.getOffsetDateTimeValue()); });
deserializerMap.put("@odata.type", (n) -> { this.setOdataType(n.getStringValue()); });
deserializerMap.put("skuId", (n) -> { this.setSkuId(n.getUUIDValue()); });
deserializerMap.put("state", (n) -> { this.setState(n.getStringValue()); });
return deserializerMap;
}
/**
* Gets the lastUpdatedDateTime property value. The lastUpdatedDateTime property
* @return a {@link OffsetDateTime}
*/
@jakarta.annotation.Nullable
public OffsetDateTime getLastUpdatedDateTime() {
return this.backingStore.get("lastUpdatedDateTime");
}
/**
* Gets the @odata.type property value. The OdataType property
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getOdataType() {
return this.backingStore.get("odataType");
}
/**
* Gets the skuId property value. The skuId property
* @return a {@link UUID}
*/
@jakarta.annotation.Nullable
public UUID getSkuId() {
return this.backingStore.get("skuId");
}
/**
* Gets the state property value. The state property
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getState() {
return this.backingStore.get("state");
}
/**
* 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);
writer.writeStringValue("assignedByGroup", this.getAssignedByGroup());
writer.writeCollectionOfPrimitiveValues("disabledPlans", this.getDisabledPlans());
writer.writeStringValue("error", this.getError());
writer.writeOffsetDateTimeValue("lastUpdatedDateTime", this.getLastUpdatedDateTime());
writer.writeStringValue("@odata.type", this.getOdataType());
writer.writeUUIDValue("skuId", this.getSkuId());
writer.writeStringValue("state", this.getState());
writer.writeAdditionalData(this.getAdditionalData());
}
/**
* Sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @param value Value to set for the AdditionalData property.
*/
public void setAdditionalData(@jakarta.annotation.Nullable final Map value) {
this.backingStore.set("additionalData", value);
}
/**
* Sets the assignedByGroup property value. The assignedByGroup property
* @param value Value to set for the assignedByGroup property.
*/
public void setAssignedByGroup(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("assignedByGroup", value);
}
/**
* Sets the backingStore property value. Stores model information.
* @param value Value to set for the backingStore property.
*/
public void setBackingStore(@jakarta.annotation.Nonnull final BackingStore value) {
Objects.requireNonNull(value);
this.backingStore = value;
}
/**
* Sets the disabledPlans property value. The disabledPlans property
* @param value Value to set for the disabledPlans property.
*/
public void setDisabledPlans(@jakarta.annotation.Nullable final java.util.List value) {
this.backingStore.set("disabledPlans", value);
}
/**
* Sets the error property value. The error property
* @param value Value to set for the error property.
*/
public void setError(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("error", value);
}
/**
* Sets the lastUpdatedDateTime property value. The lastUpdatedDateTime property
* @param value Value to set for the lastUpdatedDateTime property.
*/
public void setLastUpdatedDateTime(@jakarta.annotation.Nullable final OffsetDateTime value) {
this.backingStore.set("lastUpdatedDateTime", value);
}
/**
* Sets the @odata.type property value. The OdataType property
* @param value Value to set for the @odata.type property.
*/
public void setOdataType(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("odataType", value);
}
/**
* Sets the skuId property value. The skuId property
* @param value Value to set for the skuId property.
*/
public void setSkuId(@jakarta.annotation.Nullable final UUID value) {
this.backingStore.set("skuId", value);
}
/**
* Sets the state property value. The state property
* @param value Value to set for the state property.
*/
public void setState(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("state", value);
}
}