Top Description Methods
org.eclipse.microprofile.openapi.models.servers

public Interface ServerVariable

extends Constructible, Extensible<ServerVariable>
Imports
java.util.List, org.eclipse.microprofile.openapi.models.Constructible, .Extensible

An object representing a Server Variable for server URL template substitution.
See Also
OpenAPI Specification Server Variable Object

Method Summary

Modifier and TypeMethod and Description
public ServerVariable

Returns:

ServerVariable instance with the added enum item.
addEnumeration
(String
an item to be added to enum list
enumeration
)

This method adds a string item to enumeration list of a ServerVariable instance and returns the instance.

public default ServerVariable

Returns:

ServerVariable instance with the set defaultValue property
defaultValue
(String
the value to use for substitution, and to send, if an alternate value is not supplied
defaultValue
)

The default value to use for substitution, and to send, if an alternate value is not supplied.

public default ServerVariable

Returns:

ServerVariable instance with the set description property
description
(String
a short description of the server variable
description
)

This method sets the description property of ServerVariable instance to the given description argument and returns the modeified instance.

public default ServerVariable

Returns:

ServerVariable instance with the set enumeration property
enumeration
(List<String>
an list of string values to be used if the substitution options are from a limited set
enumeration
)

This method sets the enumeration property of ServerVariable instance to the given enumeration argument and returns the modified instance.

public String

Returns:

String defaultValue
getDefaultValue
()

The default value to use for substitution, and to send, if an alternate value is not supplied.

public String

Returns:

String description
getDescription
()

This method returns the description property of ServerVariable instance.

public List<String>

Returns:

a copy List (potentially immutable) of possible values for this variable
getEnumeration
()

This method returns the enumeration property of ServerVariable instance.

public void
removeEnumeration(String
an item to be removed to enum list
enumeration
)

This method removes a string item to enumeration list of a ServerVariable instance.

public void
setDefaultValue(String
the value to use for substitution, and to send, if an alternate value is not supplied
defaultValue
)

The default value to use for substitution, and to send, if an alternate value is not supplied.

public void
setDescription(String
a short description of the server variable
description
)

This method sets the description property of ServerVariable instance to the given description argument.

public void
setEnumeration(List<String>
an list of string values to be used if the substitution options are from a limited set
enumeration
)

This method sets the enumeration property of ServerVariable instance to the given enumeration argument.

Inherited from org.eclipse.microprofile.openapi.models.Extensible:
addExtensionextensionsgetExtensionsremoveExtensionsetExtensions

Method Detail

addEnumerationback to summary
public ServerVariable addEnumeration(String enumeration)

This method adds a string item to enumeration list of a ServerVariable instance and returns the instance.

If the enumeration list is null, this method should create a new ArrayList and add the item.

Parameters
enumeration:String

an item to be added to enum list

Returns:ServerVariable

ServerVariable instance with the added enum item.

defaultValueback to summary
public default ServerVariable defaultValue(String defaultValue)

The default value to use for substitution, and to send, if an alternate value is not supplied. This value MUST be provided by the consumer and is REQUIRED.

If enumeration is set the default value MUST be one of the values in enumeration.

This method sets the defaultValue property of ServerVariable instance to the given defaultValue argument and returns the modified instance.

Parameters
defaultValue:String

the value to use for substitution, and to send, if an alternate value is not supplied

Returns:ServerVariable

ServerVariable instance with the set defaultValue property

descriptionback to summary
public default ServerVariable description(String description)

This method sets the description property of ServerVariable instance to the given description argument and returns the modeified instance.

Description property is optional for server variable. CommonMark syntax can be used for rich text representation.

Parameters
description:String

a short description of the server variable

Returns:ServerVariable

ServerVariable instance with the set description property

enumerationback to summary
public default ServerVariable enumeration(List<String> enumeration)

This method sets the enumeration property of ServerVariable instance to the given enumeration argument and returns the modified instance.

This property represents an enum of string values to be used if the substitution options are from a limited set.

Parameters
enumeration:List<String>

an list of string values to be used if the substitution options are from a limited set

Returns:ServerVariable

ServerVariable instance with the set enumeration property

getDefaultValueback to summary
public String getDefaultValue()

The default value to use for substitution, and to send, if an alternate value is not supplied. This value MUST be provided by the consumer and is REQUIRED.

This method returns the defaultValue property from ServerVariable instance.

Returns:String

String defaultValue

getDescriptionback to summary
public String getDescription()

This method returns the description property of ServerVariable instance. Description property is optional for server variable.

Returns:String

String description

getEnumerationback to summary
public List<String> getEnumeration()

This method returns the enumeration property of ServerVariable instance.

This property represents an enumeration of string values to be used if the substitution options are from a limited set

Returns:List<String>

a copy List (potentially immutable) of possible values for this variable

removeEnumerationback to summary
public void removeEnumeration(String enumeration)

This method removes a string item to enumeration list of a ServerVariable instance.

Parameters
enumeration:String

an item to be removed to enum list

setDefaultValueback to summary
public void setDefaultValue(String defaultValue)

The default value to use for substitution, and to send, if an alternate value is not supplied. This value MUST be provided by the consumer and is REQUIRED.

If enumeration is set the default value MUST be one of the values in enumeration.

This method sets the defaultValue property of ServerVariable instance to the given defaultValue argument.

Parameters
defaultValue:String

the value to use for substitution, and to send, if an alternate value is not supplied

setDescriptionback to summary
public void setDescription(String description)

This method sets the description property of ServerVariable instance to the given description argument.

Description property is optional for server variable. CommonMark syntax can be used for rich text representation.

Parameters
description:String

a short description of the server variable

setEnumerationback to summary
public void setEnumeration(List<String> enumeration)

This method sets the enumeration property of ServerVariable instance to the given enumeration argument.

This property represents an enumeration of string values to be used if the substitution options are from a limited set

Parameters
enumeration:List<String>

an list of string values to be used if the substitution options are from a limited set