// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.storagemover.fluent.models;

import com.azure.core.annotation.Immutable;
import com.azure.resourcemanager.storagemover.models.JobRunError;
import com.azure.resourcemanager.storagemover.models.JobRunScanStatus;
import com.azure.resourcemanager.storagemover.models.JobRunStatus;
import com.azure.resourcemanager.storagemover.models.ProvisioningState;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Job run properties. */
@Immutable
public final class JobRunProperties {
    /*
     * The state of the job execution.
     */
    @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
    private JobRunStatus status;

    /*
     * The status of Agent's scanning of source.
     */
    @JsonProperty(value = "scanStatus", access = JsonProperty.Access.WRITE_ONLY)
    private JobRunScanStatus scanStatus;

    /*
     * Name of the Agent assigned to this run.
     */
    @JsonProperty(value = "agentName", access = JsonProperty.Access.WRITE_ONLY)
    private String agentName;

    /*
     * Fully qualified resource id of the Agent assigned to this run.
     */
    @JsonProperty(value = "agentResourceId", access = JsonProperty.Access.WRITE_ONLY)
    private String agentResourceId;

    /*
     * Start time of the run. Null if no Agent reported that the job has started.
     */
    @JsonProperty(value = "executionStartTime", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime executionStartTime;

    /*
     * End time of the run. Null if Agent has not reported that the job has ended.
     */
    @JsonProperty(value = "executionEndTime", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime executionEndTime;

    /*
     * The last updated time of the Job Run.
     */
    @JsonProperty(value = "lastStatusUpdate", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime lastStatusUpdate;

    /*
     * Number of items scanned so far in source.
     */
    @JsonProperty(value = "itemsScanned", access = JsonProperty.Access.WRITE_ONLY)
    private Long itemsScanned;

    /*
     * Number of items that will not be transferred, as they are excluded by user configuration.
     */
    @JsonProperty(value = "itemsExcluded", access = JsonProperty.Access.WRITE_ONLY)
    private Long itemsExcluded;

    /*
     * Number of items that will not be transferred, as they are unsupported on target.
     */
    @JsonProperty(value = "itemsUnsupported", access = JsonProperty.Access.WRITE_ONLY)
    private Long itemsUnsupported;

    /*
     * Number of items that will not be transferred, as they are already found on target (e.g. mirror mode).
     */
    @JsonProperty(value = "itemsNoTransferNeeded", access = JsonProperty.Access.WRITE_ONLY)
    private Long itemsNoTransferNeeded;

    /*
     * Number of items that were attempted to transfer and failed.
     */
    @JsonProperty(value = "itemsFailed", access = JsonProperty.Access.WRITE_ONLY)
    private Long itemsFailed;

    /*
     * Number of items successfully transferred to target.
     */
    @JsonProperty(value = "itemsTransferred", access = JsonProperty.Access.WRITE_ONLY)
    private Long itemsTransferred;

    /*
     * Bytes of data scanned so far in source.
     */
    @JsonProperty(value = "bytesScanned", access = JsonProperty.Access.WRITE_ONLY)
    private Long bytesScanned;

    /*
     * Bytes of data that will not be transferred, as they are excluded by user configuration.
     */
    @JsonProperty(value = "bytesExcluded", access = JsonProperty.Access.WRITE_ONLY)
    private Long bytesExcluded;

    /*
     * Bytes of data that will not be transferred, as they are unsupported on target.
     */
    @JsonProperty(value = "bytesUnsupported", access = JsonProperty.Access.WRITE_ONLY)
    private Long bytesUnsupported;

    /*
     * Bytes of data that will not be transferred, as they are already found on target (e.g. mirror mode).
     */
    @JsonProperty(value = "bytesNoTransferNeeded", access = JsonProperty.Access.WRITE_ONLY)
    private Long bytesNoTransferNeeded;

    /*
     * Bytes of data that were attempted to transfer and failed.
     */
    @JsonProperty(value = "bytesFailed", access = JsonProperty.Access.WRITE_ONLY)
    private Long bytesFailed;

    /*
     * Bytes of data successfully transferred to target.
     */
    @JsonProperty(value = "bytesTransferred", access = JsonProperty.Access.WRITE_ONLY)
    private Long bytesTransferred;

    /*
     * Name of source Endpoint resource. This resource may no longer exist.
     */
    @JsonProperty(value = "sourceName", access = JsonProperty.Access.WRITE_ONLY)
    private String sourceName;

    /*
     * Fully qualified resource id of source Endpoint. This id may no longer exist.
     */
    @JsonProperty(value = "sourceResourceId", access = JsonProperty.Access.WRITE_ONLY)
    private String sourceResourceId;

    /*
     * Copy of source Endpoint resource's properties at time of Job Run creation.
     */
    @JsonProperty(value = "sourceProperties", access = JsonProperty.Access.WRITE_ONLY)
    private Object sourceProperties;

    /*
     * Name of target Endpoint resource. This resource may no longer exist.
     */
    @JsonProperty(value = "targetName", access = JsonProperty.Access.WRITE_ONLY)
    private String targetName;

    /*
     * Fully qualified resource id of of Endpoint. This id may no longer exist.
     */
    @JsonProperty(value = "targetResourceId", access = JsonProperty.Access.WRITE_ONLY)
    private String targetResourceId;

    /*
     * Copy of Endpoint resource's properties at time of Job Run creation.
     */
    @JsonProperty(value = "targetProperties", access = JsonProperty.Access.WRITE_ONLY)
    private Object targetProperties;

    /*
     * Copy of parent Job Definition's properties at time of Job Run creation.
     */
    @JsonProperty(value = "jobDefinitionProperties", access = JsonProperty.Access.WRITE_ONLY)
    private Object jobDefinitionProperties;

    /*
     * Error details.
     */
    @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY)
    private JobRunError error;

    /*
     * The provisioning state of this resource.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private ProvisioningState provisioningState;

    /** Creates an instance of JobRunProperties class. */
    public JobRunProperties() {
    }

    /**
     * Get the status property: The state of the job execution.
     *
     * @return the status value.
     */
    public JobRunStatus status() {
        return this.status;
    }

    /**
     * Get the scanStatus property: The status of Agent's scanning of source.
     *
     * @return the scanStatus value.
     */
    public JobRunScanStatus scanStatus() {
        return this.scanStatus;
    }

    /**
     * Get the agentName property: Name of the Agent assigned to this run.
     *
     * @return the agentName value.
     */
    public String agentName() {
        return this.agentName;
    }

    /**
     * Get the agentResourceId property: Fully qualified resource id of the Agent assigned to this run.
     *
     * @return the agentResourceId value.
     */
    public String agentResourceId() {
        return this.agentResourceId;
    }

    /**
     * Get the executionStartTime property: Start time of the run. Null if no Agent reported that the job has started.
     *
     * @return the executionStartTime value.
     */
    public OffsetDateTime executionStartTime() {
        return this.executionStartTime;
    }

    /**
     * Get the executionEndTime property: End time of the run. Null if Agent has not reported that the job has ended.
     *
     * @return the executionEndTime value.
     */
    public OffsetDateTime executionEndTime() {
        return this.executionEndTime;
    }

    /**
     * Get the lastStatusUpdate property: The last updated time of the Job Run.
     *
     * @return the lastStatusUpdate value.
     */
    public OffsetDateTime lastStatusUpdate() {
        return this.lastStatusUpdate;
    }

    /**
     * Get the itemsScanned property: Number of items scanned so far in source.
     *
     * @return the itemsScanned value.
     */
    public Long itemsScanned() {
        return this.itemsScanned;
    }

    /**
     * Get the itemsExcluded property: Number of items that will not be transferred, as they are excluded by user
     * configuration.
     *
     * @return the itemsExcluded value.
     */
    public Long itemsExcluded() {
        return this.itemsExcluded;
    }

    /**
     * Get the itemsUnsupported property: Number of items that will not be transferred, as they are unsupported on
     * target.
     *
     * @return the itemsUnsupported value.
     */
    public Long itemsUnsupported() {
        return this.itemsUnsupported;
    }

    /**
     * Get the itemsNoTransferNeeded property: Number of items that will not be transferred, as they are already found
     * on target (e.g. mirror mode).
     *
     * @return the itemsNoTransferNeeded value.
     */
    public Long itemsNoTransferNeeded() {
        return this.itemsNoTransferNeeded;
    }

    /**
     * Get the itemsFailed property: Number of items that were attempted to transfer and failed.
     *
     * @return the itemsFailed value.
     */
    public Long itemsFailed() {
        return this.itemsFailed;
    }

    /**
     * Get the itemsTransferred property: Number of items successfully transferred to target.
     *
     * @return the itemsTransferred value.
     */
    public Long itemsTransferred() {
        return this.itemsTransferred;
    }

    /**
     * Get the bytesScanned property: Bytes of data scanned so far in source.
     *
     * @return the bytesScanned value.
     */
    public Long bytesScanned() {
        return this.bytesScanned;
    }

    /**
     * Get the bytesExcluded property: Bytes of data that will not be transferred, as they are excluded by user
     * configuration.
     *
     * @return the bytesExcluded value.
     */
    public Long bytesExcluded() {
        return this.bytesExcluded;
    }

    /**
     * Get the bytesUnsupported property: Bytes of data that will not be transferred, as they are unsupported on target.
     *
     * @return the bytesUnsupported value.
     */
    public Long bytesUnsupported() {
        return this.bytesUnsupported;
    }

    /**
     * Get the bytesNoTransferNeeded property: Bytes of data that will not be transferred, as they are already found on
     * target (e.g. mirror mode).
     *
     * @return the bytesNoTransferNeeded value.
     */
    public Long bytesNoTransferNeeded() {
        return this.bytesNoTransferNeeded;
    }

    /**
     * Get the bytesFailed property: Bytes of data that were attempted to transfer and failed.
     *
     * @return the bytesFailed value.
     */
    public Long bytesFailed() {
        return this.bytesFailed;
    }

    /**
     * Get the bytesTransferred property: Bytes of data successfully transferred to target.
     *
     * @return the bytesTransferred value.
     */
    public Long bytesTransferred() {
        return this.bytesTransferred;
    }

    /**
     * Get the sourceName property: Name of source Endpoint resource. This resource may no longer exist.
     *
     * @return the sourceName value.
     */
    public String sourceName() {
        return this.sourceName;
    }

    /**
     * Get the sourceResourceId property: Fully qualified resource id of source Endpoint. This id may no longer exist.
     *
     * @return the sourceResourceId value.
     */
    public String sourceResourceId() {
        return this.sourceResourceId;
    }

    /**
     * Get the sourceProperties property: Copy of source Endpoint resource's properties at time of Job Run creation.
     *
     * @return the sourceProperties value.
     */
    public Object sourceProperties() {
        return this.sourceProperties;
    }

    /**
     * Get the targetName property: Name of target Endpoint resource. This resource may no longer exist.
     *
     * @return the targetName value.
     */
    public String targetName() {
        return this.targetName;
    }

    /**
     * Get the targetResourceId property: Fully qualified resource id of of Endpoint. This id may no longer exist.
     *
     * @return the targetResourceId value.
     */
    public String targetResourceId() {
        return this.targetResourceId;
    }

    /**
     * Get the targetProperties property: Copy of Endpoint resource's properties at time of Job Run creation.
     *
     * @return the targetProperties value.
     */
    public Object targetProperties() {
        return this.targetProperties;
    }

    /**
     * Get the jobDefinitionProperties property: Copy of parent Job Definition's properties at time of Job Run creation.
     *
     * @return the jobDefinitionProperties value.
     */
    public Object jobDefinitionProperties() {
        return this.jobDefinitionProperties;
    }

    /**
     * Get the error property: Error details.
     *
     * @return the error value.
     */
    public JobRunError error() {
        return this.error;
    }

    /**
     * Get the provisioningState property: The provisioning state of this resource.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.provisioningState;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (error() != null) {
            error().validate();
        }
    }
}
