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

package com.azure.resourcemanager.elastic.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Marketplace SAAS Info of the resource. */
@Fluent
public final class MarketplaceSaaSInfo {
    /*
     * Marketplace Subscription
     */
    @JsonProperty(value = "marketplaceSubscription")
    private MarketplaceSaaSInfoMarketplaceSubscription marketplaceSubscription;

    /*
     * Marketplace Subscription Details: SAAS Name
     */
    @JsonProperty(value = "marketplaceName")
    private String marketplaceName;

    /*
     * Marketplace Subscription Details: Resource URI
     */
    @JsonProperty(value = "marketplaceResourceId")
    private String marketplaceResourceId;

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

    /**
     * Get the marketplaceSubscription property: Marketplace Subscription.
     *
     * @return the marketplaceSubscription value.
     */
    public MarketplaceSaaSInfoMarketplaceSubscription marketplaceSubscription() {
        return this.marketplaceSubscription;
    }

    /**
     * Set the marketplaceSubscription property: Marketplace Subscription.
     *
     * @param marketplaceSubscription the marketplaceSubscription value to set.
     * @return the MarketplaceSaaSInfo object itself.
     */
    public MarketplaceSaaSInfo withMarketplaceSubscription(
        MarketplaceSaaSInfoMarketplaceSubscription marketplaceSubscription) {
        this.marketplaceSubscription = marketplaceSubscription;
        return this;
    }

    /**
     * Get the marketplaceName property: Marketplace Subscription Details: SAAS Name.
     *
     * @return the marketplaceName value.
     */
    public String marketplaceName() {
        return this.marketplaceName;
    }

    /**
     * Set the marketplaceName property: Marketplace Subscription Details: SAAS Name.
     *
     * @param marketplaceName the marketplaceName value to set.
     * @return the MarketplaceSaaSInfo object itself.
     */
    public MarketplaceSaaSInfo withMarketplaceName(String marketplaceName) {
        this.marketplaceName = marketplaceName;
        return this;
    }

    /**
     * Get the marketplaceResourceId property: Marketplace Subscription Details: Resource URI.
     *
     * @return the marketplaceResourceId value.
     */
    public String marketplaceResourceId() {
        return this.marketplaceResourceId;
    }

    /**
     * Set the marketplaceResourceId property: Marketplace Subscription Details: Resource URI.
     *
     * @param marketplaceResourceId the marketplaceResourceId value to set.
     * @return the MarketplaceSaaSInfo object itself.
     */
    public MarketplaceSaaSInfo withMarketplaceResourceId(String marketplaceResourceId) {
        this.marketplaceResourceId = marketplaceResourceId;
        return this;
    }

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