Class ParameterContract


  • public final class ParameterContract
    extends Object
    Operation parameters details.
    • Constructor Detail

      • ParameterContract

        public ParameterContract()
    • Method Detail

      • name

        public String name()
        Get the name property: Parameter name.
        Returns:
        the name value.
      • withName

        public ParameterContract withName​(String name)
        Set the name property: Parameter name.
        Parameters:
        name - the name value to set.
        Returns:
        the ParameterContract object itself.
      • description

        public String description()
        Get the description property: Parameter description.
        Returns:
        the description value.
      • withDescription

        public ParameterContract withDescription​(String description)
        Set the description property: Parameter description.
        Parameters:
        description - the description value to set.
        Returns:
        the ParameterContract object itself.
      • type

        public String type()
        Get the type property: Parameter type.
        Returns:
        the type value.
      • withType

        public ParameterContract withType​(String type)
        Set the type property: Parameter type.
        Parameters:
        type - the type value to set.
        Returns:
        the ParameterContract object itself.
      • defaultValue

        public String defaultValue()
        Get the defaultValue property: Default parameter value.
        Returns:
        the defaultValue value.
      • withDefaultValue

        public ParameterContract withDefaultValue​(String defaultValue)
        Set the defaultValue property: Default parameter value.
        Parameters:
        defaultValue - the defaultValue value to set.
        Returns:
        the ParameterContract object itself.
      • required

        public Boolean required()
        Get the required property: Specifies whether parameter is required or not.
        Returns:
        the required value.
      • withRequired

        public ParameterContract withRequired​(Boolean required)
        Set the required property: Specifies whether parameter is required or not.
        Parameters:
        required - the required value to set.
        Returns:
        the ParameterContract object itself.
      • values

        public List<String> values()
        Get the values property: Parameter values.
        Returns:
        the values value.
      • withValues

        public ParameterContract withValues​(List<String> values)
        Set the values property: Parameter values.
        Parameters:
        values - the values value to set.
        Returns:
        the ParameterContract object itself.
      • schemaId

        public String schemaId()
        Get the schemaId property: Schema identifier.
        Returns:
        the schemaId value.
      • withSchemaId

        public ParameterContract withSchemaId​(String schemaId)
        Set the schemaId property: Schema identifier.
        Parameters:
        schemaId - the schemaId value to set.
        Returns:
        the ParameterContract object itself.
      • typeName

        public String typeName()
        Get the typeName property: Type name defined by the schema.
        Returns:
        the typeName value.
      • withTypeName

        public ParameterContract withTypeName​(String typeName)
        Set the typeName property: Type name defined by the schema.
        Parameters:
        typeName - the typeName value to set.
        Returns:
        the ParameterContract object itself.
      • withExamples

        public ParameterContract withExamples​(Map<String,​ParameterExampleContract> examples)
        Set the examples property: Exampled defined for the parameter.
        Parameters:
        examples - the examples value to set.
        Returns:
        the ParameterContract object itself.
      • validate

        public void validate()
        Validates the instance.
        Throws:
        IllegalArgumentException - thrown if the instance is not valid.