Package org.apache.juneau.petstore.dto
Class Pet
java.lang.Object
org.apache.juneau.petstore.dto.Pet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondefaultPhoto(String value) Sets the photo URI only if it is currentlynull .defaultSpecies(Species value) Sets the species only if it is currentlynull .defaultStatus(PetStatus value) Sets the lifecycle status only if it is currentlynull .defaultTags(List<String> value) Sets the tags only if they are currentlynull .longgetId()Returns the pet ID.getName()Returns the name of the pet.getPhoto()Returns the URI of the pet photo.floatgetPrice()Returns the price of the pet.Returns the species of the pet.Returns the lifecycle status of the pet.getTags()Returns the tags associated with the pet.setId(long value) Sets the pet ID.Sets the name of the pet.Sets the URI of the pet photo.setPrice(float value) Sets the price of the pet.setSpecies(Species value) Sets the species of the pet.Sets the lifecycle status of the pet.Sets the tags associated with the pet.
-
Constructor Details
-
Pet
public Pet()
-
-
Method Details
-
getId
Returns the pet ID.- Returns:
- The pet ID.
-
setId
Sets the pet ID.- Parameters:
value- The new value.- Returns:
- This object.
-
getSpecies
Returns the species of the pet.- Returns:
- The species of the pet.
-
setSpecies
Sets the species of the pet.- Parameters:
value- The new value.- Returns:
- This object.
-
getName
Returns the name of the pet.- Returns:
- The name of the pet.
-
setName
Sets the name of the pet.- Parameters:
value- The new value.- Returns:
- This object.
-
getPrice
Returns the price of the pet.- Returns:
- The price of the pet.
-
setPrice
Sets the price of the pet.- Parameters:
value- The new value.- Returns:
- This object.
-
getTags
Returns the tags associated with the pet.- Returns:
- The tags associated with the pet. Can be
null if not set.
-
setTags
Sets the tags associated with the pet.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object.
-
getStatus
Returns the lifecycle status of the pet.- Returns:
- The lifecycle status of the pet.
-
setStatus
Sets the lifecycle status of the pet.- Parameters:
value- The new value.- Returns:
- This object.
-
getPhoto
Returns the URI of the pet photo.- Returns:
- The URI of the pet photo. Can be
null if not set.
-
setPhoto
Sets the URI of the pet photo.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object.
-
defaultSpecies
Sets the species only if it is currentlynull .- Parameters:
value- The fallback value.- Returns:
- This object.
-
defaultTags
Sets the tags only if they are currentlynull .- Parameters:
value- The fallback value.- Returns:
- This object.
-
defaultStatus
Sets the lifecycle status only if it is currentlynull .- Parameters:
value- The fallback value.- Returns:
- This object.
-
defaultPhoto
Sets the photo URI only if it is currentlynull .- Parameters:
value- The fallback value.- Returns:
- This object.
-