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

package com.azure.resourcemanager.support.models;

import com.azure.core.util.Context;
import com.azure.resourcemanager.support.fluent.models.CommunicationDetailsInner;
import java.time.OffsetDateTime;

/** An immutable client-side representation of CommunicationDetails. */
public interface CommunicationDetails {
    /**
     * Gets the id property: Fully qualified resource Id for the resource.
     *
     * @return the id value.
     */
    String id();

    /**
     * Gets the name property: The name of the resource.
     *
     * @return the name value.
     */
    String name();

    /**
     * Gets the type property: The type of the resource.
     *
     * @return the type value.
     */
    String type();

    /**
     * Gets the communicationType property: Communication type.
     *
     * @return the communicationType value.
     */
    CommunicationType communicationType();

    /**
     * Gets the communicationDirection property: Direction of communication.
     *
     * @return the communicationDirection value.
     */
    CommunicationDirection communicationDirection();

    /**
     * Gets the sender property: Email address of the sender. This property is required if called by a service
     * principal.
     *
     * @return the sender value.
     */
    String sender();

    /**
     * Gets the subject property: Subject of the communication.
     *
     * @return the subject value.
     */
    String subject();

    /**
     * Gets the body property: Body of the communication.
     *
     * @return the body value.
     */
    String body();

    /**
     * Gets the createdDate property: Time in UTC (ISO 8601 format) when the communication was created.
     *
     * @return the createdDate value.
     */
    OffsetDateTime createdDate();

    /**
     * Gets the inner com.azure.resourcemanager.support.fluent.models.CommunicationDetailsInner object.
     *
     * @return the inner object.
     */
    CommunicationDetailsInner innerModel();

    /** The entirety of the CommunicationDetails definition. */
    interface Definition
        extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
    }
    /** The CommunicationDetails definition stages. */
    interface DefinitionStages {
        /** The first stage of the CommunicationDetails definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the CommunicationDetails definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies supportTicketName.
             *
             * @param supportTicketName Support ticket name.
             * @return the next definition stage.
             */
            WithCreate withExistingSupportTicket(String supportTicketName);
        }
        /**
         * The stage of the CommunicationDetails definition which contains all the minimum required properties for the
         * resource to be created, but also allows for any other optional properties to be specified.
         */
        interface WithCreate
            extends DefinitionStages.WithSender, DefinitionStages.WithSubject, DefinitionStages.WithBody {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            CommunicationDetails create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            CommunicationDetails create(Context context);
        }
        /** The stage of the CommunicationDetails definition allowing to specify sender. */
        interface WithSender {
            /**
             * Specifies the sender property: Email address of the sender. This property is required if called by a
             * service principal..
             *
             * @param sender Email address of the sender. This property is required if called by a service principal.
             * @return the next definition stage.
             */
            WithCreate withSender(String sender);
        }
        /** The stage of the CommunicationDetails definition allowing to specify subject. */
        interface WithSubject {
            /**
             * Specifies the subject property: Subject of the communication..
             *
             * @param subject Subject of the communication.
             * @return the next definition stage.
             */
            WithCreate withSubject(String subject);
        }
        /** The stage of the CommunicationDetails definition allowing to specify body. */
        interface WithBody {
            /**
             * Specifies the body property: Body of the communication..
             *
             * @param body Body of the communication.
             * @return the next definition stage.
             */
            WithCreate withBody(String body);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    CommunicationDetails refresh();

    /**
     * Refreshes the resource to sync with Azure.
     *
     * @param context The context to associate with this operation.
     * @return the refreshed resource.
     */
    CommunicationDetails refresh(Context context);
}
