Record Class OpenFoodFactsWebClientProperties
java.lang.Object
java.lang.Record
com.alpermulayim.openfoodfacts_spring_boot_starter.config.OpenFoodFactsWebClientProperties
@ConfigurationProperties(prefix="openfoodfacts")
public record OpenFoodFactsWebClientProperties(@DefaultValue("https://world.openfoodfacts.org") String baseUrl, @DefaultValue("https://prices.openfoodfacts.org") String pricesBaseUrl, @DefaultValue("/api/v2/search") String searchPath, @DefaultValue("/api/v2/product") String productPath, @DefaultValue("/api/v1/prices") String pricePath, @DefaultValue("/cgi/product_image_upload.pl") String productImagePath, @DefaultValue("/cgi/product_jqm2.pl") String productPathSave, Optional<String> username, Optional<String> password)
extends Record
- Author:
- Alper Mulayim ...
-
Constructor Summary
ConstructorsConstructorDescriptionOpenFoodFactsWebClientProperties
(String baseUrl, String pricesBaseUrl, String searchPath, String productPath, String pricePath, String productImagePath, String productPathSave, Optional<String> username, Optional<String> password) Creates an instance of aOpenFoodFactsWebClientProperties
record class. -
Method Summary
Modifier and TypeMethodDescriptionbaseUrl()
Returns the value of thebaseUrl
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.password()
Returns the value of thepassword
record component.Returns the value of thepricePath
record component.Returns the value of thepricesBaseUrl
record component.Returns the value of theproductImagePath
record component.Returns the value of theproductPath
record component.Returns the value of theproductPathSave
record component.Returns the value of thesearchPath
record component.final String
toString()
Returns a string representation of this record class.username()
Returns the value of theusername
record component.
-
Constructor Details
-
OpenFoodFactsWebClientProperties
public OpenFoodFactsWebClientProperties(@DefaultValue("https://world.openfoodfacts.org") String baseUrl, @DefaultValue("https://prices.openfoodfacts.org") String pricesBaseUrl, @DefaultValue("/api/v2/search") String searchPath, @DefaultValue("/api/v2/product") String productPath, @DefaultValue("/api/v1/prices") String pricePath, @DefaultValue("/cgi/product_image_upload.pl") String productImagePath, @DefaultValue("/cgi/product_jqm2.pl") String productPathSave, Optional<String> username, Optional<String> password) Creates an instance of aOpenFoodFactsWebClientProperties
record class.- Parameters:
baseUrl
- the value for thebaseUrl
record componentpricesBaseUrl
- the value for thepricesBaseUrl
record componentsearchPath
- the value for thesearchPath
record componentproductPath
- the value for theproductPath
record componentpricePath
- the value for thepricePath
record componentproductImagePath
- the value for theproductImagePath
record componentproductPathSave
- the value for theproductPathSave
record componentusername
- the value for theusername
record componentpassword
- the value for thepassword
record 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. All components in this record class are compared withObjects::equals(Object,Object)
. -
baseUrl
Returns the value of thebaseUrl
record component.- Returns:
- the value of the
baseUrl
record component
-
pricesBaseUrl
Returns the value of thepricesBaseUrl
record component.- Returns:
- the value of the
pricesBaseUrl
record component
-
searchPath
Returns the value of thesearchPath
record component.- Returns:
- the value of the
searchPath
record component
-
productPath
Returns the value of theproductPath
record component.- Returns:
- the value of the
productPath
record component
-
pricePath
Returns the value of thepricePath
record component.- Returns:
- the value of the
pricePath
record component
-
productImagePath
Returns the value of theproductImagePath
record component.- Returns:
- the value of the
productImagePath
record component
-
productPathSave
Returns the value of theproductPathSave
record component.- Returns:
- the value of the
productPathSave
record component
-
username
Returns the value of theusername
record component.- Returns:
- the value of the
username
record component
-
password
Returns the value of thepassword
record component.- Returns:
- the value of the
password
record component
-