// 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.ParticipantProfilePropertyReference;
import com.azure.resourcemanager.customerinsights.models.ProvisioningStates;
import com.azure.resourcemanager.customerinsights.models.RelationshipLinkFieldMapping;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;

/** The relationship link resource format. */
@Fluent
public final class RelationshipLinkResourceFormatInner extends ProxyResource {
    /*
     * The definition of relationship link.
     */
    @JsonProperty(value = "properties")
    private RelationshipLinkDefinition innerProperties;

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

    /**
     * Get the innerProperties property: The definition of relationship link.
     *
     * @return the innerProperties value.
     */
    private RelationshipLinkDefinition innerProperties() {
        return this.innerProperties;
    }

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

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

    /**
     * Get the description property: Localized descriptions for the Relationship Link.
     *
     * @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 Relationship Link.
     *
     * @param description the description value to set.
     * @return the RelationshipLinkResourceFormatInner object itself.
     */
    public RelationshipLinkResourceFormatInner withDescription(Map<String, String> description) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RelationshipLinkDefinition();
        }
        this.innerProperties().withDescription(description);
        return this;
    }

    /**
     * Get the interactionType property: The InteractionType associated with the Relationship Link.
     *
     * @return the interactionType value.
     */
    public String interactionType() {
        return this.innerProperties() == null ? null : this.innerProperties().interactionType();
    }

    /**
     * Set the interactionType property: The InteractionType associated with the Relationship Link.
     *
     * @param interactionType the interactionType value to set.
     * @return the RelationshipLinkResourceFormatInner object itself.
     */
    public RelationshipLinkResourceFormatInner withInteractionType(String interactionType) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RelationshipLinkDefinition();
        }
        this.innerProperties().withInteractionType(interactionType);
        return this;
    }

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

    /**
     * Get the mappings property: The mappings between Interaction and Relationship fields.
     *
     * @return the mappings value.
     */
    public List<RelationshipLinkFieldMapping> mappings() {
        return this.innerProperties() == null ? null : this.innerProperties().mappings();
    }

    /**
     * Set the mappings property: The mappings between Interaction and Relationship fields.
     *
     * @param mappings the mappings value to set.
     * @return the RelationshipLinkResourceFormatInner object itself.
     */
    public RelationshipLinkResourceFormatInner withMappings(List<RelationshipLinkFieldMapping> mappings) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RelationshipLinkDefinition();
        }
        this.innerProperties().withMappings(mappings);
        return this;
    }

    /**
     * Get the profilePropertyReferences property: The property references for the Profile of the Relationship.
     *
     * @return the profilePropertyReferences value.
     */
    public List<ParticipantProfilePropertyReference> profilePropertyReferences() {
        return this.innerProperties() == null ? null : this.innerProperties().profilePropertyReferences();
    }

    /**
     * Set the profilePropertyReferences property: The property references for the Profile of the Relationship.
     *
     * @param profilePropertyReferences the profilePropertyReferences value to set.
     * @return the RelationshipLinkResourceFormatInner object itself.
     */
    public RelationshipLinkResourceFormatInner withProfilePropertyReferences(
        List<ParticipantProfilePropertyReference> profilePropertyReferences) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RelationshipLinkDefinition();
        }
        this.innerProperties().withProfilePropertyReferences(profilePropertyReferences);
        return this;
    }

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

    /**
     * Get the relatedProfilePropertyReferences property: The property references for the Related Profile of the
     * Relationship.
     *
     * @return the relatedProfilePropertyReferences value.
     */
    public List<ParticipantProfilePropertyReference> relatedProfilePropertyReferences() {
        return this.innerProperties() == null ? null : this.innerProperties().relatedProfilePropertyReferences();
    }

    /**
     * Set the relatedProfilePropertyReferences property: The property references for the Related Profile of the
     * Relationship.
     *
     * @param relatedProfilePropertyReferences the relatedProfilePropertyReferences value to set.
     * @return the RelationshipLinkResourceFormatInner object itself.
     */
    public RelationshipLinkResourceFormatInner withRelatedProfilePropertyReferences(
        List<ParticipantProfilePropertyReference> relatedProfilePropertyReferences) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RelationshipLinkDefinition();
        }
        this.innerProperties().withRelatedProfilePropertyReferences(relatedProfilePropertyReferences);
        return this;
    }

    /**
     * Get the relationshipName property: The Relationship associated with the Link.
     *
     * @return the relationshipName value.
     */
    public String relationshipName() {
        return this.innerProperties() == null ? null : this.innerProperties().relationshipName();
    }

    /**
     * Set the relationshipName property: The Relationship associated with the Link.
     *
     * @param relationshipName the relationshipName value to set.
     * @return the RelationshipLinkResourceFormatInner object itself.
     */
    public RelationshipLinkResourceFormatInner withRelationshipName(String relationshipName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RelationshipLinkDefinition();
        }
        this.innerProperties().withRelationshipName(relationshipName);
        return this;
    }

    /**
     * Get the relationshipGuidId property: The relationship guid id.
     *
     * @return the relationshipGuidId value.
     */
    public String relationshipGuidId() {
        return this.innerProperties() == null ? null : this.innerProperties().relationshipGuidId();
    }

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

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