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

package com.azure.resourcemanager.healthcareapis.models;

import com.azure.core.management.Region;
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.healthcareapis.fluent.models.IotFhirDestinationInner;

/** An immutable client-side representation of IotFhirDestination. */
public interface IotFhirDestination {
    /**
     * 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 etag property: An etag associated with the resource, used for optimistic concurrency when editing it.
     *
     * @return the etag value.
     */
    String etag();

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

    /**
     * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
     *
     * @return the systemData value.
     */
    SystemData systemData();

    /**
     * Gets the resourceIdentityResolutionType property: Determines how resource identity is resolved on the
     * destination.
     *
     * @return the resourceIdentityResolutionType value.
     */
    IotIdentityResolutionType resourceIdentityResolutionType();

    /**
     * Gets the fhirServiceResourceId property: Fully qualified resource id of the FHIR service to connect to.
     *
     * @return the fhirServiceResourceId value.
     */
    String fhirServiceResourceId();

    /**
     * Gets the fhirMapping property: FHIR Mappings.
     *
     * @return the fhirMapping value.
     */
    IotMappingProperties fhirMapping();

    /**
     * Gets the region of the resource.
     *
     * @return the region of the resource.
     */
    Region region();

    /**
     * Gets the name of the resource region.
     *
     * @return the name of the resource region.
     */
    String regionName();

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

    /** The entirety of the IotFhirDestination definition. */
    interface Definition
        extends DefinitionStages.Blank,
            DefinitionStages.WithParentResource,
            DefinitionStages.WithResourceIdentityResolutionType,
            DefinitionStages.WithFhirServiceResourceId,
            DefinitionStages.WithFhirMapping,
            DefinitionStages.WithCreate {
    }
    /** The IotFhirDestination definition stages. */
    interface DefinitionStages {
        /** The first stage of the IotFhirDestination definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the IotFhirDestination definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, workspaceName, iotConnectorName.
             *
             * @param resourceGroupName The name of the resource group that contains the service instance.
             * @param workspaceName The name of workspace resource.
             * @param iotConnectorName The name of IoT Connector resource.
             * @return the next definition stage.
             */
            WithResourceIdentityResolutionType withExistingIotconnector(
                String resourceGroupName, String workspaceName, String iotConnectorName);
        }
        /** The stage of the IotFhirDestination definition allowing to specify resourceIdentityResolutionType. */
        interface WithResourceIdentityResolutionType {
            /**
             * Specifies the resourceIdentityResolutionType property: Determines how resource identity is resolved on
             * the destination..
             *
             * @param resourceIdentityResolutionType Determines how resource identity is resolved on the destination.
             * @return the next definition stage.
             */
            WithFhirServiceResourceId withResourceIdentityResolutionType(
                IotIdentityResolutionType resourceIdentityResolutionType);
        }
        /** The stage of the IotFhirDestination definition allowing to specify fhirServiceResourceId. */
        interface WithFhirServiceResourceId {
            /**
             * Specifies the fhirServiceResourceId property: Fully qualified resource id of the FHIR service to connect
             * to..
             *
             * @param fhirServiceResourceId Fully qualified resource id of the FHIR service to connect to.
             * @return the next definition stage.
             */
            WithFhirMapping withFhirServiceResourceId(String fhirServiceResourceId);
        }
        /** The stage of the IotFhirDestination definition allowing to specify fhirMapping. */
        interface WithFhirMapping {
            /**
             * Specifies the fhirMapping property: FHIR Mappings.
             *
             * @param fhirMapping FHIR Mappings.
             * @return the next definition stage.
             */
            WithCreate withFhirMapping(IotMappingProperties fhirMapping);
        }
        /**
         * The stage of the IotFhirDestination 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.WithLocation, DefinitionStages.WithEtag {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            IotFhirDestination create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            IotFhirDestination create(Context context);
        }
        /** The stage of the IotFhirDestination definition allowing to specify location. */
        interface WithLocation {
            /**
             * Specifies the region for the resource.
             *
             * @param location The resource location.
             * @return the next definition stage.
             */
            WithCreate withRegion(Region location);

            /**
             * Specifies the region for the resource.
             *
             * @param location The resource location.
             * @return the next definition stage.
             */
            WithCreate withRegion(String location);
        }
        /** The stage of the IotFhirDestination definition allowing to specify etag. */
        interface WithEtag {
            /**
             * Specifies the etag property: An etag associated with the resource, used for optimistic concurrency when
             * editing it..
             *
             * @param etag An etag associated with the resource, used for optimistic concurrency when editing it.
             * @return the next definition stage.
             */
            WithCreate withEtag(String etag);
        }
    }
    /**
     * Begins update for the IotFhirDestination resource.
     *
     * @return the stage of resource update.
     */
    IotFhirDestination.Update update();

    /** The template for IotFhirDestination update. */
    interface Update
        extends UpdateStages.WithEtag,
            UpdateStages.WithResourceIdentityResolutionType,
            UpdateStages.WithFhirServiceResourceId,
            UpdateStages.WithFhirMapping {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        IotFhirDestination apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        IotFhirDestination apply(Context context);
    }
    /** The IotFhirDestination update stages. */
    interface UpdateStages {
        /** The stage of the IotFhirDestination update allowing to specify etag. */
        interface WithEtag {
            /**
             * Specifies the etag property: An etag associated with the resource, used for optimistic concurrency when
             * editing it..
             *
             * @param etag An etag associated with the resource, used for optimistic concurrency when editing it.
             * @return the next definition stage.
             */
            Update withEtag(String etag);
        }
        /** The stage of the IotFhirDestination update allowing to specify resourceIdentityResolutionType. */
        interface WithResourceIdentityResolutionType {
            /**
             * Specifies the resourceIdentityResolutionType property: Determines how resource identity is resolved on
             * the destination..
             *
             * @param resourceIdentityResolutionType Determines how resource identity is resolved on the destination.
             * @return the next definition stage.
             */
            Update withResourceIdentityResolutionType(IotIdentityResolutionType resourceIdentityResolutionType);
        }
        /** The stage of the IotFhirDestination update allowing to specify fhirServiceResourceId. */
        interface WithFhirServiceResourceId {
            /**
             * Specifies the fhirServiceResourceId property: Fully qualified resource id of the FHIR service to connect
             * to..
             *
             * @param fhirServiceResourceId Fully qualified resource id of the FHIR service to connect to.
             * @return the next definition stage.
             */
            Update withFhirServiceResourceId(String fhirServiceResourceId);
        }
        /** The stage of the IotFhirDestination update allowing to specify fhirMapping. */
        interface WithFhirMapping {
            /**
             * Specifies the fhirMapping property: FHIR Mappings.
             *
             * @param fhirMapping FHIR Mappings.
             * @return the next definition stage.
             */
            Update withFhirMapping(IotMappingProperties fhirMapping);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    IotFhirDestination refresh();

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