![JAR search and dependency download from the Maven repository](/logo.png)
com.microsoft.graph.generated.models.Thumbnail 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.util.HashMap;
import java.util.Map;
import java.util.Objects;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class Thumbnail implements AdditionalDataHolder, BackedModel, Parsable {
/**
* Stores model information.
*/
@jakarta.annotation.Nonnull
protected BackingStore backingStore;
/**
* Instantiates a new {@link Thumbnail} and sets the default values.
*/
public Thumbnail() {
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 Thumbnail}
*/
@jakarta.annotation.Nonnull
public static Thumbnail createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new Thumbnail();
}
/**
* 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 backingStore property value. Stores model information.
* @return a {@link BackingStore}
*/
@jakarta.annotation.Nonnull
public BackingStore getBackingStore() {
return this.backingStore;
}
/**
* Gets the content property value. The content stream for the thumbnail.
* @return a {@link byte[]}
*/
@jakarta.annotation.Nullable
public byte[] getContent() {
return this.backingStore.get("content");
}
/**
* The deserialization information for the current model
* @return a {@link Map>}
*/
@jakarta.annotation.Nonnull
public Map> getFieldDeserializers() {
final HashMap> deserializerMap = new HashMap>(6);
deserializerMap.put("content", (n) -> { this.setContent(n.getByteArrayValue()); });
deserializerMap.put("height", (n) -> { this.setHeight(n.getIntegerValue()); });
deserializerMap.put("@odata.type", (n) -> { this.setOdataType(n.getStringValue()); });
deserializerMap.put("sourceItemId", (n) -> { this.setSourceItemId(n.getStringValue()); });
deserializerMap.put("url", (n) -> { this.setUrl(n.getStringValue()); });
deserializerMap.put("width", (n) -> { this.setWidth(n.getIntegerValue()); });
return deserializerMap;
}
/**
* Gets the height property value. The height of the thumbnail, in pixels.
* @return a {@link Integer}
*/
@jakarta.annotation.Nullable
public Integer getHeight() {
return this.backingStore.get("height");
}
/**
* 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 sourceItemId property value. The unique identifier of the item that provided the thumbnail. This is only available when a folder thumbnail is requested.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getSourceItemId() {
return this.backingStore.get("sourceItemId");
}
/**
* Gets the url property value. The URL used to fetch the thumbnail content.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getUrl() {
return this.backingStore.get("url");
}
/**
* Gets the width property value. The width of the thumbnail, in pixels.
* @return a {@link Integer}
*/
@jakarta.annotation.Nullable
public Integer getWidth() {
return this.backingStore.get("width");
}
/**
* 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.writeByteArrayValue("content", this.getContent());
writer.writeIntegerValue("height", this.getHeight());
writer.writeStringValue("@odata.type", this.getOdataType());
writer.writeStringValue("sourceItemId", this.getSourceItemId());
writer.writeStringValue("url", this.getUrl());
writer.writeIntegerValue("width", this.getWidth());
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 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 content property value. The content stream for the thumbnail.
* @param value Value to set for the content property.
*/
public void setContent(@jakarta.annotation.Nullable final byte[] value) {
this.backingStore.set("content", value);
}
/**
* Sets the height property value. The height of the thumbnail, in pixels.
* @param value Value to set for the height property.
*/
public void setHeight(@jakarta.annotation.Nullable final Integer value) {
this.backingStore.set("height", 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 sourceItemId property value. The unique identifier of the item that provided the thumbnail. This is only available when a folder thumbnail is requested.
* @param value Value to set for the sourceItemId property.
*/
public void setSourceItemId(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("sourceItemId", value);
}
/**
* Sets the url property value. The URL used to fetch the thumbnail content.
* @param value Value to set for the url property.
*/
public void setUrl(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("url", value);
}
/**
* Sets the width property value. The width of the thumbnail, in pixels.
* @param value Value to set for the width property.
*/
public void setWidth(@jakarta.annotation.Nullable final Integer value) {
this.backingStore.set("width", value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy