com.microsoft.graph.beta.generated.models.DeviceManagementScript 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.time.OffsetDateTime;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/**
* Intune will provide customer the ability to run their Powershell scripts on the enrolled windows 10 Azure Active Directory joined devices. The script can be run once or periodically.
*/
@jakarta.annotation.Generated("com.microsoft.kiota")
public class DeviceManagementScript extends Entity implements Parsable {
/**
* Instantiates a new {@link DeviceManagementScript} and sets the default values.
*/
public DeviceManagementScript() {
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 DeviceManagementScript}
*/
@jakarta.annotation.Nonnull
public static DeviceManagementScript createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new DeviceManagementScript();
}
/**
* Gets the assignments property value. The list of group assignments for the device management script.
* @return a {@link java.util.List}
*/
@jakarta.annotation.Nullable
public java.util.List getAssignments() {
return this.backingStore.get("assignments");
}
/**
* Gets the createdDateTime property value. The date and time the device management script was created. This property is read-only.
* @return a {@link OffsetDateTime}
*/
@jakarta.annotation.Nullable
public OffsetDateTime getCreatedDateTime() {
return this.backingStore.get("createdDateTime");
}
/**
* Gets the description property value. Optional description for the device management script.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getDescription() {
return this.backingStore.get("description");
}
/**
* Gets the deviceRunStates property value. List of run states for this script across all devices.
* @return a {@link java.util.List}
*/
@jakarta.annotation.Nullable
public java.util.List getDeviceRunStates() {
return this.backingStore.get("deviceRunStates");
}
/**
* Gets the displayName property value. Name of the device management script.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getDisplayName() {
return this.backingStore.get("displayName");
}
/**
* Gets the enforceSignatureCheck property value. Indicate whether the script signature needs be checked.
* @return a {@link Boolean}
*/
@jakarta.annotation.Nullable
public Boolean getEnforceSignatureCheck() {
return this.backingStore.get("enforceSignatureCheck");
}
/**
* 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("assignments", (n) -> { this.setAssignments(n.getCollectionOfObjectValues(DeviceManagementScriptAssignment::createFromDiscriminatorValue)); });
deserializerMap.put("createdDateTime", (n) -> { this.setCreatedDateTime(n.getOffsetDateTimeValue()); });
deserializerMap.put("description", (n) -> { this.setDescription(n.getStringValue()); });
deserializerMap.put("deviceRunStates", (n) -> { this.setDeviceRunStates(n.getCollectionOfObjectValues(DeviceManagementScriptDeviceState::createFromDiscriminatorValue)); });
deserializerMap.put("displayName", (n) -> { this.setDisplayName(n.getStringValue()); });
deserializerMap.put("enforceSignatureCheck", (n) -> { this.setEnforceSignatureCheck(n.getBooleanValue()); });
deserializerMap.put("fileName", (n) -> { this.setFileName(n.getStringValue()); });
deserializerMap.put("groupAssignments", (n) -> { this.setGroupAssignments(n.getCollectionOfObjectValues(DeviceManagementScriptGroupAssignment::createFromDiscriminatorValue)); });
deserializerMap.put("lastModifiedDateTime", (n) -> { this.setLastModifiedDateTime(n.getOffsetDateTimeValue()); });
deserializerMap.put("roleScopeTagIds", (n) -> { this.setRoleScopeTagIds(n.getCollectionOfPrimitiveValues(String.class)); });
deserializerMap.put("runAs32Bit", (n) -> { this.setRunAs32Bit(n.getBooleanValue()); });
deserializerMap.put("runAsAccount", (n) -> { this.setRunAsAccount(n.getEnumValue(RunAsAccountType::forValue)); });
deserializerMap.put("runSummary", (n) -> { this.setRunSummary(n.getObjectValue(DeviceManagementScriptRunSummary::createFromDiscriminatorValue)); });
deserializerMap.put("scriptContent", (n) -> { this.setScriptContent(n.getByteArrayValue()); });
deserializerMap.put("userRunStates", (n) -> { this.setUserRunStates(n.getCollectionOfObjectValues(DeviceManagementScriptUserState::createFromDiscriminatorValue)); });
return deserializerMap;
}
/**
* Gets the fileName property value. Script file name.
* @return a {@link String}
*/
@jakarta.annotation.Nullable
public String getFileName() {
return this.backingStore.get("fileName");
}
/**
* Gets the groupAssignments property value. The list of group assignments for the device management script.
* @return a {@link java.util.List}
*/
@jakarta.annotation.Nullable
public java.util.List getGroupAssignments() {
return this.backingStore.get("groupAssignments");
}
/**
* Gets the lastModifiedDateTime property value. The date and time the device management script was last modified. This property is read-only.
* @return a {@link OffsetDateTime}
*/
@jakarta.annotation.Nullable
public OffsetDateTime getLastModifiedDateTime() {
return this.backingStore.get("lastModifiedDateTime");
}
/**
* Gets the roleScopeTagIds property value. List of Scope Tag IDs for this PowerShellScript instance.
* @return a {@link java.util.List}
*/
@jakarta.annotation.Nullable
public java.util.List getRoleScopeTagIds() {
return this.backingStore.get("roleScopeTagIds");
}
/**
* Gets the runAs32Bit property value. A value indicating whether the PowerShell script should run as 32-bit
* @return a {@link Boolean}
*/
@jakarta.annotation.Nullable
public Boolean getRunAs32Bit() {
return this.backingStore.get("runAs32Bit");
}
/**
* Gets the runAsAccount property value. Indicates the type of execution context the app runs in.
* @return a {@link RunAsAccountType}
*/
@jakarta.annotation.Nullable
public RunAsAccountType getRunAsAccount() {
return this.backingStore.get("runAsAccount");
}
/**
* Gets the runSummary property value. Run summary for device management script.
* @return a {@link DeviceManagementScriptRunSummary}
*/
@jakarta.annotation.Nullable
public DeviceManagementScriptRunSummary getRunSummary() {
return this.backingStore.get("runSummary");
}
/**
* Gets the scriptContent property value. The script content.
* @return a {@link byte[]}
*/
@jakarta.annotation.Nullable
public byte[] getScriptContent() {
return this.backingStore.get("scriptContent");
}
/**
* Gets the userRunStates property value. List of run states for this script across all users.
* @return a {@link java.util.List}
*/
@jakarta.annotation.Nullable
public java.util.List getUserRunStates() {
return this.backingStore.get("userRunStates");
}
/**
* 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("assignments", this.getAssignments());
writer.writeStringValue("description", this.getDescription());
writer.writeCollectionOfObjectValues("deviceRunStates", this.getDeviceRunStates());
writer.writeStringValue("displayName", this.getDisplayName());
writer.writeBooleanValue("enforceSignatureCheck", this.getEnforceSignatureCheck());
writer.writeStringValue("fileName", this.getFileName());
writer.writeCollectionOfObjectValues("groupAssignments", this.getGroupAssignments());
writer.writeCollectionOfPrimitiveValues("roleScopeTagIds", this.getRoleScopeTagIds());
writer.writeBooleanValue("runAs32Bit", this.getRunAs32Bit());
writer.writeEnumValue("runAsAccount", this.getRunAsAccount());
writer.writeObjectValue("runSummary", this.getRunSummary());
writer.writeByteArrayValue("scriptContent", this.getScriptContent());
writer.writeCollectionOfObjectValues("userRunStates", this.getUserRunStates());
}
/**
* Sets the assignments property value. The list of group assignments for the device management script.
* @param value Value to set for the assignments property.
*/
public void setAssignments(@jakarta.annotation.Nullable final java.util.List value) {
this.backingStore.set("assignments", value);
}
/**
* Sets the createdDateTime property value. The date and time the device management script was created. This property is read-only.
* @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 description property value. Optional description for the device management script.
* @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 deviceRunStates property value. List of run states for this script across all devices.
* @param value Value to set for the deviceRunStates property.
*/
public void setDeviceRunStates(@jakarta.annotation.Nullable final java.util.List value) {
this.backingStore.set("deviceRunStates", value);
}
/**
* Sets the displayName property value. Name of the device management script.
* @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 enforceSignatureCheck property value. Indicate whether the script signature needs be checked.
* @param value Value to set for the enforceSignatureCheck property.
*/
public void setEnforceSignatureCheck(@jakarta.annotation.Nullable final Boolean value) {
this.backingStore.set("enforceSignatureCheck", value);
}
/**
* Sets the fileName property value. Script file name.
* @param value Value to set for the fileName property.
*/
public void setFileName(@jakarta.annotation.Nullable final String value) {
this.backingStore.set("fileName", value);
}
/**
* Sets the groupAssignments property value. The list of group assignments for the device management script.
* @param value Value to set for the groupAssignments property.
*/
public void setGroupAssignments(@jakarta.annotation.Nullable final java.util.List value) {
this.backingStore.set("groupAssignments", value);
}
/**
* Sets the lastModifiedDateTime property value. The date and time the device management script was last modified. This property is read-only.
* @param value Value to set for the lastModifiedDateTime property.
*/
public void setLastModifiedDateTime(@jakarta.annotation.Nullable final OffsetDateTime value) {
this.backingStore.set("lastModifiedDateTime", value);
}
/**
* Sets the roleScopeTagIds property value. List of Scope Tag IDs for this PowerShellScript instance.
* @param value Value to set for the roleScopeTagIds property.
*/
public void setRoleScopeTagIds(@jakarta.annotation.Nullable final java.util.List value) {
this.backingStore.set("roleScopeTagIds", value);
}
/**
* Sets the runAs32Bit property value. A value indicating whether the PowerShell script should run as 32-bit
* @param value Value to set for the runAs32Bit property.
*/
public void setRunAs32Bit(@jakarta.annotation.Nullable final Boolean value) {
this.backingStore.set("runAs32Bit", value);
}
/**
* Sets the runAsAccount property value. Indicates the type of execution context the app runs in.
* @param value Value to set for the runAsAccount property.
*/
public void setRunAsAccount(@jakarta.annotation.Nullable final RunAsAccountType value) {
this.backingStore.set("runAsAccount", value);
}
/**
* Sets the runSummary property value. Run summary for device management script.
* @param value Value to set for the runSummary property.
*/
public void setRunSummary(@jakarta.annotation.Nullable final DeviceManagementScriptRunSummary value) {
this.backingStore.set("runSummary", value);
}
/**
* Sets the scriptContent property value. The script content.
* @param value Value to set for the scriptContent property.
*/
public void setScriptContent(@jakarta.annotation.Nullable final byte[] value) {
this.backingStore.set("scriptContent", value);
}
/**
* Sets the userRunStates property value. List of run states for this script across all users.
* @param value Value to set for the userRunStates property.
*/
public void setUserRunStates(@jakarta.annotation.Nullable final java.util.List value) {
this.backingStore.set("userRunStates", value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy