// 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.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.orbital.models.AvailableContactsSpacecraft;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/**
 * Customer retrieves list of Available Contacts for a spacecraft resource. Later, one of the available contact can be
 * selected to create a contact.
 */
@Fluent
public final class AvailableContactsInner {
    /*
     * The reference to the spacecraft resource.
     */
    @JsonProperty(value = "spacecraft")
    private AvailableContactsSpacecraft spacecraft;

    /*
     * Name of Azure Ground Station.
     */
    @JsonProperty(value = "groundStationName", access = JsonProperty.Access.WRITE_ONLY)
    private String groundStationName;

    /*
     * Properties of Contact resource.
     */
    @JsonProperty(value = "properties")
    private AvailableContactsProperties innerProperties;

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

    /**
     * Get the spacecraft property: The reference to the spacecraft resource.
     *
     * @return the spacecraft value.
     */
    public AvailableContactsSpacecraft spacecraft() {
        return this.spacecraft;
    }

    /**
     * Set the spacecraft property: The reference to the spacecraft resource.
     *
     * @param spacecraft the spacecraft value to set.
     * @return the AvailableContactsInner object itself.
     */
    public AvailableContactsInner withSpacecraft(AvailableContactsSpacecraft spacecraft) {
        this.spacecraft = spacecraft;
        return this;
    }

    /**
     * Get the groundStationName property: Name of Azure Ground Station.
     *
     * @return the groundStationName value.
     */
    public String groundStationName() {
        return this.groundStationName;
    }

    /**
     * Get the innerProperties property: Properties of Contact resource.
     *
     * @return the innerProperties value.
     */
    private AvailableContactsProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the maximumElevationDegrees property: Maximum elevation of the antenna during the contact in decimal degrees.
     *
     * @return the maximumElevationDegrees value.
     */
    public Float maximumElevationDegrees() {
        return this.innerProperties() == null ? null : this.innerProperties().maximumElevationDegrees();
    }

    /**
     * Get the txStartTime property: Time at which antenna transmit will be enabled (ISO 8601 UTC standard).
     *
     * @return the txStartTime value.
     */
    public OffsetDateTime txStartTime() {
        return this.innerProperties() == null ? null : this.innerProperties().txStartTime();
    }

    /**
     * Get the txEndTime property: Time at which antenna transmit will be disabled (ISO 8601 UTC standard).
     *
     * @return the txEndTime value.
     */
    public OffsetDateTime txEndTime() {
        return this.innerProperties() == null ? null : this.innerProperties().txEndTime();
    }

    /**
     * Get the rxStartTime property: Earliest time to receive a signal (ISO 8601 UTC standard).
     *
     * @return the rxStartTime value.
     */
    public OffsetDateTime rxStartTime() {
        return this.innerProperties() == null ? null : this.innerProperties().rxStartTime();
    }

    /**
     * Get the rxEndTime property: Time to lost receiving a signal (ISO 8601 UTC standard).
     *
     * @return the rxEndTime value.
     */
    public OffsetDateTime rxEndTime() {
        return this.innerProperties() == null ? null : this.innerProperties().rxEndTime();
    }

    /**
     * Get the startAzimuthDegrees property: Azimuth of the antenna at the start of the contact in decimal degrees.
     *
     * @return the startAzimuthDegrees value.
     */
    public Float startAzimuthDegrees() {
        return this.innerProperties() == null ? null : this.innerProperties().startAzimuthDegrees();
    }

    /**
     * Get the endAzimuthDegrees property: Azimuth of the antenna at the end of the contact in decimal degrees.
     *
     * @return the endAzimuthDegrees value.
     */
    public Float endAzimuthDegrees() {
        return this.innerProperties() == null ? null : this.innerProperties().endAzimuthDegrees();
    }

    /**
     * Get the startElevationDegrees property: Spacecraft elevation above the horizon at contact start.
     *
     * @return the startElevationDegrees value.
     */
    public Float startElevationDegrees() {
        return this.innerProperties() == null ? null : this.innerProperties().startElevationDegrees();
    }

    /**
     * Get the endElevationDegrees property: Spacecraft elevation above the horizon at contact end.
     *
     * @return the endElevationDegrees value.
     */
    public Float endElevationDegrees() {
        return this.innerProperties() == null ? null : this.innerProperties().endElevationDegrees();
    }

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