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

package com.azure.resourcemanager.recoveryservicessiterecovery.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Update migration item input properties. */
@Fluent
public final class UpdateMigrationItemInputProperties {
    /*
     * The provider specific input to update migration item.
     */
    @JsonProperty(value = "providerSpecificDetails", required = true)
    private UpdateMigrationItemProviderSpecificInput providerSpecificDetails;

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

    /**
     * Get the providerSpecificDetails property: The provider specific input to update migration item.
     *
     * @return the providerSpecificDetails value.
     */
    public UpdateMigrationItemProviderSpecificInput providerSpecificDetails() {
        return this.providerSpecificDetails;
    }

    /**
     * Set the providerSpecificDetails property: The provider specific input to update migration item.
     *
     * @param providerSpecificDetails the providerSpecificDetails value to set.
     * @return the UpdateMigrationItemInputProperties object itself.
     */
    public UpdateMigrationItemInputProperties withProviderSpecificDetails(
        UpdateMigrationItemProviderSpecificInput providerSpecificDetails) {
        this.providerSpecificDetails = providerSpecificDetails;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (providerSpecificDetails() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property providerSpecificDetails in model"
                            + " UpdateMigrationItemInputProperties"));
        } else {
            providerSpecificDetails().validate();
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(UpdateMigrationItemInputProperties.class);
}
