com.microsoft.graph.generated.models.FeatureRolloutPolicy Maven / Gradle / Ivy
package com.microsoft.graph.models;
import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParseNode;
import com.microsoft.kiota.serialization.SerializationWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class FeatureRolloutPolicy extends Entity implements Parsable {
/**
* Instantiates a new {@link FeatureRolloutPolicy} and sets the default values.
*/
public FeatureRolloutPolicy() {
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 FeatureRolloutPolicy}
*/
@jakarta.annotation.Nonnull
public static FeatureRolloutPolicy createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new FeatureRolloutPolicy();
}
/**
* Gets the appliesTo property value. Nullable. Specifies a list of directoryObjects that feature is enabled for.
* @return a {@link java.util.List}
*/
@jakarta.annotation.Nullable
public java.util.List getAppliesTo() {
return this.backingStore.get("appliesTo");
}
/**
* Gets the description property value. A description for this feature rollout policy.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getDescription() {
return this.backingStore.get("description");
}
/**
* Gets the displayName property value. The display name for this feature rollout policy.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getDisplayName() {
return this.backingStore.get("displayName");
}
/**
* Gets the feature property value. The feature property
* @return a {@link StagedFeatureName}
*/
@jakarta.annotation.Nullable
public StagedFeatureName getFeature() {
return this.backingStore.get("feature");
}
/**
* 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("appliesTo", (n) -> { this.setAppliesTo(n.getCollectionOfObjectValues(DirectoryObject::createFromDiscriminatorValue)); });
deserializerMap.put("description", (n) -> { this.setDescription(n.getStringValue()); });
deserializerMap.put("displayName", (n) -> { this.setDisplayName(n.getStringValue()); });
deserializerMap.put("feature", (n) -> { this.setFeature(n.getEnumValue(StagedFeatureName::forValue)); });
deserializerMap.put("isAppliedToOrganization", (n) -> { this.setIsAppliedToOrganization(n.getBooleanValue()); });
deserializerMap.put("isEnabled", (n) -> { this.setIsEnabled(n.getBooleanValue()); });
return deserializerMap;
}
/**
* Gets the isAppliedToOrganization property value. Indicates whether this feature rollout policy should be applied to the entire organization.
* @return a {@link Boolean}
*/
@jakarta.annotation.Nullable
public Boolean getIsAppliedToOrganization() {
return this.backingStore.get("isAppliedToOrganization");
}
/**
* Gets the isEnabled property value. Indicates whether the feature rollout is enabled.
* @return a {@link Boolean}
*/
@jakarta.annotation.Nullable
public Boolean getIsEnabled() {
return this.backingStore.get("isEnabled");
}
/**
* 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.writeCollectionOfObjectValues("appliesTo", this.getAppliesTo());
writer.writeStringValue("description", this.getDescription());
writer.writeStringValue("displayName", this.getDisplayName());
writer.writeEnumValue("feature", this.getFeature());
writer.writeBooleanValue("isAppliedToOrganization", this.getIsAppliedToOrganization());
writer.writeBooleanValue("isEnabled", this.getIsEnabled());
}
/**
* Sets the appliesTo property value. Nullable. Specifies a list of directoryObjects that feature is enabled for.
* @param value Value to set for the appliesTo property.
*/
public void setAppliesTo(@jakarta.annotation.Nullable final java.util.List value) {
this.backingStore.set("appliesTo", value);
}
/**
* Sets the description property value. A description for this feature rollout policy.
* @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 display name for this feature rollout policy.
* @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 feature property value. The feature property
* @param value Value to set for the feature property.
*/
public void setFeature(@jakarta.annotation.Nullable final StagedFeatureName value) {
this.backingStore.set("feature", value);
}
/**
* Sets the isAppliedToOrganization property value. Indicates whether this feature rollout policy should be applied to the entire organization.
* @param value Value to set for the isAppliedToOrganization property.
*/
public void setIsAppliedToOrganization(@jakarta.annotation.Nullable final Boolean value) {
this.backingStore.set("isAppliedToOrganization", value);
}
/**
* Sets the isEnabled property value. Indicates whether the feature rollout is enabled.
* @param value Value to set for the isEnabled property.
*/
public void setIsEnabled(@jakarta.annotation.Nullable final Boolean value) {
this.backingStore.set("isEnabled", value);
}
}