A set of variables for server URL template substitution
Source:R/servers-string_replacements.R
class_string_replacements.Rd
A string_replacements
object describes server variable properties used for
substitution in a single server’s URL template.
Arguments
- name
Character vector (required). The names of the variables.
- default
Character vector (required). The default value to use for substitution of each variable, which shall be sent if an alternate value is not supplied. Note this behavior is different than the Schema Object’s treatment of default values, because in those cases parameter values are optional. If the
enum
is defined, the value must exist in the enum’s values.- ...
These dots are for future extensions and must be empty.
- enum
List of (potentially empty) character vectors (optional). An enumeration of valid string values to be used if the substitution options are from a limited set.
- description
Character vector (optional). An optional description for each server variable. CommonMark syntax may be used for rich text representation.
Value
A string_replacements
S7 object describing a collection of string
variables for a single server, with fields name
, default
, enum
, and
description
.
See also
servers object
as_server_variables()
,
as_servers()
,
as_string_replacements()
,
class_server_variables()
,
class_servers()
Examples
class_string_replacements(
"username",
"demo",
enum = c("demo", "other"),
description = "The active user's folder."
)
#> <rapid::string_replacements>
#> @ name : chr "username"
#> @ default : chr "demo"
#> @ enum :List of 1
#> .. $ : chr [1:2] "demo" "other"
#> @ description: chr "The active user's folder."