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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.apimanagement.models.OperationEntityBaseContract;
import com.azure.resourcemanager.apimanagement.models.ParameterContract;
import com.azure.resourcemanager.apimanagement.models.RequestContract;
import com.azure.resourcemanager.apimanagement.models.ResponseContract;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Operation Update Contract Properties. */
@Fluent
public final class OperationUpdateContractProperties extends OperationEntityBaseContract {
    /*
     * Operation Name.
     */
    @JsonProperty(value = "displayName")
    private String displayName;

    /*
     * A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST
     * but not limited by only them.
     */
    @JsonProperty(value = "method")
    private String method;

    /*
     * Relative URL template identifying the target resource for this
     * operation. May include parameters. Example:
     * /customers/{cid}/orders/{oid}/?date={date}
     */
    @JsonProperty(value = "urlTemplate")
    private String urlTemplate;

    /**
     * Get the displayName property: Operation Name.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.displayName;
    }

    /**
     * Set the displayName property: Operation Name.
     *
     * @param displayName the displayName value to set.
     * @return the OperationUpdateContractProperties object itself.
     */
    public OperationUpdateContractProperties withDisplayName(String displayName) {
        this.displayName = displayName;
        return this;
    }

    /**
     * Get the method property: A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited
     * by only them.
     *
     * @return the method value.
     */
    public String method() {
        return this.method;
    }

    /**
     * Set the method property: A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited
     * by only them.
     *
     * @param method the method value to set.
     * @return the OperationUpdateContractProperties object itself.
     */
    public OperationUpdateContractProperties withMethod(String method) {
        this.method = method;
        return this;
    }

    /**
     * Get the urlTemplate property: Relative URL template identifying the target resource for this operation. May
     * include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}.
     *
     * @return the urlTemplate value.
     */
    public String urlTemplate() {
        return this.urlTemplate;
    }

    /**
     * Set the urlTemplate property: Relative URL template identifying the target resource for this operation. May
     * include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}.
     *
     * @param urlTemplate the urlTemplate value to set.
     * @return the OperationUpdateContractProperties object itself.
     */
    public OperationUpdateContractProperties withUrlTemplate(String urlTemplate) {
        this.urlTemplate = urlTemplate;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public OperationUpdateContractProperties withTemplateParameters(List<ParameterContract> templateParameters) {
        super.withTemplateParameters(templateParameters);
        return this;
    }

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

    /** {@inheritDoc} */
    @Override
    public OperationUpdateContractProperties withRequest(RequestContract request) {
        super.withRequest(request);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public OperationUpdateContractProperties withResponses(List<ResponseContract> responses) {
        super.withResponses(responses);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public OperationUpdateContractProperties withPolicies(String policies) {
        super.withPolicies(policies);
        return this;
    }

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