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

package com.azure.resourcemanager.apimanagement.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** API contract properties for the Tag Resources. */
@Fluent
public final class ApiTagResourceContractProperties extends ApiEntityBaseContract {
    /*
     * API identifier in the form /apis/{apiId}.
     */
    @JsonProperty(value = "id")
    private String id;

    /*
     * API name.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * Absolute URL of the backend service implementing this API.
     */
    @JsonProperty(value = "serviceUrl")
    private String serviceUrl;

    /*
     * Relative URL uniquely identifying this API and all of its resource paths
     * within the API Management service instance. It is appended to the API
     * endpoint base URL specified during the service instance creation to form
     * a public URL for this API.
     */
    @JsonProperty(value = "path")
    private String path;

    /*
     * Describes on which protocols the operations in this API can be invoked.
     */
    @JsonProperty(value = "protocols")
    private List<Protocol> protocols;

    /**
     * Get the id property: API identifier in the form /apis/{apiId}.
     *
     * @return the id value.
     */
    public String id() {
        return this.id;
    }

    /**
     * Set the id property: API identifier in the form /apis/{apiId}.
     *
     * @param id the id value to set.
     * @return the ApiTagResourceContractProperties object itself.
     */
    public ApiTagResourceContractProperties withId(String id) {
        this.id = id;
        return this;
    }

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

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

    /**
     * Get the serviceUrl property: Absolute URL of the backend service implementing this API.
     *
     * @return the serviceUrl value.
     */
    public String serviceUrl() {
        return this.serviceUrl;
    }

    /**
     * Set the serviceUrl property: Absolute URL of the backend service implementing this API.
     *
     * @param serviceUrl the serviceUrl value to set.
     * @return the ApiTagResourceContractProperties object itself.
     */
    public ApiTagResourceContractProperties withServiceUrl(String serviceUrl) {
        this.serviceUrl = serviceUrl;
        return this;
    }

    /**
     * Get the path property: Relative URL uniquely identifying this API and all of its resource paths within the API
     * Management service instance. It is appended to the API endpoint base URL specified during the service instance
     * creation to form a public URL for this API.
     *
     * @return the path value.
     */
    public String path() {
        return this.path;
    }

    /**
     * Set the path property: Relative URL uniquely identifying this API and all of its resource paths within the API
     * Management service instance. It is appended to the API endpoint base URL specified during the service instance
     * creation to form a public URL for this API.
     *
     * @param path the path value to set.
     * @return the ApiTagResourceContractProperties object itself.
     */
    public ApiTagResourceContractProperties withPath(String path) {
        this.path = path;
        return this;
    }

    /**
     * Get the protocols property: Describes on which protocols the operations in this API can be invoked.
     *
     * @return the protocols value.
     */
    public List<Protocol> protocols() {
        return this.protocols;
    }

    /**
     * Set the protocols property: Describes on which protocols the operations in this API can be invoked.
     *
     * @param protocols the protocols value to set.
     * @return the ApiTagResourceContractProperties object itself.
     */
    public ApiTagResourceContractProperties withProtocols(List<Protocol> protocols) {
        this.protocols = protocols;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ApiTagResourceContractProperties withDescription(String description) {
        super.withDescription(description);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ApiTagResourceContractProperties withAuthenticationSettings(
        AuthenticationSettingsContract authenticationSettings) {
        super.withAuthenticationSettings(authenticationSettings);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ApiTagResourceContractProperties withSubscriptionKeyParameterNames(
        SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames) {
        super.withSubscriptionKeyParameterNames(subscriptionKeyParameterNames);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ApiTagResourceContractProperties withApiType(ApiType apiType) {
        super.withApiType(apiType);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ApiTagResourceContractProperties withApiRevision(String apiRevision) {
        super.withApiRevision(apiRevision);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ApiTagResourceContractProperties withApiVersion(String apiVersion) {
        super.withApiVersion(apiVersion);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ApiTagResourceContractProperties withIsCurrent(Boolean isCurrent) {
        super.withIsCurrent(isCurrent);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ApiTagResourceContractProperties withApiRevisionDescription(String apiRevisionDescription) {
        super.withApiRevisionDescription(apiRevisionDescription);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ApiTagResourceContractProperties withApiVersionDescription(String apiVersionDescription) {
        super.withApiVersionDescription(apiVersionDescription);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ApiTagResourceContractProperties withApiVersionSetId(String apiVersionSetId) {
        super.withApiVersionSetId(apiVersionSetId);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ApiTagResourceContractProperties withSubscriptionRequired(Boolean subscriptionRequired) {
        super.withSubscriptionRequired(subscriptionRequired);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ApiTagResourceContractProperties withTermsOfServiceUrl(String termsOfServiceUrl) {
        super.withTermsOfServiceUrl(termsOfServiceUrl);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ApiTagResourceContractProperties withContact(ApiContactInformation contact) {
        super.withContact(contact);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public ApiTagResourceContractProperties withLicense(ApiLicenseInformation license) {
        super.withLicense(license);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
    }
}
