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

package com.azure.resourcemanager.avs.models;

import com.azure.core.util.Context;
import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkSegmentInner;
import java.util.List;

/** An immutable client-side representation of WorkloadNetworkSegment. */
public interface WorkloadNetworkSegment {
    /**
     * 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 displayName property: Display name of the segment.
     *
     * @return the displayName value.
     */
    String displayName();

    /**
     * Gets the connectedGateway property: Gateway which to connect segment to.
     *
     * @return the connectedGateway value.
     */
    String connectedGateway();

    /**
     * Gets the subnet property: Subnet which to connect segment to.
     *
     * @return the subnet value.
     */
    WorkloadNetworkSegmentSubnet subnet();

    /**
     * Gets the portVif property: Port Vif which segment is associated with.
     *
     * @return the portVif value.
     */
    List<WorkloadNetworkSegmentPortVif> portVif();

    /**
     * Gets the status property: Segment status.
     *
     * @return the status value.
     */
    SegmentStatusEnum status();

    /**
     * Gets the provisioningState property: The provisioning state.
     *
     * @return the provisioningState value.
     */
    WorkloadNetworkSegmentProvisioningState provisioningState();

    /**
     * Gets the revision property: NSX revision number.
     *
     * @return the revision value.
     */
    Long revision();

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

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

    /** The entirety of the WorkloadNetworkSegment definition. */
    interface Definition
        extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
    }
    /** The WorkloadNetworkSegment definition stages. */
    interface DefinitionStages {
        /** The first stage of the WorkloadNetworkSegment definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the WorkloadNetworkSegment definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, privateCloudName.
             *
             * @param resourceGroupName The name of the resource group. The name is case insensitive.
             * @param privateCloudName Name of the private cloud.
             * @return the next definition stage.
             */
            WithCreate withExistingPrivateCloud(String resourceGroupName, String privateCloudName);
        }
        /**
         * The stage of the WorkloadNetworkSegment 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.WithDisplayName,
                DefinitionStages.WithConnectedGateway,
                DefinitionStages.WithSubnet,
                DefinitionStages.WithRevision {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            WorkloadNetworkSegment create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            WorkloadNetworkSegment create(Context context);
        }
        /** The stage of the WorkloadNetworkSegment definition allowing to specify displayName. */
        interface WithDisplayName {
            /**
             * Specifies the displayName property: Display name of the segment..
             *
             * @param displayName Display name of the segment.
             * @return the next definition stage.
             */
            WithCreate withDisplayName(String displayName);
        }
        /** The stage of the WorkloadNetworkSegment definition allowing to specify connectedGateway. */
        interface WithConnectedGateway {
            /**
             * Specifies the connectedGateway property: Gateway which to connect segment to..
             *
             * @param connectedGateway Gateway which to connect segment to.
             * @return the next definition stage.
             */
            WithCreate withConnectedGateway(String connectedGateway);
        }
        /** The stage of the WorkloadNetworkSegment definition allowing to specify subnet. */
        interface WithSubnet {
            /**
             * Specifies the subnet property: Subnet which to connect segment to..
             *
             * @param subnet Subnet which to connect segment to.
             * @return the next definition stage.
             */
            WithCreate withSubnet(WorkloadNetworkSegmentSubnet subnet);
        }
        /** The stage of the WorkloadNetworkSegment definition allowing to specify revision. */
        interface WithRevision {
            /**
             * Specifies the revision property: NSX revision number..
             *
             * @param revision NSX revision number.
             * @return the next definition stage.
             */
            WithCreate withRevision(Long revision);
        }
    }
    /**
     * Begins update for the WorkloadNetworkSegment resource.
     *
     * @return the stage of resource update.
     */
    WorkloadNetworkSegment.Update update();

    /** The template for WorkloadNetworkSegment update. */
    interface Update
        extends UpdateStages.WithDisplayName,
            UpdateStages.WithConnectedGateway,
            UpdateStages.WithSubnet,
            UpdateStages.WithRevision {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        WorkloadNetworkSegment apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        WorkloadNetworkSegment apply(Context context);
    }
    /** The WorkloadNetworkSegment update stages. */
    interface UpdateStages {
        /** The stage of the WorkloadNetworkSegment update allowing to specify displayName. */
        interface WithDisplayName {
            /**
             * Specifies the displayName property: Display name of the segment..
             *
             * @param displayName Display name of the segment.
             * @return the next definition stage.
             */
            Update withDisplayName(String displayName);
        }
        /** The stage of the WorkloadNetworkSegment update allowing to specify connectedGateway. */
        interface WithConnectedGateway {
            /**
             * Specifies the connectedGateway property: Gateway which to connect segment to..
             *
             * @param connectedGateway Gateway which to connect segment to.
             * @return the next definition stage.
             */
            Update withConnectedGateway(String connectedGateway);
        }
        /** The stage of the WorkloadNetworkSegment update allowing to specify subnet. */
        interface WithSubnet {
            /**
             * Specifies the subnet property: Subnet which to connect segment to..
             *
             * @param subnet Subnet which to connect segment to.
             * @return the next definition stage.
             */
            Update withSubnet(WorkloadNetworkSegmentSubnet subnet);
        }
        /** The stage of the WorkloadNetworkSegment update allowing to specify revision. */
        interface WithRevision {
            /**
             * Specifies the revision property: NSX revision number..
             *
             * @param revision NSX revision number.
             * @return the next definition stage.
             */
            Update withRevision(Long revision);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    WorkloadNetworkSegment refresh();

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