Package ai.shipeasy.admin.model
Class CreateAttributeRequest
java.lang.Object
ai.shipeasy.admin.model.CreateAttributeRequest
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class CreateAttributeRequest
extends Object
Body for `POST /api/admin/attributes`. Declares a targeting attribute.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddEnumValuesItem(String enumValuesItem) description(String description) enumValues(List<String> enumValues) booleanstatic CreateAttributeRequestCreate an instance of CreateAttributeRequest given an JSON stringOptional human note shown in the dashboard.Allowed values when `type` is `enum` (required in that case — 422 otherwise); `null` for non-enum types.getName()Attribute key (lowercase alphanumeric start, then letters/digits/`_`/`-`; max 64 chars).Whether the attribute must be present on the evaluation context.Optional dotted path the SDK reads the value from.getType()Get typeinthashCode()voidsetDescription(String description) voidsetEnumValues(List<String> enumValues) voidvoidsetRequired(Boolean required) voidsetSdkPath(String sdkPath) voidsetType(AttributeType type) toJson()Convert an instance of CreateAttributeRequest to an JSON stringtoString()type(AttributeType type) static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_TYPE
- See Also:
-
SERIALIZED_NAME_ENUM_VALUES
- See Also:
-
SERIALIZED_NAME_REQUIRED
- See Also:
-
SERIALIZED_NAME_DESCRIPTION
- See Also:
-
SERIALIZED_NAME_SDK_PATH
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
CreateAttributeRequest
public CreateAttributeRequest()
-
-
Method Details
-
name
-
getName
Attribute key (lowercase alphanumeric start, then letters/digits/`_`/`-`; max 64 chars). Immutable after create.- Returns:
- name
-
setName
-
type
-
getType
Get type- Returns:
- type
-
setType
-
enumValues
-
addEnumValuesItem
-
getEnumValues
Allowed values when `type` is `enum` (required in that case — 422 otherwise); `null` for non-enum types.- Returns:
- enumValues
-
setEnumValues
-
required
-
getRequired
Whether the attribute must be present on the evaluation context.- Returns:
- required
-
setRequired
-
description
-
getDescription
Optional human note shown in the dashboard.- Returns:
- description
-
setDescription
-
sdkPath
-
getSdkPath
Optional dotted path the SDK reads the value from.- Returns:
- sdkPath
-
setSdkPath
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to CreateAttributeRequest
-
fromJson
Create an instance of CreateAttributeRequest given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CreateAttributeRequest
- Throws:
IOException- if the JSON string is invalid with respect to CreateAttributeRequest
-
toJson
Convert an instance of CreateAttributeRequest to an JSON string- Returns:
- JSON string
-