Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
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.time.OffsetDateTime;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@jakarta.annotation.Generated("com.microsoft.kiota")
public class PrivilegedAccessSchedule extends Entity implements Parsable {
/**
* Instantiates a new {@link PrivilegedAccessSchedule} and sets the default values.
*/
public PrivilegedAccessSchedule() {
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 PrivilegedAccessSchedule}
*/
@jakarta.annotation.Nonnull
public static PrivilegedAccessSchedule createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
final ParseNode mappingValueNode = parseNode.getChildNode("@odata.type");
if (mappingValueNode != null) {
final String mappingValue = mappingValueNode.getStringValue();
switch (mappingValue) {
case "#microsoft.graph.privilegedAccessGroupAssignmentSchedule": return new PrivilegedAccessGroupAssignmentSchedule();
case "#microsoft.graph.privilegedAccessGroupEligibilitySchedule": return new PrivilegedAccessGroupEligibilitySchedule();
}
}
return new PrivilegedAccessSchedule();
}
/**
* Gets the createdDateTime property value. When the schedule was created. Optional.
* @return a {@link OffsetDateTime}
*/
@jakarta.annotation.Nullable
public OffsetDateTime getCreatedDateTime() {
return this.backingStore.get("createdDateTime");
}
/**
* Gets the createdUsing property value. The identifier of the access assignment or eligibility request that created this schedule. Optional.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getCreatedUsing() {
return this.backingStore.get("createdUsing");
}
/**
* 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("createdDateTime", (n) -> { this.setCreatedDateTime(n.getOffsetDateTimeValue()); });
deserializerMap.put("createdUsing", (n) -> { this.setCreatedUsing(n.getStringValue()); });
deserializerMap.put("modifiedDateTime", (n) -> { this.setModifiedDateTime(n.getOffsetDateTimeValue()); });
deserializerMap.put("scheduleInfo", (n) -> { this.setScheduleInfo(n.getObjectValue(RequestSchedule::createFromDiscriminatorValue)); });
deserializerMap.put("status", (n) -> { this.setStatus(n.getStringValue()); });
return deserializerMap;
}
/**
* Gets the modifiedDateTime property value. When the schedule was last modified. Optional.
* @return a {@link OffsetDateTime}
*/
@jakarta.annotation.Nullable
public OffsetDateTime getModifiedDateTime() {
return this.backingStore.get("modifiedDateTime");
}
/**
* Gets the scheduleInfo property value. Represents the period of the access assignment or eligibility. The scheduleInfo can represent a single occurrence or multiple recurring instances. Required.
* @return a {@link RequestSchedule}
*/
@jakarta.annotation.Nullable
public RequestSchedule getScheduleInfo() {
return this.backingStore.get("scheduleInfo");
}
/**
* Gets the status property value. The status of the access assignment or eligibility request. The possible values are: Canceled, Denied, Failed, Granted, PendingAdminDecision, PendingApproval, PendingProvisioning, PendingScheduleCreation, Provisioned, Revoked, and ScheduleCreated. Not nullable. Optional.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getStatus() {
return this.backingStore.get("status");
}
/**
* 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.writeOffsetDateTimeValue("createdDateTime", this.getCreatedDateTime());
writer.writeStringValue("createdUsing", this.getCreatedUsing());
writer.writeOffsetDateTimeValue("modifiedDateTime", this.getModifiedDateTime());
writer.writeObjectValue("scheduleInfo", this.getScheduleInfo());
writer.writeStringValue("status", this.getStatus());
}
/**
* Sets the createdDateTime property value. When the schedule was created. Optional.
* @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 createdUsing property value. The identifier of the access assignment or eligibility request that created this schedule. Optional.
* @param value Value to set for the createdUsing property.
*/
public void setCreatedUsing(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("createdUsing", value);
}
/**
* Sets the modifiedDateTime property value. When the schedule was last modified. Optional.
* @param value Value to set for the modifiedDateTime property.
*/
public void setModifiedDateTime(@jakarta.annotation.Nullable final OffsetDateTime value) {
this.backingStore.set("modifiedDateTime", value);
}
/**
* Sets the scheduleInfo property value. Represents the period of the access assignment or eligibility. The scheduleInfo can represent a single occurrence or multiple recurring instances. Required.
* @param value Value to set for the scheduleInfo property.
*/
public void setScheduleInfo(@jakarta.annotation.Nullable final RequestSchedule value) {
this.backingStore.set("scheduleInfo", value);
}
/**
* Sets the status property value. The status of the access assignment or eligibility request. The possible values are: Canceled, Denied, Failed, Granted, PendingAdminDecision, PendingApproval, PendingProvisioning, PendingScheduleCreation, Provisioned, Revoked, and ScheduleCreated. Not nullable. Optional.
* @param value Value to set for the status property.
*/
public void setStatus(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("status", value);
}
}