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

package com.azure.resourcemanager.mobilenetwork.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The installation state of the packet core. */
@Fluent
public final class Installation {
    /*
     * Installation state
     */
    @JsonProperty(value = "state")
    private InstallationState state;

    /*
     * A reference to an in-progress installation operation
     */
    @JsonProperty(value = "operation")
    private AsyncOperationId operation;

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

    /**
     * Get the state property: Installation state.
     *
     * @return the state value.
     */
    public InstallationState state() {
        return this.state;
    }

    /**
     * Set the state property: Installation state.
     *
     * @param state the state value to set.
     * @return the Installation object itself.
     */
    public Installation withState(InstallationState state) {
        this.state = state;
        return this;
    }

    /**
     * Get the operation property: A reference to an in-progress installation operation.
     *
     * @return the operation value.
     */
    public AsyncOperationId operation() {
        return this.operation;
    }

    /**
     * Set the operation property: A reference to an in-progress installation operation.
     *
     * @param operation the operation value to set.
     * @return the Installation object itself.
     */
    public Installation withOperation(AsyncOperationId operation) {
        this.operation = operation;
        return this;
    }

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