// 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;

/** Protocol-specific configuration. */
@Fluent
public final class ConnectivityCheckRequestProtocolConfiguration {
    /*
     * Configuration for HTTP or HTTPS requests.
     */
    @JsonProperty(value = "HTTPConfiguration")
    private ConnectivityCheckRequestProtocolConfigurationHttpConfiguration httpConfiguration;

    /**
     * Get the httpConfiguration property: Configuration for HTTP or HTTPS requests.
     *
     * @return the httpConfiguration value.
     */
    public ConnectivityCheckRequestProtocolConfigurationHttpConfiguration httpConfiguration() {
        return this.httpConfiguration;
    }

    /**
     * Set the httpConfiguration property: Configuration for HTTP or HTTPS requests.
     *
     * @param httpConfiguration the httpConfiguration value to set.
     * @return the ConnectivityCheckRequestProtocolConfiguration object itself.
     */
    public ConnectivityCheckRequestProtocolConfiguration withHttpConfiguration(
        ConnectivityCheckRequestProtocolConfigurationHttpConfiguration httpConfiguration) {
        this.httpConfiguration = httpConfiguration;
        return this;
    }

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