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

package com.azure.resourcemanager.orbital.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Contact Profile third-party partner configuration. */
@Fluent
public final class ContactProfileThirdPartyConfiguration {
    /*
     * Name of the third-party provider.
     */
    @JsonProperty(value = "providerName", required = true)
    private String providerName;

    /*
     * Name of string referencing the configuration describing contact set-up for a particular mission. Expected values
     * are those which have been created in collaboration with the partner network.
     */
    @JsonProperty(value = "missionConfiguration", required = true)
    private String missionConfiguration;

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

    /**
     * Get the providerName property: Name of the third-party provider.
     *
     * @return the providerName value.
     */
    public String providerName() {
        return this.providerName;
    }

    /**
     * Set the providerName property: Name of the third-party provider.
     *
     * @param providerName the providerName value to set.
     * @return the ContactProfileThirdPartyConfiguration object itself.
     */
    public ContactProfileThirdPartyConfiguration withProviderName(String providerName) {
        this.providerName = providerName;
        return this;
    }

    /**
     * Get the missionConfiguration property: Name of string referencing the configuration describing contact set-up for
     * a particular mission. Expected values are those which have been created in collaboration with the partner
     * network.
     *
     * @return the missionConfiguration value.
     */
    public String missionConfiguration() {
        return this.missionConfiguration;
    }

    /**
     * Set the missionConfiguration property: Name of string referencing the configuration describing contact set-up for
     * a particular mission. Expected values are those which have been created in collaboration with the partner
     * network.
     *
     * @param missionConfiguration the missionConfiguration value to set.
     * @return the ContactProfileThirdPartyConfiguration object itself.
     */
    public ContactProfileThirdPartyConfiguration withMissionConfiguration(String missionConfiguration) {
        this.missionConfiguration = missionConfiguration;
        return this;
    }

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

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