// 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.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;

/** Property/Properties which represent a unique ID. */
@Fluent
public final class StrongId {
    /*
     * The properties which make up the unique ID.
     */
    @JsonProperty(value = "keyPropertyNames", required = true)
    private List<String> keyPropertyNames;

    /*
     * The Name identifying the strong ID.
     */
    @JsonProperty(value = "strongIdName", required = true)
    private String strongIdName;

    /*
     * Localized display name.
     */
    @JsonProperty(value = "displayName")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> displayName;

    /*
     * Localized descriptions.
     */
    @JsonProperty(value = "description")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> description;

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

    /**
     * Get the keyPropertyNames property: The properties which make up the unique ID.
     *
     * @return the keyPropertyNames value.
     */
    public List<String> keyPropertyNames() {
        return this.keyPropertyNames;
    }

    /**
     * Set the keyPropertyNames property: The properties which make up the unique ID.
     *
     * @param keyPropertyNames the keyPropertyNames value to set.
     * @return the StrongId object itself.
     */
    public StrongId withKeyPropertyNames(List<String> keyPropertyNames) {
        this.keyPropertyNames = keyPropertyNames;
        return this;
    }

    /**
     * Get the strongIdName property: The Name identifying the strong ID.
     *
     * @return the strongIdName value.
     */
    public String strongIdName() {
        return this.strongIdName;
    }

    /**
     * Set the strongIdName property: The Name identifying the strong ID.
     *
     * @param strongIdName the strongIdName value to set.
     * @return the StrongId object itself.
     */
    public StrongId withStrongIdName(String strongIdName) {
        this.strongIdName = strongIdName;
        return this;
    }

    /**
     * Get the displayName property: Localized display name.
     *
     * @return the displayName value.
     */
    public Map<String, String> displayName() {
        return this.displayName;
    }

    /**
     * Set the displayName property: Localized display name.
     *
     * @param displayName the displayName value to set.
     * @return the StrongId object itself.
     */
    public StrongId withDisplayName(Map<String, String> displayName) {
        this.displayName = displayName;
        return this;
    }

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

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

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (keyPropertyNames() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property keyPropertyNames in model StrongId"));
        }
        if (strongIdName() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException("Missing required property strongIdName in model StrongId"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(StrongId.class);
}
