// 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.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;

/** Base Properties of an API Management service resource description. */
@Fluent
public class ApiManagementServiceBaseProperties {
    /*
     * Email address from which the notification will be sent.
     */
    @JsonProperty(value = "notificationSenderEmail")
    private String notificationSenderEmail;

    /*
     * The current provisioning state of the API Management service which can
     * be one of the following:
     * Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private String provisioningState;

    /*
     * The provisioning state of the API Management service, which is targeted
     * by the long running operation started on the service.
     */
    @JsonProperty(value = "targetProvisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private String targetProvisioningState;

    /*
     * Creation UTC date of the API Management service.The date conforms to the
     * following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601
     * standard.
     */
    @JsonProperty(value = "createdAtUtc", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime createdAtUtc;

    /*
     * Gateway URL of the API Management service.
     */
    @JsonProperty(value = "gatewayUrl", access = JsonProperty.Access.WRITE_ONLY)
    private String gatewayUrl;

    /*
     * Gateway URL of the API Management service in the Default Region.
     */
    @JsonProperty(value = "gatewayRegionalUrl", access = JsonProperty.Access.WRITE_ONLY)
    private String gatewayRegionalUrl;

    /*
     * Publisher portal endpoint Url of the API Management service.
     */
    @JsonProperty(value = "portalUrl", access = JsonProperty.Access.WRITE_ONLY)
    private String portalUrl;

    /*
     * Management API endpoint URL of the API Management service.
     */
    @JsonProperty(value = "managementApiUrl", access = JsonProperty.Access.WRITE_ONLY)
    private String managementApiUrl;

    /*
     * SCM endpoint URL of the API Management service.
     */
    @JsonProperty(value = "scmUrl", access = JsonProperty.Access.WRITE_ONLY)
    private String scmUrl;

    /*
     * DEveloper Portal endpoint URL of the API Management service.
     */
    @JsonProperty(value = "developerPortalUrl", access = JsonProperty.Access.WRITE_ONLY)
    private String developerPortalUrl;

    /*
     * Custom hostname configuration of the API Management service.
     */
    @JsonProperty(value = "hostnameConfigurations")
    private List<HostnameConfiguration> hostnameConfigurations;

    /*
     * Public Static Load Balanced IP addresses of the API Management service
     * in Primary region. Available only for Basic, Standard, Premium and
     * Isolated SKU.
     */
    @JsonProperty(value = "publicIPAddresses", access = JsonProperty.Access.WRITE_ONLY)
    private List<String> publicIpAddresses;

    /*
     * Private Static Load Balanced IP addresses of the API Management service
     * in Primary region which is deployed in an Internal Virtual Network.
     * Available only for Basic, Standard, Premium and Isolated SKU.
     */
    @JsonProperty(value = "privateIPAddresses", access = JsonProperty.Access.WRITE_ONLY)
    private List<String> privateIpAddresses;

    /*
     * Public Standard SKU IP V4 based IP address to be associated with Virtual
     * Network deployed service in the region. Supported only for Developer and
     * Premium SKU being deployed in Virtual Network.
     */
    @JsonProperty(value = "publicIpAddressId")
    private String publicIpAddressId;

    /*
     * Whether or not public endpoint access is allowed for this API Management
     * service.  Value is optional but if passed in, must be 'Enabled' or
     * 'Disabled'. If 'Disabled', private endpoints are the exclusive access
     * method. Default value is 'Enabled'
     */
    @JsonProperty(value = "publicNetworkAccess")
    private PublicNetworkAccess publicNetworkAccess;

    /*
     * Virtual network configuration of the API Management service.
     */
    @JsonProperty(value = "virtualNetworkConfiguration")
    private VirtualNetworkConfiguration virtualNetworkConfiguration;

    /*
     * Additional datacenter locations of the API Management service.
     */
    @JsonProperty(value = "additionalLocations")
    private List<AdditionalLocation> additionalLocations;

    /*
     * Custom properties of the API Management service.</br>Setting
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168`
     * will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0,
     * 1.1 and 1.2).</br>Setting
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11`
     * can be used to disable just TLS 1.1.</br>Setting
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10`
     * can be used to disable TLS 1.0 on an API Management service.</br>Setting
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11`
     * can be used to disable just TLS 1.1 for communications with
     * backends.</br>Setting
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10`
     * can be used to disable TLS 1.0 for communications with
     * backends.</br>Setting
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2`
     * can be used to enable HTTP2 protocol on an API Management
     * service.</br>Not specifying any of these properties on PATCH operation
     * will reset omitted properties' values to their defaults. For all the
     * settings except Http2 the default value is `True` if the service was
     * created on or before April 1st 2018 and `False` otherwise. Http2
     * setting's default value is `False`.</br></br>You can disable any of next
     * ciphers by using settings
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`:
     * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
     * TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
     * TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
     * TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256,
     * TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA,
     * TLS_RSA_WITH_AES_128_CBC_SHA. For example,
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`.
     * The default value is `true` for them.  Note: next ciphers can't be
     * disabled since they are required by Azure CloudService internal
     * components:
     * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384
     */
    @JsonProperty(value = "customProperties")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> customProperties;

    /*
     * List of Certificates that need to be installed in the API Management
     * service. Max supported certificates that can be installed is 10.
     */
    @JsonProperty(value = "certificates")
    private List<CertificateConfiguration> certificates;

    /*
     * Property only meant to be used for Consumption SKU Service. This
     * enforces a client certificate to be presented on each request to the
     * gateway. This also enables the ability to authenticate the certificate
     * in the policy on the gateway.
     */
    @JsonProperty(value = "enableClientCertificate")
    private Boolean enableClientCertificate;

    /*
     * Property only valid for an Api Management service deployed in multiple
     * locations. This can be used to disable the gateway in master region.
     */
    @JsonProperty(value = "disableGateway")
    private Boolean disableGateway;

    /*
     * The type of VPN in which API Management service needs to be configured
     * in. None (Default Value) means the API Management service is not part of
     * any Virtual Network, External means the API Management deployment is set
     * up inside a Virtual Network having an Internet Facing Endpoint, and
     * Internal means that API Management deployment is setup inside a Virtual
     * Network having an Intranet Facing Endpoint only.
     */
    @JsonProperty(value = "virtualNetworkType")
    private VirtualNetworkType virtualNetworkType;

    /*
     * Control Plane Apis version constraint for the API Management service.
     */
    @JsonProperty(value = "apiVersionConstraint")
    private ApiVersionConstraint apiVersionConstraint;

    /*
     * Undelete Api Management Service if it was previously soft-deleted. If
     * this flag is specified and set to True all other properties will be
     * ignored.
     */
    @JsonProperty(value = "restore")
    private Boolean restore;

    /*
     * List of Private Endpoint Connections of this service.
     */
    @JsonProperty(value = "privateEndpointConnections")
    private List<RemotePrivateEndpointConnectionWrapper> privateEndpointConnections;

    /*
     * Compute Platform Version running the service in this location.
     */
    @JsonProperty(value = "platformVersion", access = JsonProperty.Access.WRITE_ONLY)
    private PlatformVersion platformVersion;

    /**
     * Get the notificationSenderEmail property: Email address from which the notification will be sent.
     *
     * @return the notificationSenderEmail value.
     */
    public String notificationSenderEmail() {
        return this.notificationSenderEmail;
    }

    /**
     * Set the notificationSenderEmail property: Email address from which the notification will be sent.
     *
     * @param notificationSenderEmail the notificationSenderEmail value to set.
     * @return the ApiManagementServiceBaseProperties object itself.
     */
    public ApiManagementServiceBaseProperties withNotificationSenderEmail(String notificationSenderEmail) {
        this.notificationSenderEmail = notificationSenderEmail;
        return this;
    }

    /**
     * Get the provisioningState property: The current provisioning state of the API Management service which can be one
     * of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.
     *
     * @return the provisioningState value.
     */
    public String provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the targetProvisioningState property: The provisioning state of the API Management service, which is targeted
     * by the long running operation started on the service.
     *
     * @return the targetProvisioningState value.
     */
    public String targetProvisioningState() {
        return this.targetProvisioningState;
    }

    /**
     * Get the createdAtUtc property: Creation UTC date of the API Management service.The date conforms to the following
     * format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
     *
     * @return the createdAtUtc value.
     */
    public OffsetDateTime createdAtUtc() {
        return this.createdAtUtc;
    }

    /**
     * Get the gatewayUrl property: Gateway URL of the API Management service.
     *
     * @return the gatewayUrl value.
     */
    public String gatewayUrl() {
        return this.gatewayUrl;
    }

    /**
     * Get the gatewayRegionalUrl property: Gateway URL of the API Management service in the Default Region.
     *
     * @return the gatewayRegionalUrl value.
     */
    public String gatewayRegionalUrl() {
        return this.gatewayRegionalUrl;
    }

    /**
     * Get the portalUrl property: Publisher portal endpoint Url of the API Management service.
     *
     * @return the portalUrl value.
     */
    public String portalUrl() {
        return this.portalUrl;
    }

    /**
     * Get the managementApiUrl property: Management API endpoint URL of the API Management service.
     *
     * @return the managementApiUrl value.
     */
    public String managementApiUrl() {
        return this.managementApiUrl;
    }

    /**
     * Get the scmUrl property: SCM endpoint URL of the API Management service.
     *
     * @return the scmUrl value.
     */
    public String scmUrl() {
        return this.scmUrl;
    }

    /**
     * Get the developerPortalUrl property: DEveloper Portal endpoint URL of the API Management service.
     *
     * @return the developerPortalUrl value.
     */
    public String developerPortalUrl() {
        return this.developerPortalUrl;
    }

    /**
     * Get the hostnameConfigurations property: Custom hostname configuration of the API Management service.
     *
     * @return the hostnameConfigurations value.
     */
    public List<HostnameConfiguration> hostnameConfigurations() {
        return this.hostnameConfigurations;
    }

    /**
     * Set the hostnameConfigurations property: Custom hostname configuration of the API Management service.
     *
     * @param hostnameConfigurations the hostnameConfigurations value to set.
     * @return the ApiManagementServiceBaseProperties object itself.
     */
    public ApiManagementServiceBaseProperties withHostnameConfigurations(
        List<HostnameConfiguration> hostnameConfigurations) {
        this.hostnameConfigurations = hostnameConfigurations;
        return this;
    }

    /**
     * Get the publicIpAddresses property: Public Static Load Balanced IP addresses of the API Management service in
     * Primary region. Available only for Basic, Standard, Premium and Isolated SKU.
     *
     * @return the publicIpAddresses value.
     */
    public List<String> publicIpAddresses() {
        return this.publicIpAddresses;
    }

    /**
     * Get the privateIpAddresses property: Private Static Load Balanced IP addresses of the API Management service in
     * Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and
     * Isolated SKU.
     *
     * @return the privateIpAddresses value.
     */
    public List<String> privateIpAddresses() {
        return this.privateIpAddresses;
    }

    /**
     * Get the publicIpAddressId property: Public Standard SKU IP V4 based IP address to be associated with Virtual
     * Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual
     * Network.
     *
     * @return the publicIpAddressId value.
     */
    public String publicIpAddressId() {
        return this.publicIpAddressId;
    }

    /**
     * Set the publicIpAddressId property: Public Standard SKU IP V4 based IP address to be associated with Virtual
     * Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual
     * Network.
     *
     * @param publicIpAddressId the publicIpAddressId value to set.
     * @return the ApiManagementServiceBaseProperties object itself.
     */
    public ApiManagementServiceBaseProperties withPublicIpAddressId(String publicIpAddressId) {
        this.publicIpAddressId = publicIpAddressId;
        return this;
    }

    /**
     * Get the publicNetworkAccess property: Whether or not public endpoint access is allowed for this API Management
     * service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints
     * are the exclusive access method. Default value is 'Enabled'.
     *
     * @return the publicNetworkAccess value.
     */
    public PublicNetworkAccess publicNetworkAccess() {
        return this.publicNetworkAccess;
    }

    /**
     * Set the publicNetworkAccess property: Whether or not public endpoint access is allowed for this API Management
     * service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints
     * are the exclusive access method. Default value is 'Enabled'.
     *
     * @param publicNetworkAccess the publicNetworkAccess value to set.
     * @return the ApiManagementServiceBaseProperties object itself.
     */
    public ApiManagementServiceBaseProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
        this.publicNetworkAccess = publicNetworkAccess;
        return this;
    }

    /**
     * Get the virtualNetworkConfiguration property: Virtual network configuration of the API Management service.
     *
     * @return the virtualNetworkConfiguration value.
     */
    public VirtualNetworkConfiguration virtualNetworkConfiguration() {
        return this.virtualNetworkConfiguration;
    }

    /**
     * Set the virtualNetworkConfiguration property: Virtual network configuration of the API Management service.
     *
     * @param virtualNetworkConfiguration the virtualNetworkConfiguration value to set.
     * @return the ApiManagementServiceBaseProperties object itself.
     */
    public ApiManagementServiceBaseProperties withVirtualNetworkConfiguration(
        VirtualNetworkConfiguration virtualNetworkConfiguration) {
        this.virtualNetworkConfiguration = virtualNetworkConfiguration;
        return this;
    }

    /**
     * Get the additionalLocations property: Additional datacenter locations of the API Management service.
     *
     * @return the additionalLocations value.
     */
    public List<AdditionalLocation> additionalLocations() {
        return this.additionalLocations;
    }

    /**
     * Set the additionalLocations property: Additional datacenter locations of the API Management service.
     *
     * @param additionalLocations the additionalLocations value to set.
     * @return the ApiManagementServiceBaseProperties object itself.
     */
    public ApiManagementServiceBaseProperties withAdditionalLocations(List<AdditionalLocation> additionalLocations) {
        this.additionalLocations = additionalLocations;
        return this;
    }

    /**
     * Get the customProperties property: Custom properties of the API Management service.&lt;/br&gt;Setting
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher
     * TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).&lt;/br&gt;Setting
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS
     * 1.1.&lt;/br&gt;Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to
     * disable TLS 1.0 on an API Management service.&lt;/br&gt;Setting
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS
     * 1.1 for communications with backends.&lt;/br&gt;Setting
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0
     * for communications with backends.&lt;/br&gt;Setting
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an
     * API Management service.&lt;/br&gt;Not specifying any of these properties on PATCH operation will reset omitted
     * properties' values to their defaults. For all the settings except Http2 the default value is `True` if the
     * service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is
     * `False`.&lt;/br&gt;&lt;/br&gt;You can disable any of next ciphers by using settings
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`:
     * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
     * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256,
     * TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example,
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The
     * default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure
     * CloudService internal components:
     * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384.
     *
     * @return the customProperties value.
     */
    public Map<String, String> customProperties() {
        return this.customProperties;
    }

    /**
     * Set the customProperties property: Custom properties of the API Management service.&lt;/br&gt;Setting
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher
     * TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).&lt;/br&gt;Setting
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS
     * 1.1.&lt;/br&gt;Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to
     * disable TLS 1.0 on an API Management service.&lt;/br&gt;Setting
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS
     * 1.1 for communications with backends.&lt;/br&gt;Setting
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0
     * for communications with backends.&lt;/br&gt;Setting
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an
     * API Management service.&lt;/br&gt;Not specifying any of these properties on PATCH operation will reset omitted
     * properties' values to their defaults. For all the settings except Http2 the default value is `True` if the
     * service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is
     * `False`.&lt;/br&gt;&lt;/br&gt;You can disable any of next ciphers by using settings
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`:
     * TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
     * TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256,
     * TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example,
     * `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The
     * default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure
     * CloudService internal components:
     * TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384.
     *
     * @param customProperties the customProperties value to set.
     * @return the ApiManagementServiceBaseProperties object itself.
     */
    public ApiManagementServiceBaseProperties withCustomProperties(Map<String, String> customProperties) {
        this.customProperties = customProperties;
        return this;
    }

    /**
     * Get the certificates property: List of Certificates that need to be installed in the API Management service. Max
     * supported certificates that can be installed is 10.
     *
     * @return the certificates value.
     */
    public List<CertificateConfiguration> certificates() {
        return this.certificates;
    }

    /**
     * Set the certificates property: List of Certificates that need to be installed in the API Management service. Max
     * supported certificates that can be installed is 10.
     *
     * @param certificates the certificates value to set.
     * @return the ApiManagementServiceBaseProperties object itself.
     */
    public ApiManagementServiceBaseProperties withCertificates(List<CertificateConfiguration> certificates) {
        this.certificates = certificates;
        return this;
    }

    /**
     * Get the enableClientCertificate property: Property only meant to be used for Consumption SKU Service. This
     * enforces a client certificate to be presented on each request to the gateway. This also enables the ability to
     * authenticate the certificate in the policy on the gateway.
     *
     * @return the enableClientCertificate value.
     */
    public Boolean enableClientCertificate() {
        return this.enableClientCertificate;
    }

    /**
     * Set the enableClientCertificate property: Property only meant to be used for Consumption SKU Service. This
     * enforces a client certificate to be presented on each request to the gateway. This also enables the ability to
     * authenticate the certificate in the policy on the gateway.
     *
     * @param enableClientCertificate the enableClientCertificate value to set.
     * @return the ApiManagementServiceBaseProperties object itself.
     */
    public ApiManagementServiceBaseProperties withEnableClientCertificate(Boolean enableClientCertificate) {
        this.enableClientCertificate = enableClientCertificate;
        return this;
    }

    /**
     * Get the disableGateway property: Property only valid for an Api Management service deployed in multiple
     * locations. This can be used to disable the gateway in master region.
     *
     * @return the disableGateway value.
     */
    public Boolean disableGateway() {
        return this.disableGateway;
    }

    /**
     * Set the disableGateway property: Property only valid for an Api Management service deployed in multiple
     * locations. This can be used to disable the gateway in master region.
     *
     * @param disableGateway the disableGateway value to set.
     * @return the ApiManagementServiceBaseProperties object itself.
     */
    public ApiManagementServiceBaseProperties withDisableGateway(Boolean disableGateway) {
        this.disableGateway = disableGateway;
        return this;
    }

    /**
     * Get the virtualNetworkType property: The type of VPN in which API Management service needs to be configured in.
     * None (Default Value) means the API Management service is not part of any Virtual Network, External means the API
     * Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means
     * that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only.
     *
     * @return the virtualNetworkType value.
     */
    public VirtualNetworkType virtualNetworkType() {
        return this.virtualNetworkType;
    }

    /**
     * Set the virtualNetworkType property: The type of VPN in which API Management service needs to be configured in.
     * None (Default Value) means the API Management service is not part of any Virtual Network, External means the API
     * Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means
     * that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only.
     *
     * @param virtualNetworkType the virtualNetworkType value to set.
     * @return the ApiManagementServiceBaseProperties object itself.
     */
    public ApiManagementServiceBaseProperties withVirtualNetworkType(VirtualNetworkType virtualNetworkType) {
        this.virtualNetworkType = virtualNetworkType;
        return this;
    }

    /**
     * Get the apiVersionConstraint property: Control Plane Apis version constraint for the API Management service.
     *
     * @return the apiVersionConstraint value.
     */
    public ApiVersionConstraint apiVersionConstraint() {
        return this.apiVersionConstraint;
    }

    /**
     * Set the apiVersionConstraint property: Control Plane Apis version constraint for the API Management service.
     *
     * @param apiVersionConstraint the apiVersionConstraint value to set.
     * @return the ApiManagementServiceBaseProperties object itself.
     */
    public ApiManagementServiceBaseProperties withApiVersionConstraint(ApiVersionConstraint apiVersionConstraint) {
        this.apiVersionConstraint = apiVersionConstraint;
        return this;
    }

    /**
     * Get the restore property: Undelete Api Management Service if it was previously soft-deleted. If this flag is
     * specified and set to True all other properties will be ignored.
     *
     * @return the restore value.
     */
    public Boolean restore() {
        return this.restore;
    }

    /**
     * Set the restore property: Undelete Api Management Service if it was previously soft-deleted. If this flag is
     * specified and set to True all other properties will be ignored.
     *
     * @param restore the restore value to set.
     * @return the ApiManagementServiceBaseProperties object itself.
     */
    public ApiManagementServiceBaseProperties withRestore(Boolean restore) {
        this.restore = restore;
        return this;
    }

    /**
     * Get the privateEndpointConnections property: List of Private Endpoint Connections of this service.
     *
     * @return the privateEndpointConnections value.
     */
    public List<RemotePrivateEndpointConnectionWrapper> privateEndpointConnections() {
        return this.privateEndpointConnections;
    }

    /**
     * Set the privateEndpointConnections property: List of Private Endpoint Connections of this service.
     *
     * @param privateEndpointConnections the privateEndpointConnections value to set.
     * @return the ApiManagementServiceBaseProperties object itself.
     */
    public ApiManagementServiceBaseProperties withPrivateEndpointConnections(
        List<RemotePrivateEndpointConnectionWrapper> privateEndpointConnections) {
        this.privateEndpointConnections = privateEndpointConnections;
        return this;
    }

    /**
     * Get the platformVersion property: Compute Platform Version running the service in this location.
     *
     * @return the platformVersion value.
     */
    public PlatformVersion platformVersion() {
        return this.platformVersion;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (hostnameConfigurations() != null) {
            hostnameConfigurations().forEach(e -> e.validate());
        }
        if (virtualNetworkConfiguration() != null) {
            virtualNetworkConfiguration().validate();
        }
        if (additionalLocations() != null) {
            additionalLocations().forEach(e -> e.validate());
        }
        if (certificates() != null) {
            certificates().forEach(e -> e.validate());
        }
        if (apiVersionConstraint() != null) {
            apiVersionConstraint().validate();
        }
        if (privateEndpointConnections() != null) {
            privateEndpointConnections().forEach(e -> e.validate());
        }
    }
}
