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

package com.azure.resourcemanager.storagepool.models;

import com.azure.core.util.Context;
import com.azure.resourcemanager.storagepool.fluent.models.IscsiTargetInner;
import java.util.List;

/** An immutable client-side representation of IscsiTarget. */
public interface IscsiTarget {
    /**
     * Gets the id property: Fully qualified resource Id for the resource.
     *
     * @return the id value.
     */
    String id();

    /**
     * Gets the name property: The name of the resource.
     *
     * @return the name value.
     */
    String name();

    /**
     * Gets the type property: The type of the resource.
     *
     * @return the type value.
     */
    String type();

    /**
     * Gets the systemData property: Resource metadata required by ARM RPC.
     *
     * @return the systemData value.
     */
    SystemMetadata systemData();

    /**
     * Gets the managedBy property: Azure resource id. Indicates if this resource is managed by another Azure resource.
     *
     * @return the managedBy value.
     */
    String managedBy();

    /**
     * Gets the managedByExtended property: List of Azure resource ids that manage this resource.
     *
     * @return the managedByExtended value.
     */
    List<String> managedByExtended();

    /**
     * Gets the aclMode property: Mode for Target connectivity.
     *
     * @return the aclMode value.
     */
    IscsiTargetAclMode aclMode();

    /**
     * Gets the staticAcls property: Access Control List (ACL) for an iSCSI Target; defines LUN masking policy.
     *
     * @return the staticAcls value.
     */
    List<Acl> staticAcls();

    /**
     * Gets the luns property: List of LUNs to be exposed through iSCSI Target.
     *
     * @return the luns value.
     */
    List<IscsiLun> luns();

    /**
     * Gets the targetIqn property: iSCSI Target IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:server".
     *
     * @return the targetIqn value.
     */
    String targetIqn();

    /**
     * Gets the provisioningState property: State of the operation on the resource.
     *
     * @return the provisioningState value.
     */
    ProvisioningStates provisioningState();

    /**
     * Gets the status property: Operational status of the iSCSI Target.
     *
     * @return the status value.
     */
    OperationalStatus status();

    /**
     * Gets the endpoints property: List of private IPv4 addresses to connect to the iSCSI Target.
     *
     * @return the endpoints value.
     */
    List<String> endpoints();

    /**
     * Gets the port property: The port used by iSCSI Target portal group.
     *
     * @return the port value.
     */
    Integer port();

    /**
     * Gets the sessions property: List of identifiers for active sessions on the iSCSI target.
     *
     * @return the sessions value.
     */
    List<String> sessions();

    /**
     * Gets the name of the resource group.
     *
     * @return the name of the resource group.
     */
    String resourceGroupName();

    /**
     * Gets the inner com.azure.resourcemanager.storagepool.fluent.models.IscsiTargetInner object.
     *
     * @return the inner object.
     */
    IscsiTargetInner innerModel();

