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 aOpenFoodFactsWebClientPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbaseUrl()Returns the value of thebaseUrlrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.password()Returns the value of thepasswordrecord component.Returns the value of thepricePathrecord component.Returns the value of thepricesBaseUrlrecord component.Returns the value of theproductImagePathrecord component.Returns the value of theproductPathrecord component.Returns the value of theproductPathSaverecord component.Returns the value of thesearchPathrecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord 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 aOpenFoodFactsWebClientPropertiesrecord class.- Parameters:
baseUrl- the value for thebaseUrlrecord componentpricesBaseUrl- the value for thepricesBaseUrlrecord componentsearchPath- the value for thesearchPathrecord componentproductPath- the value for theproductPathrecord componentpricePath- the value for thepricePathrecord componentproductImagePath- the value for theproductImagePathrecord componentproductPathSave- the value for theproductPathSaverecord componentusername- the value for theusernamerecord componentpassword- the value for thepasswordrecord 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 thebaseUrlrecord component.- Returns:
- the value of the
baseUrlrecord component
-
pricesBaseUrl
Returns the value of thepricesBaseUrlrecord component.- Returns:
- the value of the
pricesBaseUrlrecord component
-
searchPath
Returns the value of thesearchPathrecord component.- Returns:
- the value of the
searchPathrecord component
-
productPath
Returns the value of theproductPathrecord component.- Returns:
- the value of the
productPathrecord component
-
pricePath
Returns the value of thepricePathrecord component.- Returns:
- the value of the
pricePathrecord component
-
productImagePath
Returns the value of theproductImagePathrecord component.- Returns:
- the value of the
productImagePathrecord component
-
productPathSave
Returns the value of theproductPathSaverecord component.- Returns:
- the value of the
productPathSaverecord component
-
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
password
Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord component
-