// 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.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.customerinsights.models.DataSourcePrecedence;
import com.azure.resourcemanager.customerinsights.models.DataSourceType;
import com.azure.resourcemanager.customerinsights.models.EntityTypes;
import com.azure.resourcemanager.customerinsights.models.Participant;
import com.azure.resourcemanager.customerinsights.models.PropertyDefinition;
import com.azure.resourcemanager.customerinsights.models.ProvisioningStates;
import com.azure.resourcemanager.customerinsights.models.Status;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;

/** The interaction resource format. */
@Fluent
public final class InteractionResourceFormatInner extends ProxyResource {
    /*
     * The Interaction Type Definition
     */
    @JsonProperty(value = "properties")
    private InteractionTypeDefinition innerProperties;

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

    /**
     * Get the innerProperties property: The Interaction Type Definition.
     *
     * @return the innerProperties value.
     */
    private InteractionTypeDefinition innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the idPropertyNames property: The id property names. Properties which uniquely identify an interaction
     * instance.
     *
     * @return the idPropertyNames value.
     */
    public List<String> idPropertyNames() {
        return this.innerProperties() == null ? null : this.innerProperties().idPropertyNames();
    }

    /**
     * Set the idPropertyNames property: The id property names. Properties which uniquely identify an interaction
     * instance.
     *
     * @param idPropertyNames the idPropertyNames value to set.
     * @return the InteractionResourceFormatInner object itself.
     */
    public InteractionResourceFormatInner withIdPropertyNames(List<String> idPropertyNames) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InteractionTypeDefinition();
        }
        this.innerProperties().withIdPropertyNames(idPropertyNames);
        return this;
    }

    /**
     * Get the participantProfiles property: Profiles that participated in the interaction.
     *
     * @return the participantProfiles value.
     */
    public List<Participant> participantProfiles() {
        return this.innerProperties() == null ? null : this.innerProperties().participantProfiles();
    }

    /**
     * Set the participantProfiles property: Profiles that participated in the interaction.
     *
     * @param participantProfiles the participantProfiles value to set.
     * @return the InteractionResourceFormatInner object itself.
     */
    public InteractionResourceFormatInner withParticipantProfiles(List<Participant> participantProfiles) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InteractionTypeDefinition();
        }
        this.innerProperties().withParticipantProfiles(participantProfiles);
        return this;
    }

    /**
     * Get the primaryParticipantProfilePropertyName property: The primary participant property name for an interaction
     * ,This is used to logically represent the agent of the interaction, Specify the participant name here from
     * ParticipantName.
     *
     * @return the primaryParticipantProfilePropertyName value.
     */
    public String primaryParticipantProfilePropertyName() {
        return this.innerProperties() == null ? null : this.innerProperties().primaryParticipantProfilePropertyName();
    }

    /**
     * Set the primaryParticipantProfilePropertyName property: The primary participant property name for an interaction
     * ,This is used to logically represent the agent of the interaction, Specify the participant name here from
     * ParticipantName.
     *
     * @param primaryParticipantProfilePropertyName the primaryParticipantProfilePropertyName value to set.
     * @return the InteractionResourceFormatInner object itself.
     */
    public InteractionResourceFormatInner withPrimaryParticipantProfilePropertyName(
        String primaryParticipantProfilePropertyName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InteractionTypeDefinition();
        }
        this.innerProperties().withPrimaryParticipantProfilePropertyName(primaryParticipantProfilePropertyName);
        return this;
    }

    /**
     * Get the dataSourcePrecedenceRules property: This is specific to interactions modeled as activities. Data sources
     * are used to determine where data is stored and also in precedence rules.
     *
     * @return the dataSourcePrecedenceRules value.
     */
    public List<DataSourcePrecedence> dataSourcePrecedenceRules() {
        return this.innerProperties() == null ? null : this.innerProperties().dataSourcePrecedenceRules();
    }

    /**
     * Get the isActivity property: An interaction can be tagged as an activity only during create. This enables the
     * interaction to be editable and can enable merging of properties from multiple data sources based on precedence,
     * which is defined at a link level.
     *
     * @return the isActivity value.
     */
    public Boolean isActivity() {
        return this.innerProperties() == null ? null : this.innerProperties().isActivity();
    }

    /**
     * Set the isActivity property: An interaction can be tagged as an activity only during create. This enables the
     * interaction to be editable and can enable merging of properties from multiple data sources based on precedence,
     * which is defined at a link level.
     *
     * @param isActivity the isActivity value to set.
     * @return the InteractionResourceFormatInner object itself.
     */
    public InteractionResourceFormatInner withIsActivity(Boolean isActivity) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InteractionTypeDefinition();
        }
        this.innerProperties().withIsActivity(isActivity);
        return this;
    }

    /**
     * Get the name property: The data source name.
     *
     * @return the name value.
     */
    public String namePropertiesName() {
        return this.innerProperties() == null ? null : this.innerProperties().name();
    }

    /**
     * Get the dataSourceType property: The data source type.
     *
     * @return the dataSourceType value.
     */
    public DataSourceType dataSourceType() {
        return this.innerProperties() == null ? null : this.innerProperties().dataSourceType();
    }

    /**
     * Get the status property: The data source status.
     *
     * @return the status value.
     */
    public Status status() {
        return this.innerProperties() == null ? null : this.innerProperties().status();
    }

    /**
     * Get the id property: The data source ID.
     *
     * @return the id value.
     */
    public Integer idPropertiesId() {
        return this.innerProperties() == null ? null : this.innerProperties().id();
    }

    /**
     * Get the dataSourceReferenceId property: The data source reference id.
     *
     * @return the dataSourceReferenceId value.
     */
    public String dataSourceReferenceId() {
        return this.innerProperties() == null ? null : this.innerProperties().dataSourceReferenceId();
    }

    /**
     * Get the apiEntitySetName property: The api entity set name. This becomes the odata entity set name for the entity
     * Type being referred in this object.
     *
     * @return the apiEntitySetName value.
     */
    public String apiEntitySetName() {
        return this.innerProperties() == null ? null : this.innerProperties().apiEntitySetName();
    }

    /**
     * Set the apiEntitySetName property: The api entity set name. This becomes the odata entity set name for the entity
     * Type being referred in this object.
     *
     * @param apiEntitySetName the apiEntitySetName value to set.
     * @return the InteractionResourceFormatInner object itself.
     */
    public InteractionResourceFormatInner withApiEntitySetName(String apiEntitySetName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InteractionTypeDefinition();
        }
        this.innerProperties().withApiEntitySetName(apiEntitySetName);
        return this;
    }

    /**
     * Get the entityType property: Type of entity.
     *
     * @return the entityType value.
     */
    public EntityTypes entityType() {
        return this.innerProperties() == null ? null : this.innerProperties().entityType();
    }

    /**
     * Set the entityType property: Type of entity.
     *
     * @param entityType the entityType value to set.
     * @return the InteractionResourceFormatInner object itself.
     */
    public InteractionResourceFormatInner withEntityType(EntityTypes entityType) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InteractionTypeDefinition();
        }
        this.innerProperties().withEntityType(entityType);
        return this;
    }

    /**
     * Get the fields property: The properties of the Profile.
     *
     * @return the fields value.
     */
    public List<PropertyDefinition> fields() {
        return this.innerProperties() == null ? null : this.innerProperties().fields();
    }

    /**
     * Set the fields property: The properties of the Profile.
     *
     * @param fields the fields value to set.
     * @return the InteractionResourceFormatInner object itself.
     */
    public InteractionResourceFormatInner withFields(List<PropertyDefinition> fields) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InteractionTypeDefinition();
        }
        this.innerProperties().withFields(fields);
        return this;
    }

    /**
     * Get the instancesCount property: The instance count.
     *
     * @return the instancesCount value.
     */
    public Integer instancesCount() {
        return this.innerProperties() == null ? null : this.innerProperties().instancesCount();
    }

    /**
     * Set the instancesCount property: The instance count.
     *
     * @param instancesCount the instancesCount value to set.
     * @return the InteractionResourceFormatInner object itself.
     */
    public InteractionResourceFormatInner withInstancesCount(Integer instancesCount) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InteractionTypeDefinition();
        }
        this.innerProperties().withInstancesCount(instancesCount);
        return this;
    }

    /**
     * Get the lastChangedUtc property: The last changed time for the type definition.
     *
     * @return the lastChangedUtc value.
     */
    public OffsetDateTime lastChangedUtc() {
        return this.innerProperties() == null ? null : this.innerProperties().lastChangedUtc();
    }

    /**
     * Get the provisioningState property: Provisioning state.
     *
     * @return the provisioningState value.
     */
    public ProvisioningStates provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the schemaItemTypeLink property: The schema org link. This helps ACI identify and suggest semantic models.
     *
     * @return the schemaItemTypeLink value.
     */
    public String schemaItemTypeLink() {
        return this.innerProperties() == null ? null : this.innerProperties().schemaItemTypeLink();
    }

    /**
     * Set the schemaItemTypeLink property: The schema org link. This helps ACI identify and suggest semantic models.
     *
     * @param schemaItemTypeLink the schemaItemTypeLink value to set.
     * @return the InteractionResourceFormatInner object itself.
     */
    public InteractionResourceFormatInner withSchemaItemTypeLink(String schemaItemTypeLink) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InteractionTypeDefinition();
        }
        this.innerProperties().withSchemaItemTypeLink(schemaItemTypeLink);
        return this;
    }

    /**
     * Get the tenantId property: The hub name.
     *
     * @return the tenantId value.
     */
    public String tenantId() {
        return this.innerProperties() == null ? null : this.innerProperties().tenantId();
    }

    /**
     * Get the timestampFieldName property: The timestamp property name. Represents the time when the interaction or
     * profile update happened.
     *
     * @return the timestampFieldName value.
     */
    public String timestampFieldName() {
        return this.innerProperties() == null ? null : this.innerProperties().timestampFieldName();
    }

    /**
     * Set the timestampFieldName property: The timestamp property name. Represents the time when the interaction or
     * profile update happened.
     *
     * @param timestampFieldName the timestampFieldName value to set.
     * @return the InteractionResourceFormatInner object itself.
     */
    public InteractionResourceFormatInner withTimestampFieldName(String timestampFieldName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InteractionTypeDefinition();
        }
        this.innerProperties().withTimestampFieldName(timestampFieldName);
        return this;
    }

    /**
     * Get the typeName property: The name of the entity.
     *
     * @return the typeName value.
     */
    public String typeName() {
        return this.innerProperties() == null ? null : this.innerProperties().typeName();
    }

    /**
     * Set the typeName property: The name of the entity.
     *
     * @param typeName the typeName value to set.
     * @return the InteractionResourceFormatInner object itself.
     */
    public InteractionResourceFormatInner withTypeName(String typeName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InteractionTypeDefinition();
        }
        this.innerProperties().withTypeName(typeName);
        return this;
    }

    /**
     * Get the attributes property: The attributes for the Type.
     *
     * @return the attributes value.
     */
    public Map<String, List<String>> attributes() {
        return this.innerProperties() == null ? null : this.innerProperties().attributes();
    }

    /**
     * Set the attributes property: The attributes for the Type.
     *
     * @param attributes the attributes value to set.
     * @return the InteractionResourceFormatInner object itself.
     */
    public InteractionResourceFormatInner withAttributes(Map<String, List<String>> attributes) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InteractionTypeDefinition();
        }
        this.innerProperties().withAttributes(attributes);
        return this;
    }

    /**
     * Get the description property: Localized descriptions for the property.
     *
     * @return the description value.
     */
    public Map<String, String> description() {
        return this.innerProperties() == null ? null : this.innerProperties().description();
    }

    /**
     * Set the description property: Localized descriptions for the property.
     *
     * @param description the description value to set.
     * @return the InteractionResourceFormatInner object itself.
     */
    public InteractionResourceFormatInner withDescription(Map<String, String> description) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InteractionTypeDefinition();
        }
        this.innerProperties().withDescription(description);
        return this;
    }

    /**
     * Get the displayName property: Localized display names for the property.
     *
     * @return the displayName value.
     */
    public Map<String, String> displayName() {
        return this.innerProperties() == null ? null : this.innerProperties().displayName();
    }

    /**
     * Set the displayName property: Localized display names for the property.
     *
     * @param displayName the displayName value to set.
     * @return the InteractionResourceFormatInner object itself.
     */
    public InteractionResourceFormatInner withDisplayName(Map<String, String> displayName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InteractionTypeDefinition();
        }
        this.innerProperties().withDisplayName(displayName);
        return this;
    }

    /**
     * Get the localizedAttributes property: Any custom localized attributes for the Type.
     *
     * @return the localizedAttributes value.
     */
    public Map<String, Map<String, String>> localizedAttributes() {
        return this.innerProperties() == null ? null : this.innerProperties().localizedAttributes();
    }

    /**
     * Set the localizedAttributes property: Any custom localized attributes for the Type.
     *
     * @param localizedAttributes the localizedAttributes value to set.
     * @return the InteractionResourceFormatInner object itself.
     */
    public InteractionResourceFormatInner withLocalizedAttributes(
        Map<String, Map<String, String>> localizedAttributes) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InteractionTypeDefinition();
        }
        this.innerProperties().withLocalizedAttributes(localizedAttributes);
        return this;
    }

    /**
     * Get the smallImage property: Small Image associated with the Property or EntityType.
     *
     * @return the smallImage value.
     */
    public String smallImage() {
        return this.innerProperties() == null ? null : this.innerProperties().smallImage();
    }

    /**
     * Set the smallImage property: Small Image associated with the Property or EntityType.
     *
     * @param smallImage the smallImage value to set.
     * @return the InteractionResourceFormatInner object itself.
     */
    public InteractionResourceFormatInner withSmallImage(String smallImage) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InteractionTypeDefinition();
        }
        this.innerProperties().withSmallImage(smallImage);
        return this;
    }

    /**
     * Get the mediumImage property: Medium Image associated with the Property or EntityType.
     *
     * @return the mediumImage value.
     */
    public String mediumImage() {
        return this.innerProperties() == null ? null : this.innerProperties().mediumImage();
    }

    /**
     * Set the mediumImage property: Medium Image associated with the Property or EntityType.
     *
     * @param mediumImage the mediumImage value to set.
     * @return the InteractionResourceFormatInner object itself.
     */
    public InteractionResourceFormatInner withMediumImage(String mediumImage) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InteractionTypeDefinition();
        }
        this.innerProperties().withMediumImage(mediumImage);
        return this;
    }

    /**
     * Get the largeImage property: Large Image associated with the Property or EntityType.
     *
     * @return the largeImage value.
     */
    public String largeImage() {
        return this.innerProperties() == null ? null : this.innerProperties().largeImage();
    }

    /**
     * Set the largeImage property: Large Image associated with the Property or EntityType.
     *
     * @param largeImage the largeImage value to set.
     * @return the InteractionResourceFormatInner object itself.
     */
    public InteractionResourceFormatInner withLargeImage(String largeImage) {
        if (this.innerProperties() == null) {
            this.innerProperties = new InteractionTypeDefinition();
        }
        this.innerProperties().withLargeImage(largeImage);
        return this;
    }

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