Package com.google.adk.web.config
Record Class AdkWebCorsProperties
java.lang.Object
java.lang.Record
com.google.adk.web.config.AdkWebCorsProperties
@ConfigurationProperties(prefix="adk.web.cors")
public record AdkWebCorsProperties(String mapping, List<String> origins, List<String> methods, List<String> headers, boolean allowCredentials, long maxAge)
extends Record
Properties for configuring CORS in ADK Web. This class is used to load CORS settings from
application properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theallowCredentialsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.headers()Returns the value of theheadersrecord component.mapping()Returns the value of themappingrecord component.longmaxAge()Returns the value of themaxAgerecord component.methods()Returns the value of themethodsrecord component.origins()Returns the value of theoriginsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AdkWebCorsProperties
public AdkWebCorsProperties(String mapping, List<String> origins, List<String> methods, List<String> headers, boolean allowCredentials, long maxAge) Creates an instance of aAdkWebCorsPropertiesrecord class.- Parameters:
mapping- the value for themappingrecord componentorigins- the value for theoriginsrecord componentmethods- the value for themethodsrecord componentheaders- the value for theheadersrecord componentallowCredentials- the value for theallowCredentialsrecord componentmaxAge- the value for themaxAgerecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
mapping
Returns the value of themappingrecord component.- Returns:
- the value of the
mappingrecord component
-
origins
Returns the value of theoriginsrecord component.- Returns:
- the value of the
originsrecord component
-
methods
Returns the value of themethodsrecord component.- Returns:
- the value of the
methodsrecord component
-
headers
Returns the value of theheadersrecord component.- Returns:
- the value of the
headersrecord component
-
allowCredentials
public boolean allowCredentials()Returns the value of theallowCredentialsrecord component.- Returns:
- the value of the
allowCredentialsrecord component
-
maxAge
public long maxAge()Returns the value of themaxAgerecord component.- Returns:
- the value of the
maxAgerecord component
-