    /** The entirety of the IscsiTarget definition. */
    interface Definition
        extends DefinitionStages.Blank,
            DefinitionStages.WithParentResource,
            DefinitionStages.WithAclMode,
            DefinitionStages.WithCreate {
    }
    /** The IscsiTarget definition stages. */
    interface DefinitionStages {
        /** The first stage of the IscsiTarget definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the IscsiTarget definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, diskPoolName.
             *
             * @param resourceGroupName The name of the resource group. The name is case insensitive.
             * @param diskPoolName The name of the Disk Pool.
             * @return the next definition stage.
             */
            WithAclMode withExistingDiskPool(String resourceGroupName, String diskPoolName);
        }
        /** The stage of the IscsiTarget definition allowing to specify aclMode. */
        interface WithAclMode {
            /**
             * Specifies the aclMode property: Mode for Target connectivity..
             *
             * @param aclMode Mode for Target connectivity.
             * @return the next definition stage.
             */
            WithCreate withAclMode(IscsiTargetAclMode aclMode);
        }
        /**
         * The stage of the IscsiTarget definition which contains all the minimum required properties for the resource
         * to be created, but also allows for any other optional properties to be specified.
         */
        interface WithCreate
            extends DefinitionStages.WithManagedBy,
                DefinitionStages.WithManagedByExtended,
                DefinitionStages.WithTargetIqn,
                DefinitionStages.WithStaticAcls,
                DefinitionStages.WithLuns {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            IscsiTarget create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            IscsiTarget create(Context context);
        }
        /** The stage of the IscsiTarget definition allowing to specify managedBy. */
        interface WithManagedBy {
            /**
             * Specifies the managedBy property: Azure resource id. Indicates if this resource is managed by another
             * Azure resource..
             *
             * @param managedBy Azure resource id. Indicates if this resource is managed by another Azure resource.
             * @return the next definition stage.
             */
            WithCreate withManagedBy(String managedBy);
        }
        /** The stage of the IscsiTarget definition allowing to specify managedByExtended. */
        interface WithManagedByExtended {
            /**
             * Specifies the managedByExtended property: List of Azure resource ids that manage this resource..
             *
             * @param managedByExtended List of Azure resource ids that manage this resource.
             * @return the next definition stage.
             */
            WithCreate withManagedByExtended(List<String> managedByExtended);
        }
        /** The stage of the IscsiTarget definition allowing to specify targetIqn. */
        interface WithTargetIqn {
            /**
             * Specifies the targetIqn property: iSCSI Target IQN (iSCSI Qualified Name); example:
             * "iqn.2005-03.org.iscsi:server"..
             *
             * @param targetIqn iSCSI Target IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:server".
             * @return the next definition stage.
             */
            WithCreate withTargetIqn(String targetIqn);
        }
        /** The stage of the IscsiTarget definition allowing to specify staticAcls. */
        interface WithStaticAcls {
            /**
             * Specifies the staticAcls property: Access Control List (ACL) for an iSCSI Target; defines LUN masking
             * policy.
             *
             * @param staticAcls Access Control List (ACL) for an iSCSI Target; defines LUN masking policy.
             * @return the next definition stage.
             */
            WithCreate withStaticAcls(List<Acl> staticAcls);
        }
        /** The stage of the IscsiTarget definition allowing to specify luns. */
        interface WithLuns {
            /**
             * Specifies the luns property: List of LUNs to be exposed through iSCSI Target..
             *
             * @param luns List of LUNs to be exposed through iSCSI Target.
             * @return the next definition stage.
             */
            WithCreate withLuns(List<IscsiLun> luns);
        }
    }
    /**
     * Begins update for the IscsiTarget resource.
     *
     * @return the stage of resource update.
     */
    IscsiTarget.Update update();

    /** The template for IscsiTarget update. */
    interface Update
        extends UpdateStages.WithManagedBy,
            UpdateStages.WithManagedByExtended,
            UpdateStages.WithStaticAcls,
            UpdateStages.WithLuns {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        IscsiTarget apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        IscsiTarget apply(Context context);
    }
    /** The IscsiTarget update stages. */
    interface UpdateStages {
        /** The stage of the IscsiTarget update allowing to specify managedBy. */
        interface WithManagedBy {
            /**
             * Specifies the managedBy property: Azure resource id. Indicates if this resource is managed by another
             * Azure resource..
             *
             * @param managedBy Azure resource id. Indicates if this resource is managed by another Azure resource.
             * @return the next definition stage.
             */
            Update withManagedBy(String managedBy);
        }
        /** The stage of the IscsiTarget update allowing to specify managedByExtended. */
        interface WithManagedByExtended {
            /**
             * Specifies the managedByExtended property: List of Azure resource ids that manage this resource..
             *
             * @param managedByExtended List of Azure resource ids that manage this resource.
             * @return the next definition stage.
             */
            Update withManagedByExtended(List<String> managedByExtended);
        }
        /** The stage of the IscsiTarget update allowing to specify staticAcls. */
        interface WithStaticAcls {
            /**
             * Specifies the staticAcls property: Access Control List (ACL) for an iSCSI Target; defines LUN masking
             * policy.
             *
             * @param staticAcls Access Control List (ACL) for an iSCSI Target; defines LUN masking policy.
             * @return the next definition stage.
             */
            Update withStaticAcls(List<Acl> staticAcls);
        }
        /** The stage of the IscsiTarget update allowing to specify luns. */
        interface WithLuns {
            /**
             * Specifies the luns property: List of LUNs to be exposed through iSCSI Target..
             *
             * @param luns List of LUNs to be exposed through iSCSI Target.
             * @return the next definition stage.
             */
            Update withLuns(List<IscsiLun> luns);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    IscsiTarget refresh();

    /**
     * Refreshes the resource to sync with Azure.
     *
     * @param context The context to associate with this operation.
     * @return the refreshed resource.
     */
    IscsiTarget refresh(Context context);
}
