Package com.postman.collection
Class Property
java.lang.Object
com.postman.collection.CollectionElement
com.postman.collection.Property
Postman SDK analog: Not directly related, but probably close to 
PropertyBase
 
 
 Utility class to store key-value pairs with additional, optional description and type properties
- 
Constructor Summary
ConstructorsConstructorDescriptionConstructs a Property with with justkeyandvaluepropertiesConstructs a Property with the specified properties.Constructs a Property with all specified properties. - 
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns thedescriptionproperty, or null if it is not setgetKey()returns the value of thekeypropertygetToken()Returns the Postman token for a variable, eg.getType()Returns thetypeproperty for this variablegetValue()Sets thevalueproperty for this propertyvoidsetDescription(String desc) Sets thedescriptionpropertyvoidSets thekeyvalue for this propertyvoidSets thetypeproperty for this variablevoidSets thevalueproperty for this variableMethods inherited from class com.postman.collection.CollectionElement
getCollection, getDefaultCollectionSchema, getDefaultValidationSchema, getParent, getUUID, getValidationMessages, isEquivalentTo, setParent, setUUID, toJson, toJson, validate, validate 
- 
Constructor Details
- 
Property
Constructs a Property with the specified properties. Thetypeproperty is set tonull- Parameters:
 key- Value for thekeyproperty. NOTE: If a null key is provided it will be transformed to an empty string ("");value- Value for thevaluepropertydescription- Value for thedescriptionproptery
 - 
Property
Constructs a Property with all specified properties.- Parameters:
 key- Value for thekeyproperty. NOTE: If a null key is provided it will be transformed to an empty string ("");value- Value for thevaluepropertydescription- Value for thedescriptionpropertytype- Value for thetypeproperty
 - 
Property
Constructs a Property with with justkeyandvalueproperties- Parameters:
 key- Value for thekeyproperty. NOTE: If a null key is provided it will be transformed to an empty string ("");value- Value for thevalueproperty
 
 - 
 - 
Method Details
- 
getToken
Returns the Postman token for a variable, eg. thekeysurrounded by double curly braces{{}}- Returns:
 - String The postman token
 
 - 
getKey
returns the value of thekeyproperty- Specified by:
 getKeyin classCollectionElement- Returns:
 - String
 
 - 
setDescription
Sets thedescriptionproperty- Parameters:
 desc-
 - 
getDescription
Returns thedescriptionproperty, or null if it is not set- Returns:
 - String
 
 - 
setKey
Sets thekeyvalue for this property- Parameters:
 key-
 - 
getValue
Sets thevalueproperty for this property- Returns:
 - String
 
 - 
setValue
Sets thevalueproperty for this variable- Parameters:
 value- The value
 - 
getType
Returns thetypeproperty for this variable- Returns:
 - String the type
 
 - 
setType
Sets thetypeproperty for this variable- Parameters:
 type- The type, e.g., "string" or "boolean"
 - 
equals
 
 -