com.microsoft.graph.beta.generated.models.UnifiedRoleScheduleInstanceBase Maven / Gradle / Ivy
package com.microsoft.graph.beta.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 UnifiedRoleScheduleInstanceBase extends Entity implements Parsable {
/**
* Instantiates a new {@link UnifiedRoleScheduleInstanceBase} and sets the default values.
*/
public UnifiedRoleScheduleInstanceBase() {
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 UnifiedRoleScheduleInstanceBase}
*/
@jakarta.annotation.Nonnull
public static UnifiedRoleScheduleInstanceBase 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.unifiedRoleAssignmentScheduleInstance": return new UnifiedRoleAssignmentScheduleInstance();
case "#microsoft.graph.unifiedRoleEligibilityScheduleInstance": return new UnifiedRoleEligibilityScheduleInstance();
}
}
return new UnifiedRoleScheduleInstanceBase();
}
/**
* Gets the appScope property value. Read-only property with details of the app-specific scope when the assignment or role eligibility is scoped to an app. Nullable.
* @return a {@link AppScope}
*/
@jakarta.annotation.Nullable
public AppScope getAppScope() {
return this.backingStore.get("appScope");
}
/**
* Gets the appScopeId property value. Identifier of the app-specific scope when the assignment or role eligibility is scoped to an app. The scope of an assignment or role eligibility determines the set of resources for which the principal has been granted access. App scopes are scopes that are defined and understood by this application only. Use / for tenant-wide app scopes. Use directoryScopeId to limit the scope to particular directory objects, for example, administrative units.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getAppScopeId() {
return this.backingStore.get("appScopeId");
}
/**
* Gets the directoryScope property value. The directory object that is the scope of the assignment or role eligibility. Read-only.
* @return a {@link DirectoryObject}
*/
@jakarta.annotation.Nullable
public DirectoryObject getDirectoryScope() {
return this.backingStore.get("directoryScope");
}
/**
* Gets the directoryScopeId property value. Identifier of the directory object representing the scope of the assignment or role eligibility. The scope of an assignment or role eligibility determines the set of resources for which the principal has been granted access. Directory scopes are shared scopes stored in the directory that are understood by multiple applications. Use / for tenant-wide scope. Use appScopeId to limit the scope to an application only.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getDirectoryScopeId() {
return this.backingStore.get("directoryScopeId");
}
/**
* 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("appScope", (n) -> { this.setAppScope(n.getObjectValue(AppScope::createFromDiscriminatorValue)); });
deserializerMap.put("appScopeId", (n) -> { this.setAppScopeId(n.getStringValue()); });
deserializerMap.put("directoryScope", (n) -> { this.setDirectoryScope(n.getObjectValue(DirectoryObject::createFromDiscriminatorValue)); });
deserializerMap.put("directoryScopeId", (n) -> { this.setDirectoryScopeId(n.getStringValue()); });
deserializerMap.put("principal", (n) -> { this.setPrincipal(n.getObjectValue(DirectoryObject::createFromDiscriminatorValue)); });
deserializerMap.put("principalId", (n) -> { this.setPrincipalId(n.getStringValue()); });
deserializerMap.put("roleDefinition", (n) -> { this.setRoleDefinition(n.getObjectValue(UnifiedRoleDefinition::createFromDiscriminatorValue)); });
deserializerMap.put("roleDefinitionId", (n) -> { this.setRoleDefinitionId(n.getStringValue()); });
return deserializerMap;
}
/**
* Gets the principal property value. The principal that's getting a role assignment or role eligibility through the request.
* @return a {@link DirectoryObject}
*/
@jakarta.annotation.Nullable
public DirectoryObject getPrincipal() {
return this.backingStore.get("principal");
}
/**
* Gets the principalId property value. Identifier of the principal that has been granted the role assignment or that's eligible for a role.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getPrincipalId() {
return this.backingStore.get("principalId");
}
/**
* Gets the roleDefinition property value. Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property.
* @return a {@link UnifiedRoleDefinition}
*/
@jakarta.annotation.Nullable
public UnifiedRoleDefinition getRoleDefinition() {
return this.backingStore.get("roleDefinition");
}
/**
* Gets the roleDefinitionId property value. Identifier of the unifiedRoleDefinition object that is being assigned to the principal or that the principal is eligible for.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getRoleDefinitionId() {
return this.backingStore.get("roleDefinitionId");
}
/**
* 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.writeObjectValue("appScope", this.getAppScope());
writer.writeStringValue("appScopeId", this.getAppScopeId());
writer.writeObjectValue("directoryScope", this.getDirectoryScope());
writer.writeStringValue("directoryScopeId", this.getDirectoryScopeId());
writer.writeObjectValue("principal", this.getPrincipal());
writer.writeStringValue("principalId", this.getPrincipalId());
writer.writeObjectValue("roleDefinition", this.getRoleDefinition());
writer.writeStringValue("roleDefinitionId", this.getRoleDefinitionId());
}
/**
* Sets the appScope property value. Read-only property with details of the app-specific scope when the assignment or role eligibility is scoped to an app. Nullable.
* @param value Value to set for the appScope property.
*/
public void setAppScope(@jakarta.annotation.Nullable final AppScope value) {
this.backingStore.set("appScope", value);
}
/**
* Sets the appScopeId property value. Identifier of the app-specific scope when the assignment or role eligibility is scoped to an app. The scope of an assignment or role eligibility determines the set of resources for which the principal has been granted access. App scopes are scopes that are defined and understood by this application only. Use / for tenant-wide app scopes. Use directoryScopeId to limit the scope to particular directory objects, for example, administrative units.
* @param value Value to set for the appScopeId property.
*/
public void setAppScopeId(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("appScopeId", value);
}
/**
* Sets the directoryScope property value. The directory object that is the scope of the assignment or role eligibility. Read-only.
* @param value Value to set for the directoryScope property.
*/
public void setDirectoryScope(@jakarta.annotation.Nullable final DirectoryObject value) {
this.backingStore.set("directoryScope", value);
}
/**
* Sets the directoryScopeId property value. Identifier of the directory object representing the scope of the assignment or role eligibility. The scope of an assignment or role eligibility determines the set of resources for which the principal has been granted access. Directory scopes are shared scopes stored in the directory that are understood by multiple applications. Use / for tenant-wide scope. Use appScopeId to limit the scope to an application only.
* @param value Value to set for the directoryScopeId property.
*/
public void setDirectoryScopeId(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("directoryScopeId", value);
}
/**
* Sets the principal property value. The principal that's getting a role assignment or role eligibility through the request.
* @param value Value to set for the principal property.
*/
public void setPrincipal(@jakarta.annotation.Nullable final DirectoryObject value) {
this.backingStore.set("principal", value);
}
/**
* Sets the principalId property value. Identifier of the principal that has been granted the role assignment or that's eligible for a role.
* @param value Value to set for the principalId property.
*/
public void setPrincipalId(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("principalId", value);
}
/**
* Sets the roleDefinition property value. Detailed information for the roleDefinition object that is referenced through the roleDefinitionId property.
* @param value Value to set for the roleDefinition property.
*/
public void setRoleDefinition(@jakarta.annotation.Nullable final UnifiedRoleDefinition value) {
this.backingStore.set("roleDefinition", value);
}
/**
* Sets the roleDefinitionId property value. Identifier of the unifiedRoleDefinition object that is being assigned to the principal or that the principal is eligible for.
* @param value Value to set for the roleDefinitionId property.
*/
public void setRoleDefinitionId(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("roleDefinitionId", value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy