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

package com.azure.resourcemanager.newrelicobservability.models;

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.management.Region;
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.newrelicobservability.fluent.models.NewRelicMonitorResourceInner;
import java.util.Map;

/** An immutable client-side representation of NewRelicMonitorResource. */
public interface NewRelicMonitorResource {
    /**
     * 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 location property: The geo-location where the resource lives.
     *
     * @return the location value.
     */
    String location();

    /**
     * Gets the tags property: Resource tags.
     *
     * @return the tags value.
     */
    Map<String, String> tags();

    /**
     * Gets the identity property: The managed service identities assigned to this resource.
     *
     * @return the identity value.
     */
    ManagedServiceIdentity identity();

    /**
     * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
     *
     * @return the systemData value.
     */
    SystemData systemData();

    /**
     * Gets the provisioningState property: Provisioning State of the resource.
     *
     * @return the provisioningState value.
     */
    ProvisioningState provisioningState();

    /**
     * Gets the monitoringStatus property: MonitoringStatus of the resource.
     *
     * @return the monitoringStatus value.
     */
    MonitoringStatus monitoringStatus();

    /**
     * Gets the marketplaceSubscriptionStatus property: NewRelic Organization properties of the resource.
     *
     * @return the marketplaceSubscriptionStatus value.
     */
    MarketplaceSubscriptionStatus marketplaceSubscriptionStatus();

    /**
     * Gets the marketplaceSubscriptionId property: Marketplace Subscription Id.
     *
     * @return the marketplaceSubscriptionId value.
     */
    String marketplaceSubscriptionId();

    /**
     * Gets the newRelicAccountProperties property: MarketplaceSubscriptionStatus of the resource.
     *
     * @return the newRelicAccountProperties value.
     */
    NewRelicAccountProperties newRelicAccountProperties();

    /**
     * Gets the userInfo property: User Info.
     *
     * @return the userInfo value.
     */
    UserInfo userInfo();

    /**
     * Gets the planData property: Plan details.
     *
     * @return the planData value.
     */
    PlanData planData();

    /**
     * Gets the liftrResourceCategory property: Liftr resource category.
     *
     * @return the liftrResourceCategory value.
     */
    LiftrResourceCategories liftrResourceCategory();

    /**
     * Gets the liftrResourcePreference property: Liftr resource preference. The priority of the resource.
     *
     * @return the liftrResourcePreference value.
     */
    Integer liftrResourcePreference();

    /**
     * Gets the orgCreationSource property: Source of org creation.
     *
     * @return the orgCreationSource value.
     */
    OrgCreationSource orgCreationSource();

    /**
     * Gets the accountCreationSource property: Source of account creation.
     *
     * @return the accountCreationSource value.
     */
    AccountCreationSource accountCreationSource();

    /**
     * Gets the region of the resource.
     *
     * @return the region of the resource.
     */
    Region region();

    /**
     * Gets the name of the resource region.
     *
     * @return the name of the resource region.
     */
    String regionName();

    /**
     * Gets the name of the resource group.
     *
     * @return the name of the resource group.
     */
    String resourceGroupName();

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

    /** The entirety of the NewRelicMonitorResource definition. */
    interface Definition
        extends DefinitionStages.Blank,
            DefinitionStages.WithLocation,
            DefinitionStages.WithResourceGroup,
            DefinitionStages.WithCreate {
    }
    /** The NewRelicMonitorResource definition stages. */
    interface DefinitionStages {
        /** The first stage of the NewRelicMonitorResource definition. */
        interface Blank extends WithLocation {
        }
        /** The stage of the NewRelicMonitorResource definition allowing to specify location. */
        interface WithLocation {
            /**
             * Specifies the region for the resource.
             *
             * @param location The geo-location where the resource lives.
             * @return the next definition stage.
             */
            WithResourceGroup withRegion(Region location);

            /**
             * Specifies the region for the resource.
             *
             * @param location The geo-location where the resource lives.
             * @return the next definition stage.
             */
            WithResourceGroup withRegion(String location);
        }
        /** The stage of the NewRelicMonitorResource definition allowing to specify parent resource. */
        interface WithResourceGroup {
            /**
             * Specifies resourceGroupName.
             *
             * @param resourceGroupName The name of the resource group. The name is case insensitive.
             * @return the next definition stage.
             */
            WithCreate withExistingResourceGroup(String resourceGroupName);
        }
        /**
         * The stage of the NewRelicMonitorResource 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.WithTags,
                DefinitionStages.WithIdentity,
                DefinitionStages.WithNewRelicAccountProperties,
                DefinitionStages.WithUserInfo,
                DefinitionStages.WithPlanData,
                DefinitionStages.WithOrgCreationSource,
                DefinitionStages.WithAccountCreationSource {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            NewRelicMonitorResource create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            NewRelicMonitorResource create(Context context);
        }
        /** The stage of the NewRelicMonitorResource definition allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: Resource tags..
             *
             * @param tags Resource tags.
             * @return the next definition stage.
             */
            WithCreate withTags(Map<String, String> tags);
        }
        /** The stage of the NewRelicMonitorResource definition allowing to specify identity. */
        interface WithIdentity {
            /**
             * Specifies the identity property: The managed service identities assigned to this resource..
             *
             * @param identity The managed service identities assigned to this resource.
             * @return the next definition stage.
             */
            WithCreate withIdentity(ManagedServiceIdentity identity);
        }
        /** The stage of the NewRelicMonitorResource definition allowing to specify newRelicAccountProperties. */
        interface WithNewRelicAccountProperties {
            /**
             * Specifies the newRelicAccountProperties property: MarketplaceSubscriptionStatus of the resource.
             *
             * @param newRelicAccountProperties MarketplaceSubscriptionStatus of the resource.
             * @return the next definition stage.
             */
            WithCreate withNewRelicAccountProperties(NewRelicAccountProperties newRelicAccountProperties);
        }
        /** The stage of the NewRelicMonitorResource definition allowing to specify userInfo. */
        interface WithUserInfo {
            /**
             * Specifies the userInfo property: User Info.
             *
             * @param userInfo User Info.
             * @return the next definition stage.
             */
            WithCreate withUserInfo(UserInfo userInfo);
        }
        /** The stage of the NewRelicMonitorResource definition allowing to specify planData. */
        interface WithPlanData {
            /**
             * Specifies the planData property: Plan details.
             *
             * @param planData Plan details.
             * @return the next definition stage.
             */
            WithCreate withPlanData(PlanData planData);
        }
        /** The stage of the NewRelicMonitorResource definition allowing to specify orgCreationSource. */
        interface WithOrgCreationSource {
            /**
             * Specifies the orgCreationSource property: Source of org creation.
             *
             * @param orgCreationSource Source of org creation.
             * @return the next definition stage.
             */
            WithCreate withOrgCreationSource(OrgCreationSource orgCreationSource);
        }
        /** The stage of the NewRelicMonitorResource definition allowing to specify accountCreationSource. */
        interface WithAccountCreationSource {
            /**
             * Specifies the accountCreationSource property: Source of account creation.
             *
             * @param accountCreationSource Source of account creation.
             * @return the next definition stage.
             */
            WithCreate withAccountCreationSource(AccountCreationSource accountCreationSource);
        }
    }
    /**
     * Begins update for the NewRelicMonitorResource resource.
     *
     * @return the stage of resource update.
     */
    NewRelicMonitorResource.Update update();

    /** The template for NewRelicMonitorResource update. */
    interface Update
        extends UpdateStages.WithTags,
            UpdateStages.WithIdentity,
            UpdateStages.WithNewRelicAccountProperties,
            UpdateStages.WithUserInfo,
            UpdateStages.WithPlanData,
            UpdateStages.WithOrgCreationSource,
            UpdateStages.WithAccountCreationSource {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        NewRelicMonitorResource apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        NewRelicMonitorResource apply(Context context);
    }
    /** The NewRelicMonitorResource update stages. */
    interface UpdateStages {
        /** The stage of the NewRelicMonitorResource update allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: Resource tags..
             *
             * @param tags Resource tags.
             * @return the next definition stage.
             */
            Update withTags(Map<String, String> tags);
        }
        /** The stage of the NewRelicMonitorResource update allowing to specify identity. */
        interface WithIdentity {
            /**
             * Specifies the identity property: The managed service identities assigned to this resource..
             *
             * @param identity The managed service identities assigned to this resource.
             * @return the next definition stage.
             */
            Update withIdentity(ManagedServiceIdentity identity);
        }
        /** The stage of the NewRelicMonitorResource update allowing to specify newRelicAccountProperties. */
        interface WithNewRelicAccountProperties {
            /**
             * Specifies the newRelicAccountProperties property: MarketplaceSubscriptionStatus of the resource.
             *
             * @param newRelicAccountProperties MarketplaceSubscriptionStatus of the resource.
             * @return the next definition stage.
             */
            Update withNewRelicAccountProperties(NewRelicAccountProperties newRelicAccountProperties);
        }
        /** The stage of the NewRelicMonitorResource update allowing to specify userInfo. */
        interface WithUserInfo {
            /**
             * Specifies the userInfo property: User Info.
             *
             * @param userInfo User Info.
             * @return the next definition stage.
             */
            Update withUserInfo(UserInfo userInfo);
        }
        /** The stage of the NewRelicMonitorResource update allowing to specify planData. */
        interface WithPlanData {
            /**
             * Specifies the planData property: Plan details.
             *
             * @param planData Plan details.
             * @return the next definition stage.
             */
            Update withPlanData(PlanData planData);
        }
        /** The stage of the NewRelicMonitorResource update allowing to specify orgCreationSource. */
        interface WithOrgCreationSource {
            /**
             * Specifies the orgCreationSource property: Source of org creation.
             *
             * @param orgCreationSource Source of org creation.
             * @return the next definition stage.
             */
            Update withOrgCreationSource(OrgCreationSource orgCreationSource);
        }
        /** The stage of the NewRelicMonitorResource update allowing to specify accountCreationSource. */
        interface WithAccountCreationSource {
            /**
             * Specifies the accountCreationSource property: Source of account creation.
             *
             * @param accountCreationSource Source of account creation.
             * @return the next definition stage.
             */
            Update withAccountCreationSource(AccountCreationSource accountCreationSource);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    NewRelicMonitorResource refresh();

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

    /**
     * Get metric rules.
     *
     * @param request The details of the get metrics status request.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return metric rules along with {@link Response}.
     */
    Response<MetricRules> getMetricRulesWithResponse(MetricsRequest request, Context context);

    /**
     * Get metric rules.
     *
     * @param request The details of the get metrics status request.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return metric rules.
     */
    MetricRules getMetricRules(MetricsRequest request);

    /**
     * Get metric status.
     *
     * @param request The details of the get metrics status request.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return metric status along with {@link Response}.
     */
    Response<MetricsStatusResponse> getMetricStatusWithResponse(MetricsStatusRequest request, Context context);

    /**
     * Get metric status.
     *
     * @param request The details of the get metrics status request.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return metric status.
     */
    MetricsStatusResponse getMetricStatus(MetricsStatusRequest request);

    /**
     * List the app service resources currently being monitored by the NewRelic resource.
     *
     * @param request The details of the app services get request.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return response of a list app services Operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<AppServiceInfo> listAppServices(AppServicesGetRequest request);

    /**
     * List the app service resources currently being monitored by the NewRelic resource.
     *
     * @param request The details of the app services get request.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return response of a list app services Operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<AppServiceInfo> listAppServices(AppServicesGetRequest request, Context context);

    /**
     * Switches the billing for NewRelic monitor resource.
     *
     * @param request The details of the switch billing request.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a Monitor Resource by NewRelic.
     */
    Response<NewRelicMonitorResource> switchBillingWithResponse(SwitchBillingRequest request, Context context);

    /**
     * Switches the billing for NewRelic monitor resource.
     *
     * @param request The details of the switch billing request.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return a Monitor Resource by NewRelic.
     */
    NewRelicMonitorResource switchBilling(SwitchBillingRequest request);

    /**
     * List the compute vm resources currently being monitored by the NewRelic resource.
     *
     * @param request The details of the Hosts get request.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return response of a list VM Host Operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<VMInfo> listHosts(HostsGetRequest request);

    /**
     * List the compute vm resources currently being monitored by the NewRelic resource.
     *
     * @param request The details of the Hosts get request.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return response of a list VM Host Operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<VMInfo> listHosts(HostsGetRequest request, Context context);

    /**
     * List the resources currently being monitored by the NewRelic monitor resource.
     *
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of all the resources being monitored by NewRelic monitor resource as paginated response with {@link
     *     PagedIterable}.
     */
    PagedIterable<MonitoredResource> listMonitoredResources();

    /**
     * List the resources currently being monitored by the NewRelic monitor resource.
     *
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return list of all the resources being monitored by NewRelic monitor resource as paginated response with {@link
     *     PagedIterable}.
     */
    PagedIterable<MonitoredResource> listMonitoredResources(Context context);

    /**
     * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM.
     *
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return response of payload to be passed while installing VM agent along with {@link Response}.
     */
    Response<VMExtensionPayload> vmHostPayloadWithResponse(Context context);

    /**
     * Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM.
     *
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return response of payload to be passed while installing VM agent.
     */
    VMExtensionPayload vmHostPayload();
}
