// 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.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The definition of suggested relationship for the type. */
@Immutable
public final class RelationshipsLookup {
    /*
     * The relationship profile.
     */
    @JsonProperty(value = "profileName", access = JsonProperty.Access.WRITE_ONLY)
    private String profileName;

    /*
     * The property references for the profile type.
     */
    @JsonProperty(value = "profilePropertyReferences", access = JsonProperty.Access.WRITE_ONLY)
    private List<ParticipantProfilePropertyReference> profilePropertyReferences;

    /*
     * The related profile.
     */
    @JsonProperty(value = "relatedProfileName", access = JsonProperty.Access.WRITE_ONLY)
    private String relatedProfileName;

    /*
     * The property references for the related profile type.
     */
    @JsonProperty(value = "relatedProfilePropertyReferences", access = JsonProperty.Access.WRITE_ONLY)
    private List<ParticipantProfilePropertyReference> relatedProfilePropertyReferences;

    /*
     * The name of existing Relationship.
     */
    @JsonProperty(value = "existingRelationshipName", access = JsonProperty.Access.WRITE_ONLY)
    private String existingRelationshipName;

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

    /**
     * Get the profileName property: The relationship profile.
     *
     * @return the profileName value.
     */
    public String profileName() {
        return this.profileName;
    }

    /**
     * Get the profilePropertyReferences property: The property references for the profile type.
     *
     * @return the profilePropertyReferences value.
     */
    public List<ParticipantProfilePropertyReference> profilePropertyReferences() {
        return this.profilePropertyReferences;
    }

    /**
     * Get the relatedProfileName property: The related profile.
     *
     * @return the relatedProfileName value.
     */
    public String relatedProfileName() {
        return this.relatedProfileName;
    }

    /**
     * Get the relatedProfilePropertyReferences property: The property references for the related profile type.
     *
     * @return the relatedProfilePropertyReferences value.
     */
    public List<ParticipantProfilePropertyReference> relatedProfilePropertyReferences() {
        return this.relatedProfilePropertyReferences;
    }

    /**
     * Get the existingRelationshipName property: The name of existing Relationship.
     *
     * @return the existingRelationshipName value.
     */
    public String existingRelationshipName() {
        return this.existingRelationshipName;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (profilePropertyReferences() != null) {
            profilePropertyReferences().forEach(e -> e.validate());
        }
        if (relatedProfilePropertyReferences() != null) {
            relatedProfilePropertyReferences().forEach(e -> e.validate());
        }
    }
}
