Class DeviceManagementScriptDeviceState

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

    public class DeviceManagementScriptDeviceState
    extends Entity
    implements com.github.davidmoten.odata.client.ODataEntityType
    “Contains properties for device run state of the device management script.”
    • Field Detail

      • errorCode

        protected Integer errorCode
      • errorDescription

        protected String errorDescription
      • lastStateUpdateDateTime

        protected OffsetDateTime lastStateUpdateDateTime
      • resultMessage

        protected String resultMessage
    • Constructor Detail

      • DeviceManagementScriptDeviceState

        protected DeviceManagementScriptDeviceState()
    • Method Detail

      • odataTypeName

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

        public static DeviceManagementScriptDeviceState.Builder builderDeviceManagementScriptDeviceState()
        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
      • getErrorCode

        public Optional<Integer> getErrorCode()
        “Error code corresponding to erroneous execution of the device management script.”
        Returns:
        property errorCode
      • withErrorCode

        public DeviceManagementScriptDeviceState withErrorCode​(Integer errorCode)
        Returns an immutable copy of this with just the errorCode 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.

        “Error code corresponding to erroneous execution of the device management script.”

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

        public Optional<String> getErrorDescription()
        “Error description corresponding to erroneous execution of the device management script.”
        Returns:
        property errorDescription
      • withErrorDescription

        public DeviceManagementScriptDeviceState withErrorDescription​(String errorDescription)
        Returns an immutable copy of this with just the errorDescription 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.

        “Error description corresponding to erroneous execution of the device management script.”

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

        public Optional<OffsetDateTime> getLastStateUpdateDateTime()
        “Latest time the device management script executes.”
        Returns:
        property lastStateUpdateDateTime
      • withLastStateUpdateDateTime

        public DeviceManagementScriptDeviceState withLastStateUpdateDateTime​(OffsetDateTime lastStateUpdateDateTime)
        Returns an immutable copy of this with just the lastStateUpdateDateTime 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.

        “Latest time the device management script executes.”

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

        public Optional<String> getResultMessage()
        “Details of execution output.”
        Returns:
        property resultMessage
      • withResultMessage

        public DeviceManagementScriptDeviceState withResultMessage​(String resultMessage)
        Returns an immutable copy of this with just the resultMessage 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.

        “Details of execution output.”

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

        public Optional<RunState> getRunState()
        “State of latest run of the device management script.”
        Returns:
        property runState
      • withRunState

        public DeviceManagementScriptDeviceState withRunState​(RunState runState)
        Returns an immutable copy of this with just the runState 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.

        “State of latest run of the device management script.”

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

        public ManagedDeviceRequest getManagedDevice()
        “The managed devices that executes the device management script.”
        Returns:
        navigational property managedDevice
      • 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 DeviceManagementScriptDeviceState 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 DeviceManagementScriptDeviceState 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