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

package com.azure.resourcemanager.storageimportexport.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.storageimportexport.fluent.models.UpdateJobParametersProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Update Job parameters. */
@Fluent
public final class UpdateJobParameters {
    /*
     * Specifies the tags that will be assigned to the job
     */
    @JsonProperty(value = "tags")
    private Object tags;

    /*
     * Specifies the properties of a UpdateJob.
     */
    @JsonProperty(value = "properties")
    private UpdateJobParametersProperties innerProperties;

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

    /**
     * Get the tags property: Specifies the tags that will be assigned to the job.
     *
     * @return the tags value.
     */
    public Object tags() {
        return this.tags;
    }

    /**
     * Set the tags property: Specifies the tags that will be assigned to the job.
     *
     * @param tags the tags value to set.
     * @return the UpdateJobParameters object itself.
     */
    public UpdateJobParameters withTags(Object tags) {
        this.tags = tags;
        return this;
    }

    /**
     * Get the innerProperties property: Specifies the properties of a UpdateJob.
     *
     * @return the innerProperties value.
     */
    private UpdateJobParametersProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the cancelRequested property: If specified, the value must be true. The service will attempt to cancel the
     * job.
     *
     * @return the cancelRequested value.
     */
    public Boolean cancelRequested() {
        return this.innerProperties() == null ? null : this.innerProperties().cancelRequested();
    }

    /**
     * Set the cancelRequested property: If specified, the value must be true. The service will attempt to cancel the
     * job.
     *
     * @param cancelRequested the cancelRequested value to set.
     * @return the UpdateJobParameters object itself.
     */
    public UpdateJobParameters withCancelRequested(Boolean cancelRequested) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateJobParametersProperties();
        }
        this.innerProperties().withCancelRequested(cancelRequested);
        return this;
    }

    /**
     * Get the state property: If specified, the value must be Shipping, which tells the Import/Export service that the
     * package for the job has been shipped. The ReturnAddress and DeliveryPackage properties must have been set either
     * in this request or in a previous request, otherwise the request will fail.
     *
     * @return the state value.
     */
    public String state() {
        return this.innerProperties() == null ? null : this.innerProperties().state();
    }

    /**
     * Set the state property: If specified, the value must be Shipping, which tells the Import/Export service that the
     * package for the job has been shipped. The ReturnAddress and DeliveryPackage properties must have been set either
     * in this request or in a previous request, otherwise the request will fail.
     *
     * @param state the state value to set.
     * @return the UpdateJobParameters object itself.
     */
    public UpdateJobParameters withState(String state) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateJobParametersProperties();
        }
        this.innerProperties().withState(state);
        return this;
    }

    /**
     * Get the returnAddress property: Specifies the return address information for the job.
     *
     * @return the returnAddress value.
     */
    public ReturnAddress returnAddress() {
        return this.innerProperties() == null ? null : this.innerProperties().returnAddress();
    }

    /**
     * Set the returnAddress property: Specifies the return address information for the job.
     *
     * @param returnAddress the returnAddress value to set.
     * @return the UpdateJobParameters object itself.
     */
    public UpdateJobParameters withReturnAddress(ReturnAddress returnAddress) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateJobParametersProperties();
        }
        this.innerProperties().withReturnAddress(returnAddress);
        return this;
    }

    /**
     * Get the returnShipping property: Specifies the return carrier and customer's account with the carrier.
     *
     * @return the returnShipping value.
     */
    public ReturnShipping returnShipping() {
        return this.innerProperties() == null ? null : this.innerProperties().returnShipping();
    }

    /**
     * Set the returnShipping property: Specifies the return carrier and customer's account with the carrier.
     *
     * @param returnShipping the returnShipping value to set.
     * @return the UpdateJobParameters object itself.
     */
    public UpdateJobParameters withReturnShipping(ReturnShipping returnShipping) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateJobParametersProperties();
        }
        this.innerProperties().withReturnShipping(returnShipping);
        return this;
    }

    /**
     * Get the deliveryPackage property: Contains information about the package being shipped by the customer to the
     * Microsoft data center.
     *
     * @return the deliveryPackage value.
     */
    public DeliveryPackageInformation deliveryPackage() {
        return this.innerProperties() == null ? null : this.innerProperties().deliveryPackage();
    }

    /**
     * Set the deliveryPackage property: Contains information about the package being shipped by the customer to the
     * Microsoft data center.
     *
     * @param deliveryPackage the deliveryPackage value to set.
     * @return the UpdateJobParameters object itself.
     */
    public UpdateJobParameters withDeliveryPackage(DeliveryPackageInformation deliveryPackage) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateJobParametersProperties();
        }
        this.innerProperties().withDeliveryPackage(deliveryPackage);
        return this;
    }

    /**
     * Get the logLevel property: Indicates whether error logging or verbose logging is enabled.
     *
     * @return the logLevel value.
     */
    public String logLevel() {
        return this.innerProperties() == null ? null : this.innerProperties().logLevel();
    }

    /**
     * Set the logLevel property: Indicates whether error logging or verbose logging is enabled.
     *
     * @param logLevel the logLevel value to set.
     * @return the UpdateJobParameters object itself.
     */
    public UpdateJobParameters withLogLevel(String logLevel) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateJobParametersProperties();
        }
        this.innerProperties().withLogLevel(logLevel);
        return this;
    }

    /**
     * Get the backupDriveManifest property: Indicates whether the manifest files on the drives should be copied to
     * block blobs.
     *
     * @return the backupDriveManifest value.
     */
    public Boolean backupDriveManifest() {
        return this.innerProperties() == null ? null : this.innerProperties().backupDriveManifest();
    }

    /**
     * Set the backupDriveManifest property: Indicates whether the manifest files on the drives should be copied to
     * block blobs.
     *
     * @param backupDriveManifest the backupDriveManifest value to set.
     * @return the UpdateJobParameters object itself.
     */
    public UpdateJobParameters withBackupDriveManifest(Boolean backupDriveManifest) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateJobParametersProperties();
        }
        this.innerProperties().withBackupDriveManifest(backupDriveManifest);
        return this;
    }

    /**
     * Get the driveList property: List of drives that comprise the job.
     *
     * @return the driveList value.
     */
    public List<DriveStatus> driveList() {
        return this.innerProperties() == null ? null : this.innerProperties().driveList();
    }

    /**
     * Set the driveList property: List of drives that comprise the job.
     *
     * @param driveList the driveList value to set.
     * @return the UpdateJobParameters object itself.
     */
    public UpdateJobParameters withDriveList(List<DriveStatus> driveList) {
        if (this.innerProperties() == null) {
            this.innerProperties = new UpdateJobParametersProperties();
        }
        this.innerProperties().withDriveList(driveList);
        return this;
    }

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