com.microsoft.graph.beta.generated.models.search.AnswerVariant Maven / Gradle / Ivy
package com.microsoft.graph.beta.models.search;
import com.microsoft.graph.beta.models.DevicePlatformType;
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 AnswerVariant implements AdditionalDataHolder, BackedModel, Parsable {
/**
* Stores model information.
*/
@jakarta.annotation.Nonnull
protected BackingStore backingStore;
/**
* Instantiates a new {@link AnswerVariant} and sets the default values.
*/
public AnswerVariant() {
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 AnswerVariant}
*/
@jakarta.annotation.Nonnull
public static AnswerVariant createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new AnswerVariant();
}
/**
* 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 description property value. The answer variation description that is shown on the search results page.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getDescription() {
return this.backingStore.get("description");
}
/**
* Gets the displayName property value. The answer variation name that is displayed in search results.
* @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>(6);
deserializerMap.put("description", (n) -> { this.setDescription(n.getStringValue()); });
deserializerMap.put("displayName", (n) -> { this.setDisplayName(n.getStringValue()); });
deserializerMap.put("languageTag", (n) -> { this.setLanguageTag(n.getStringValue()); });
deserializerMap.put("@odata.type", (n) -> { this.setOdataType(n.getStringValue()); });
deserializerMap.put("platform", (n) -> { this.setPlatform(n.getEnumValue(DevicePlatformType::forValue)); });
deserializerMap.put("webUrl", (n) -> { this.setWebUrl(n.getStringValue()); });
return deserializerMap;
}
/**
* Gets the languageTag property value. The country or region that can view this answer variation.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getLanguageTag() {
return this.backingStore.get("languageTag");
}
/**
* 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 platform property value. The device or operating system that can view this answer variation. Possible values are: android, androidForWork, ios, macOS, windowsPhone81, windowsPhone81AndLater, windows10AndLater, androidWorkProfile, unknown, androidASOP, androidMobileApplicationManagement, iOSMobileApplicationManagement, unknownFutureValue.
* @return a {@link DevicePlatformType}
*/
@jakarta.annotation.Nullable
public DevicePlatformType getPlatform() {
return this.backingStore.get("platform");
}
/**
* Gets the webUrl property value. The URL link for the answer variation. When users select this answer variation from the search results, they're directed to the specified URL.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getWebUrl() {
return this.backingStore.get("webUrl");
}
/**
* 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("description", this.getDescription());
writer.writeStringValue("displayName", this.getDisplayName());
writer.writeStringValue("languageTag", this.getLanguageTag());
writer.writeStringValue("@odata.type", this.getOdataType());
writer.writeEnumValue("platform", this.getPlatform());
writer.writeStringValue("webUrl", this.getWebUrl());
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 description property value. The answer variation description that is shown on the search results page.
* @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 displayName property value. The answer variation name that is displayed in search results.
* @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 languageTag property value. The country or region that can view this answer variation.
* @param value Value to set for the languageTag property.
*/
public void setLanguageTag(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("languageTag", 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 platform property value. The device or operating system that can view this answer variation. Possible values are: android, androidForWork, ios, macOS, windowsPhone81, windowsPhone81AndLater, windows10AndLater, androidWorkProfile, unknown, androidASOP, androidMobileApplicationManagement, iOSMobileApplicationManagement, unknownFutureValue.
* @param value Value to set for the platform property.
*/
public void setPlatform(@jakarta.annotation.Nullable final DevicePlatformType value) {
this.backingStore.set("platform", value);
}
/**
* Sets the webUrl property value. The URL link for the answer variation. When users select this answer variation from the search results, they're directed to the specified URL.
* @param value Value to set for the webUrl property.
*/
public void setWebUrl(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("webUrl", value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy