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

package com.azure.resourcemanager.customerinsights.models;

import com.azure.core.util.Context;
import com.azure.resourcemanager.customerinsights.fluent.models.LinkResourceFormatInner;
import java.util.List;
import java.util.Map;

/** An immutable client-side representation of LinkResourceFormat. */
public interface LinkResourceFormat {
    /**
     * 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 tenantId property: The hub name.
     *
     * @return the tenantId value.
     */
    String tenantId();

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

    /**
     * Gets the sourceEntityType property: Type of source entity.
     *
     * @return the sourceEntityType value.
     */
    EntityType sourceEntityType();

    /**
     * Gets the targetEntityType property: Type of target entity.
     *
     * @return the targetEntityType value.
     */
    EntityType targetEntityType();

    /**
     * Gets the sourceEntityTypeName property: Name of the source Entity Type.
     *
     * @return the sourceEntityTypeName value.
     */
    String sourceEntityTypeName();

    /**
     * Gets the targetEntityTypeName property: Name of the target Entity Type.
     *
     * @return the targetEntityTypeName value.
     */
    String targetEntityTypeName();

    /**
     * Gets the displayName property: Localized display name for the Link.
     *
     * @return the displayName value.
     */
    Map<String, String> displayName();

    /**
     * Gets the description property: Localized descriptions for the Link.
     *
     * @return the description value.
     */
    Map<String, String> description();

    /**
     * Gets the mappings property: The set of properties mappings between the source and target Types.
     *
     * @return the mappings value.
     */
    List<TypePropertiesMapping> mappings();

    /**
     * Gets the participantPropertyReferences property: The properties that represent the participating profile.
     *
     * @return the participantPropertyReferences value.
     */
    List<ParticipantPropertyReference> participantPropertyReferences();

    /**
     * Gets the provisioningState property: Provisioning state.
     *
     * @return the provisioningState value.
     */
    ProvisioningStates provisioningState();

    /**
     * Gets the referenceOnly property: Indicating whether the link is reference only link. This flag is ignored if the
     * Mappings are defined. If the mappings are not defined and it is set to true, links processing will not create or
     * update profiles.
     *
     * @return the referenceOnly value.
     */
    Boolean referenceOnly();

    /**
     * Gets the operationType property: Determines whether this link is supposed to create or delete instances if Link
     * is NOT Reference Only.
     *
     * @return the operationType value.
     */
    InstanceOperationType operationType();

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

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

