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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.logic.models.ResourceReference;
import com.azure.resourcemanager.logic.models.WorkflowState;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The integration account properties. */
@Fluent
public final class IntegrationAccountProperties {
    /*
     * The integration service environment.
     */
    @JsonProperty(value = "integrationServiceEnvironment")
    private ResourceReference integrationServiceEnvironment;

    /*
     * The workflow state.
     */
    @JsonProperty(value = "state")
    private WorkflowState state;

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

    /**
     * Get the integrationServiceEnvironment property: The integration service environment.
     *
     * @return the integrationServiceEnvironment value.
     */
    public ResourceReference integrationServiceEnvironment() {
        return this.integrationServiceEnvironment;
    }

    /**
     * Set the integrationServiceEnvironment property: The integration service environment.
     *
     * @param integrationServiceEnvironment the integrationServiceEnvironment value to set.
     * @return the IntegrationAccountProperties object itself.
     */
    public IntegrationAccountProperties withIntegrationServiceEnvironment(
        ResourceReference integrationServiceEnvironment) {
        this.integrationServiceEnvironment = integrationServiceEnvironment;
        return this;
    }

    /**
     * Get the state property: The workflow state.
     *
     * @return the state value.
     */
    public WorkflowState state() {
        return this.state;
    }

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

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