// 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 Link Channel. */
@Fluent
public final class ContactProfileLinkChannel {
    /*
     * Channel name.
     */
    @JsonProperty(value = "name", required = true)
    private String name;

    /*
     * Center Frequency in MHz.
     */
    @JsonProperty(value = "centerFrequencyMHz", required = true)
    private float centerFrequencyMHz;

    /*
     * Bandwidth in MHz.
     */
    @JsonProperty(value = "bandwidthMHz", required = true)
    private float bandwidthMHz;

    /*
     * Customer end point to store and retrieve data during a contact with the spacecraft.
     */
    @JsonProperty(value = "endPoint", required = true)
    private EndPoint endPoint;

    /*
     * Copy of the modem configuration file such as Kratos QRadio. Only valid for uplink directions. If provided, the
     * modem connects to the customer endpoint and accepts commands from the customer instead of a VITA.49 stream.
     */
    @JsonProperty(value = "modulationConfiguration")
    private String modulationConfiguration;

    /*
     * Copy of the modem configuration file such as Kratos QRadio or Kratos QuantumRx. Only valid for downlink
     * directions. If provided, the modem connects to the customer endpoint and sends demodulated data instead of a
     * VITA.49 stream.
     */
    @JsonProperty(value = "demodulationConfiguration")
    private String demodulationConfiguration;

    /*
     * Currently unused.
     */
    @JsonProperty(value = "encodingConfiguration")
    private String encodingConfiguration;

    /*
     * Currently unused.
     */
    @JsonProperty(value = "decodingConfiguration")
    private String decodingConfiguration;

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

    /**
     * Get the name property: Channel name.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: Channel name.
     *
     * @param name the name value to set.
     * @return the ContactProfileLinkChannel object itself.
     */
    public ContactProfileLinkChannel withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the centerFrequencyMHz property: Center Frequency in MHz.
     *
     * @return the centerFrequencyMHz value.
     */
    public float centerFrequencyMHz() {
        return this.centerFrequencyMHz;
    }

    /**
     * Set the centerFrequencyMHz property: Center Frequency in MHz.
     *
     * @param centerFrequencyMHz the centerFrequencyMHz value to set.
     * @return the ContactProfileLinkChannel object itself.
     */
    public ContactProfileLinkChannel withCenterFrequencyMHz(float centerFrequencyMHz) {
        this.centerFrequencyMHz = centerFrequencyMHz;
        return this;
    }

    /**
     * Get the bandwidthMHz property: Bandwidth in MHz.
     *
     * @return the bandwidthMHz value.
     */
    public float bandwidthMHz() {
        return this.bandwidthMHz;
    }

    /**
     * Set the bandwidthMHz property: Bandwidth in MHz.
     *
     * @param bandwidthMHz the bandwidthMHz value to set.
     * @return the ContactProfileLinkChannel object itself.
     */
    public ContactProfileLinkChannel withBandwidthMHz(float bandwidthMHz) {
        this.bandwidthMHz = bandwidthMHz;
        return this;
    }

    /**
     * Get the endPoint property: Customer end point to store and retrieve data during a contact with the spacecraft.
     *
     * @return the endPoint value.
     */
    public EndPoint endPoint() {
        return this.endPoint;
    }

    /**
     * Set the endPoint property: Customer end point to store and retrieve data during a contact with the spacecraft.
     *
     * @param endPoint the endPoint value to set.
     * @return the ContactProfileLinkChannel object itself.
     */
    public ContactProfileLinkChannel withEndPoint(EndPoint endPoint) {
        this.endPoint = endPoint;
        return this;
    }

    /**
     * Get the modulationConfiguration property: Copy of the modem configuration file such as Kratos QRadio. Only valid
     * for uplink directions. If provided, the modem connects to the customer endpoint and accepts commands from the
     * customer instead of a VITA.49 stream.
     *
     * @return the modulationConfiguration value.
     */
    public String modulationConfiguration() {
        return this.modulationConfiguration;
    }

    /**
     * Set the modulationConfiguration property: Copy of the modem configuration file such as Kratos QRadio. Only valid
     * for uplink directions. If provided, the modem connects to the customer endpoint and accepts commands from the
     * customer instead of a VITA.49 stream.
     *
     * @param modulationConfiguration the modulationConfiguration value to set.
     * @return the ContactProfileLinkChannel object itself.
     */
    public ContactProfileLinkChannel withModulationConfiguration(String modulationConfiguration) {
        this.modulationConfiguration = modulationConfiguration;
        return this;
    }

    /**
     * Get the demodulationConfiguration property: Copy of the modem configuration file such as Kratos QRadio or Kratos
     * QuantumRx. Only valid for downlink directions. If provided, the modem connects to the customer endpoint and sends
     * demodulated data instead of a VITA.49 stream.
     *
     * @return the demodulationConfiguration value.
     */
    public String demodulationConfiguration() {
        return this.demodulationConfiguration;
    }

    /**
     * Set the demodulationConfiguration property: Copy of the modem configuration file such as Kratos QRadio or Kratos
     * QuantumRx. Only valid for downlink directions. If provided, the modem connects to the customer endpoint and sends
     * demodulated data instead of a VITA.49 stream.
     *
     * @param demodulationConfiguration the demodulationConfiguration value to set.
     * @return the ContactProfileLinkChannel object itself.
     */
    public ContactProfileLinkChannel withDemodulationConfiguration(String demodulationConfiguration) {
        this.demodulationConfiguration = demodulationConfiguration;
        return this;
    }

    /**
     * Get the encodingConfiguration property: Currently unused.
     *
     * @return the encodingConfiguration value.
     */
    public String encodingConfiguration() {
        return this.encodingConfiguration;
    }

    /**
     * Set the encodingConfiguration property: Currently unused.
     *
     * @param encodingConfiguration the encodingConfiguration value to set.
     * @return the ContactProfileLinkChannel object itself.
     */
    public ContactProfileLinkChannel withEncodingConfiguration(String encodingConfiguration) {
        this.encodingConfiguration = encodingConfiguration;
        return this;
    }

    /**
     * Get the decodingConfiguration property: Currently unused.
     *
     * @return the decodingConfiguration value.
     */
    public String decodingConfiguration() {
        return this.decodingConfiguration;
    }

    /**
     * Set the decodingConfiguration property: Currently unused.
     *
     * @param decodingConfiguration the decodingConfiguration value to set.
     * @return the ContactProfileLinkChannel object itself.
     */
    public ContactProfileLinkChannel withDecodingConfiguration(String decodingConfiguration) {
        this.decodingConfiguration = decodingConfiguration;
        return this;
    }

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

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