    /** The entirety of the LinkResourceFormat definition. */
    interface Definition
        extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
    }
    /** The LinkResourceFormat definition stages. */
    interface DefinitionStages {
        /** The first stage of the LinkResourceFormat definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the LinkResourceFormat definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, hubName.
             *
             * @param resourceGroupName The name of the resource group.
             * @param hubName The name of the hub.
             * @return the next definition stage.
             */
            WithCreate withExistingHub(String resourceGroupName, String hubName);
        }
        /**
         * The stage of the LinkResourceFormat 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.WithSourceEntityType,
                DefinitionStages.WithTargetEntityType,
                DefinitionStages.WithSourceEntityTypeName,
                DefinitionStages.WithTargetEntityTypeName,
                DefinitionStages.WithDisplayName,
                DefinitionStages.WithDescription,
                DefinitionStages.WithMappings,
                DefinitionStages.WithParticipantPropertyReferences,
                DefinitionStages.WithReferenceOnly,
                DefinitionStages.WithOperationType {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            LinkResourceFormat create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            LinkResourceFormat create(Context context);
        }
        /** The stage of the LinkResourceFormat definition allowing to specify sourceEntityType. */
        interface WithSourceEntityType {
            /**
             * Specifies the sourceEntityType property: Type of source entity..
             *
             * @param sourceEntityType Type of source entity.
             * @return the next definition stage.
             */
            WithCreate withSourceEntityType(EntityType sourceEntityType);
        }
        /** The stage of the LinkResourceFormat definition allowing to specify targetEntityType. */
        interface WithTargetEntityType {
            /**
             * Specifies the targetEntityType property: Type of target entity..
             *
             * @param targetEntityType Type of target entity.
             * @return the next definition stage.
             */
            WithCreate withTargetEntityType(EntityType targetEntityType);
        }
        /** The stage of the LinkResourceFormat definition allowing to specify sourceEntityTypeName. */
        interface WithSourceEntityTypeName {
            /**
             * Specifies the sourceEntityTypeName property: Name of the source Entity Type..
             *
             * @param sourceEntityTypeName Name of the source Entity Type.
             * @return the next definition stage.
             */
            WithCreate withSourceEntityTypeName(String sourceEntityTypeName);
        }
        /** The stage of the LinkResourceFormat definition allowing to specify targetEntityTypeName. */
        interface WithTargetEntityTypeName {
            /**
             * Specifies the targetEntityTypeName property: Name of the target Entity Type..
             *
             * @param targetEntityTypeName Name of the target Entity Type.
             * @return the next definition stage.
             */
            WithCreate withTargetEntityTypeName(String targetEntityTypeName);
        }
        /** The stage of the LinkResourceFormat definition allowing to specify displayName. */
        interface WithDisplayName {
            /**
             * Specifies the displayName property: Localized display name for the Link..
             *
             * @param displayName Localized display name for the Link.
             * @return the next definition stage.
             */
            WithCreate withDisplayName(Map<String, String> displayName);
        }
        /** The stage of the LinkResourceFormat definition allowing to specify description. */
        interface WithDescription {
            /**
             * Specifies the description property: Localized descriptions for the Link..
             *
             * @param description Localized descriptions for the Link.
             * @return the next definition stage.
             */
            WithCreate withDescription(Map<String, String> description);
        }
        /** The stage of the LinkResourceFormat definition allowing to specify mappings. */
        interface WithMappings {
            /**
             * Specifies the mappings property: The set of properties mappings between the source and target Types..
             *
             * @param mappings The set of properties mappings between the source and target Types.
             * @return the next definition stage.
             */
            WithCreate withMappings(List<TypePropertiesMapping> mappings);
        }
        /** The stage of the LinkResourceFormat definition allowing to specify participantPropertyReferences. */
        interface WithParticipantPropertyReferences {
            /**
             * Specifies the participantPropertyReferences property: The properties that represent the participating
             * profile..
             *
             * @param participantPropertyReferences The properties that represent the participating profile.
             * @return the next definition stage.
             */
            WithCreate withParticipantPropertyReferences(
                List<ParticipantPropertyReference> participantPropertyReferences);
        }
        /** The stage of the LinkResourceFormat definition allowing to specify referenceOnly. */
        interface WithReferenceOnly {
            /**
             * Specifies the referenceOnly property: Indicating whether the link is reference only link. This flag is
             * ignored if the Mappings are defined. If the mappings are not defined and it is set to true, links
             * processing will not create or update profiles..
             *
             * @param referenceOnly Indicating whether the link is reference only link. This flag is ignored if the
             *     Mappings are defined. If the mappings are not defined and it is set to true, links processing will
             *     not create or update profiles.
             * @return the next definition stage.
             */
            WithCreate withReferenceOnly(Boolean referenceOnly);
        }
        /** The stage of the LinkResourceFormat definition allowing to specify operationType. */
        interface WithOperationType {
            /**
             * Specifies the operationType property: Determines whether this link is supposed to create or delete
             * instances if Link is NOT Reference Only..
             *
             * @param operationType Determines whether this link is supposed to create or delete instances if Link is
             *     NOT Reference Only.
             * @return the next definition stage.
             */
            WithCreate withOperationType(InstanceOperationType operationType);
        }
    }
    /**
     * Begins update for the LinkResourceFormat resource.
     *
     * @return the stage of resource update.
     */
    LinkResourceFormat.Update update();

    /** The template for LinkResourceFormat update. */
    interface Update
        extends UpdateStages.WithSourceEntityType,
            UpdateStages.WithTargetEntityType,
            UpdateStages.WithSourceEntityTypeName,
            UpdateStages.WithTargetEntityTypeName,
            UpdateStages.WithDisplayName,
            UpdateStages.WithDescription,
            UpdateStages.WithMappings,
            UpdateStages.WithParticipantPropertyReferences,
            UpdateStages.WithReferenceOnly,
            UpdateStages.WithOperationType {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        LinkResourceFormat apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        LinkResourceFormat apply(Context context);
    }
    /** The LinkResourceFormat update stages. */
    interface UpdateStages {
        /** The stage of the LinkResourceFormat update allowing to specify sourceEntityType. */
        interface WithSourceEntityType {
            /**
             * Specifies the sourceEntityType property: Type of source entity..
             *
             * @param sourceEntityType Type of source entity.
             * @return the next definition stage.
             */
            Update withSourceEntityType(EntityType sourceEntityType);
        }
        /** The stage of the LinkResourceFormat update allowing to specify targetEntityType. */
        interface WithTargetEntityType {
            /**
             * Specifies the targetEntityType property: Type of target entity..
             *
             * @param targetEntityType Type of target entity.
             * @return the next definition stage.
             */
            Update withTargetEntityType(EntityType targetEntityType);
        }
        /** The stage of the LinkResourceFormat update allowing to specify sourceEntityTypeName. */
        interface WithSourceEntityTypeName {
            /**
             * Specifies the sourceEntityTypeName property: Name of the source Entity Type..
             *
             * @param sourceEntityTypeName Name of the source Entity Type.
             * @return the next definition stage.
             */
            Update withSourceEntityTypeName(String sourceEntityTypeName);
        }
        /** The stage of the LinkResourceFormat update allowing to specify targetEntityTypeName. */
        interface WithTargetEntityTypeName {
            /**
             * Specifies the targetEntityTypeName property: Name of the target Entity Type..
             *
             * @param targetEntityTypeName Name of the target Entity Type.
             * @return the next definition stage.
             */
            Update withTargetEntityTypeName(String targetEntityTypeName);
        }
        /** The stage of the LinkResourceFormat update allowing to specify displayName. */
        interface WithDisplayName {
            /**
             * Specifies the displayName property: Localized display name for the Link..
             *
             * @param displayName Localized display name for the Link.
             * @return the next definition stage.
             */
            Update withDisplayName(Map<String, String> displayName);
        }
        /** The stage of the LinkResourceFormat update allowing to specify description. */
        interface WithDescription {
            /**
             * Specifies the description property: Localized descriptions for the Link..
             *
             * @param description Localized descriptions for the Link.
             * @return the next definition stage.
             */
            Update withDescription(Map<String, String> description);
        }
        /** The stage of the LinkResourceFormat update allowing to specify mappings. */
        interface WithMappings {
            /**
             * Specifies the mappings property: The set of properties mappings between the source and target Types..
             *
             * @param mappings The set of properties mappings between the source and target Types.
             * @return the next definition stage.
             */
            Update withMappings(List<TypePropertiesMapping> mappings);
        }
        /** The stage of the LinkResourceFormat update allowing to specify participantPropertyReferences. */
        interface WithParticipantPropertyReferences {
            /**
             * Specifies the participantPropertyReferences property: The properties that represent the participating
             * profile..
             *
             * @param participantPropertyReferences The properties that represent the participating profile.
             * @return the next definition stage.
             */
            Update withParticipantPropertyReferences(List<ParticipantPropertyReference> participantPropertyReferences);
        }
        /** The stage of the LinkResourceFormat update allowing to specify referenceOnly. */
        interface WithReferenceOnly {
            /**
             * Specifies the referenceOnly property: Indicating whether the link is reference only link. This flag is
             * ignored if the Mappings are defined. If the mappings are not defined and it is set to true, links
             * processing will not create or update profiles..
             *
             * @param referenceOnly Indicating whether the link is reference only link. This flag is ignored if the
             *     Mappings are defined. If the mappings are not defined and it is set to true, links processing will
             *     not create or update profiles.
             * @return the next definition stage.
             */
            Update withReferenceOnly(Boolean referenceOnly);
        }
        /** The stage of the LinkResourceFormat update allowing to specify operationType. */
        interface WithOperationType {
            /**
             * Specifies the operationType property: Determines whether this link is supposed to create or delete
             * instances if Link is NOT Reference Only..
             *
             * @param operationType Determines whether this link is supposed to create or delete instances if Link is
             *     NOT Reference Only.
             * @return the next definition stage.
             */
            Update withOperationType(InstanceOperationType operationType);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    LinkResourceFormat refresh();

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