Class DeviceShellScript

  • All Implemented Interfaces:
    com.github.davidmoten.odata.client.ODataEntityType, com.github.davidmoten.odata.client.ODataType

    public class DeviceShellScript
    extends Entity
    implements com.github.davidmoten.odata.client.ODataEntityType
    “Intune will provide customer the ability to run their Shell scripts on the enrolled Mac OS devices. The script can be run once or periodically.”
    • Field Detail

      • blockExecutionNotifications

        protected Boolean blockExecutionNotifications
      • description

        protected String description
      • displayName

        protected String displayName
      • executionFrequency

        protected Duration executionFrequency
      • fileName

        protected String fileName
      • retryCount

        protected Integer retryCount
      • roleScopeTagIds

        protected List<String> roleScopeTagIds
      • roleScopeTagIdsNextLink

        protected String roleScopeTagIdsNextLink
      • scriptContent

        protected byte[] scriptContent
    • Constructor Detail

      • DeviceShellScript

        protected DeviceShellScript()
    • Method Detail

      • odataTypeName

        public String odataTypeName()
        Specified by:
        odataTypeName in interface com.github.davidmoten.odata.client.ODataType
        Overrides:
        odataTypeName in class Entity
      • builderDeviceShellScript

        public static DeviceShellScript.Builder builderDeviceShellScript()
        Returns a builder which is used to create a new instance of this class (given that this class is immutable).
        Returns:
        a new Builder for this class
      • getChangedFields

        public com.github.davidmoten.odata.client.internal.ChangedFields getChangedFields()
        Specified by:
        getChangedFields in interface com.github.davidmoten.odata.client.ODataEntityType
        Overrides:
        getChangedFields in class Entity
      • postInject

        public void postInject​(boolean addKeysToContextPath)
        Specified by:
        postInject in interface com.github.davidmoten.odata.client.ODataType
        Overrides:
        postInject in class Entity
      • getBlockExecutionNotifications

        public Optional<Boolean> getBlockExecutionNotifications()
        “Does not notify the user a script is being executed”
        Returns:
        property blockExecutionNotifications
      • withBlockExecutionNotifications

        public DeviceShellScript withBlockExecutionNotifications​(Boolean blockExecutionNotifications)
        Returns an immutable copy of this with just the blockExecutionNotifications field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this.patch() is called (if available)on the returned object only the changed fields are submitted.

        “Does not notify the user a script is being executed”

        Parameters:
        blockExecutionNotifications - new value of blockExecutionNotifications field (as defined in service metadata)
        Returns:
        immutable copy of this with just the blockExecutionNotifications field changed
      • getCreatedDateTime

        public Optional<OffsetDateTime> getCreatedDateTime()
        “The date and time the device management script was created. This property is read-only.”

        Org.OData.Core.V1.Computed

        true

        Org.OData.Core.V1.Permissions

        Returns:
        property createdDateTime
      • withCreatedDateTime

        public DeviceShellScript withCreatedDateTime​(OffsetDateTime createdDateTime)
        Returns an immutable copy of this with just the createdDateTime field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this. patch() is called (if available)on the returned object only the changed fields are submitted.

        “The date and time the device management script was created. This property is read-only.”

        Org.OData.Core.V1.Computed

        true

        Org.OData.Core.V1.Permissions

        Parameters:
        createdDateTime - new value of createdDateTime field (as defined in service metadata)
        Returns:
        immutable copy of this with just the createdDateTime field changed
      • getDescription

        public Optional<String> getDescription()
        “Optional description for the device management script.”
        Returns:
        property description
      • withDescription

        public DeviceShellScript withDescription​(String description)
        Returns an immutable copy of this with just the description field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this. patch() is called (if available)on the returned object only the changed fields are submitted.

        “Optional description for the device management script.”

        Parameters:
        description - new value of description field (as defined in service metadata)
        Returns:
        immutable copy of this with just the description field changed
      • getDisplayName

        public Optional<String> getDisplayName()
        “Name of the device management script.”
        Returns:
        property displayName
      • withDisplayName

        public DeviceShellScript withDisplayName​(String displayName)
        Returns an immutable copy of this with just the displayName field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this. patch() is called (if available)on the returned object only the changed fields are submitted.

        “Name of the device management script.”

        Parameters:
        displayName - new value of displayName field (as defined in service metadata)
        Returns:
        immutable copy of this with just the displayName field changed
      • getExecutionFrequency

        public Optional<Duration> getExecutionFrequency()
        “The interval for script to run. If not defined the script will run once”
        Returns:
        property executionFrequency
      • withExecutionFrequency

        public DeviceShellScript withExecutionFrequency​(Duration executionFrequency)
        Returns an immutable copy of this with just the executionFrequency field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this.patch() is called (if available)on the returned object only the changed fields are submitted.

        “The interval for script to run. If not defined the script will run once”

        Parameters:
        executionFrequency - new value of executionFrequency field (as defined in service metadata)
        Returns:
        immutable copy of this with just the executionFrequency field changed
      • getFileName

        public Optional<String> getFileName()
        “Script file name.”
        Returns:
        property fileName
      • withFileName

        public DeviceShellScript withFileName​(String fileName)
        Returns an immutable copy of this with just the fileName field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this.patch() is called (if available)on the returned object only the changed fields are submitted.

        “Script file name.”

        Parameters:
        fileName - new value of fileName field (as defined in service metadata)
        Returns:
        immutable copy of this with just the fileName field changed
      • getLastModifiedDateTime

        public Optional<OffsetDateTime> getLastModifiedDateTime()
        “The date and time the device management script was last modified. This property is read-only.”

        Org.OData.Core.V1.Computed

        true

        Org.OData.Core.V1.Permissions

        Returns:
        property lastModifiedDateTime
      • withLastModifiedDateTime

        public DeviceShellScript withLastModifiedDateTime​(OffsetDateTime lastModifiedDateTime)
        Returns an immutable copy of this with just the lastModifiedDateTime field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this.patch() is called (if available)on the returned object only the changed fields are submitted.

        “The date and time the device management script was last modified. This property is read-only.”

        Org.OData.Core.V1.Computed

        true

        Org.OData.Core.V1.Permissions

        Parameters:
        lastModifiedDateTime - new value of lastModifiedDateTime field (as defined in service metadata)
        Returns:
        immutable copy of this with just the lastModifiedDateTime field changed
      • getRetryCount

        public Optional<Integer> getRetryCount()
        “Number of times for the script to be retried if it fails”
        Returns:
        property retryCount
      • withRetryCount

        public DeviceShellScript withRetryCount​(Integer retryCount)
        Returns an immutable copy of this with just the retryCount field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this.patch() is called (if available)on the returned object only the changed fields are submitted.

        “Number of times for the script to be retried if it fails”

        Parameters:
        retryCount - new value of retryCount field (as defined in service metadata)
        Returns:
        immutable copy of this with just the retryCount field changed
      • getRoleScopeTagIds

        public com.github.davidmoten.odata.client.CollectionPage<String> getRoleScopeTagIds()
        “List of Scope Tag IDs for this PowerShellScript instance.”
        Returns:
        property roleScopeTagIds
      • withRoleScopeTagIds

        public DeviceShellScript withRoleScopeTagIds​(List<String> roleScopeTagIds)
        Returns an immutable copy of this with just the roleScopeTagIds field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this. patch() is called (if available)on the returned object only the changed fields are submitted.

        “List of Scope Tag IDs for this PowerShellScript instance.”

        Parameters:
        roleScopeTagIds - new value of roleScopeTagIds field (as defined in service metadata)
        Returns:
        immutable copy of this with just the roleScopeTagIds field changed
      • getRoleScopeTagIds

        public com.github.davidmoten.odata.client.CollectionPage<String> getRoleScopeTagIds​(com.github.davidmoten.odata.client.HttpRequestOptions options)
        “List of Scope Tag IDs for this PowerShellScript instance.”
        Parameters:
        options - specify connect and read timeouts
        Returns:
        property roleScopeTagIds
      • getRunAsAccount

        public Optional<RunAsAccountType> getRunAsAccount()
        “Indicates the type of execution context.”
        Returns:
        property runAsAccount
      • withRunAsAccount

        public DeviceShellScript withRunAsAccount​(RunAsAccountType runAsAccount)
        Returns an immutable copy of this with just the runAsAccount field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this. patch() is called (if available)on the returned object only the changed fields are submitted.

        “Indicates the type of execution context.”

        Parameters:
        runAsAccount - new value of runAsAccount field (as defined in service metadata)
        Returns:
        immutable copy of this with just the runAsAccount field changed
      • getScriptContent

        public Optional<byte[]> getScriptContent()
        “The script content.”
        Returns:
        property scriptContent
      • withScriptContent

        public DeviceShellScript withScriptContent​(byte[] scriptContent)
        Returns an immutable copy of this with just the scriptContent field changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that when this. patch() is called (if available)on the returned object only the changed fields are submitted.

        “The script content.”

        Parameters:
        scriptContent - new value of scriptContent field (as defined in service metadata)
        Returns:
        immutable copy of this with just the scriptContent field changed
      • getUnmappedFields

        public com.github.davidmoten.odata.client.UnmappedFields getUnmappedFields()
        Specified by:
        getUnmappedFields in interface com.github.davidmoten.odata.client.ODataType
        Overrides:
        getUnmappedFields in class Entity
      • patch

        public DeviceShellScript patch()
        Submits only changed fields for update and returns an immutable copy of this with changed fields reset.
        Overrides:
        patch in class Entity
        Returns:
        a copy of this with changed fields reset
        Throws:
        com.github.davidmoten.odata.client.ClientException - if HTTP response is not as expected
      • put

        public DeviceShellScript put()
        Submits all fields for update and returns an immutable copy of this with changed fields reset (they were ignored anyway).
        Overrides:
        put in class Entity
        Returns:
        a copy of this with changed fields reset
        Throws:
        com.github.davidmoten.odata.client.ClientException - if HTTP response is not as expected