Class ServiceCorsConfigurationInfo
- java.lang.Object
-
- com.azure.resourcemanager.healthcareapis.models.ServiceCorsConfigurationInfo
-
public final class ServiceCorsConfigurationInfo extends Object
The settings for the CORS configuration of the service instance.
-
-
Constructor Summary
Constructors Constructor Description ServiceCorsConfigurationInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
allowCredentials()
Get the allowCredentials property: If credentials are allowed via CORS.List<String>
headers()
Get the headers property: The headers to be allowed via CORS.Integer
maxAge()
Get the maxAge property: The max age to be allowed via CORS.List<String>
methods()
Get the methods property: The methods to be allowed via CORS.List<String>
origins()
Get the origins property: The origins to be allowed via CORS.void
validate()
Validates the instance.ServiceCorsConfigurationInfo
withAllowCredentials(Boolean allowCredentials)
Set the allowCredentials property: If credentials are allowed via CORS.ServiceCorsConfigurationInfo
withHeaders(List<String> headers)
Set the headers property: The headers to be allowed via CORS.ServiceCorsConfigurationInfo
withMaxAge(Integer maxAge)
Set the maxAge property: The max age to be allowed via CORS.ServiceCorsConfigurationInfo
withMethods(List<String> methods)
Set the methods property: The methods to be allowed via CORS.ServiceCorsConfigurationInfo
withOrigins(List<String> origins)
Set the origins property: The origins to be allowed via CORS.
-
-
-
Method Detail
-
origins
public List<String> origins()
Get the origins property: The origins to be allowed via CORS.- Returns:
- the origins value.
-
withOrigins
public ServiceCorsConfigurationInfo withOrigins(List<String> origins)
Set the origins property: The origins to be allowed via CORS.- Parameters:
origins
- the origins value to set.- Returns:
- the ServiceCorsConfigurationInfo object itself.
-
headers
public List<String> headers()
Get the headers property: The headers to be allowed via CORS.- Returns:
- the headers value.
-
withHeaders
public ServiceCorsConfigurationInfo withHeaders(List<String> headers)
Set the headers property: The headers to be allowed via CORS.- Parameters:
headers
- the headers value to set.- Returns:
- the ServiceCorsConfigurationInfo object itself.
-
methods
public List<String> methods()
Get the methods property: The methods to be allowed via CORS.- Returns:
- the methods value.
-
withMethods
public ServiceCorsConfigurationInfo withMethods(List<String> methods)
Set the methods property: The methods to be allowed via CORS.- Parameters:
methods
- the methods value to set.- Returns:
- the ServiceCorsConfigurationInfo object itself.
-
maxAge
public Integer maxAge()
Get the maxAge property: The max age to be allowed via CORS.- Returns:
- the maxAge value.
-
withMaxAge
public ServiceCorsConfigurationInfo withMaxAge(Integer maxAge)
Set the maxAge property: The max age to be allowed via CORS.- Parameters:
maxAge
- the maxAge value to set.- Returns:
- the ServiceCorsConfigurationInfo object itself.
-
allowCredentials
public Boolean allowCredentials()
Get the allowCredentials property: If credentials are allowed via CORS.- Returns:
- the allowCredentials value.
-
withAllowCredentials
public ServiceCorsConfigurationInfo withAllowCredentials(Boolean allowCredentials)
Set the allowCredentials property: If credentials are allowed via CORS.- Parameters:
allowCredentials
- the allowCredentials value to set.- Returns:
- the ServiceCorsConfigurationInfo object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-