> For the complete documentation index, see [llms.txt](/llms.txt)

# GS2-Formation SDK API Reference

Specification of models and API references for GS2-Formation SDK for various programming languages



## Models

### Namespace

Namespace

A Namespace allows multiple independent instances of the same service within a single project by separating data spaces and usage contexts.
Each GS2 service is managed on a per-namespace basis. Even when using the same service, if the Namespace differs, the data is treated as a completely independent data space.

Therefore, you must create a Namespace before you can start using each service.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceId | string |  | * |  |  ~ 1024 chars | Namespace GRN<br>* Set automatically by the server |
| name | string |  | ✓ |  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  |  |  |  ~ 1024 chars | Description |
| transactionSetting | [TransactionSetting](#transactionsetting) |  |  |  |  | Transaction Setting<br>Configuration for controlling how transactions are processed when executing formation operations. |
| updateMoldScript | [ScriptSetting](#scriptsetting) |  |  |  |  | Script setting to be executed when updating Form Storage Area capacity<br>Script Trigger Reference - [`updateMold`](../script/#updatemold) |
| updateFormScript | [ScriptSetting](#scriptsetting) |  |  |  |  | Script setting to be executed when updating a form<br>Script Trigger Reference - [`updateForm`](../script/#updateform) |
| updatePropertyFormScript | [ScriptSetting](#scriptsetting) |  |  |  |  | Script setting to be executed when updating a property form<br>Script Trigger Reference - [`updatePropertyForm`](../script/#updatepropertyform) |
| logSetting | [LogSetting](#logsetting) |  |  |  |  | Log Output Setting<br>Configuration for outputting log data of formation operations to GS2-Log. By specifying a GS2-Log Namespace, API request and response logs for form updates, mold capacity changes, and property form modifications can be collected. |
| createdAt | long |  | * | Current time |  | Creation Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| updatedAt | long |  | * | Current time |  | Last Updated Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | Revision |

**Related methods:**
describeNamespaces - List Namespaces
createNamespace - Create Namespace
getNamespace - Get Namespace
updateNamespace - Update Namespace
deleteNamespace - Delete Namespace



---

### TransactionSetting

Transaction Setting

Transaction Setting controls execution methods, consistency, asynchronous processing, and conflict avoidance mechanisms of transactions.
Combining features like AutoRun, AtomicCommit, asynchronous execution using GS2-Distributor, batch application of script results, and asynchronous processing of Acquire Actions via GS2-JobQueue enables robust transaction management tailored to game logic.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| enableAutoRun | bool |  |  | false |  | Whether to automatically execute issued transactions on the server side |
| enableAtomicCommit | bool | {enableAutoRun} == true |  | false |  | Whether to commit transactions atomically<br>* Enabled only if enableAutoRun is true |
| transactionUseDistributor | bool | {enableAtomicCommit} == true |  | false |  | Whether to execute transactions asynchronously<br>* Enabled only if enableAtomicCommit is true |
| commitScriptResultInUseDistributor | bool | {transactionUseDistributor} == true |  | false |  | Whether to execute the commit processing of the script result asynchronously<br>* Enabled only if transactionUseDistributor is true |
| acquireActionUseJobQueue | bool | {enableAtomicCommit} == true |  | false |  | Whether to use GS2-JobQueue to execute the acquire action<br>* Enabled only if enableAtomicCommit is true |
| distributorNamespaceId | string |  |  | "grn:gs2:{region}:{ownerId}:distributor:default" |  ~ 1024 chars | GS2-Distributor Namespace GRN used to execute transactions |
| queueNamespaceId | string |  |  | "grn:gs2:{region}:{ownerId}:queue:default" |  ~ 1024 chars | GS2-JobQueue Namespace GRN used to execute transactions |

**Related methods:**
createNamespace - Create Namespace
updateNamespace - Update Namespace


**Related models:**
Namespace - Namespace



---

### ScriptSetting

Script Setting

In GS2, you can associate custom scripts with microservice events and execute them.
This model holds the settings for triggering script execution.

There are two main ways to execute a script: synchronous execution and asynchronous execution.
Because synchronous execution blocks processing until the script finishes executing,
you can use the script result to stop the API execution or control the API response.

In contrast, asynchronous execution does not block processing until the script has finished executing.
However, because the script result cannot be used to stop the API execution or modify the API response,
asynchronous execution does not affect the API response flow and is generally recommended.

There are two types of asynchronous execution methods: GS2-Script and Amazon EventBridge.
By using Amazon EventBridge, you can write processing in languages other than Lua.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| triggerScriptId | string |  |  |  |  ~ 1024 chars | GS2-Script script GRN executed synchronously when the API is executed<br>Must be specified in GRN format starting with "grn:gs2:". |
| doneTriggerTargetType | string (enum)<br>enum {<br>"none",<br>"gs2_script",<br>"aws"<br>}<br> |  |  | "none" |  | Asynchronous script execution method<br>Specifies the type of script to use for asynchronous execution.<br>You can choose from "Do not use an asynchronous execution script (none)", "Use GS2-Script (gs2_script)", and "Use Amazon EventBridge (aws)"."none": None / "gs2_script": GS2-Script / "aws": Amazon EventBridge /  |
| doneTriggerScriptId | string | {doneTriggerTargetType} == "gs2_script" |  |  |  ~ 1024 chars | GS2-Script script GRN for asynchronous execution<br>Must be specified in GRN format starting with "grn:gs2:".<br>* Enabled only if doneTriggerTargetType is "gs2_script" |
| doneTriggerQueueNamespaceId | string | {doneTriggerTargetType} == "gs2_script" |  |  |  ~ 1024 chars | GS2-JobQueue Namespace GRN used to execute asynchronous scripts<br>If you want to execute asynchronous execution scripts via GS2-JobQueue instead of executing them directly, specify the GS2-JobQueue Namespace GRN.<br>GS2-JobQueue is generally not required unless you have a specific reason to use it.<br>* Enabled only if doneTriggerTargetType is "gs2_script" |

**Related methods:**
createNamespace - Create Namespace
updateNamespace - Update Namespace


**Related models:**
Namespace - Namespace



---

### LogSetting

Log Output Setting

Log Output Setting defines how log data is exported. This type holds the GS2-Log Namespace identifier (Namespace ID), which is used to export log data.
Specify the GS2-Log Namespace where log data is collected and stored in the GRN format for the Log Namespace ID (loggingNamespaceId).
Configuring this setting ensures that log data for API requests and responses occurring within the specified Namespace is output to the target GS2-Log Namespace.
GS2-Log provides real-time logs that can be used for system monitoring, analysis, debugging, and other operational purposes.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| loggingNamespaceId | string |  | ✓ |  |  ~ 1024 chars | GS2-Log Namespace GRN to output logs<br>Must be specified in GRN format starting with "grn:gs2:". |

**Related methods:**
createNamespace - Create Namespace
updateNamespace - Update Namespace


**Related models:**
Namespace - Namespace



---

### GitHubCheckoutSetting

Setting for checking out master data from GitHub


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| apiKeyId | string |  | ✓ |  |  ~ 1024 chars | GitHub API Key GRN |
| repositoryName | string |  | ✓ |  |  ~ 1024 chars | Repository Name |
| sourcePath | string |  | ✓ |  |  ~ 1024 chars | Master data (JSON) file path |
| referenceType | string (enum)<br>enum {<br>"commit_hash",<br>"branch",<br>"tag"<br>}<br> |  | ✓ |  |  | Source of code"commit_hash": Commit hash / "branch": Branch / "tag": Tag /  |
| commitHash | string | {referenceType} == "commit_hash" | ✓* |  |  ~ 1024 chars | Commit hash<br>* Required if referenceType is "commit_hash" |
| branchName | string | {referenceType} == "branch" | ✓* |  |  ~ 1024 chars | Branch Name<br>* Required if referenceType is "branch" |
| tagName | string | {referenceType} == "tag" | ✓* |  |  ~ 1024 chars | Tag Name<br>* Required if referenceType is "tag" |

**Related methods:**
updateCurrentFormMasterFromGitHub - Update currently active Form Model master data from GitHub



---

### Mold

Form Storage Area

An entity that holds formation information configured by the game player.
Form information can be stored multiple times per Form Storage Area, and the capacity—how many can be stored—can be set individually for each game player × Form Storage Area.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| moldId | string |  | * |  |  ~ 1024 chars | Form Storage Area GRN<br>* Set automatically by the server |
| name | string |  | ✓ |  |  ~ 128 chars | Form Storage Area Model name<br>Unique Form Storage Area Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓ |  |  ~ 128 chars | User ID |
| capacity | int |  | ✓ |  | 0 ~ 2147483646 | Current Capacity<br>The number of form save slots currently available to this player for this mold. Initially set to the mold model's initialMaxCapacity and can be expanded up to maxCapacity through capacity increase operations. |
| createdAt | long |  | * | Current time |  | Creation Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| updatedAt | long |  | * | Current time |  | Last Updated Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | Revision |

**Related methods:**
describeMolds - List Form Storage Areas
describeMoldsByUserId - List Form Storage Areas by User ID
getMold - Get Form Storage Area
getMoldByUserId - Get Form Storage Area by User ID
setMoldCapacityByUserId - Set capacity size with specified user ID
addMoldCapacityByUserId - Add capacity size by User ID
subMoldCapacity - Subtract capacity size
subMoldCapacityByUserId - Subtract capacity size by User ID
deleteMold - Delete Form Storage Area
deleteMoldByUserId - Delete Form Storage Area by User ID
getForm - Get Form
getFormByUserId - Get Form by User ID
getFormWithSignature - Retrieve signed forms
getFormWithSignatureByUserId - Get signed Form by User ID
setForm - Set form
setFormByUserId - Set form by User ID
setFormWithSignature - Update forms with signed slots
acquireActionsToFormProperties - Apply acquire action to Form Properties by User ID
deleteForm - Delete form
deleteFormByUserId - Delete Form by User ID



---

### Form

Form

An entity representing formation status.
Slots can be defined as areas that can be formed.

For weapons and armor, slots can be represented as parts like “right hand”, “left hand”, “torso”, and “arms”.
For parties, slots can be represented as positions like “front line”, “mid-line”, and “back line”.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| formId | string |  | * |  |  ~ 1024 chars | Form GRN<br>* Set automatically by the server |
| name | string |  | ✓ |  |  ~ 128 chars | Form name<br>The name of the mold model this form belongs to. Identifies which form model (slot configuration) applies to this form instance. |
| index | int |  | ✓ |  | 0 ~ 2147483646 | Index of form<br>The zero-based index identifying which save slot this form occupies within the mold. The maximum index is limited by the mold's current capacity. For example, index 0 might be "Party 1" and index 1 might be "Party 2". |
| slots | [List&lt;Slot&gt;](#slot) |  |  |  | 0 ~ 10 items | List of Slots<br>The current slot assignments for this form. Each entry corresponds to a slot defined in the form model and holds the property ID of the resource assigned to that position. Slot names must match those defined in the form model. |
| createdAt | long |  | * | Current time |  | Creation Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| updatedAt | long |  | * | Current time |  | Last Updated Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | Revision |

**Related methods:**
describeForms - List Forms
describeFormsByUserId - List Forms by User ID
getForm - Get Form
getFormByUserId - Get Form by User ID
getFormWithSignature - Retrieve signed forms
getFormWithSignatureByUserId - Get signed Form by User ID
setForm - Set form
setFormByUserId - Set form by User ID
setFormWithSignature - Update forms with signed slots
acquireActionsToFormProperties - Apply acquire action to Form Properties by User ID
deleteForm - Delete form
deleteFormByUserId - Delete Form by User ID



---

### PropertyForm

Property Form

Property Form is an entity representing the formation status.
The difference between Mold / Form is that Mold / Form defines the number of slots and records the composition in each slot,
and Property Form is used to represent compositions that are difficult to determine the number of slots in advance, such as setting skills for owned equipment.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| formId | string |  | * |  |  ~ 1024 chars | Property Form GRN<br>* Set automatically by the server |
| userId | string |  | ✓ |  |  ~ 128 chars | User ID |
| name | string |  | ✓ |  |  ~ 128 chars | Property Form name<br>The name of the property form model that defines the slot configuration for this property form. Determines which slots are available for assignment. |
| propertyId | string |  | ✓ |  |  ~ 1024 chars | Property ID<br>A developer-defined identifier that uniquely identifies this property form instance. Typically set to the GRN of the owned resource (e.g., a GS2-Inventory item set) that this form configures, such as setting skills on a specific piece of equipment. |
| slots | [List&lt;Slot&gt;](#slot) |  |  |  | 0 ~ 10 items | List of Slots<br>The current slot assignments for this property form. Each entry corresponds to a slot defined in the property form model. For example, if the property form represents skill configuration for a piece of equipment, each slot might hold a different skill assignment. |
| createdAt | long |  | * | Current time |  | Creation Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| updatedAt | long |  | * | Current time |  | Last Updated Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | Revision |

**Related methods:**
describePropertyForms - List Property Forms
describePropertyFormsByUserId - List Property Forms by User ID
getPropertyForm - Get Property Form
getPropertyFormByUserId - Get Property Form by User ID
getPropertyFormWithSignature - Retrieve signed Property Forms
getPropertyFormWithSignatureByUserId - Get signed property form by User ID
setPropertyForm - Update Property Form
setPropertyFormByUserId - Update Property Form by User ID
setPropertyFormWithSignature - Update Property Form with signed slots
acquireActionsToPropertyFormProperties - Apply acquire action to property form properties
deletePropertyForm - Delete Property Form
deletePropertyFormByUserId - Delete Property Form by User ID



---

### FormModel

Form Model

Form Model is an entity representing the formation status.
You can define `slots` as areas that can be formed.

For weapons and armor, parts such as "right hand", "left hand", "body", and "arm" can be used as slots,
and for parties, positions such as "vanguard", "midfield", and "rear guard" can be expressed as slots.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| formModelId | string |  | * |  |  ~ 1024 chars | Form Model GRN<br>* Set automatically by the server |
| name | string |  | ✓ |  |  ~ 128 chars | Form Model name<br>Unique Form Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| metadata | string |  |  |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| slots | [List&lt;SlotModel&gt;](#slotmodel) |  | ✓ |  | 1 ~ 10 items | List of Slot Model<br>The ordered list of slot definitions that make up this form. Each slot represents an assignable position, and the slot names must be unique within the form. For equipment, this might include slots like "weapon", "armor", "accessory". For parties, slots like "position_1", "position_2", etc. |

**Related methods:**
getForm - Get Form
getFormByUserId - Get Form by User ID
getFormWithSignature - Retrieve signed forms
getFormWithSignatureByUserId - Get signed Form by User ID
setForm - Set form
setFormByUserId - Set form by User ID
setFormWithSignature - Update forms with signed slots
deleteForm - Delete form
deleteFormByUserId - Delete Form by User ID
getFormModel - Get Form Model


**Related models:**
MoldModel - Form Storage Area Model



---

### MoldModel

Form Storage Area Model

If it is a party composition, it is intended to be saved in the form of "fire attribute party" or "water attribute party".
The number of areas that can be saved can be limited or expanded individually.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| moldModelId | string |  | * |  |  ~ 1024 chars | Form Storage Area GRN<br>* Set automatically by the server |
| name | string |  | ✓ |  |  ~ 128 chars | Form Storage Area Model name<br>Unique Form Storage Area Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| metadata | string |  |  |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| initialMaxCapacity | int |  | ✓ |  | 1 ~ 2147483646 | Initial capacity to store forms<br>The default number of form save slots available to each player for this mold. For example, if set to 3, the player can initially save up to 3 different formations (e.g., "fire party", "water party", "wind party"). Can be expanded per-player up to maxCapacity. |
| maxCapacity | int |  | ✓ |  | 1 ~ 2147483646 | Maximum capacity to store forms<br>The absolute upper limit for the number of form save slots per player for this mold. Even through capacity expansion operations, the capacity cannot exceed this value. Must be greater than or equal to initialMaxCapacity. |
| formModel | [FormModel](#formmodel) |  | ✓ |  |  | Form Model |

**Related methods:**
getMold - Get Form Storage Area
getMoldByUserId - Get Form Storage Area by User ID
setMoldCapacityByUserId - Set capacity size with specified user ID
addMoldCapacityByUserId - Add capacity size by User ID
subMoldCapacity - Subtract capacity size
subMoldCapacityByUserId - Subtract capacity size by User ID
getForm - Get Form
getFormByUserId - Get Form by User ID
getFormWithSignature - Retrieve signed forms
getFormWithSignatureByUserId - Get signed Form by User ID
setForm - Set form
setFormByUserId - Set form by User ID
setFormWithSignature - Update forms with signed slots
deleteForm - Delete form
deleteFormByUserId - Delete Form by User ID
describeMoldModels - List Form Storage Area Models
getMoldModel - Get Form Storage Area Model



---

### PropertyFormModel

Property Form Model

An entity that represents the formation status.
The difference between Mold / Form is that Mold / Form defines the number of slots and records the composition in each slot,
and Property Form is used to represent compositions that are difficult to determine the number of slots in advance, such as setting skills for owned equipment.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| propertyFormModelId | string |  | * |  |  ~ 1024 chars | Property Form Model GRN<br>* Set automatically by the server |
| name | string |  | ✓ |  |  ~ 128 chars | Property Form Model name<br>Unique Property Form Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| metadata | string |  |  |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| slots | [List&lt;SlotModel&gt;](#slotmodel) |  | ✓ |  | 1 ~ 10 items | List of Slot Model<br>The ordered list of slot definitions for this property form. Unlike Mold/Form where the number of forms is limited by capacity, property forms are identified by a property ID and can exist for any owned resource. Slot names must be unique within the form. |

**Related methods:**
getPropertyForm - Get Property Form
getPropertyFormByUserId - Get Property Form by User ID
getPropertyFormWithSignature - Retrieve signed Property Forms
getPropertyFormWithSignatureByUserId - Get signed property form by User ID
setPropertyForm - Update Property Form
setPropertyFormByUserId - Update Property Form by User ID
setPropertyFormWithSignature - Update Property Form with signed slots
deletePropertyForm - Delete Property Form
deletePropertyFormByUserId - Delete Property Form by User ID
describePropertyFormModels - List Property Form Models
getPropertyFormModel - Get Property Form Model



---

### SlotModel

Slot Model

Defines a single slot within a form model. A slot represents an assignable position where a game resource (such as an item, character, or equipment) can be placed. The property regex validates what values can be assigned to the slot.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| name | string |  | ✓ |  |  ~ 128 chars | Slot Model name<br>A unique identifier for this slot within the form model. For equipment forms, names like "right_hand" or "body" are typical. For party forms, names like "vanguard" or "rear_guard" are used. |
| propertyRegex | string |  |  | ".*" |  ~ 512 chars | Regular expressions for values that can be set as properties<br>A regex pattern that validates the property ID values assignable to this slot. For example, restricting to specific GS2-Inventory item GRNs or GS2-Dictionary entry GRNs. Defaults to ".*" which allows any value. |
| metadata | string |  |  |  |  ~ 512 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |

**Related models:**
FormModel - Form Model
PropertyFormModel - Property Form Model
FormModelMaster - Form Model Master
PropertyFormModelMaster - Property Form Model Master



---

### Slot

Slot

Represents the actual assignment state of a single slot within a form. Each slot holds a property ID referencing the game resource (such as a GS2-Inventory item set or GS2-Dictionary entry) that the player has placed in that position.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| name | string |  | ✓ |  |  ~ 128 chars | Slot Model name<br>A unique identifier for this slot within the form model. For equipment forms, names like "right_hand" or "body" are typical. For party forms, names like "vanguard" or "rear_guard" are used. |
| propertyId | string |  |  |  |  ~ 1024 chars | Property ID<br>A developer-defined identifier referencing the game resource assigned to this slot. Typically a GS2-Inventory Item Set GRN, GS2-Dictionary Entry GRN, or other resource identifier. Must match the slot model's propertyRegex pattern. |
| metadata | string |  |  |  |  ~ 1024 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |

**Related models:**
Form - Form
PropertyForm - Property Form



---

### SlotWithSignature

Signature Slot

A slot assignment that includes a cryptographic signature proving the player owns the referenced resource. Used when updating forms to verify that the player actually possesses the item, entry, or other resource being placed in the slot, preventing unauthorized assignments.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| name | string |  | ✓ |  |  ~ 128 chars | Slot Model name<br>Unique Slot Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| propertyType | string (enum)<br>enum {<br>"gs2_inventory",<br>"gs2_simple_inventory",<br>"gs2_dictionary"<br>}<br> |  | ✓ |  |  | Property Type<br>Specifies the type of GS2 resource referenced by this slot. Determines how the signature is verified: GS2-Inventory item sets, GS2-Inventory simple items, or GS2-Dictionary entries each have different signature formats."gs2_inventory": GS2-Inventory::ItemSet / "gs2_simple_inventory": GS2-Inventory::SimpleItem / "gs2_dictionary": GS2-Dictionary::Entry /  |
| body | string |  |  |  |  ~ 1048576 chars | Payload<br>The serialized resource data obtained from the GS2 service that owns the resource. Contains the resource state information needed to verify the signature and confirm ownership. |
| signature | string |  |  |  |  ~ 1024 chars | Signature that proves ownership of the resource referenced by the property ID<br>A cryptographic signature generated by the GS2 service that owns the resource. Verified during form updates to ensure the player possesses the referenced item set, simple item, or dictionary entry. |
| metadata | string |  |  |  |  ~ 1024 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |


---

### AcquireAction

Acquire Action


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| action | string (enum)<br>enum {<br>}<br> |  | ✓ |  |  | Type of Acquire Action |
| request | string |  | ✓ |  |  ~ 524288 chars | JSON string of the request used when executing the action |

**Related methods:**
acquireActionsToFormProperties - Apply acquire action to Form Properties by User ID
acquireActionsToPropertyFormProperties - Apply acquire action to property form properties



---

### Config

Configuration

Configuration values applied to transaction variables


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| key | string |  | ✓ |  |  ~ 64 chars | Name |
| value | string |  |  |  |  ~ 51200 chars | Value |


---

### VerifyActionResult

Verify Action execution result


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| action | string (enum)<br>enum {<br>}<br> |  | ✓ |  |  | Type of Verify Action |
| verifyRequest | string |  | ✓ |  |  ~ 524288 chars | JSON string of the request used when executing the action |
| statusCode | int |  |  |  | 0 ~ 999 | Status code |
| verifyResult | string |  |  |  |  ~ 1048576 chars | Result content |

**Related models:**
TransactionResult - Transaction Execution Result



---

### ConsumeActionResult

Consume Action execution result


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| action | string (enum)<br>enum {<br>}<br> |  | ✓ |  |  | Type of Consume Action |
| consumeRequest | string |  | ✓ |  |  ~ 524288 chars | JSON string of the request used when executing the action |
| statusCode | int |  |  |  | 0 ~ 999 | Status code |
| consumeResult | string |  |  |  |  ~ 1048576 chars | Result content |

**Related models:**
TransactionResult - Transaction Execution Result



---

### AcquireActionResult

Acquire Action execution result


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| action | string (enum)<br>enum {<br>}<br> |  | ✓ |  |  | Type of Acquire Action |
| acquireRequest | string |  | ✓ |  |  ~ 524288 chars | JSON string of the request used when executing the action |
| statusCode | int |  |  |  | 0 ~ 999 | Status code |
| acquireResult | string |  |  |  |  ~ 1048576 chars | Result content |

**Related models:**
TransactionResult - Transaction Execution Result



---

### TransactionResult

Transaction Execution Result

Result of a transaction executed using the server-side automatic execution feature


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| transactionId | string |  | ✓ |  | 36 ~ 36 chars | Transaction ID |
| verifyResults | [List&lt;VerifyActionResult&gt;](#verifyactionresult) |  |  |  | 0 ~ 10 items | List of verify action execution results |
| consumeResults | [List&lt;ConsumeActionResult&gt;](#consumeactionresult) |  |  | [] | 0 ~ 10 items | List of Consume Action execution results |
| acquireResults | [List&lt;AcquireActionResult&gt;](#acquireactionresult) |  |  | [] | 0 ~ 100 items | List of Acquire Action execution results |
| hasError | bool |  |  | false |  | Whether an error occurred during transaction execution |

**Related methods:**
acquireActionsToFormProperties - Apply acquire action to Form Properties by User ID
acquireActionsToPropertyFormProperties - Apply acquire action to property form properties



---

### CurrentFormMaster

Currently active Form Model master data

This master data defines the Form Model currently active within the Namespace.
GS2 uses JSON format files for managing master data.
By uploading these files, you can apply the master data to the server.

To create JSON files, GS2 provides a master data editor within the management console.
Additionally, you can create tools better suited for game operations and export JSON files in the appropriate format.
{{% alert title="Note" color="info" %}}
Please refer to [GS2-Formation Master Data Reference](api_reference/formation/master_data/) for the JSON file format.
{{% /alert %}}


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceId | string |  | * |  |  ~ 1024 chars | Namespace GRN<br>* Set automatically by the server |
| settings | string |  | ✓ |  |  ~ 5242880 bytes (5MB) | Master Data |

**Related methods:**
exportMaster - Export Form Model Master in a master data format that can be activated
getCurrentFormMaster - Get currently active Form Model master data
updateCurrentFormMaster - Update currently active Form Model master data
updateCurrentFormMasterFromGitHub - Update currently active Form Model master data from GitHub



---

### FormModelMaster

Form Model Master

Form Model Master is data used to edit and manage Form Model within the game. It is temporarily stored in the Management Console's Master Data Editor.
By performing import and update processes, it is reflected as Form Model actually referenced by the game.

Form Model is an entity representing the formation status.
You can define `slots` as areas that can be formed.

For weapons and armor, parts such as "right hand", "left hand", "body", and "arm" can be used as slots,
and for parties, positions such as "vanguard", "midfield", and "rear guard" can be expressed as slots.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| formModelId | string |  | * |  |  ~ 1024 chars | Form Model Master GRN<br>* Set automatically by the server |
| name | string |  | ✓ |  |  ~ 128 chars | Form Model name<br>Unique Form Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  |  |  |  ~ 1024 chars | Description |
| metadata | string |  |  |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| slots | [List&lt;SlotModel&gt;](#slotmodel) |  | ✓ |  | 1 ~ 10 items | List of Slot Model<br>The ordered list of slot definitions that make up this form. Each slot represents an assignable position, and the slot names must be unique within the form. For equipment, this might include slots like "weapon", "armor", "accessory". For parties, slots like "position_1", "position_2", etc. |
| createdAt | long |  | * | Current time |  | Creation Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| updatedAt | long |  | * | Current time |  | Last Updated Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | Revision |

**Related methods:**
describeFormModelMasters - List Form Model Masters
createFormModelMaster - Create Form Model Master
getFormModelMaster - Get Form Model Master
updateFormModelMaster - Update Form Model Master
deleteFormModelMaster - Delete Form Model Master



---

### MoldModelMaster

Form Storage Area Model Master

Form Storage Area Model Master is data used to edit and manage Form Storage Area Model within the game. It is temporarily stored in the Management Console's Master Data Editor.
By performing import and update processes, it is reflected as Form Storage Area Model actually referenced by the game.

If it is a party composition, it is intended to be saved in the form of "fire attribute party" or "water attribute party".
The number of areas that can be saved can be limited or expanded individually.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| moldModelId | string |  | * |  |  ~ 1024 chars | Form Storage Area Model Master GRN<br>* Set automatically by the server |
| name | string |  | ✓ |  |  ~ 128 chars | Form Storage Area Model name<br>Unique Form Storage Area Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  |  |  |  ~ 1024 chars | Description |
| metadata | string |  |  |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| initialMaxCapacity | int |  | ✓ |  | 1 ~ 2147483646 | Initial capacity to store forms<br>The default number of form save slots available to each player for this mold. For example, if set to 3, the player can initially save up to 3 different formations (e.g., "fire party", "water party", "wind party"). Can be expanded per-player up to maxCapacity. |
| maxCapacity | int |  | ✓ |  | 1 ~ 2147483646 | Maximum capacity to store forms<br>The absolute upper limit for the number of form save slots per player for this mold. Even through capacity expansion operations, the capacity cannot exceed this value. Must be greater than or equal to initialMaxCapacity. |
| formModelName | string |  | ✓ |  |  ~ 128 chars | Form Model name |
| createdAt | long |  | * | Current time |  | Creation Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| updatedAt | long |  | * | Current time |  | Last Updated Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | Revision |

**Related methods:**
describeMoldModelMasters - List Form Storage Area Masters
createMoldModelMaster - Create Form Storage Area Master
getMoldModelMaster - Get Form Storage Area Master
updateMoldModelMaster - Update Form Storage Area Master
deleteMoldModelMaster - Delete Form Storage Area Master



---

### PropertyFormModelMaster

Property Form Model Master

Property Form Model Master is data used to edit and manage Property Form Model within the game. It is temporarily stored in the Management Console's Master Data Editor.
By performing import and update processes, it is reflected as Property Form Model actually referenced by the game.

Property Form Model is an entity representing the formation status.
The difference between Mold / Form is that Mold / Form defines the number of slots and records the composition in each slot,
and Property Form is used to represent compositions that are difficult to determine the number of slots in advance, such as setting skills for owned equipment.


|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| propertyFormModelId | string |  | * |  |  ~ 1024 chars | Property Form Model Master GRN<br>* Set automatically by the server |
| name | string |  | ✓ |  |  ~ 128 chars | Property Form Model name<br>Unique Property Form Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  |  |  |  ~ 1024 chars | Description |
| metadata | string |  |  |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| slots | [List&lt;SlotModel&gt;](#slotmodel) |  | ✓ |  | 1 ~ 10 items | List of Slot Model<br>The ordered list of slot definitions for this property form. Unlike Mold/Form where the number of forms is limited by capacity, property forms are identified by a property ID and can exist for any owned resource. Slot names must be unique within the form. |
| createdAt | long |  | * | Current time |  | Creation Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| updatedAt | long |  | * | Current time |  | Last Updated Timestamp<br>Unix time, milliseconds<br>* Set automatically by the server |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | Revision |

**Related methods:**
describePropertyFormModelMasters - List Property Form Model Masters
createPropertyFormModelMaster - Create Property Form Model Master
getPropertyFormModelMaster - Get Property Form Model Master
updatePropertyFormModelMaster - Update Property Form Model Master
deletePropertyFormModelMaster - Delete Property Form Model Master



---
## Methods

### describeNamespaces

List Namespaces

Retrieves a list of Namespaces that have been created on a per-service basis within the project.
You can use the optional page token to start acquiring data from a specific location in the list.
You can also limit the number of Namespaces to be acquired.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namePrefix | string |  | |  |  ~ 64 chars | Filter by Namespace name prefix |
| pageToken | string |  | |  |  ~ 1024 chars | Token specifying the position from which to start acquiring data |
| limit | int |  | | 30 | 1 ~ 1000 | Number of data items to retrieve |

#### Result

|  | Type | Description |
| --- | --- | --- |
| items | [List&lt;Namespace&gt;](#namespace) | List of Namespaces |
| nextPageToken | string | Page token to retrieve the rest of the listing |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribeNamespaces(
    &formation.DescribeNamespacesRequest {
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribeNamespacesRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describeNamespaces(
        (new DescribeNamespacesRequest())
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribeNamespacesRequest;
import io.gs2.formation.result.DescribeNamespacesResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DescribeNamespacesResult result = client.describeNamespaces(
        new DescribeNamespacesRequest()
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<Namespace> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DescribeNamespacesResult> asyncResult = null;
yield return client.DescribeNamespaces(
    new Gs2.Gs2Formation.Request.DescribeNamespacesRequest()
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.describeNamespaces(
        new Gs2Formation.DescribeNamespacesRequest()
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.describe_namespaces(
        formation.DescribeNamespacesRequest()
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.describe_namespaces({
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.describe_namespaces_async({
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```



---

### createNamespace

Create Namespace

You must specify detailed information including the name, description, and various settings of the Namespace.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| name | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  | |  |  ~ 1024 chars | Description |
| transactionSetting | [TransactionSetting](#transactionsetting) |  | |  |  | Transaction Setting<br>Configuration for controlling how transactions are processed when executing formation operations. |
| updateMoldScript | [ScriptSetting](#scriptsetting) |  | |  |  | Script setting to be executed when updating Form Storage Area capacity<br>Script Trigger Reference - [`updateMold`](../script/#updatemold) |
| updateFormScript | [ScriptSetting](#scriptsetting) |  | |  |  | Script setting to be executed when updating a form<br>Script Trigger Reference - [`updateForm`](../script/#updateform) |
| updatePropertyFormScript | [ScriptSetting](#scriptsetting) |  | |  |  | Script setting to be executed when updating a property form<br>Script Trigger Reference - [`updatePropertyForm`](../script/#updatepropertyform) |
| logSetting | [LogSetting](#logsetting) |  | |  |  | Log Output Setting<br>Configuration for outputting log data of formation operations to GS2-Log. By specifying a GS2-Log Namespace, API request and response logs for form updates, mold capacity changes, and property form modifications can be collected. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Namespace](#namespace) | Namespace created |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.CreateNamespace(
    &formation.CreateNamespaceRequest {
        Name: pointy.String("namespace-0001"),
        Description: nil,
        TransactionSetting: &formation.TransactionSetting{
            EnableAutoRun: pointy.Bool(false),
            QueueNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"),
        },
        UpdateMoldScript: nil,
        UpdateFormScript: nil,
        UpdatePropertyFormScript: nil,
        LogSetting: &formation.LogSetting{
            LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\CreateNamespaceRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->createNamespace(
        (new CreateNamespaceRequest())
            ->withName("namespace-0001")
            ->withDescription(null)
            ->withTransactionSetting((new \Gs2\Formation\Model\TransactionSetting())
                ->withEnableAutoRun(false)
                ->withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
            ->withUpdateMoldScript(null)
            ->withUpdateFormScript(null)
            ->withUpdatePropertyFormScript(null)
            ->withLogSetting((new \Gs2\Formation\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.CreateNamespaceRequest;
import io.gs2.formation.result.CreateNamespaceResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    CreateNamespaceResult result = client.createNamespace(
        new CreateNamespaceRequest()
            .withName("namespace-0001")
            .withDescription(null)
            .withTransactionSetting(new io.gs2.formation.model.TransactionSetting()
                .withEnableAutoRun(false)
                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
            .withUpdateMoldScript(null)
            .withUpdateFormScript(null)
            .withUpdatePropertyFormScript(null)
            .withLogSetting(new io.gs2.formation.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.CreateNamespaceResult> asyncResult = null;
yield return client.CreateNamespace(
    new Gs2.Gs2Formation.Request.CreateNamespaceRequest()
        .WithName("namespace-0001")
        .WithDescription(null)
        .WithTransactionSetting(new Gs2.Gs2Formation.Model.TransactionSetting()
            .WithEnableAutoRun(false)
            .WithQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
        .WithUpdateMoldScript(null)
        .WithUpdateFormScript(null)
        .WithUpdatePropertyFormScript(null)
        .WithLogSetting(new Gs2.Gs2Formation.Model.LogSetting()
            .WithLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001")),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.createNamespace(
        new Gs2Formation.CreateNamespaceRequest()
            .withName("namespace-0001")
            .withDescription(null)
            .withTransactionSetting(new Gs2Formation.model.TransactionSetting()
                .withEnableAutoRun(false)
                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
            .withUpdateMoldScript(null)
            .withUpdateFormScript(null)
            .withUpdatePropertyFormScript(null)
            .withLogSetting(new Gs2Formation.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.create_namespace(
        formation.CreateNamespaceRequest()
            .with_name('namespace-0001')
            .with_description(None)
            .with_transaction_setting(
                formation.TransactionSetting()
                    .with_enable_auto_run(False)
                    .with_queue_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001'))
            .with_update_mold_script(None)
            .with_update_form_script(None)
            .with_update_property_form_script(None)
            .with_log_setting(
                formation.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.create_namespace({
    name="namespace-0001",
    description=nil,
    transactionSetting={
        enableAutoRun=false,
        queueNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001",
    },
    updateMoldScript=nil,
    updateFormScript=nil,
    updatePropertyFormScript=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001",
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.create_namespace_async({
    name="namespace-0001",
    description=nil,
    transactionSetting={
        enableAutoRun=false,
        queueNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001",
    },
    updateMoldScript=nil,
    updateFormScript=nil,
    updatePropertyFormScript=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001",
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### getNamespaceStatus

Get Namespace Status

Get the current status of the specified Namespace.
This includes whether the Namespace is active, pending, or in some other state.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| status | string | Namespace Status<br>"ACTIVE": Active / "DELETED": Deleted /  |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetNamespaceStatus(
    &formation.GetNamespaceStatusRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
status := result.Status

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetNamespaceStatusRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getNamespaceStatus(
        (new GetNamespaceStatusRequest())
            ->withNamespaceName("namespace-0001")
    );
    $status = $result->getStatus();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetNamespaceStatusRequest;
import io.gs2.formation.result.GetNamespaceStatusResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetNamespaceStatusResult result = client.getNamespaceStatus(
        new GetNamespaceStatusRequest()
            .withNamespaceName("namespace-0001")
    );
    String status = result.getStatus();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetNamespaceStatusResult> asyncResult = null;
yield return client.GetNamespaceStatus(
    new Gs2.Gs2Formation.Request.GetNamespaceStatusRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var status = result.Status;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getNamespaceStatus(
        new Gs2Formation.GetNamespaceStatusRequest()
            .withNamespaceName("namespace-0001")
    );
    const status = result.getStatus();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_namespace_status(
        formation.GetNamespaceStatusRequest()
            .with_namespace_name('namespace-0001')
    )
    status = result.status
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_namespace_status({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
status = result.status;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_namespace_status_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
status = result.status;

```



---

### getNamespace

Get Namespace

Get detailed information about the specified Namespace.
This includes the name, description, and other settings of the Namespace.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Namespace](#namespace) | Namespace |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetNamespace(
    &formation.GetNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetNamespaceRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getNamespace(
        (new GetNamespaceRequest())
            ->withNamespaceName("namespace-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetNamespaceRequest;
import io.gs2.formation.result.GetNamespaceResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetNamespaceResult result = client.getNamespace(
        new GetNamespaceRequest()
            .withNamespaceName("namespace-0001")
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetNamespaceResult> asyncResult = null;
yield return client.GetNamespace(
    new Gs2.Gs2Formation.Request.GetNamespaceRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getNamespace(
        new Gs2Formation.GetNamespaceRequest()
            .withNamespaceName("namespace-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_namespace(
        formation.GetNamespaceRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_namespace({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_namespace_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### updateNamespace

Update Namespace

Update the settings of the specified Namespace.
You can change the description and other settings of the Namespace.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  | |  |  ~ 1024 chars | Description |
| transactionSetting | [TransactionSetting](#transactionsetting) |  | |  |  | Transaction Setting<br>Configuration for controlling how transactions are processed when executing formation operations. |
| updateMoldScript | [ScriptSetting](#scriptsetting) |  | |  |  | Script setting to be executed when updating Form Storage Area capacity<br>Script Trigger Reference - [`updateMold`](../script/#updatemold) |
| updateFormScript | [ScriptSetting](#scriptsetting) |  | |  |  | Script setting to be executed when updating a form<br>Script Trigger Reference - [`updateForm`](../script/#updateform) |
| updatePropertyFormScript | [ScriptSetting](#scriptsetting) |  | |  |  | Script setting to be executed when updating a property form<br>Script Trigger Reference - [`updatePropertyForm`](../script/#updatepropertyform) |
| logSetting | [LogSetting](#logsetting) |  | |  |  | Log Output Setting<br>Configuration for outputting log data of formation operations to GS2-Log. By specifying a GS2-Log Namespace, API request and response logs for form updates, mold capacity changes, and property form modifications can be collected. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Namespace](#namespace) | Namespace updated |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.UpdateNamespace(
    &formation.UpdateNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Description: pointy.String("description1"),
        TransactionSetting: &formation.TransactionSetting{
            EnableAutoRun: pointy.Bool(false),
            QueueNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"),
        },
        UpdateMoldScript: nil,
        UpdateFormScript: nil,
        UpdatePropertyFormScript: nil,
        LogSetting: &formation.LogSetting{
            LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\UpdateNamespaceRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->updateNamespace(
        (new UpdateNamespaceRequest())
            ->withNamespaceName("namespace-0001")
            ->withDescription("description1")
            ->withTransactionSetting((new \Gs2\Formation\Model\TransactionSetting())
                ->withEnableAutoRun(false)
                ->withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"))
            ->withUpdateMoldScript(null)
            ->withUpdateFormScript(null)
            ->withUpdatePropertyFormScript(null)
            ->withLogSetting((new \Gs2\Formation\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.UpdateNamespaceRequest;
import io.gs2.formation.result.UpdateNamespaceResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    UpdateNamespaceResult result = client.updateNamespace(
        new UpdateNamespaceRequest()
            .withNamespaceName("namespace-0001")
            .withDescription("description1")
            .withTransactionSetting(new io.gs2.formation.model.TransactionSetting()
                .withEnableAutoRun(false)
                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"))
            .withUpdateMoldScript(null)
            .withUpdateFormScript(null)
            .withUpdatePropertyFormScript(null)
            .withLogSetting(new io.gs2.formation.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.UpdateNamespaceResult> asyncResult = null;
yield return client.UpdateNamespace(
    new Gs2.Gs2Formation.Request.UpdateNamespaceRequest()
        .WithNamespaceName("namespace-0001")
        .WithDescription("description1")
        .WithTransactionSetting(new Gs2.Gs2Formation.Model.TransactionSetting()
            .WithEnableAutoRun(false)
            .WithQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"))
        .WithUpdateMoldScript(null)
        .WithUpdateFormScript(null)
        .WithUpdatePropertyFormScript(null)
        .WithLogSetting(new Gs2.Gs2Formation.Model.LogSetting()
            .WithLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001")),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.updateNamespace(
        new Gs2Formation.UpdateNamespaceRequest()
            .withNamespaceName("namespace-0001")
            .withDescription("description1")
            .withTransactionSetting(new Gs2Formation.model.TransactionSetting()
                .withEnableAutoRun(false)
                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"))
            .withUpdateMoldScript(null)
            .withUpdateFormScript(null)
            .withUpdatePropertyFormScript(null)
            .withLogSetting(new Gs2Formation.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.update_namespace(
        formation.UpdateNamespaceRequest()
            .with_namespace_name('namespace-0001')
            .with_description('description1')
            .with_transaction_setting(
                formation.TransactionSetting()
                    .with_enable_auto_run(False)
                    .with_queue_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002'))
            .with_update_mold_script(None)
            .with_update_form_script(None)
            .with_update_property_form_script(None)
            .with_log_setting(
                formation.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.update_namespace({
    namespaceName="namespace-0001",
    description="description1",
    transactionSetting={
        enableAutoRun=false,
        queueNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002",
    },
    updateMoldScript=nil,
    updateFormScript=nil,
    updatePropertyFormScript=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001",
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.update_namespace_async({
    namespaceName="namespace-0001",
    description="description1",
    transactionSetting={
        enableAutoRun=false,
        queueNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002",
    },
    updateMoldScript=nil,
    updateFormScript=nil,
    updatePropertyFormScript=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001",
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### deleteNamespace

Delete Namespace

Delete the specified Namespace.
This operation is irreversible and all data associated with the deleted Namespace will be lost.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Namespace](#namespace) | Deleted Namespace |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeleteNamespace(
    &formation.DeleteNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeleteNamespaceRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deleteNamespace(
        (new DeleteNamespaceRequest())
            ->withNamespaceName("namespace-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeleteNamespaceRequest;
import io.gs2.formation.result.DeleteNamespaceResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DeleteNamespaceResult result = client.deleteNamespace(
        new DeleteNamespaceRequest()
            .withNamespaceName("namespace-0001")
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DeleteNamespaceResult> asyncResult = null;
yield return client.DeleteNamespace(
    new Gs2.Gs2Formation.Request.DeleteNamespaceRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.deleteNamespace(
        new Gs2Formation.DeleteNamespaceRequest()
            .withNamespaceName("namespace-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.delete_namespace(
        formation.DeleteNamespaceRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.delete_namespace({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.delete_namespace_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### getServiceVersion

Get microservice version


#### Request

Request parameters: None

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | string | Version |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetServiceVersion(
    &formation.GetServiceVersionRequest {
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetServiceVersionRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getServiceVersion(
        (new GetServiceVersionRequest())
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetServiceVersionRequest;
import io.gs2.formation.result.GetServiceVersionResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetServiceVersionResult result = client.getServiceVersion(
        new GetServiceVersionRequest()
    );
    String item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetServiceVersionResult> asyncResult = null;
yield return client.GetServiceVersion(
    new Gs2.Gs2Formation.Request.GetServiceVersionRequest(),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getServiceVersion(
        new Gs2Formation.GetServiceVersionRequest()
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_service_version(
        formation.GetServiceVersionRequest()
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_service_version({
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_service_version_async({
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### dumpUserDataByUserId

Dump data associated with the specified user ID

Can be used to meet legal requirements for the protection of personal information, or to back up or migrate data.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

Return value: None

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DumpUserDataByUserId(
    &formation.DumpUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DumpUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->dumpUserDataByUserId(
        (new DumpUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DumpUserDataByUserIdRequest;
import io.gs2.formation.result.DumpUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DumpUserDataByUserIdResult result = client.dumpUserDataByUserId(
        new DumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DumpUserDataByUserIdResult> asyncResult = null;
yield return client.DumpUserDataByUserId(
    new Gs2.Gs2Formation.Request.DumpUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.dumpUserDataByUserId(
        new Gs2Formation.DumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.dump_user_data_by_user_id(
        formation.DumpUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.dump_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.dump_user_data_by_user_id_async({
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result

```



---

### checkDumpUserDataByUserId

Check if the dump of the data associated with the specified user ID is complete


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| url | string | URL of output data |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.CheckDumpUserDataByUserId(
    &formation.CheckDumpUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
url := result.Url

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\CheckDumpUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->checkDumpUserDataByUserId(
        (new CheckDumpUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $url = $result->getUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.CheckDumpUserDataByUserIdRequest;
import io.gs2.formation.result.CheckDumpUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    CheckDumpUserDataByUserIdResult result = client.checkDumpUserDataByUserId(
        new CheckDumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    String url = result.getUrl();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.CheckDumpUserDataByUserIdResult> asyncResult = null;
yield return client.CheckDumpUserDataByUserId(
    new Gs2.Gs2Formation.Request.CheckDumpUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var url = result.Url;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.checkDumpUserDataByUserId(
        new Gs2Formation.CheckDumpUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const url = result.getUrl();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.check_dump_user_data_by_user_id(
        formation.CheckDumpUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    url = result.url
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.check_dump_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
url = result.url;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.check_dump_user_data_by_user_id_async({
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
url = result.url;

```



---

### cleanUserDataByUserId

Clean User Data by User ID

Execute cleaning of data associated with the specified user ID.
This allows you to safely delete specific user data from the project.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

Return value: None

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.CleanUserDataByUserId(
    &formation.CleanUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\CleanUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->cleanUserDataByUserId(
        (new CleanUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.CleanUserDataByUserIdRequest;
import io.gs2.formation.result.CleanUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    CleanUserDataByUserIdResult result = client.cleanUserDataByUserId(
        new CleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.CleanUserDataByUserIdResult> asyncResult = null;
yield return client.CleanUserDataByUserId(
    new Gs2.Gs2Formation.Request.CleanUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.cleanUserDataByUserId(
        new Gs2Formation.CleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.clean_user_data_by_user_id(
        formation.CleanUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.clean_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.clean_user_data_by_user_id_async({
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result

```



---

### checkCleanUserDataByUserId

Check if the cleaning of the data associated with the specified user ID is complete


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

Return value: None

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.CheckCleanUserDataByUserId(
    &formation.CheckCleanUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\CheckCleanUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->checkCleanUserDataByUserId(
        (new CheckCleanUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.CheckCleanUserDataByUserIdRequest;
import io.gs2.formation.result.CheckCleanUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    CheckCleanUserDataByUserIdResult result = client.checkCleanUserDataByUserId(
        new CheckCleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.CheckCleanUserDataByUserIdResult> asyncResult = null;
yield return client.CheckCleanUserDataByUserId(
    new Gs2.Gs2Formation.Request.CheckCleanUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.checkCleanUserDataByUserId(
        new Gs2Formation.CheckCleanUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.check_clean_user_data_by_user_id(
        formation.CheckCleanUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.check_clean_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.check_clean_user_data_by_user_id_async({
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result

```



---

### prepareImportUserDataByUserId

Prepare User Data Import by User ID

The data that can be used for import is limited to the data exported by GS2, and old data may fail to import.
You can import data with a user ID different from the one you exported, but if the user ID is included in the payload of the user data, this may not be the case.

You can start the actual import process by uploading the exported zip file to the URL returned in the return value of this API and calling importUserDataByUserId.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| uploadToken | string | Token used to reflect results after upload |
| uploadUrl | string | URL used to upload user data |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.PrepareImportUserDataByUserId(
    &formation.PrepareImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
uploadToken := result.UploadToken
uploadUrl := result.UploadUrl

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\PrepareImportUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->prepareImportUserDataByUserId(
        (new PrepareImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $uploadToken = $result->getUploadToken();
    $uploadUrl = $result->getUploadUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.PrepareImportUserDataByUserIdRequest;
import io.gs2.formation.result.PrepareImportUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    PrepareImportUserDataByUserIdResult result = client.prepareImportUserDataByUserId(
        new PrepareImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    String uploadToken = result.getUploadToken();
    String uploadUrl = result.getUploadUrl();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.PrepareImportUserDataByUserIdResult> asyncResult = null;
yield return client.PrepareImportUserDataByUserId(
    new Gs2.Gs2Formation.Request.PrepareImportUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var uploadToken = result.UploadToken;
var uploadUrl = result.UploadUrl;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.prepareImportUserDataByUserId(
        new Gs2Formation.PrepareImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const uploadToken = result.getUploadToken();
    const uploadUrl = result.getUploadUrl();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.prepare_import_user_data_by_user_id(
        formation.PrepareImportUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    upload_token = result.upload_token
    upload_url = result.upload_url
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.prepare_import_user_data_by_user_id({
    userId="user-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
uploadToken = result.uploadToken;
uploadUrl = result.uploadUrl;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.prepare_import_user_data_by_user_id_async({
    userId="user-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
uploadToken = result.uploadToken;
uploadUrl = result.uploadUrl;

```



---

### importUserDataByUserId

Execute import of data associated with the specified user ID

The data that can be used for import is limited to the data exported by GS2, and old data may fail to import.
You can import data with a user ID different from the one you exported, but if the user ID is included in the payload of the user data, this may not be the case.

Before calling this API, you must call prepareImportUserDataByUserId to complete the upload preparation.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| uploadToken | string |  | ✓|  |  ~ 1024 chars | Token received in preparation for upload |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

Return value: None

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.ImportUserDataByUserId(
    &formation.ImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        UploadToken: pointy.String("upload-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\ImportUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->importUserDataByUserId(
        (new ImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withUploadToken("upload-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.ImportUserDataByUserIdRequest;
import io.gs2.formation.result.ImportUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    ImportUserDataByUserIdResult result = client.importUserDataByUserId(
        new ImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withUploadToken("upload-0001")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.ImportUserDataByUserIdResult> asyncResult = null;
yield return client.ImportUserDataByUserId(
    new Gs2.Gs2Formation.Request.ImportUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithUploadToken("upload-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.importUserDataByUserId(
        new Gs2Formation.ImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withUploadToken("upload-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.import_user_data_by_user_id(
        formation.ImportUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_upload_token('upload-0001')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.import_user_data_by_user_id({
    userId="user-0001",
    uploadToken="upload-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.import_user_data_by_user_id_async({
    userId="user-0001",
    uploadToken="upload-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result

```



---

### checkImportUserDataByUserId

Check if the import of the data associated with the specified user ID is complete


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| uploadToken | string |  | ✓|  |  ~ 1024 chars | Token received in preparation for upload |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| url | string | URL of log data |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.CheckImportUserDataByUserId(
    &formation.CheckImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        UploadToken: pointy.String("upload-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
url := result.Url

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\CheckImportUserDataByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->checkImportUserDataByUserId(
        (new CheckImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withUploadToken("upload-0001")
            ->withTimeOffsetToken(null)
    );
    $url = $result->getUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.CheckImportUserDataByUserIdRequest;
import io.gs2.formation.result.CheckImportUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    CheckImportUserDataByUserIdResult result = client.checkImportUserDataByUserId(
        new CheckImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withUploadToken("upload-0001")
            .withTimeOffsetToken(null)
    );
    String url = result.getUrl();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.CheckImportUserDataByUserIdResult> asyncResult = null;
yield return client.CheckImportUserDataByUserId(
    new Gs2.Gs2Formation.Request.CheckImportUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithUploadToken("upload-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var url = result.Url;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.checkImportUserDataByUserId(
        new Gs2Formation.CheckImportUserDataByUserIdRequest()
            .withUserId("user-0001")
            .withUploadToken("upload-0001")
            .withTimeOffsetToken(null)
    );
    const url = result.getUrl();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.check_import_user_data_by_user_id(
        formation.CheckImportUserDataByUserIdRequest()
            .with_user_id('user-0001')
            .with_upload_token('upload-0001')
            .with_time_offset_token(None)
    )
    url = result.url
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.check_import_user_data_by_user_id({
    userId="user-0001",
    uploadToken="upload-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
url = result.url;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.check_import_user_data_by_user_id_async({
    userId="user-0001",
    uploadToken="upload-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
url = result.url;

```



---

### describeMolds

List Form Storage Areas

Retrieves a paginated list of the requesting user's form storage areas (molds).
Each mold represents a user's storage area for a specific mold model and contains the current capacity information.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| pageToken | string |  | |  |  ~ 1024 chars | Token specifying the position from which to start acquiring data |
| limit | int |  | | 30 | 1 ~ 1000 | Number of data items to retrieve |

#### Result

|  | Type | Description |
| --- | --- | --- |
| items | [List&lt;Mold&gt;](#mold) | List of Form Storage Area |
| nextPageToken | string | Page token to retrieve the rest of the listing |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribeMolds(
    &formation.DescribeMoldsRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribeMoldsRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describeMolds(
        (new DescribeMoldsRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribeMoldsRequest;
import io.gs2.formation.result.DescribeMoldsResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DescribeMoldsResult result = client.describeMolds(
        new DescribeMoldsRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<Mold> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DescribeMoldsResult> asyncResult = null;
yield return client.DescribeMolds(
    new Gs2.Gs2Formation.Request.DescribeMoldsRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.describeMolds(
        new Gs2Formation.DescribeMoldsRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.describe_molds(
        formation.DescribeMoldsRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.describe_molds({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.describe_molds_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```



---

### describeMoldsByUserId

List Form Storage Areas by User ID

Retrieves a paginated list of form storage areas (molds) for the specified user.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| pageToken | string |  | |  |  ~ 1024 chars | Token specifying the position from which to start acquiring data |
| limit | int |  | | 30 | 1 ~ 1000 | Number of data items to retrieve |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| items | [List&lt;Mold&gt;](#mold) | List of Form Storage Area |
| nextPageToken | string | Page token to retrieve the rest of the listing |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribeMoldsByUserId(
    &formation.DescribeMoldsByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribeMoldsByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describeMoldsByUserId(
        (new DescribeMoldsByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribeMoldsByUserIdRequest;
import io.gs2.formation.result.DescribeMoldsByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DescribeMoldsByUserIdResult result = client.describeMoldsByUserId(
        new DescribeMoldsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<Mold> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DescribeMoldsByUserIdResult> asyncResult = null;
yield return client.DescribeMoldsByUserId(
    new Gs2.Gs2Formation.Request.DescribeMoldsByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.describeMoldsByUserId(
        new Gs2Formation.DescribeMoldsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.describe_molds_by_user_id(
        formation.DescribeMoldsByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_page_token(None)
            .with_limit(None)
            .with_time_offset_token(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.describe_molds_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.describe_molds_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```



---

### getMold

Get Form Storage Area

Retrieves a specific form storage area (mold) for the requesting user by mold model name.
Returns the mold with its current capacity and the associated mold model information.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name<br>Unique Form Storage Area Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Mold](#mold) | Form Storage Area |
| moldModel | [MoldModel](#moldmodel) | Form Storage Area |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetMold(
    &formation.GetMoldRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MoldModelName: pointy.String("mold-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
moldModel := result.MoldModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetMoldRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getMold(
        (new GetMoldRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withMoldModelName("mold-0001")
    );
    $item = $result->getItem();
    $moldModel = $result->getMoldModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetMoldRequest;
import io.gs2.formation.result.GetMoldResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetMoldResult result = client.getMold(
        new GetMoldRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
    );
    Mold item = result.getItem();
    MoldModel moldModel = result.getMoldModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetMoldResult> asyncResult = null;
yield return client.GetMold(
    new Gs2.Gs2Formation.Request.GetMoldRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithMoldModelName("mold-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var moldModel = result.MoldModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getMold(
        new Gs2Formation.GetMoldRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
    );
    const item = result.getItem();
    const moldModel = result.getMoldModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_mold(
        formation.GetMoldRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_mold_model_name('mold-0001')
    )
    item = result.item
    mold_model = result.mold_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_mold({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
moldModel = result.moldModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_mold_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
moldModel = result.moldModel;

```



---

### getMoldByUserId

Get Form Storage Area by User ID

Retrieves a specific form storage area (mold) for the specified user by mold model name.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name<br>Unique Form Storage Area Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Mold](#mold) | Form Storage Area |
| moldModel | [MoldModel](#moldmodel) | Form Storage Area |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetMoldByUserId(
    &formation.GetMoldByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
moldModel := result.MoldModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetMoldByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getMoldByUserId(
        (new GetMoldByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $moldModel = $result->getMoldModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetMoldByUserIdRequest;
import io.gs2.formation.result.GetMoldByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetMoldByUserIdResult result = client.getMoldByUserId(
        new GetMoldByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withTimeOffsetToken(null)
    );
    Mold item = result.getItem();
    MoldModel moldModel = result.getMoldModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetMoldByUserIdResult> asyncResult = null;
yield return client.GetMoldByUserId(
    new Gs2.Gs2Formation.Request.GetMoldByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithMoldModelName("mold-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var moldModel = result.MoldModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getMoldByUserId(
        new Gs2Formation.GetMoldByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const moldModel = result.getMoldModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_mold_by_user_id(
        formation.GetMoldByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_mold_model_name('mold-0001')
            .with_time_offset_token(None)
    )
    item = result.item
    mold_model = result.mold_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_mold_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
moldModel = result.moldModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_mold_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
moldModel = result.moldModel;

```



---

### setMoldCapacityByUserId

Set capacity size with specified user ID

Directly sets the capacity of the form storage area (mold) for the specified user to an exact value.
Captures and returns the state before the update as 'old', in addition to the updated mold.
The capacity is capped at the maxCapacity defined in the Mold Model.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name<br>Unique Form Storage Area Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| capacity | int |  | ✓|  | 0 ~ 2147483646 | Current Capacity<br>The number of form save slots currently available to this player for this mold. Initially set to the mold model's initialMaxCapacity and can be expanded up to maxCapacity through capacity increase operations. |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Mold](#mold) | Form Storage Area with updated capacity |
| old | [Mold](#mold) | Form Storage Area before updating capacity |
| moldModel | [MoldModel](#moldmodel) | Form Storage Area |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.SetMoldCapacityByUserId(
    &formation.SetMoldCapacityByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Capacity: pointy.Int32(10),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
old := result.Old
moldModel := result.MoldModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\SetMoldCapacityByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->setMoldCapacityByUserId(
        (new SetMoldCapacityByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withCapacity(10)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $old = $result->getOld();
    $moldModel = $result->getMoldModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.SetMoldCapacityByUserIdRequest;
import io.gs2.formation.result.SetMoldCapacityByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    SetMoldCapacityByUserIdResult result = client.setMoldCapacityByUserId(
        new SetMoldCapacityByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withCapacity(10)
            .withTimeOffsetToken(null)
    );
    Mold item = result.getItem();
    Mold old = result.getOld();
    MoldModel moldModel = result.getMoldModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.SetMoldCapacityByUserIdResult> asyncResult = null;
yield return client.SetMoldCapacityByUserId(
    new Gs2.Gs2Formation.Request.SetMoldCapacityByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithMoldModelName("mold-0001")
        .WithCapacity(10)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var old = result.Old;
var moldModel = result.MoldModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.setMoldCapacityByUserId(
        new Gs2Formation.SetMoldCapacityByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withCapacity(10)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const old = result.getOld();
    const moldModel = result.getMoldModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.set_mold_capacity_by_user_id(
        formation.SetMoldCapacityByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_mold_model_name('mold-0001')
            .with_capacity(10)
            .with_time_offset_token(None)
    )
    item = result.item
    old = result.old
    mold_model = result.mold_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.set_mold_capacity_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    capacity=10,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
old = result.old;
moldModel = result.moldModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.set_mold_capacity_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    capacity=10,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
old = result.old;
moldModel = result.moldModel;

```



---

### addMoldCapacityByUserId

Add capacity size by User ID

Increases the capacity of the form storage area (mold) for the specified user.
The capacity cannot exceed the maxCapacity defined in the Mold Model.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name<br>Unique Form Storage Area Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| capacity | int |  | ✓|  | 0 ~ 2147483646 | Current Capacity<br>The number of form save slots currently available to this player for this mold. Initially set to the mold model's initialMaxCapacity and can be expanded up to maxCapacity through capacity increase operations. |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Mold](#mold) | Form Storage Area with updated capacity |
| moldModel | [MoldModel](#moldmodel) | Form Storage Area |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.AddMoldCapacityByUserId(
    &formation.AddMoldCapacityByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Capacity: pointy.Int32(10),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
moldModel := result.MoldModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\AddMoldCapacityByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->addMoldCapacityByUserId(
        (new AddMoldCapacityByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withCapacity(10)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $moldModel = $result->getMoldModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.AddMoldCapacityByUserIdRequest;
import io.gs2.formation.result.AddMoldCapacityByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    AddMoldCapacityByUserIdResult result = client.addMoldCapacityByUserId(
        new AddMoldCapacityByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withCapacity(10)
            .withTimeOffsetToken(null)
    );
    Mold item = result.getItem();
    MoldModel moldModel = result.getMoldModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.AddMoldCapacityByUserIdResult> asyncResult = null;
yield return client.AddMoldCapacityByUserId(
    new Gs2.Gs2Formation.Request.AddMoldCapacityByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithMoldModelName("mold-0001")
        .WithCapacity(10)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var moldModel = result.MoldModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.addMoldCapacityByUserId(
        new Gs2Formation.AddMoldCapacityByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withCapacity(10)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const moldModel = result.getMoldModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.add_mold_capacity_by_user_id(
        formation.AddMoldCapacityByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_mold_model_name('mold-0001')
            .with_capacity(10)
            .with_time_offset_token(None)
    )
    item = result.item
    mold_model = result.mold_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.add_mold_capacity_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    capacity=10,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
moldModel = result.moldModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.add_mold_capacity_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    capacity=10,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
moldModel = result.moldModel;

```



---

### subMoldCapacity

Subtract capacity size

Decreases the capacity of the form storage area (mold) for the requesting user. The capacity will not go below 0.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name<br>Unique Form Storage Area Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| capacity | int |  | ✓|  | 0 ~ 2147483646 | Current Capacity<br>The number of form save slots currently available to this player for this mold. Initially set to the mold model's initialMaxCapacity and can be expanded up to maxCapacity through capacity increase operations. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Mold](#mold) | Form Storage Area with updated capacities |
| moldModel | [MoldModel](#moldmodel) | Form Storage Area |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.SubMoldCapacity(
    &formation.SubMoldCapacityRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Capacity: pointy.Int32(10),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
moldModel := result.MoldModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\SubMoldCapacityRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->subMoldCapacity(
        (new SubMoldCapacityRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withMoldModelName("mold-0001")
            ->withCapacity(10)
    );
    $item = $result->getItem();
    $moldModel = $result->getMoldModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.SubMoldCapacityRequest;
import io.gs2.formation.result.SubMoldCapacityResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    SubMoldCapacityResult result = client.subMoldCapacity(
        new SubMoldCapacityRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withCapacity(10)
    );
    Mold item = result.getItem();
    MoldModel moldModel = result.getMoldModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.SubMoldCapacityResult> asyncResult = null;
yield return client.SubMoldCapacity(
    new Gs2.Gs2Formation.Request.SubMoldCapacityRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithMoldModelName("mold-0001")
        .WithCapacity(10),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var moldModel = result.MoldModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.subMoldCapacity(
        new Gs2Formation.SubMoldCapacityRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withCapacity(10)
    );
    const item = result.getItem();
    const moldModel = result.getMoldModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.sub_mold_capacity(
        formation.SubMoldCapacityRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_mold_model_name('mold-0001')
            .with_capacity(10)
    )
    item = result.item
    mold_model = result.mold_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.sub_mold_capacity({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
    capacity=10,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
moldModel = result.moldModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.sub_mold_capacity_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
    capacity=10,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
moldModel = result.moldModel;

```



---

### subMoldCapacityByUserId

Subtract capacity size by User ID

Decreases the capacity of the form storage area (mold) for the specified user. The capacity will not go below 0.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name<br>Unique Form Storage Area Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| capacity | int |  | ✓|  | 0 ~ 2147483646 | Current Capacity<br>The number of form save slots currently available to this player for this mold. Initially set to the mold model's initialMaxCapacity and can be expanded up to maxCapacity through capacity increase operations. |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Mold](#mold) | Form Storage Area with updated capacities |
| moldModel | [MoldModel](#moldmodel) | Form Storage Area |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.SubMoldCapacityByUserId(
    &formation.SubMoldCapacityByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Capacity: pointy.Int32(10),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
moldModel := result.MoldModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\SubMoldCapacityByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->subMoldCapacityByUserId(
        (new SubMoldCapacityByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withCapacity(10)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $moldModel = $result->getMoldModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.SubMoldCapacityByUserIdRequest;
import io.gs2.formation.result.SubMoldCapacityByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    SubMoldCapacityByUserIdResult result = client.subMoldCapacityByUserId(
        new SubMoldCapacityByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withCapacity(10)
            .withTimeOffsetToken(null)
    );
    Mold item = result.getItem();
    MoldModel moldModel = result.getMoldModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.SubMoldCapacityByUserIdResult> asyncResult = null;
yield return client.SubMoldCapacityByUserId(
    new Gs2.Gs2Formation.Request.SubMoldCapacityByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithMoldModelName("mold-0001")
        .WithCapacity(10)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var moldModel = result.MoldModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.subMoldCapacityByUserId(
        new Gs2Formation.SubMoldCapacityByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withCapacity(10)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const moldModel = result.getMoldModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.sub_mold_capacity_by_user_id(
        formation.SubMoldCapacityByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_mold_model_name('mold-0001')
            .with_capacity(10)
            .with_time_offset_token(None)
    )
    item = result.item
    mold_model = result.mold_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.sub_mold_capacity_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    capacity=10,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
moldModel = result.moldModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.sub_mold_capacity_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    capacity=10,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
moldModel = result.moldModel;

```



---

### deleteMold

Delete Form Storage Area

Deletes the form storage area (mold) for the requesting user. This removes all forms stored within the mold along with the capacity data.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name<br>Unique Form Storage Area Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Mold](#mold) | Form Storage Area |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeleteMold(
    &formation.DeleteMoldRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MoldModelName: pointy.String("mold-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeleteMoldRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deleteMold(
        (new DeleteMoldRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withMoldModelName("mold-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeleteMoldRequest;
import io.gs2.formation.result.DeleteMoldResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DeleteMoldResult result = client.deleteMold(
        new DeleteMoldRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
    );
    Mold item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DeleteMoldResult> asyncResult = null;
yield return client.DeleteMold(
    new Gs2.Gs2Formation.Request.DeleteMoldRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithMoldModelName("mold-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.deleteMold(
        new Gs2Formation.DeleteMoldRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.delete_mold(
        formation.DeleteMoldRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_mold_model_name('mold-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.delete_mold({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.delete_mold_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### deleteMoldByUserId

Delete Form Storage Area by User ID

Deletes the form storage area (mold) for the specified user.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name<br>Unique Form Storage Area Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Mold](#mold) | Form Storage Area |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeleteMoldByUserId(
    &formation.DeleteMoldByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeleteMoldByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deleteMoldByUserId(
        (new DeleteMoldByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeleteMoldByUserIdRequest;
import io.gs2.formation.result.DeleteMoldByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DeleteMoldByUserIdResult result = client.deleteMoldByUserId(
        new DeleteMoldByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withTimeOffsetToken(null)
    );
    Mold item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DeleteMoldByUserIdResult> asyncResult = null;
yield return client.DeleteMoldByUserId(
    new Gs2.Gs2Formation.Request.DeleteMoldByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithMoldModelName("mold-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.deleteMoldByUserId(
        new Gs2Formation.DeleteMoldByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.delete_mold_by_user_id(
        formation.DeleteMoldByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_mold_model_name('mold-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.delete_mold_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.delete_mold_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### describeForms

List Forms

Retrieves a paginated list of the requesting user's forms within the specified mold (form storage area).
Each form contains a set of slots that can hold references to items from inventory, simple inventory, or dictionary.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| pageToken | string |  | |  |  ~ 1024 chars | Token specifying the position from which to start acquiring data |
| limit | int |  | | 30 | 1 ~ 1000 | Number of data items to retrieve |

#### Result

|  | Type | Description |
| --- | --- | --- |
| items | [List&lt;Form&gt;](#form) | List of Form |
| nextPageToken | string | Page token to retrieve the rest of the listing |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribeForms(
    &formation.DescribeFormsRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MoldModelName: pointy.String("mold-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribeFormsRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describeForms(
        (new DescribeFormsRequest())
            ->withNamespaceName("namespace-0001")
            ->withMoldModelName("mold-0001")
            ->withAccessToken("accessToken-0001")
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribeFormsRequest;
import io.gs2.formation.result.DescribeFormsResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DescribeFormsResult result = client.describeForms(
        new DescribeFormsRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
            .withAccessToken("accessToken-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<Form> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DescribeFormsResult> asyncResult = null;
yield return client.DescribeForms(
    new Gs2.Gs2Formation.Request.DescribeFormsRequest()
        .WithNamespaceName("namespace-0001")
        .WithMoldModelName("mold-0001")
        .WithAccessToken("accessToken-0001")
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.describeForms(
        new Gs2Formation.DescribeFormsRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
            .withAccessToken("accessToken-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.describe_forms(
        formation.DescribeFormsRequest()
            .with_namespace_name('namespace-0001')
            .with_mold_model_name('mold-0001')
            .with_access_token('accessToken-0001')
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.describe_forms({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
    accessToken="accessToken-0001",
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.describe_forms_async({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
    accessToken="accessToken-0001",
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```



---

### describeFormsByUserId

List Forms by User ID

Retrieves a paginated list of forms for the specified user within the specified mold.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| pageToken | string |  | |  |  ~ 1024 chars | Token specifying the position from which to start acquiring data |
| limit | int |  | | 30 | 1 ~ 1000 | Number of data items to retrieve |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| items | [List&lt;Form&gt;](#form) | List of Form |
| nextPageToken | string | Page token to retrieve the rest of the listing |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribeFormsByUserId(
    &formation.DescribeFormsByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MoldModelName: pointy.String("mold-0001"),
        UserId: pointy.String("user-0001"),
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribeFormsByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describeFormsByUserId(
        (new DescribeFormsByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withMoldModelName("mold-0001")
            ->withUserId("user-0001")
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribeFormsByUserIdRequest;
import io.gs2.formation.result.DescribeFormsByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DescribeFormsByUserIdResult result = client.describeFormsByUserId(
        new DescribeFormsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
            .withUserId("user-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<Form> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DescribeFormsByUserIdResult> asyncResult = null;
yield return client.DescribeFormsByUserId(
    new Gs2.Gs2Formation.Request.DescribeFormsByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithMoldModelName("mold-0001")
        .WithUserId("user-0001")
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.describeFormsByUserId(
        new Gs2Formation.DescribeFormsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
            .withUserId("user-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.describe_forms_by_user_id(
        formation.DescribeFormsByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_mold_model_name('mold-0001')
            .with_user_id('user-0001')
            .with_page_token(None)
            .with_limit(None)
            .with_time_offset_token(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.describe_forms_by_user_id({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
    userId="user-0001",
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.describe_forms_by_user_id_async({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
    userId="user-0001",
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```



---

### getForm

Get Form

Retrieves a specific form by mold model name and index for the requesting user.
Returns the form along with the associated mold, mold model, and form model information.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name |
| index | int |  | ✓|  | 0 ~ 2147483646 | Index of form<br>The zero-based index identifying which save slot this form occupies within the mold. The maximum index is limited by the mold's current capacity. For example, index 0 might be "Party 1" and index 1 might be "Party 2". |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Form](#form) | Form |
| mold | [Mold](#mold) | Form Storage Area |
| moldModel | [MoldModel](#moldmodel) | Form Storage Area Model |
| formModel | [FormModel](#formmodel) | Form Model |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetForm(
    &formation.GetFormRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
mold := result.Mold
moldModel := result.MoldModel
formModel := result.FormModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetFormRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getForm(
        (new GetFormRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
    );
    $item = $result->getItem();
    $mold = $result->getMold();
    $moldModel = $result->getMoldModel();
    $formModel = $result->getFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetFormRequest;
import io.gs2.formation.result.GetFormResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetFormResult result = client.getForm(
        new GetFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
    );
    Form item = result.getItem();
    Mold mold = result.getMold();
    MoldModel moldModel = result.getMoldModel();
    FormModel formModel = result.getFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetFormResult> asyncResult = null;
yield return client.GetForm(
    new Gs2.Gs2Formation.Request.GetFormRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var mold = result.Mold;
var moldModel = result.MoldModel;
var formModel = result.FormModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getForm(
        new Gs2Formation.GetFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
    );
    const item = result.getItem();
    const mold = result.getMold();
    const moldModel = result.getMoldModel();
    const formModel = result.getFormModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_form(
        formation.GetFormRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
    )
    item = result.item
    mold = result.mold
    mold_model = result.mold_model
    form_model = result.form_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_form({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
    index=0,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_form_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
    index=0,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

```



---

### getFormByUserId

Get Form by User ID

Retrieves a specific form for the specified user by mold model name and index.
Returns the form along with the associated mold, mold model, and form model information.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name |
| index | int |  | ✓|  | 0 ~ 2147483646 | Index of form<br>The zero-based index identifying which save slot this form occupies within the mold. The maximum index is limited by the mold's current capacity. For example, index 0 might be "Party 1" and index 1 might be "Party 2". |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Form](#form) | Form |
| mold | [Mold](#mold) | Form Storage Area |
| moldModel | [MoldModel](#moldmodel) | Form Storage Area Model |
| formModel | [FormModel](#formmodel) | Form Model |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetFormByUserId(
    &formation.GetFormByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
mold := result.Mold
moldModel := result.MoldModel
formModel := result.FormModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetFormByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getFormByUserId(
        (new GetFormByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $mold = $result->getMold();
    $moldModel = $result->getMoldModel();
    $formModel = $result->getFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetFormByUserIdRequest;
import io.gs2.formation.result.GetFormByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetFormByUserIdResult result = client.getFormByUserId(
        new GetFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withTimeOffsetToken(null)
    );
    Form item = result.getItem();
    Mold mold = result.getMold();
    MoldModel moldModel = result.getMoldModel();
    FormModel formModel = result.getFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetFormByUserIdResult> asyncResult = null;
yield return client.GetFormByUserId(
    new Gs2.Gs2Formation.Request.GetFormByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var mold = result.Mold;
var moldModel = result.MoldModel;
var formModel = result.FormModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getFormByUserId(
        new Gs2Formation.GetFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const mold = result.getMold();
    const moldModel = result.getMoldModel();
    const formModel = result.getFormModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_form_by_user_id(
        formation.GetFormByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
            .with_time_offset_token(None)
    )
    item = result.item
    mold = result.mold
    mold_model = result.mold_model
    form_model = result.form_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_form_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    index=0,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_form_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    index=0,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

```



---

### getFormWithSignature

Retrieve signed forms

Retrieves a form along with a cryptographic signature generated using the specified encryption key.
The form data is serialized to JSON and signed, allowing the client to verify the integrity of the form data.
The signature can be used when updating the form via SetFormWithSignature to ensure slot contents have not been tampered with.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name |
| index | int |  | ✓|  | 0 ~ 2147483646 | Index of form<br>The zero-based index identifying which save slot this form occupies within the mold. The maximum index is limited by the mold's current capacity. For example, index 0 might be "Party 1" and index 1 might be "Party 2". |
| keyId | string |  | | "grn:gs2:{region}:{ownerId}:key:default:key:default" |  ~ 1024 chars | Encryption Key GRN |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Form](#form) | Form |
| body | string | Value to be signed |
| signature | string | Signature |
| mold | [Mold](#mold) | Form Storage Area |
| moldModel | [MoldModel](#moldmodel) | Form Storage Area Model |
| formModel | [FormModel](#formmodel) | Form Model |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetFormWithSignature(
    &formation.GetFormWithSignatureRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
body := result.Body
signature := result.Signature
mold := result.Mold
moldModel := result.MoldModel
formModel := result.FormModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetFormWithSignatureRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getFormWithSignature(
        (new GetFormWithSignatureRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
            ->withKeyId("key-0001")
    );
    $item = $result->getItem();
    $body = $result->getBody();
    $signature = $result->getSignature();
    $mold = $result->getMold();
    $moldModel = $result->getMoldModel();
    $formModel = $result->getFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetFormWithSignatureRequest;
import io.gs2.formation.result.GetFormWithSignatureResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetFormWithSignatureResult result = client.getFormWithSignature(
        new GetFormWithSignatureRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withKeyId("key-0001")
    );
    Form item = result.getItem();
    String body = result.getBody();
    String signature = result.getSignature();
    Mold mold = result.getMold();
    MoldModel moldModel = result.getMoldModel();
    FormModel formModel = result.getFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetFormWithSignatureResult> asyncResult = null;
yield return client.GetFormWithSignature(
    new Gs2.Gs2Formation.Request.GetFormWithSignatureRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0)
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var body = result.Body;
var signature = result.Signature;
var mold = result.Mold;
var moldModel = result.MoldModel;
var formModel = result.FormModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getFormWithSignature(
        new Gs2Formation.GetFormWithSignatureRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withKeyId("key-0001")
    );
    const item = result.getItem();
    const body = result.getBody();
    const signature = result.getSignature();
    const mold = result.getMold();
    const moldModel = result.getMoldModel();
    const formModel = result.getFormModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_form_with_signature(
        formation.GetFormWithSignatureRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
            .with_key_id('key-0001')
    )
    item = result.item
    body = result.body
    signature = result.signature
    mold = result.mold
    mold_model = result.mold_model
    form_model = result.form_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_form_with_signature({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
    index=0,
    keyId="key-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_form_with_signature_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
    index=0,
    keyId="key-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

```



---

### getFormWithSignatureByUserId

Get signed Form by User ID

Retrieves a form for the specified user along with a cryptographic signature.
The signature is generated using the specified encryption key and can be used for secure verification.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name |
| index | int |  | ✓|  | 0 ~ 2147483646 | Index of form<br>The zero-based index identifying which save slot this form occupies within the mold. The maximum index is limited by the mold's current capacity. For example, index 0 might be "Party 1" and index 1 might be "Party 2". |
| keyId | string |  | | "grn:gs2:{region}:{ownerId}:key:default:key:default" |  ~ 1024 chars | Encryption Key GRN |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Form](#form) | Form |
| body | string | Value to be signed |
| signature | string | Signature |
| mold | [Mold](#mold) | Form Storage Area |
| moldModel | [MoldModel](#moldmodel) | Form Storage Area Model |
| formModel | [FormModel](#formmodel) | Form Model |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetFormWithSignatureByUserId(
    &formation.GetFormWithSignatureByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
        KeyId: pointy.String("key-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
body := result.Body
signature := result.Signature
mold := result.Mold
moldModel := result.MoldModel
formModel := result.FormModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetFormWithSignatureByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getFormWithSignatureByUserId(
        (new GetFormWithSignatureByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
            ->withKeyId("key-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $body = $result->getBody();
    $signature = $result->getSignature();
    $mold = $result->getMold();
    $moldModel = $result->getMoldModel();
    $formModel = $result->getFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetFormWithSignatureByUserIdRequest;
import io.gs2.formation.result.GetFormWithSignatureByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetFormWithSignatureByUserIdResult result = client.getFormWithSignatureByUserId(
        new GetFormWithSignatureByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withKeyId("key-0001")
            .withTimeOffsetToken(null)
    );
    Form item = result.getItem();
    String body = result.getBody();
    String signature = result.getSignature();
    Mold mold = result.getMold();
    MoldModel moldModel = result.getMoldModel();
    FormModel formModel = result.getFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetFormWithSignatureByUserIdResult> asyncResult = null;
yield return client.GetFormWithSignatureByUserId(
    new Gs2.Gs2Formation.Request.GetFormWithSignatureByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0)
        .WithKeyId("key-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var body = result.Body;
var signature = result.Signature;
var mold = result.Mold;
var moldModel = result.MoldModel;
var formModel = result.FormModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getFormWithSignatureByUserId(
        new Gs2Formation.GetFormWithSignatureByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withKeyId("key-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const body = result.getBody();
    const signature = result.getSignature();
    const mold = result.getMold();
    const moldModel = result.getMoldModel();
    const formModel = result.getFormModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_form_with_signature_by_user_id(
        formation.GetFormWithSignatureByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
            .with_key_id('key-0001')
            .with_time_offset_token(None)
    )
    item = result.item
    body = result.body
    signature = result.signature
    mold = result.mold
    mold_model = result.mold_model
    form_model = result.form_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_form_with_signature_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    index=0,
    keyId="key-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_form_with_signature_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    index=0,
    keyId="key-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

```



---

### setForm

Set form

Updates the slot values of a form for the requesting user. Slots define which items are placed in each position of the form.
This is the raw version without signature verification. Use SetFormWithSignature for client-side updates with tamper protection.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name |
| index | int |  | ✓|  | 0 ~ 2147483646 | Index of form<br>The zero-based index identifying which save slot this form occupies within the mold. The maximum index is limited by the mold's current capacity. For example, index 0 might be "Party 1" and index 1 might be "Party 2". |
| slots | [List&lt;Slot&gt;](#slot) |  | ✓|  | 1 ~ 10 items | List of Slots |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Form](#form) | Form |
| mold | [Mold](#mold) | Form Storage Area |
| moldModel | [MoldModel](#moldmodel) | Form Storage Area Model |
| formModel | [FormModel](#formmodel) | Form Model |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.SetForm(
    &formation.SetFormRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
        Slots: []formation.Slot{
            formation.Slot{
                Name: pointy.String("slot-0001"),
                PropertyId: pointy.String("property-0001"),
            },
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
mold := result.Mold
moldModel := result.MoldModel
formModel := result.FormModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\SetFormRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->setForm(
        (new SetFormRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
            ->withSlots([
                (new Slot())
                    ->withName("slot-0001")
                    ->withPropertyId("property-0001"),
            ])
    );
    $item = $result->getItem();
    $mold = $result->getMold();
    $moldModel = $result->getMoldModel();
    $formModel = $result->getFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.SetFormRequest;
import io.gs2.formation.result.SetFormResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    SetFormResult result = client.setForm(
        new SetFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withSlots(Arrays.asList(
                new Slot()
                    .withName("slot-0001")
                    .withPropertyId("property-0001")
            ))
    );
    Form item = result.getItem();
    Mold mold = result.getMold();
    MoldModel moldModel = result.getMoldModel();
    FormModel formModel = result.getFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.SetFormResult> asyncResult = null;
yield return client.SetForm(
    new Gs2.Gs2Formation.Request.SetFormRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0)
        .WithSlots(new Gs2.Gs2Formation.Model.Slot[] {
            new Gs2.Gs2Formation.Model.Slot()
                .WithName("slot-0001")
                .WithPropertyId("property-0001"),
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var mold = result.Mold;
var moldModel = result.MoldModel;
var formModel = result.FormModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.setForm(
        new Gs2Formation.SetFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withSlots([
                new Gs2Formation.model.Slot()
                    .withName("slot-0001")
                    .withPropertyId("property-0001"),
            ])
    );
    const item = result.getItem();
    const mold = result.getMold();
    const moldModel = result.getMoldModel();
    const formModel = result.getFormModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.set_form(
        formation.SetFormRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
            .with_slots([
                formation.Slot()
                    .with_name('slot-0001')
                    .with_property_id('property-0001'),
            ])
    )
    item = result.item
    mold = result.mold
    mold_model = result.mold_model
    form_model = result.form_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.set_form({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
    index=0,
    slots={
        {
            name="slot-0001",
            property_id="property-0001",
        }
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.set_form_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
    index=0,
    slots={
        {
            name="slot-0001",
            property_id="property-0001",
        }
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

```



---

### setFormByUserId

Set form by User ID

Updates the slot values of a form for the specified user.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name |
| index | int |  | ✓|  | 0 ~ 2147483646 | Index of form<br>The zero-based index identifying which save slot this form occupies within the mold. The maximum index is limited by the mold's current capacity. For example, index 0 might be "Party 1" and index 1 might be "Party 2". |
| slots | [List&lt;Slot&gt;](#slot) |  | ✓|  | 1 ~ 10 items | List of Slots |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Form](#form) | Form |
| mold | [Mold](#mold) | Form Storage Area |
| moldModel | [MoldModel](#moldmodel) | Form Storage Area Model |
| formModel | [FormModel](#formmodel) | Form Model |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.SetFormByUserId(
    &formation.SetFormByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
        Slots: []formation.Slot{
            formation.Slot{
                Name: pointy.String("slot-0001"),
                PropertyId: pointy.String("grn:1001"),
            },
        },
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
mold := result.Mold
moldModel := result.MoldModel
formModel := result.FormModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\SetFormByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->setFormByUserId(
        (new SetFormByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
            ->withSlots([
                (new \Gs2\Formation\Model\Slot())
                    ->withName("slot-0001")
                    ->withPropertyId("grn:1001"),
            ])
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $mold = $result->getMold();
    $moldModel = $result->getMoldModel();
    $formModel = $result->getFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.SetFormByUserIdRequest;
import io.gs2.formation.result.SetFormByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    SetFormByUserIdResult result = client.setFormByUserId(
        new SetFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withSlots(Arrays.asList(
                new io.gs2.formation.model.Slot()
                    .withName("slot-0001")
                    .withPropertyId("grn:1001")
            ))
            .withTimeOffsetToken(null)
    );
    Form item = result.getItem();
    Mold mold = result.getMold();
    MoldModel moldModel = result.getMoldModel();
    FormModel formModel = result.getFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.SetFormByUserIdResult> asyncResult = null;
yield return client.SetFormByUserId(
    new Gs2.Gs2Formation.Request.SetFormByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0)
        .WithSlots(new Gs2.Gs2Formation.Model.Slot[] {
            new Gs2.Gs2Formation.Model.Slot()
                .WithName("slot-0001")
                .WithPropertyId("grn:1001"),
        })
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var mold = result.Mold;
var moldModel = result.MoldModel;
var formModel = result.FormModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.setFormByUserId(
        new Gs2Formation.SetFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withSlots([
                new Gs2Formation.model.Slot()
                    .withName("slot-0001")
                    .withPropertyId("grn:1001"),
            ])
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const mold = result.getMold();
    const moldModel = result.getMoldModel();
    const formModel = result.getFormModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.set_form_by_user_id(
        formation.SetFormByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
            .with_slots([
                formation.Slot()
                    .with_name('slot-0001')
                    .with_property_id('grn:1001'),
            ])
            .with_time_offset_token(None)
    )
    item = result.item
    mold = result.mold
    mold_model = result.mold_model
    form_model = result.form_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.set_form_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    index=0,
    slots={
        {
            name="slot-0001",
            propertyId="grn:1001",
        }
    },
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.set_form_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    index=0,
    slots={
        {
            name="slot-0001",
            propertyId="grn:1001",
        }
    },
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

```



---

### setFormWithSignature

Update forms with signed slots

Updates form slots with signature verification for tamper protection.
Each slot must include a body and signature that are verified against the encryption key. Supports three property types for slot content: gs2_inventory (extracts ItemSetId), gs2_simple_inventory (extracts ItemId), and gs2_dictionary (extracts EntryId).
After verification, the validated slots are applied to the form.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name |
| index | int |  | ✓|  | 0 ~ 2147483646 | Index of form<br>The zero-based index identifying which save slot this form occupies within the mold. The maximum index is limited by the mold's current capacity. For example, index 0 might be "Party 1" and index 1 might be "Party 2". |
| slots | [List&lt;SlotWithSignature&gt;](#slotwithsignature) |  | ✓|  | 1 ~ 10 items | List of Slot |
| keyId | string |  | | "grn:gs2:{region}:{ownerId}:key:default:key:default" |  ~ 1024 chars | Encryption Key GRN |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Form](#form) | Form |
| mold | [Mold](#mold) | Form Storage Area |
| moldModel | [MoldModel](#moldmodel) | Form Storage Area Model |
| formModel | [FormModel](#formmodel) | Form Model |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.SetFormWithSignature(
    &formation.SetFormWithSignatureRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
        Slots: []formation.SlotWithSignature{
            formation.SlotWithSignature{
                Name: pointy.String("slot-0001"),
                PropertyType: pointy.String("gs2_dictionary"),
                Body: pointy.String("body"),
                Signature: pointy.String("signature"),
            },
        },
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
mold := result.Mold
moldModel := result.MoldModel
formModel := result.FormModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\SetFormWithSignatureRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->setFormWithSignature(
        (new SetFormWithSignatureRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
            ->withSlots([
                (new SlotWithSignature())
                    ->withName("slot-0001")
                    ->withPropertyType("gs2_dictionary")
                    ->withBody("body")
                    ->withSignature("signature"),
            ])
            ->withKeyId("key-0001")
    );
    $item = $result->getItem();
    $mold = $result->getMold();
    $moldModel = $result->getMoldModel();
    $formModel = $result->getFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.SetFormWithSignatureRequest;
import io.gs2.formation.result.SetFormWithSignatureResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    SetFormWithSignatureResult result = client.setFormWithSignature(
        new SetFormWithSignatureRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withSlots(Arrays.asList(
                new SlotWithSignature()
                    .withName("slot-0001")
                    .withPropertyType("gs2_dictionary")
                    .withBody("body")
                    .withSignature("signature")
            ))
            .withKeyId("key-0001")
    );
    Form item = result.getItem();
    Mold mold = result.getMold();
    MoldModel moldModel = result.getMoldModel();
    FormModel formModel = result.getFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.SetFormWithSignatureResult> asyncResult = null;
yield return client.SetFormWithSignature(
    new Gs2.Gs2Formation.Request.SetFormWithSignatureRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0)
        .WithSlots(new Gs2.Gs2Formation.Model.SlotWithSignature[] {
            new Gs2.Gs2Formation.Model.SlotWithSignature()
                .WithName("slot-0001")
                .WithPropertyType("gs2_dictionary")
                .WithBody("body")
                .WithSignature("signature"),
        })
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var mold = result.Mold;
var moldModel = result.MoldModel;
var formModel = result.FormModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.setFormWithSignature(
        new Gs2Formation.SetFormWithSignatureRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withSlots([
                new Gs2Formation.model.SlotWithSignature()
                    .withName("slot-0001")
                    .withPropertyType("gs2_dictionary")
                    .withBody("body")
                    .withSignature("signature"),
            ])
            .withKeyId("key-0001")
    );
    const item = result.getItem();
    const mold = result.getMold();
    const moldModel = result.getMoldModel();
    const formModel = result.getFormModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.set_form_with_signature(
        formation.SetFormWithSignatureRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
            .with_slots([
                formation.SlotWithSignature()
                    .with_name('slot-0001')
                    .with_property_type('gs2_dictionary')
                    .with_body('body')
                    .with_signature('signature'),
            ])
            .with_key_id('key-0001')
    )
    item = result.item
    mold = result.mold
    mold_model = result.mold_model
    form_model = result.form_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.set_form_with_signature({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
    index=0,
    slots={
        {
            name="slot-0001",
            property_type="gs2_dictionary",
            body="body",
            signature="signature",
        }
    },
    keyId="key-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.set_form_with_signature_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
    index=0,
    slots={
        {
            name="slot-0001",
            property_type="gs2_dictionary",
            body="body",
            signature="signature",
        }
    },
    keyId="key-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

```



---

### acquireActionsToFormProperties

Apply acquire action to Form Properties by User ID

Applies an acquire action to the form's slot properties and starts a transaction to execute it.
This is used to grant items or resources to the slots of a form, with optional config parameters for customization.
Returns a transaction for transaction processing.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name |
| index | int |  | ✓|  | 0 ~ 2147483646 | Index of form<br>The zero-based index identifying which save slot this form occupies within the mold. The maximum index is limited by the mold's current capacity. For example, index 0 might be "Party 1" and index 1 might be "Party 2". |
| acquireAction | [AcquireAction](#acquireaction) |  | ✓|  |  | Get action to be applied to form properties |
| config | [List&lt;Config&gt;](#config) |  | | [] | 0 ~ 1000 items | List of Acquisition config |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Form](#form) | Form |
| mold | [Mold](#mold) | Form Storage Area |
| transactionId | string | Issued transaction ID |
| stampSheet | string | Stamp sheet |
| stampSheetEncryptionKeyId | string | Cryptographic key GRN used for stamp sheet signature calculations |
| autoRunStampSheet | bool? | Whether automatic transaction execution is enabled |
| atomicCommit | bool? | Whether to commit the transaction atomically |
| transaction | string | Issued transaction |
| transactionResult | [TransactionResult](#transactionresult) | Transaction Execution Result |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.AcquireActionsToFormProperties(
    &formation.AcquireActionsToFormPropertiesRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
        AcquireAction: &formation.AcquireAction{
            Action: pointy.String("Gs2Experience:AddExperienceByUserId"),
            Request: pointy.String("{}"),
        },
        Config: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
mold := result.Mold
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
atomicCommit := result.AtomicCommit
transaction := result.Transaction
transactionResult := result.TransactionResult

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\AcquireActionsToFormPropertiesRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->acquireActionsToFormProperties(
        (new AcquireActionsToFormPropertiesRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
            ->withAcquireAction((new AcquireAction())
                ->withAction("Gs2Experience:AddExperienceByUserId")
                ->withRequest("{}")
            )
            ->withConfig(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $mold = $result->getMold();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
    $atomicCommit = $result->getAtomicCommit();
    $transaction = $result->getTransaction();
    $transactionResult = $result->getTransactionResult();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.AcquireActionsToFormPropertiesRequest;
import io.gs2.formation.result.AcquireActionsToFormPropertiesResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    AcquireActionsToFormPropertiesResult result = client.acquireActionsToFormProperties(
        new AcquireActionsToFormPropertiesRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withAcquireAction(new AcquireAction()
                .withAction("Gs2Experience:AddExperienceByUserId")
                .withRequest("{}")
            )
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    Form item = result.getItem();
    Mold mold = result.getMold();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
    boolean atomicCommit = result.getAtomicCommit();
    String transaction = result.getTransaction();
    TransactionResult transactionResult = result.getTransactionResult();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.AcquireActionsToFormPropertiesResult> asyncResult = null;
yield return client.AcquireActionsToFormProperties(
    new Gs2.Gs2Formation.Request.AcquireActionsToFormPropertiesRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0)
        .WithAcquireAction(new Gs2.Core.Model.AcquireAction()
            .WithAction("Gs2Experience:AddExperienceByUserId")
            .WithRequest("{}")
        )
        .WithConfig(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var mold = result.Mold;
var transactionId = result.TransactionId;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var autoRunStampSheet = result.AutoRunStampSheet;
var atomicCommit = result.AtomicCommit;
var transaction = result.Transaction;
var transactionResult = result.TransactionResult;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.acquireActionsToFormProperties(
        new Gs2Formation.AcquireActionsToFormPropertiesRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withAcquireAction(new Gs2Formation.model.AcquireAction()
                .withAction("Gs2Experience:AddExperienceByUserId")
                .withRequest("{}")
            )
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const mold = result.getMold();
    const transactionId = result.getTransactionId();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const autoRunStampSheet = result.getAutoRunStampSheet();
    const atomicCommit = result.getAtomicCommit();
    const transaction = result.getTransaction();
    const transactionResult = result.getTransactionResult();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.acquire_actions_to_form_properties(
        formation.AcquireActionsToFormPropertiesRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
            .with_acquire_action(formation.AcquireAction()
                .with_action('Gs2Experience:AddExperienceByUserId')
                .with_request('{}')
            )
            .with_config(None)
            .with_time_offset_token(None)
    )
    item = result.item
    mold = result.mold
    transaction_id = result.transaction_id
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    auto_run_stamp_sheet = result.auto_run_stamp_sheet
    atomic_commit = result.atomic_commit
    transaction = result.transaction
    transaction_result = result.transaction_result
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.acquire_actions_to_form_properties({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    index=0,
    acquireAction={
        action="Gs2Experience:AddExperienceByUserId",
        request="{}",
    },
    config=nil,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
mold = result.mold;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.acquire_actions_to_form_properties_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    index=0,
    acquireAction={
        action="Gs2Experience:AddExperienceByUserId",
        request="{}",
    },
    config=nil,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
mold = result.mold;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

```



---

### deleteForm

Delete form

Deletes a form for the requesting user at the specified mold model and index.
This removes all slot data associated with the form.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name |
| index | int |  | ✓|  | 0 ~ 2147483646 | Index of form<br>The zero-based index identifying which save slot this form occupies within the mold. The maximum index is limited by the mold's current capacity. For example, index 0 might be "Party 1" and index 1 might be "Party 2". |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Form](#form) | Form |
| mold | [Mold](#mold) | Form Storage Area |
| moldModel | [MoldModel](#moldmodel) | Form Storage Area Model |
| formModel | [FormModel](#formmodel) | Form Model |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeleteForm(
    &formation.DeleteFormRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
mold := result.Mold
moldModel := result.MoldModel
formModel := result.FormModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeleteFormRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deleteForm(
        (new DeleteFormRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
    );
    $item = $result->getItem();
    $mold = $result->getMold();
    $moldModel = $result->getMoldModel();
    $formModel = $result->getFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeleteFormRequest;
import io.gs2.formation.result.DeleteFormResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DeleteFormResult result = client.deleteForm(
        new DeleteFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
    );
    Form item = result.getItem();
    Mold mold = result.getMold();
    MoldModel moldModel = result.getMoldModel();
    FormModel formModel = result.getFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DeleteFormResult> asyncResult = null;
yield return client.DeleteForm(
    new Gs2.Gs2Formation.Request.DeleteFormRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var mold = result.Mold;
var moldModel = result.MoldModel;
var formModel = result.FormModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.deleteForm(
        new Gs2Formation.DeleteFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
    );
    const item = result.getItem();
    const mold = result.getMold();
    const moldModel = result.getMoldModel();
    const formModel = result.getFormModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.delete_form(
        formation.DeleteFormRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
    )
    item = result.item
    mold = result.mold
    mold_model = result.mold_model
    form_model = result.form_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.delete_form({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
    index=0,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.delete_form_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
    index=0,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

```



---

### deleteFormByUserId

Delete Form by User ID

Deletes a form for the specified user at the specified mold model and index.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name |
| index | int |  | ✓|  | 0 ~ 2147483646 | Index of form<br>The zero-based index identifying which save slot this form occupies within the mold. The maximum index is limited by the mold's current capacity. For example, index 0 might be "Party 1" and index 1 might be "Party 2". |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [Form](#form) | Form |
| mold | [Mold](#mold) | Form Storage Area |
| moldModel | [MoldModel](#moldmodel) | Form Storage Area Model |
| formModel | [FormModel](#formmodel) | Form Model |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeleteFormByUserId(
    &formation.DeleteFormByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
mold := result.Mold
moldModel := result.MoldModel
formModel := result.FormModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeleteFormByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deleteFormByUserId(
        (new DeleteFormByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $mold = $result->getMold();
    $moldModel = $result->getMoldModel();
    $formModel = $result->getFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeleteFormByUserIdRequest;
import io.gs2.formation.result.DeleteFormByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DeleteFormByUserIdResult result = client.deleteFormByUserId(
        new DeleteFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withTimeOffsetToken(null)
    );
    Form item = result.getItem();
    Mold mold = result.getMold();
    MoldModel moldModel = result.getMoldModel();
    FormModel formModel = result.getFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DeleteFormByUserIdResult> asyncResult = null;
yield return client.DeleteFormByUserId(
    new Gs2.Gs2Formation.Request.DeleteFormByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var mold = result.Mold;
var moldModel = result.MoldModel;
var formModel = result.FormModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.deleteFormByUserId(
        new Gs2Formation.DeleteFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const mold = result.getMold();
    const moldModel = result.getMoldModel();
    const formModel = result.getFormModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.delete_form_by_user_id(
        formation.DeleteFormByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
            .with_time_offset_token(None)
    )
    item = result.item
    mold = result.mold
    mold_model = result.mold_model
    form_model = result.form_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.delete_form_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    index=0,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.delete_form_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    index=0,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

```



---

### describePropertyForms

List Property Forms

Retrieves a paginated list of the requesting user's property forms for the specified property form model.
Property forms are similar to forms but are identified by a custom property ID (e.g., a character ID) rather than an index within a mold.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| propertyFormModelName | string |  | ✓|  |  ~ 128 chars | Property Form Model name |
| pageToken | string |  | |  |  ~ 1024 chars | Token specifying the position from which to start acquiring data |
| limit | int |  | | 30 | 1 ~ 1000 | Number of data items to retrieve |

#### Result

|  | Type | Description |
| --- | --- | --- |
| items | [List&lt;PropertyForm&gt;](#propertyform) | List of PropertyForm |
| nextPageToken | string | Page token to retrieve the rest of the listing |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribePropertyForms(
    &formation.DescribePropertyFormsRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribePropertyFormsRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describePropertyForms(
        (new DescribePropertyFormsRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribePropertyFormsRequest;
import io.gs2.formation.result.DescribePropertyFormsResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DescribePropertyFormsResult result = client.describePropertyForms(
        new DescribePropertyFormsRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<PropertyForm> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DescribePropertyFormsResult> asyncResult = null;
yield return client.DescribePropertyForms(
    new Gs2.Gs2Formation.Request.DescribePropertyFormsRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.describePropertyForms(
        new Gs2Formation.DescribePropertyFormsRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.describe_property_forms(
        formation.DescribePropertyFormsRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_property_form_model_name('form-0001')
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.describe_property_forms({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.describe_property_forms_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```



---

### describePropertyFormsByUserId

List Property Forms by User ID

Retrieves a paginated list of property forms for the specified user and property form model.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| propertyFormModelName | string |  | ✓|  |  ~ 128 chars | Property Form Model name |
| pageToken | string |  | |  |  ~ 1024 chars | Token specifying the position from which to start acquiring data |
| limit | int |  | | 30 | 1 ~ 1000 | Number of data items to retrieve |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| items | [List&lt;PropertyForm&gt;](#propertyform) | List of PropertyForm |
| nextPageToken | string | Page token to retrieve the rest of the listing |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribePropertyFormsByUserId(
    &formation.DescribePropertyFormsByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribePropertyFormsByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describePropertyFormsByUserId(
        (new DescribePropertyFormsByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribePropertyFormsByUserIdRequest;
import io.gs2.formation.result.DescribePropertyFormsByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DescribePropertyFormsByUserIdResult result = client.describePropertyFormsByUserId(
        new DescribePropertyFormsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<PropertyForm> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DescribePropertyFormsByUserIdResult> asyncResult = null;
yield return client.DescribePropertyFormsByUserId(
    new Gs2.Gs2Formation.Request.DescribePropertyFormsByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.describePropertyFormsByUserId(
        new Gs2Formation.DescribePropertyFormsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.describe_property_forms_by_user_id(
        formation.DescribePropertyFormsByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_property_form_model_name('form-0001')
            .with_page_token(None)
            .with_limit(None)
            .with_time_offset_token(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.describe_property_forms_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.describe_property_forms_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    pageToken=nil,
    limit=nil,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```



---

### getPropertyForm

Get Property Form

Retrieves a specific property form for the requesting user by property form model name and property ID.
The property ID is normalized before retrieval. Returns the property form along with the associated property form model information.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| propertyFormModelName | string |  | ✓|  |  ~ 128 chars | Property Form Model name |
| propertyId | string |  | ✓|  |  ~ 1024 chars | Property ID<br>A developer-defined identifier that uniquely identifies this property form instance. Typically set to the GRN of the owned resource (e.g., a GS2-Inventory item set) that this form configures, such as setting skills on a specific piece of equipment. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [PropertyForm](#propertyform) | PropertyForm |
| propertyFormModel | [PropertyFormModel](#propertyformmodel) | Form Model |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetPropertyForm(
    &formation.GetPropertyFormRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
propertyFormModel := result.PropertyFormModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetPropertyFormRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getPropertyForm(
        (new GetPropertyFormRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
    );
    $item = $result->getItem();
    $propertyFormModel = $result->getPropertyFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetPropertyFormRequest;
import io.gs2.formation.result.GetPropertyFormResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetPropertyFormResult result = client.getPropertyForm(
        new GetPropertyFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
    );
    PropertyForm item = result.getItem();
    PropertyFormModel propertyFormModel = result.getPropertyFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetPropertyFormResult> asyncResult = null;
yield return client.GetPropertyForm(
    new Gs2.Gs2Formation.Request.GetPropertyFormRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var propertyFormModel = result.PropertyFormModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getPropertyForm(
        new Gs2Formation.GetPropertyFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
    );
    const item = result.getItem();
    const propertyFormModel = result.getPropertyFormModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_property_form(
        formation.GetPropertyFormRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
    )
    item = result.item
    property_form_model = result.property_form_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_property_form({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_property_form_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;

```



---

### getPropertyFormByUserId

Get Property Form by User ID

Retrieves a specific property form for the specified user by property form model name and property ID.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| propertyFormModelName | string |  | ✓|  |  ~ 128 chars | Property Form Model name |
| propertyId | string |  | ✓|  |  ~ 1024 chars | Property ID<br>A developer-defined identifier that uniquely identifies this property form instance. Typically set to the GRN of the owned resource (e.g., a GS2-Inventory item set) that this form configures, such as setting skills on a specific piece of equipment. |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [PropertyForm](#propertyform) | PropertyForm |
| propertyFormModel | [PropertyFormModel](#propertyformmodel) | Form Model |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetPropertyFormByUserId(
    &formation.GetPropertyFormByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
propertyFormModel := result.PropertyFormModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetPropertyFormByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getPropertyFormByUserId(
        (new GetPropertyFormByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $propertyFormModel = $result->getPropertyFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetPropertyFormByUserIdRequest;
import io.gs2.formation.result.GetPropertyFormByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetPropertyFormByUserIdResult result = client.getPropertyFormByUserId(
        new GetPropertyFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withTimeOffsetToken(null)
    );
    PropertyForm item = result.getItem();
    PropertyFormModel propertyFormModel = result.getPropertyFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetPropertyFormByUserIdResult> asyncResult = null;
yield return client.GetPropertyFormByUserId(
    new Gs2.Gs2Formation.Request.GetPropertyFormByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var propertyFormModel = result.PropertyFormModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getPropertyFormByUserId(
        new Gs2Formation.GetPropertyFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const propertyFormModel = result.getPropertyFormModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_property_form_by_user_id(
        formation.GetPropertyFormByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
            .with_time_offset_token(None)
    )
    item = result.item
    property_form_model = result.property_form_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_property_form_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_property_form_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;

```



---

### getPropertyFormWithSignature

Retrieve signed Property Forms

Retrieves a property form along with a cryptographic signature generated using the specified encryption key.
The signature can be used when updating the property form via SetPropertyFormWithSignature to ensure slot contents have not been tampered with.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| propertyFormModelName | string |  | ✓|  |  ~ 128 chars | Property Form Model name |
| propertyId | string |  | ✓|  |  ~ 1024 chars | Property ID<br>A developer-defined identifier that uniquely identifies this property form instance. Typically set to the GRN of the owned resource (e.g., a GS2-Inventory item set) that this form configures, such as setting skills on a specific piece of equipment. |
| keyId | string |  | | "grn:gs2:{region}:{ownerId}:key:default:key:default" |  ~ 1024 chars | Encryption Key GRN |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [PropertyForm](#propertyform) | Property Form |
| body | string | Value to be signed |
| signature | string | Signature |
| propertyFormModel | [PropertyFormModel](#propertyformmodel) | Property Form Model |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetPropertyFormWithSignature(
    &formation.GetPropertyFormWithSignatureRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
body := result.Body
signature := result.Signature
propertyFormModel := result.PropertyFormModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetPropertyFormWithSignatureRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getPropertyFormWithSignature(
        (new GetPropertyFormWithSignatureRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
            ->withKeyId("key-0001")
    );
    $item = $result->getItem();
    $body = $result->getBody();
    $signature = $result->getSignature();
    $propertyFormModel = $result->getPropertyFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetPropertyFormWithSignatureRequest;
import io.gs2.formation.result.GetPropertyFormWithSignatureResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetPropertyFormWithSignatureResult result = client.getPropertyFormWithSignature(
        new GetPropertyFormWithSignatureRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withKeyId("key-0001")
    );
    PropertyForm item = result.getItem();
    String body = result.getBody();
    String signature = result.getSignature();
    PropertyFormModel propertyFormModel = result.getPropertyFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetPropertyFormWithSignatureResult> asyncResult = null;
yield return client.GetPropertyFormWithSignature(
    new Gs2.Gs2Formation.Request.GetPropertyFormWithSignatureRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001")
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var body = result.Body;
var signature = result.Signature;
var propertyFormModel = result.PropertyFormModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getPropertyFormWithSignature(
        new Gs2Formation.GetPropertyFormWithSignatureRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withKeyId("key-0001")
    );
    const item = result.getItem();
    const body = result.getBody();
    const signature = result.getSignature();
    const propertyFormModel = result.getPropertyFormModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_property_form_with_signature(
        formation.GetPropertyFormWithSignatureRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
            .with_key_id('key-0001')
    )
    item = result.item
    body = result.body
    signature = result.signature
    property_form_model = result.property_form_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_property_form_with_signature({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    keyId="key-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;
propertyFormModel = result.propertyFormModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_property_form_with_signature_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    keyId="key-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;
propertyFormModel = result.propertyFormModel;

```



---

### getPropertyFormWithSignatureByUserId

Get signed property form by User ID

Retrieves a property form for the specified user along with a cryptographic signature.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| propertyFormModelName | string |  | ✓|  |  ~ 128 chars | Property Form Model name |
| propertyId | string |  | ✓|  |  ~ 1024 chars | Property ID<br>A developer-defined identifier that uniquely identifies this property form instance. Typically set to the GRN of the owned resource (e.g., a GS2-Inventory item set) that this form configures, such as setting skills on a specific piece of equipment. |
| keyId | string |  | | "grn:gs2:{region}:{ownerId}:key:default:key:default" |  ~ 1024 chars | Encryption Key GRN |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [PropertyForm](#propertyform) | Property Form |
| body | string | Value to be signed |
| signature | string | Signature |
| propertyFormModel | [PropertyFormModel](#propertyformmodel) | Property Form Model |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetPropertyFormWithSignatureByUserId(
    &formation.GetPropertyFormWithSignatureByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
        KeyId: pointy.String("key-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
body := result.Body
signature := result.Signature
propertyFormModel := result.PropertyFormModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetPropertyFormWithSignatureByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getPropertyFormWithSignatureByUserId(
        (new GetPropertyFormWithSignatureByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
            ->withKeyId("key-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $body = $result->getBody();
    $signature = $result->getSignature();
    $propertyFormModel = $result->getPropertyFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetPropertyFormWithSignatureByUserIdRequest;
import io.gs2.formation.result.GetPropertyFormWithSignatureByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetPropertyFormWithSignatureByUserIdResult result = client.getPropertyFormWithSignatureByUserId(
        new GetPropertyFormWithSignatureByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withKeyId("key-0001")
            .withTimeOffsetToken(null)
    );
    PropertyForm item = result.getItem();
    String body = result.getBody();
    String signature = result.getSignature();
    PropertyFormModel propertyFormModel = result.getPropertyFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetPropertyFormWithSignatureByUserIdResult> asyncResult = null;
yield return client.GetPropertyFormWithSignatureByUserId(
    new Gs2.Gs2Formation.Request.GetPropertyFormWithSignatureByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001")
        .WithKeyId("key-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var body = result.Body;
var signature = result.Signature;
var propertyFormModel = result.PropertyFormModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getPropertyFormWithSignatureByUserId(
        new Gs2Formation.GetPropertyFormWithSignatureByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withKeyId("key-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const body = result.getBody();
    const signature = result.getSignature();
    const propertyFormModel = result.getPropertyFormModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_property_form_with_signature_by_user_id(
        formation.GetPropertyFormWithSignatureByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
            .with_key_id('key-0001')
            .with_time_offset_token(None)
    )
    item = result.item
    body = result.body
    signature = result.signature
    property_form_model = result.property_form_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_property_form_with_signature_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    keyId="key-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;
propertyFormModel = result.propertyFormModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_property_form_with_signature_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    keyId="key-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;
propertyFormModel = result.propertyFormModel;

```



---

### setPropertyForm

Update Property Form

Updates the slot values of a property form for the requesting user.
This is the raw version without signature verification. Use SetPropertyFormWithSignature for client-side updates with tamper protection.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| propertyFormModelName | string |  | ✓|  |  ~ 128 chars | Property Form Model name |
| propertyId | string |  | ✓|  |  ~ 1024 chars | Property ID<br>A developer-defined identifier that uniquely identifies this property form instance. Typically set to the GRN of the owned resource (e.g., a GS2-Inventory item set) that this form configures, such as setting skills on a specific piece of equipment. |
| slots | [List&lt;Slot&gt;](#slot) |  | ✓|  | 1 ~ 10 items | List of Slots |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [PropertyForm](#propertyform) | Property Form |
| propertyFormModel | [PropertyFormModel](#propertyformmodel) | Property Form Model |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.SetPropertyForm(
    &formation.SetPropertyFormRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
        Slots: []formation.Slot{
            formation.Slot{
                Name: pointy.String("slot-0001"),
                PropertyId: pointy.String("property-0001"),
            },
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
propertyFormModel := result.PropertyFormModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\SetPropertyFormRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->setPropertyForm(
        (new SetPropertyFormRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
            ->withSlots([
                (new Slot())
                    ->withName("slot-0001")
                    ->withPropertyId("property-0001"),
            ])
    );
    $item = $result->getItem();
    $propertyFormModel = $result->getPropertyFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.SetPropertyFormRequest;
import io.gs2.formation.result.SetPropertyFormResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    SetPropertyFormResult result = client.setPropertyForm(
        new SetPropertyFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withSlots(Arrays.asList(
                new Slot()
                    .withName("slot-0001")
                    .withPropertyId("property-0001")
            ))
    );
    PropertyForm item = result.getItem();
    PropertyFormModel propertyFormModel = result.getPropertyFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.SetPropertyFormResult> asyncResult = null;
yield return client.SetPropertyForm(
    new Gs2.Gs2Formation.Request.SetPropertyFormRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001")
        .WithSlots(new Gs2.Gs2Formation.Model.Slot[] {
            new Gs2.Gs2Formation.Model.Slot()
                .WithName("slot-0001")
                .WithPropertyId("property-0001"),
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var propertyFormModel = result.PropertyFormModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.setPropertyForm(
        new Gs2Formation.SetPropertyFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withSlots([
                new Gs2Formation.model.Slot()
                    .withName("slot-0001")
                    .withPropertyId("property-0001"),
            ])
    );
    const item = result.getItem();
    const propertyFormModel = result.getPropertyFormModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.set_property_form(
        formation.SetPropertyFormRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
            .with_slots([
                formation.Slot()
                    .with_name('slot-0001')
                    .with_property_id('property-0001'),
            ])
    )
    item = result.item
    property_form_model = result.property_form_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.set_property_form({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    slots={
        {
            name="slot-0001",
            property_id="property-0001",
        }
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.set_property_form_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    slots={
        {
            name="slot-0001",
            property_id="property-0001",
        }
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;

```



---

### setPropertyFormByUserId

Update Property Form by User ID

Updates the slot values of a property form for the specified user (server-side operation).
This is the raw version without signature verification, intended for server-side use where the caller is trusted.
Each slot holds a reference to a property from another service (inventory, simple inventory, or dictionary).
The property form is identified by a custom propertyId (e.g., a character ID) rather than an index within a mold.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| propertyFormModelName | string |  | ✓|  |  ~ 128 chars | Property Form Model name |
| propertyId | string |  | ✓|  |  ~ 1024 chars | Property ID<br>A developer-defined identifier that uniquely identifies this property form instance. Typically set to the GRN of the owned resource (e.g., a GS2-Inventory item set) that this form configures, such as setting skills on a specific piece of equipment. |
| slots | [List&lt;Slot&gt;](#slot) |  | ✓|  | 1 ~ 10 items | List of Slots |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [PropertyForm](#propertyform) | Property Form |
| propertyFormModel | [PropertyFormModel](#propertyformmodel) | Property Form Model |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.SetPropertyFormByUserId(
    &formation.SetPropertyFormByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
        Slots: []formation.Slot{
            formation.Slot{
                Name: pointy.String("slot-0001"),
                PropertyId: pointy.String("grn:1001"),
            },
        },
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
propertyFormModel := result.PropertyFormModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\SetPropertyFormByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->setPropertyFormByUserId(
        (new SetPropertyFormByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
            ->withSlots([
                (new \Gs2\Formation\Model\Slot())
                    ->withName("slot-0001")
                    ->withPropertyId("grn:1001"),
            ])
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $propertyFormModel = $result->getPropertyFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.SetPropertyFormByUserIdRequest;
import io.gs2.formation.result.SetPropertyFormByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    SetPropertyFormByUserIdResult result = client.setPropertyFormByUserId(
        new SetPropertyFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withSlots(Arrays.asList(
                new io.gs2.formation.model.Slot()
                    .withName("slot-0001")
                    .withPropertyId("grn:1001")
            ))
            .withTimeOffsetToken(null)
    );
    PropertyForm item = result.getItem();
    PropertyFormModel propertyFormModel = result.getPropertyFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.SetPropertyFormByUserIdResult> asyncResult = null;
yield return client.SetPropertyFormByUserId(
    new Gs2.Gs2Formation.Request.SetPropertyFormByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001")
        .WithSlots(new Gs2.Gs2Formation.Model.Slot[] {
            new Gs2.Gs2Formation.Model.Slot()
                .WithName("slot-0001")
                .WithPropertyId("grn:1001"),
        })
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var propertyFormModel = result.PropertyFormModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.setPropertyFormByUserId(
        new Gs2Formation.SetPropertyFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withSlots([
                new Gs2Formation.model.Slot()
                    .withName("slot-0001")
                    .withPropertyId("grn:1001"),
            ])
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const propertyFormModel = result.getPropertyFormModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.set_property_form_by_user_id(
        formation.SetPropertyFormByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
            .with_slots([
                formation.Slot()
                    .with_name('slot-0001')
                    .with_property_id('grn:1001'),
            ])
            .with_time_offset_token(None)
    )
    item = result.item
    property_form_model = result.property_form_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.set_property_form_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    slots={
        {
            name="slot-0001",
            propertyId="grn:1001",
        }
    },
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.set_property_form_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    slots={
        {
            name="slot-0001",
            propertyId="grn:1001",
        }
    },
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;

```



---

### setPropertyFormWithSignature

Update Property Form with signed slots

Updates the slot values of a property form with cryptographic signature verification for tamper protection.
Each slot includes a body and signature pair. The server verifies each slot's signature using the specified encryption key before applying the update.
Supports three property types based on the slot's property ID prefix:
- gs2_inventory: references an ItemSet from the Inventory service
- gs2_simple_inventory: references an Item from the Simple Inventory service
- gs2_dictionary: references an Entry from the Dictionary service
This is the recommended method for client-side updates as it prevents users from setting arbitrary values in form slots.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| propertyFormModelName | string |  | ✓|  |  ~ 128 chars | Property Form Model name |
| propertyId | string |  | ✓|  |  ~ 1024 chars | Property ID<br>A developer-defined identifier that uniquely identifies this property form instance. Typically set to the GRN of the owned resource (e.g., a GS2-Inventory item set) that this form configures, such as setting skills on a specific piece of equipment. |
| slots | [List&lt;SlotWithSignature&gt;](#slotwithsignature) |  | ✓|  | 1 ~ 10 items | List of Slot |
| keyId | string |  | | "grn:gs2:{region}:{ownerId}:key:default:key:default" |  ~ 1024 chars | Encryption Key GRN |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [PropertyForm](#propertyform) | Property Form |
| proeprtyFormModel | [PropertyFormModel](#propertyformmodel) | Property Form Model |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.SetPropertyFormWithSignature(
    &formation.SetPropertyFormWithSignatureRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
        Slots: []formation.SlotWithSignature{
            formation.SlotWithSignature{
                Name: pointy.String("slot-0001"),
                PropertyType: pointy.String("gs2_dictionary"),
                Body: pointy.String("body"),
                Signature: pointy.String("signature"),
            },
        },
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
proeprtyFormModel := result.ProeprtyFormModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\SetPropertyFormWithSignatureRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->setPropertyFormWithSignature(
        (new SetPropertyFormWithSignatureRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
            ->withSlots([
                (new SlotWithSignature())
                    ->withName("slot-0001")
                    ->withPropertyType("gs2_dictionary")
                    ->withBody("body")
                    ->withSignature("signature"),
            ])
            ->withKeyId("key-0001")
    );
    $item = $result->getItem();
    $proeprtyFormModel = $result->getProeprtyFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.SetPropertyFormWithSignatureRequest;
import io.gs2.formation.result.SetPropertyFormWithSignatureResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    SetPropertyFormWithSignatureResult result = client.setPropertyFormWithSignature(
        new SetPropertyFormWithSignatureRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withSlots(Arrays.asList(
                new SlotWithSignature()
                    .withName("slot-0001")
                    .withPropertyType("gs2_dictionary")
                    .withBody("body")
                    .withSignature("signature")
            ))
            .withKeyId("key-0001")
    );
    PropertyForm item = result.getItem();
    PropertyFormModel proeprtyFormModel = result.getProeprtyFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.SetPropertyFormWithSignatureResult> asyncResult = null;
yield return client.SetPropertyFormWithSignature(
    new Gs2.Gs2Formation.Request.SetPropertyFormWithSignatureRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001")
        .WithSlots(new Gs2.Gs2Formation.Model.SlotWithSignature[] {
            new Gs2.Gs2Formation.Model.SlotWithSignature()
                .WithName("slot-0001")
                .WithPropertyType("gs2_dictionary")
                .WithBody("body")
                .WithSignature("signature"),
        })
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var proeprtyFormModel = result.ProeprtyFormModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.setPropertyFormWithSignature(
        new Gs2Formation.SetPropertyFormWithSignatureRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withSlots([
                new Gs2Formation.model.SlotWithSignature()
                    .withName("slot-0001")
                    .withPropertyType("gs2_dictionary")
                    .withBody("body")
                    .withSignature("signature"),
            ])
            .withKeyId("key-0001")
    );
    const item = result.getItem();
    const proeprtyFormModel = result.getProeprtyFormModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.set_property_form_with_signature(
        formation.SetPropertyFormWithSignatureRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
            .with_slots([
                formation.SlotWithSignature()
                    .with_name('slot-0001')
                    .with_property_type('gs2_dictionary')
                    .with_body('body')
                    .with_signature('signature'),
            ])
            .with_key_id('key-0001')
    )
    item = result.item
    proeprty_form_model = result.proeprty_form_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.set_property_form_with_signature({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    slots={
        {
            name="slot-0001",
            property_type="gs2_dictionary",
            body="body",
            signature="signature",
        }
    },
    keyId="key-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
proeprtyFormModel = result.proeprtyFormModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.set_property_form_with_signature_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    slots={
        {
            name="slot-0001",
            property_type="gs2_dictionary",
            body="body",
            signature="signature",
        }
    },
    keyId="key-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
proeprtyFormModel = result.proeprtyFormModel;

```



---

### acquireActionsToPropertyFormProperties

Apply acquire action to property form properties

Applies an acquire action to the properties of a property form, initiating a transaction.
This is used to grant items or resources that are then set as slot values in the property form.
The acquire action is executed as a transaction, and the resulting items are applied to the form's slot properties.
Configuration values can be passed to customize the acquire action behavior.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| propertyFormModelName | string |  | ✓|  |  ~ 128 chars | Property Form Model name |
| propertyId | string |  | ✓|  |  ~ 1024 chars | Property ID<br>A developer-defined identifier that uniquely identifies this property form instance. Typically set to the GRN of the owned resource (e.g., a GS2-Inventory item set) that this form configures, such as setting skills on a specific piece of equipment. |
| acquireAction | [AcquireAction](#acquireaction) |  | ✓|  |  | Get action to be applied to form properties |
| config | [List&lt;Config&gt;](#config) |  | | [] | 0 ~ 1000 items | List of Acquisition config |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [PropertyForm](#propertyform) | Property Form |
| transactionId | string | Issued transaction ID |
| stampSheet | string | Stamp sheet |
| stampSheetEncryptionKeyId | string | Cryptographic key GRN used for stamp sheet signature calculations |
| autoRunStampSheet | bool? | Whether automatic transaction execution is enabled |
| atomicCommit | bool? | Whether to commit the transaction atomically |
| transaction | string | Issued transaction |
| transactionResult | [TransactionResult](#transactionresult) | Transaction Execution Result |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.AcquireActionsToPropertyFormProperties(
    &formation.AcquireActionsToPropertyFormPropertiesRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
        AcquireAction: &formation.AcquireAction{
            Action: pointy.String("Gs2Experience:AddExperienceByUserId"),
            Request: pointy.String("{}"),
        },
        Config: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
atomicCommit := result.AtomicCommit
transaction := result.Transaction
transactionResult := result.TransactionResult

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\AcquireActionsToPropertyFormPropertiesRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->acquireActionsToPropertyFormProperties(
        (new AcquireActionsToPropertyFormPropertiesRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
            ->withAcquireAction((new AcquireAction())
                ->withAction("Gs2Experience:AddExperienceByUserId")
                ->withRequest("{}")
            )
            ->withConfig(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
    $atomicCommit = $result->getAtomicCommit();
    $transaction = $result->getTransaction();
    $transactionResult = $result->getTransactionResult();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.AcquireActionsToPropertyFormPropertiesRequest;
import io.gs2.formation.result.AcquireActionsToPropertyFormPropertiesResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    AcquireActionsToPropertyFormPropertiesResult result = client.acquireActionsToPropertyFormProperties(
        new AcquireActionsToPropertyFormPropertiesRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withAcquireAction(new AcquireAction()
                .withAction("Gs2Experience:AddExperienceByUserId")
                .withRequest("{}")
            )
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    PropertyForm item = result.getItem();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
    boolean atomicCommit = result.getAtomicCommit();
    String transaction = result.getTransaction();
    TransactionResult transactionResult = result.getTransactionResult();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.AcquireActionsToPropertyFormPropertiesResult> asyncResult = null;
yield return client.AcquireActionsToPropertyFormProperties(
    new Gs2.Gs2Formation.Request.AcquireActionsToPropertyFormPropertiesRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001")
        .WithAcquireAction(new Gs2.Core.Model.AcquireAction()
            .WithAction("Gs2Experience:AddExperienceByUserId")
            .WithRequest("{}")
        )
        .WithConfig(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var transactionId = result.TransactionId;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var autoRunStampSheet = result.AutoRunStampSheet;
var atomicCommit = result.AtomicCommit;
var transaction = result.Transaction;
var transactionResult = result.TransactionResult;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.acquireActionsToPropertyFormProperties(
        new Gs2Formation.AcquireActionsToPropertyFormPropertiesRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withAcquireAction(new Gs2Formation.model.AcquireAction()
                .withAction("Gs2Experience:AddExperienceByUserId")
                .withRequest("{}")
            )
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const transactionId = result.getTransactionId();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const autoRunStampSheet = result.getAutoRunStampSheet();
    const atomicCommit = result.getAtomicCommit();
    const transaction = result.getTransaction();
    const transactionResult = result.getTransactionResult();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.acquire_actions_to_property_form_properties(
        formation.AcquireActionsToPropertyFormPropertiesRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
            .with_acquire_action(formation.AcquireAction()
                .with_action('Gs2Experience:AddExperienceByUserId')
                .with_request('{}')
            )
            .with_config(None)
            .with_time_offset_token(None)
    )
    item = result.item
    transaction_id = result.transaction_id
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    auto_run_stamp_sheet = result.auto_run_stamp_sheet
    atomic_commit = result.atomic_commit
    transaction = result.transaction
    transaction_result = result.transaction_result
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.acquire_actions_to_property_form_properties({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    acquireAction={
        action="Gs2Experience:AddExperienceByUserId",
        request="{}",
    },
    config=nil,
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.acquire_actions_to_property_form_properties_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    acquireAction={
        action="Gs2Experience:AddExperienceByUserId",
        request="{}",
    },
    config=nil,
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

```



---

### deletePropertyForm

Delete Property Form

Deletes the property form identified by the specified property form model name and propertyId for the requesting user.
Once deleted, all slot values associated with the property form are removed.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| accessToken | string |  | ✓|  |  ~ 128 chars | Access token |
| propertyFormModelName | string |  | ✓|  |  ~ 128 chars | Property Form Model name |
| propertyId | string |  | ✓|  |  ~ 1024 chars | Property ID<br>A developer-defined identifier that uniquely identifies this property form instance. Typically set to the GRN of the owned resource (e.g., a GS2-Inventory item set) that this form configures, such as setting skills on a specific piece of equipment. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [PropertyForm](#propertyform) | Property Form |
| propertyFormModel | [PropertyFormModel](#propertyformmodel) | Property Form Model |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeletePropertyForm(
    &formation.DeletePropertyFormRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
propertyFormModel := result.PropertyFormModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeletePropertyFormRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deletePropertyForm(
        (new DeletePropertyFormRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
    );
    $item = $result->getItem();
    $propertyFormModel = $result->getPropertyFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeletePropertyFormRequest;
import io.gs2.formation.result.DeletePropertyFormResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DeletePropertyFormResult result = client.deletePropertyForm(
        new DeletePropertyFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
    );
    PropertyForm item = result.getItem();
    PropertyFormModel propertyFormModel = result.getPropertyFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DeletePropertyFormResult> asyncResult = null;
yield return client.DeletePropertyForm(
    new Gs2.Gs2Formation.Request.DeletePropertyFormRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var propertyFormModel = result.PropertyFormModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.deletePropertyForm(
        new Gs2Formation.DeletePropertyFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
    );
    const item = result.getItem();
    const propertyFormModel = result.getPropertyFormModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.delete_property_form(
        formation.DeletePropertyFormRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
    )
    item = result.item
    property_form_model = result.property_form_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.delete_property_form({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.delete_property_form_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;

```



---

### deletePropertyFormByUserId

Delete Property Form by User ID

Deletes the property form identified by the specified property form model name and propertyId for the specified user (server-side operation).
Once deleted, all slot values associated with the property form are removed.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID |
| propertyFormModelName | string |  | ✓|  |  ~ 128 chars | Property Form Model name |
| propertyId | string |  | ✓|  |  ~ 1024 chars | Property ID<br>A developer-defined identifier that uniquely identifies this property form instance. Typically set to the GRN of the owned resource (e.g., a GS2-Inventory item set) that this form configures, such as setting skills on a specific piece of equipment. |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [PropertyForm](#propertyform) | Property Form |
| propertyFormModel | [PropertyFormModel](#propertyformmodel) | Property Form Model |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeletePropertyFormByUserId(
    &formation.DeletePropertyFormByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
propertyFormModel := result.PropertyFormModel

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeletePropertyFormByUserIdRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deletePropertyFormByUserId(
        (new DeletePropertyFormByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $propertyFormModel = $result->getPropertyFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeletePropertyFormByUserIdRequest;
import io.gs2.formation.result.DeletePropertyFormByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DeletePropertyFormByUserIdResult result = client.deletePropertyFormByUserId(
        new DeletePropertyFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withTimeOffsetToken(null)
    );
    PropertyForm item = result.getItem();
    PropertyFormModel propertyFormModel = result.getPropertyFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DeletePropertyFormByUserIdResult> asyncResult = null;
yield return client.DeletePropertyFormByUserId(
    new Gs2.Gs2Formation.Request.DeletePropertyFormByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var propertyFormModel = result.PropertyFormModel;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.deletePropertyFormByUserId(
        new Gs2Formation.DeletePropertyFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const propertyFormModel = result.getPropertyFormModel();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.delete_property_form_by_user_id(
        formation.DeletePropertyFormByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
            .with_time_offset_token(None)
    )
    item = result.item
    property_form_model = result.property_form_model
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.delete_property_form_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    timeOffsetToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.delete_property_form_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    timeOffsetToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;

```



---

### getFormModel

Get Form Model

Retrieves the currently active (published) Form Model associated with the specified Mold Model.
The Form Model defines the slot structure (available slots and their configurations) used by forms within the mold.
This is the published model actually in use, as opposed to the editable Form Model Master.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name<br>Unique Form Storage Area Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [FormModel](#formmodel) | Form |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetFormModel(
    &formation.GetFormModelRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MoldModelName: pointy.String("mold-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetFormModelRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getFormModel(
        (new GetFormModelRequest())
            ->withNamespaceName("namespace-0001")
            ->withMoldModelName("mold-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetFormModelRequest;
import io.gs2.formation.result.GetFormModelResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetFormModelResult result = client.getFormModel(
        new GetFormModelRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
    );
    FormModel item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetFormModelResult> asyncResult = null;
yield return client.GetFormModel(
    new Gs2.Gs2Formation.Request.GetFormModelRequest()
        .WithNamespaceName("namespace-0001")
        .WithMoldModelName("mold-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getFormModel(
        new Gs2Formation.GetFormModelRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_form_model(
        formation.GetFormModelRequest()
            .with_namespace_name('namespace-0001')
            .with_mold_model_name('mold-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_form_model({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_form_model_async({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### describeMoldModels

List Form Storage Area Models

Retrieves all currently active (published) Form Storage Area Models (Mold Models) in the specified Namespace.
Each model defines the form model to use, initial max capacity, and absolute max capacity for form storage areas.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| items | [List&lt;MoldModel&gt;](#moldmodel) | List of Form Storage Areas |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribeMoldModels(
    &formation.DescribeMoldModelsRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribeMoldModelsRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describeMoldModels(
        (new DescribeMoldModelsRequest())
            ->withNamespaceName("namespace-0001")
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribeMoldModelsRequest;
import io.gs2.formation.result.DescribeMoldModelsResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DescribeMoldModelsResult result = client.describeMoldModels(
        new DescribeMoldModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    List<MoldModel> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DescribeMoldModelsResult> asyncResult = null;
yield return client.DescribeMoldModels(
    new Gs2.Gs2Formation.Request.DescribeMoldModelsRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.describeMoldModels(
        new Gs2Formation.DescribeMoldModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.describe_mold_models(
        formation.DescribeMoldModelsRequest()
            .with_namespace_name('namespace-0001')
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.describe_mold_models({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.describe_mold_models_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;

```



---

### getMoldModel

Get Form Storage Area Model

Retrieves a specific currently active (published) Form Storage Area Model (Mold Model) by name.
Returns the model's configuration including the associated form model name, initial max capacity, and absolute max capacity.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name<br>Unique Form Storage Area Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [MoldModel](#moldmodel) | Form Storage Area |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetMoldModel(
    &formation.GetMoldModelRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MoldModelName: pointy.String("mold-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetMoldModelRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getMoldModel(
        (new GetMoldModelRequest())
            ->withNamespaceName("namespace-0001")
            ->withMoldModelName("mold-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetMoldModelRequest;
import io.gs2.formation.result.GetMoldModelResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetMoldModelResult result = client.getMoldModel(
        new GetMoldModelRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
    );
    MoldModel item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetMoldModelResult> asyncResult = null;
yield return client.GetMoldModel(
    new Gs2.Gs2Formation.Request.GetMoldModelRequest()
        .WithNamespaceName("namespace-0001")
        .WithMoldModelName("mold-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getMoldModel(
        new Gs2Formation.GetMoldModelRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_mold_model(
        formation.GetMoldModelRequest()
            .with_namespace_name('namespace-0001')
            .with_mold_model_name('mold-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_mold_model({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_mold_model_async({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### describePropertyFormModels

List Property Form Models

Retrieves all currently active (published) Property Form Models in the specified Namespace.
Property Form Models define the slot structure for property forms, which are identified by a custom property ID rather than an index within a mold.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| items | [List&lt;PropertyFormModel&gt;](#propertyformmodel) | List of Property Form Model name |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribePropertyFormModels(
    &formation.DescribePropertyFormModelsRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribePropertyFormModelsRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describePropertyFormModels(
        (new DescribePropertyFormModelsRequest())
            ->withNamespaceName("namespace-0001")
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribePropertyFormModelsRequest;
import io.gs2.formation.result.DescribePropertyFormModelsResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DescribePropertyFormModelsResult result = client.describePropertyFormModels(
        new DescribePropertyFormModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    List<PropertyFormModel> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DescribePropertyFormModelsResult> asyncResult = null;
yield return client.DescribePropertyFormModels(
    new Gs2.Gs2Formation.Request.DescribePropertyFormModelsRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.describePropertyFormModels(
        new Gs2Formation.DescribePropertyFormModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.describe_property_form_models(
        formation.DescribePropertyFormModelsRequest()
            .with_namespace_name('namespace-0001')
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.describe_property_form_models({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.describe_property_form_models_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;

```



---

### getPropertyFormModel

Get Property Form Model

Retrieves a specific currently active (published) Property Form Model by name.
Returns the model's slot structure definition used by property forms of this type.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| propertyFormModelName | string |  | ✓|  |  ~ 128 chars | Property Form Model name<br>Unique Property Form Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [PropertyFormModel](#propertyformmodel) | Property Form |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetPropertyFormModel(
    &formation.GetPropertyFormModelRequest {
        NamespaceName: pointy.String("namespace-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetPropertyFormModelRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getPropertyFormModel(
        (new GetPropertyFormModelRequest())
            ->withNamespaceName("namespace-0001")
            ->withPropertyFormModelName("form-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetPropertyFormModelRequest;
import io.gs2.formation.result.GetPropertyFormModelResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetPropertyFormModelResult result = client.getPropertyFormModel(
        new GetPropertyFormModelRequest()
            .withNamespaceName("namespace-0001")
            .withPropertyFormModelName("form-0001")
    );
    PropertyFormModel item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetPropertyFormModelResult> asyncResult = null;
yield return client.GetPropertyFormModel(
    new Gs2.Gs2Formation.Request.GetPropertyFormModelRequest()
        .WithNamespaceName("namespace-0001")
        .WithPropertyFormModelName("form-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getPropertyFormModel(
        new Gs2Formation.GetPropertyFormModelRequest()
            .withNamespaceName("namespace-0001")
            .withPropertyFormModelName("form-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_property_form_model(
        formation.GetPropertyFormModelRequest()
            .with_namespace_name('namespace-0001')
            .with_property_form_model_name('form-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_property_form_model({
    namespaceName="namespace-0001",
    propertyFormModelName="form-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_property_form_model_async({
    namespaceName="namespace-0001",
    propertyFormModelName="form-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### exportMaster

Export Form Model Master in a master data format that can be activated

Exports the current Form Model Masters, Form Storage Area Masters (Mold Model Masters), and Property Form Model Masters in a format that can be used for activation.
The exported data can be used to back up the current master configuration, or to import it into another Namespace.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [CurrentFormMaster](#currentformmaster) | Form Model master data that can be activated |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.ExportMaster(
    &formation.ExportMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\ExportMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->exportMaster(
        (new ExportMasterRequest())
            ->withNamespaceName("namespace-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.ExportMasterRequest;
import io.gs2.formation.result.ExportMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    ExportMasterResult result = client.exportMaster(
        new ExportMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    CurrentFormMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.ExportMasterResult> asyncResult = null;
yield return client.ExportMaster(
    new Gs2.Gs2Formation.Request.ExportMasterRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.exportMaster(
        new Gs2Formation.ExportMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.export_master(
        formation.ExportMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.export_master({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.export_master_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### getCurrentFormMaster

Get currently active Form Model master data

Retrieves the master data of the Form Models, Form Storage Area Models, and Property Form Models that are currently active (published) in the specified Namespace.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [CurrentFormMaster](#currentformmaster) | Currently active Form Model master data |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetCurrentFormMaster(
    &formation.GetCurrentFormMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetCurrentFormMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getCurrentFormMaster(
        (new GetCurrentFormMasterRequest())
            ->withNamespaceName("namespace-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetCurrentFormMasterRequest;
import io.gs2.formation.result.GetCurrentFormMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetCurrentFormMasterResult result = client.getCurrentFormMaster(
        new GetCurrentFormMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    CurrentFormMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetCurrentFormMasterResult> asyncResult = null;
yield return client.GetCurrentFormMaster(
    new Gs2.Gs2Formation.Request.GetCurrentFormMasterRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getCurrentFormMaster(
        new Gs2Formation.GetCurrentFormMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_current_form_master(
        formation.GetCurrentFormMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_current_form_master({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_current_form_master_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### preUpdateCurrentFormMaster

Update Currently active Form Model master data (3-phase version)

When uploading master data larger than 1MB, the update is performed in 3 phases.
1. Execute this API to obtain a token and URL for uploading.
2. Upload the master data to the obtained URL.
3. Execute UpdateCurrentFormMaster by passing the token obtained from the upload to reflect the master data.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| uploadToken | string | Token used to reflect results after upload |
| uploadUrl | string | URL used to upload |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.PreUpdateCurrentFormMaster(
    &formation.PreUpdateCurrentFormMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
uploadToken := result.UploadToken
uploadUrl := result.UploadUrl

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\PreUpdateCurrentFormMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->preUpdateCurrentFormMaster(
        (new PreUpdateCurrentFormMasterRequest())
            ->withNamespaceName("namespace-0001")
    );
    $uploadToken = $result->getUploadToken();
    $uploadUrl = $result->getUploadUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.PreUpdateCurrentFormMasterRequest;
import io.gs2.formation.result.PreUpdateCurrentFormMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    PreUpdateCurrentFormMasterResult result = client.preUpdateCurrentFormMaster(
        new PreUpdateCurrentFormMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    String uploadToken = result.getUploadToken();
    String uploadUrl = result.getUploadUrl();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.PreUpdateCurrentFormMasterResult> asyncResult = null;
yield return client.PreUpdateCurrentFormMaster(
    new Gs2.Gs2Formation.Request.PreUpdateCurrentFormMasterRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var uploadToken = result.UploadToken;
var uploadUrl = result.UploadUrl;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.preUpdateCurrentFormMaster(
        new Gs2Formation.PreUpdateCurrentFormMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    const uploadToken = result.getUploadToken();
    const uploadUrl = result.getUploadUrl();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.pre_update_current_form_master(
        formation.PreUpdateCurrentFormMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    upload_token = result.upload_token
    upload_url = result.upload_url
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.pre_update_current_form_master({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
uploadToken = result.uploadToken;
uploadUrl = result.uploadUrl;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.pre_update_current_form_master_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
uploadToken = result.uploadToken;
uploadUrl = result.uploadUrl;

```



---

### updateCurrentFormMaster

Update currently active Form Model master data

Updates and activates (publishes) the master data of the Form Models, Form Storage Area Models, and Property Form Models in the specified Namespace.
Supports two modes: 'direct' mode for inline master data, and 'preUpload' mode for master data that was uploaded in advance.
For master data larger than 1MB, use the 3-phase update flow: PreUpdate -> Upload -> Update (preUpload mode).
The uploaded master data is validated before being applied.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| mode | string (enum)<br>enum {<br>"direct",<br>"preUpload"<br>}<br> |  | | "direct" |  | Update mode"direct": Directly update master data / "preUpload": Upload master data and then update /  |
| settings | string | {mode} == "direct" | ✓*|  |  ~ 5242880 bytes (5MB) | Master Data<br>* Required if mode is "direct" |
| uploadToken | string | {mode} == "preUpload" | ✓*|  |  ~ 1024 chars | Token obtained by pre-upload<br>Used to apply the uploaded master data.<br>* Required if mode is "preUpload" |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [CurrentFormMaster](#currentformmaster) | Updated master data of the currently active Form Models |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentFormMaster(
    &formation.UpdateCurrentFormMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Mode: pointy.String("direct"),
        Settings: pointy.String("{\n  \"version\": \"2019-09-09\",\n  \"moldModels\": [\n    {\n      \"name\": \"party\",\n      \"metadata\": \"PARTY\",\n      \"formModel\": {\n        \"name\": \"party\",\n        \"metadata\": \"PARTY\",\n        \"slots\": [\n          {\n            \"name\": \"tank\",\n            \"metadata\": \"TANK\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"healer\",\n            \"metadata\": \"HEALER\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_1\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_2\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 10,\n      \"maxCapacity\": 20\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"formModel\": {\n        \"name\": \"equipment\",\n        \"metadata\": \"EQUIPMENT\",\n        \"slots\": [\n          {\n            \"name\": \"head\",\n            \"metadata\": \"HEAD\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"body\",\n            \"metadata\": \"BODY\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"leg\",\n            \"metadata\": \"LEG\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 20,\n      \"maxCapacity\": 30\n    }\n  ]\n}"),
        UploadToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\UpdateCurrentFormMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->updateCurrentFormMaster(
        (new UpdateCurrentFormMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMode("direct")
            ->withSettings("{\n  \"version\": \"2019-09-09\",\n  \"moldModels\": [\n    {\n      \"name\": \"party\",\n      \"metadata\": \"PARTY\",\n      \"formModel\": {\n        \"name\": \"party\",\n        \"metadata\": \"PARTY\",\n        \"slots\": [\n          {\n            \"name\": \"tank\",\n            \"metadata\": \"TANK\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"healer\",\n            \"metadata\": \"HEALER\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_1\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_2\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 10,\n      \"maxCapacity\": 20\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"formModel\": {\n        \"name\": \"equipment\",\n        \"metadata\": \"EQUIPMENT\",\n        \"slots\": [\n          {\n            \"name\": \"head\",\n            \"metadata\": \"HEAD\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"body\",\n            \"metadata\": \"BODY\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"leg\",\n            \"metadata\": \"LEG\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 20,\n      \"maxCapacity\": 30\n    }\n  ]\n}")
            ->withUploadToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.UpdateCurrentFormMasterRequest;
import io.gs2.formation.result.UpdateCurrentFormMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    UpdateCurrentFormMasterResult result = client.updateCurrentFormMaster(
        new UpdateCurrentFormMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMode("direct")
            .withSettings("{\n  \"version\": \"2019-09-09\",\n  \"moldModels\": [\n    {\n      \"name\": \"party\",\n      \"metadata\": \"PARTY\",\n      \"formModel\": {\n        \"name\": \"party\",\n        \"metadata\": \"PARTY\",\n        \"slots\": [\n          {\n            \"name\": \"tank\",\n            \"metadata\": \"TANK\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"healer\",\n            \"metadata\": \"HEALER\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_1\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_2\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 10,\n      \"maxCapacity\": 20\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"formModel\": {\n        \"name\": \"equipment\",\n        \"metadata\": \"EQUIPMENT\",\n        \"slots\": [\n          {\n            \"name\": \"head\",\n            \"metadata\": \"HEAD\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"body\",\n            \"metadata\": \"BODY\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"leg\",\n            \"metadata\": \"LEG\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 20,\n      \"maxCapacity\": 30\n    }\n  ]\n}")
            .withUploadToken(null)
    );
    CurrentFormMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.UpdateCurrentFormMasterResult> asyncResult = null;
yield return client.UpdateCurrentFormMaster(
    new Gs2.Gs2Formation.Request.UpdateCurrentFormMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMode("direct")
        .WithSettings("{\n  \"version\": \"2019-09-09\",\n  \"moldModels\": [\n    {\n      \"name\": \"party\",\n      \"metadata\": \"PARTY\",\n      \"formModel\": {\n        \"name\": \"party\",\n        \"metadata\": \"PARTY\",\n        \"slots\": [\n          {\n            \"name\": \"tank\",\n            \"metadata\": \"TANK\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"healer\",\n            \"metadata\": \"HEALER\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_1\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_2\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 10,\n      \"maxCapacity\": 20\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"formModel\": {\n        \"name\": \"equipment\",\n        \"metadata\": \"EQUIPMENT\",\n        \"slots\": [\n          {\n            \"name\": \"head\",\n            \"metadata\": \"HEAD\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"body\",\n            \"metadata\": \"BODY\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"leg\",\n            \"metadata\": \"LEG\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 20,\n      \"maxCapacity\": 30\n    }\n  ]\n}")
        .WithUploadToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.updateCurrentFormMaster(
        new Gs2Formation.UpdateCurrentFormMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMode("direct")
            .withSettings("{\n  \"version\": \"2019-09-09\",\n  \"moldModels\": [\n    {\n      \"name\": \"party\",\n      \"metadata\": \"PARTY\",\n      \"formModel\": {\n        \"name\": \"party\",\n        \"metadata\": \"PARTY\",\n        \"slots\": [\n          {\n            \"name\": \"tank\",\n            \"metadata\": \"TANK\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"healer\",\n            \"metadata\": \"HEALER\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_1\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_2\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 10,\n      \"maxCapacity\": 20\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"formModel\": {\n        \"name\": \"equipment\",\n        \"metadata\": \"EQUIPMENT\",\n        \"slots\": [\n          {\n            \"name\": \"head\",\n            \"metadata\": \"HEAD\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"body\",\n            \"metadata\": \"BODY\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"leg\",\n            \"metadata\": \"LEG\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 20,\n      \"maxCapacity\": 30\n    }\n  ]\n}")
            .withUploadToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.update_current_form_master(
        formation.UpdateCurrentFormMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mode('direct')
            .with_settings('{\n  "version": "2019-09-09",\n  "moldModels": [\n    {\n      "name": "party",\n      "metadata": "PARTY",\n      "formModel": {\n        "name": "party",\n        "metadata": "PARTY",\n        "slots": [\n          {\n            "name": "tank",\n            "metadata": "TANK",\n            "propertyRegex": "grn:.*"\n          },\n          {\n            "name": "healer",\n            "metadata": "HEALER",\n            "propertyRegex": "grn:.*"\n          },\n          {\n            "name": "dps_1",\n            "metadata": "DPS",\n            "propertyRegex": "grn:.*"\n          },\n          {\n            "name": "dps_2",\n            "metadata": "DPS",\n            "propertyRegex": "grn:.*"\n          }\n        ]\n      },\n      "initialMaxCapacity": 10,\n      "maxCapacity": 20\n    },\n    {\n      "name": "equipment",\n      "metadata": "EQUIPMENT",\n      "formModel": {\n        "name": "equipment",\n        "metadata": "EQUIPMENT",\n        "slots": [\n          {\n            "name": "head",\n            "metadata": "HEAD",\n            "propertyRegex": "grn:.*"\n          },\n          {\n            "name": "body",\n            "metadata": "BODY",\n            "propertyRegex": "grn:.*"\n          },\n          {\n            "name": "leg",\n            "metadata": "LEG",\n            "propertyRegex": "grn:.*"\n          }\n        ]\n      },\n      "initialMaxCapacity": 20,\n      "maxCapacity": 30\n    }\n  ]\n}')
            .with_upload_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.update_current_form_master({
    namespaceName="namespace-0001",
    mode="direct",
    settings="{\n  \"version\": \"2019-09-09\",\n  \"moldModels\": [\n    {\n      \"name\": \"party\",\n      \"metadata\": \"PARTY\",\n      \"formModel\": {\n        \"name\": \"party\",\n        \"metadata\": \"PARTY\",\n        \"slots\": [\n          {\n            \"name\": \"tank\",\n            \"metadata\": \"TANK\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"healer\",\n            \"metadata\": \"HEALER\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_1\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_2\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 10,\n      \"maxCapacity\": 20\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"formModel\": {\n        \"name\": \"equipment\",\n        \"metadata\": \"EQUIPMENT\",\n        \"slots\": [\n          {\n            \"name\": \"head\",\n            \"metadata\": \"HEAD\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"body\",\n            \"metadata\": \"BODY\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"leg\",\n            \"metadata\": \"LEG\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 20,\n      \"maxCapacity\": 30\n    }\n  ]\n}",
    uploadToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.update_current_form_master_async({
    namespaceName="namespace-0001",
    mode="direct",
    settings="{\n  \"version\": \"2019-09-09\",\n  \"moldModels\": [\n    {\n      \"name\": \"party\",\n      \"metadata\": \"PARTY\",\n      \"formModel\": {\n        \"name\": \"party\",\n        \"metadata\": \"PARTY\",\n        \"slots\": [\n          {\n            \"name\": \"tank\",\n            \"metadata\": \"TANK\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"healer\",\n            \"metadata\": \"HEALER\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_1\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_2\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 10,\n      \"maxCapacity\": 20\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"formModel\": {\n        \"name\": \"equipment\",\n        \"metadata\": \"EQUIPMENT\",\n        \"slots\": [\n          {\n            \"name\": \"head\",\n            \"metadata\": \"HEAD\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"body\",\n            \"metadata\": \"BODY\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"leg\",\n            \"metadata\": \"LEG\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 20,\n      \"maxCapacity\": 30\n    }\n  ]\n}",
    uploadToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### updateCurrentFormMasterFromGitHub

Update currently active Form Model master data from GitHub

Updates and activates (publishes) the master data by fetching it directly from a GitHub repository.
The checkout settings specify the repository, branch/tag, and file path to use.
This is useful for managing master data in version control and deploying it directly.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| checkoutSetting | [GitHubCheckoutSetting](#githubcheckoutsetting) |  | ✓|  |  | Setting for checking out master data from GitHub |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [CurrentFormMaster](#currentformmaster) | Updated master data of the currently active Form Models |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentFormMasterFromGitHub(
    &formation.UpdateCurrentFormMasterFromGitHubRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CheckoutSetting: &formation.GitHubCheckoutSetting{
            ApiKeyId: pointy.String("apiKeyId-0001"),
            RepositoryName: pointy.String("gs2io/master-data"),
            SourcePath: pointy.String("path/to/file.json"),
            ReferenceType: pointy.String("branch"),
            BranchName: pointy.String("develop"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\UpdateCurrentFormMasterFromGitHubRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->updateCurrentFormMasterFromGitHub(
        (new UpdateCurrentFormMasterFromGitHubRequest())
            ->withNamespaceName("namespace-0001")
            ->withCheckoutSetting((new GitHubCheckoutSetting())
                ->withApiKeyId("apiKeyId-0001")
                ->withRepositoryName("gs2io/master-data")
                ->withSourcePath("path/to/file.json")
                ->withReferenceType("branch")
                ->withBranchName("develop")
            )
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.UpdateCurrentFormMasterFromGitHubRequest;
import io.gs2.formation.result.UpdateCurrentFormMasterFromGitHubResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    UpdateCurrentFormMasterFromGitHubResult result = client.updateCurrentFormMasterFromGitHub(
        new UpdateCurrentFormMasterFromGitHubRequest()
            .withNamespaceName("namespace-0001")
            .withCheckoutSetting(new GitHubCheckoutSetting()
                .withApiKeyId("apiKeyId-0001")
                .withRepositoryName("gs2io/master-data")
                .withSourcePath("path/to/file.json")
                .withReferenceType("branch")
                .withBranchName("develop")
            )
    );
    CurrentFormMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.UpdateCurrentFormMasterFromGitHubResult> asyncResult = null;
yield return client.UpdateCurrentFormMasterFromGitHub(
    new Gs2.Gs2Formation.Request.UpdateCurrentFormMasterFromGitHubRequest()
        .WithNamespaceName("namespace-0001")
        .WithCheckoutSetting(new Gs2.Gs2Formation.Model.GitHubCheckoutSetting()
            .WithApiKeyId("apiKeyId-0001")
            .WithRepositoryName("gs2io/master-data")
            .WithSourcePath("path/to/file.json")
            .WithReferenceType("branch")
            .WithBranchName("develop")
        ),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.updateCurrentFormMasterFromGitHub(
        new Gs2Formation.UpdateCurrentFormMasterFromGitHubRequest()
            .withNamespaceName("namespace-0001")
            .withCheckoutSetting(new Gs2Formation.model.GitHubCheckoutSetting()
                .withApiKeyId("apiKeyId-0001")
                .withRepositoryName("gs2io/master-data")
                .withSourcePath("path/to/file.json")
                .withReferenceType("branch")
                .withBranchName("develop")
            )
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.update_current_form_master_from_git_hub(
        formation.UpdateCurrentFormMasterFromGitHubRequest()
            .with_namespace_name('namespace-0001')
            .with_checkout_setting(formation.GitHubCheckoutSetting()
                .with_api_key_id('apiKeyId-0001')
                .with_repository_name('gs2io/master-data')
                .with_source_path('path/to/file.json')
                .with_reference_type('branch')
                .with_branch_name('develop')
            )
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.update_current_form_master_from_git_hub({
    namespaceName="namespace-0001",
    checkoutSetting={
        api_key_id="apiKeyId-0001",
        repository_name="gs2io/master-data",
        source_path="path/to/file.json",
        reference_type="branch",
        branch_name="develop",
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.update_current_form_master_from_git_hub_async({
    namespaceName="namespace-0001",
    checkoutSetting={
        api_key_id="apiKeyId-0001",
        repository_name="gs2io/master-data",
        source_path="path/to/file.json",
        reference_type="branch",
        branch_name="develop",
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### describeFormModelMasters

List Form Model Masters

Retrieves a paginated list of editable Form Model Masters with optional name prefix filtering.
Form Model Masters define the slot structure for forms. Changes to masters do not take effect until the master data is activated via the CurrentFormMaster API.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| namePrefix | string |  | |  |  ~ 64 chars | Filter by Form Model name prefix |
| pageToken | string |  | |  |  ~ 1024 chars | Token specifying the position from which to start acquiring data |
| limit | int |  | | 30 | 1 ~ 1000 | Number of data items to retrieve |

#### Result

|  | Type | Description |
| --- | --- | --- |
| items | [List&lt;FormModelMaster&gt;](#formmodelmaster) | List of Form Model Master |
| nextPageToken | string | Page token to retrieve the rest of the listing |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribeFormModelMasters(
    &formation.DescribeFormModelMastersRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribeFormModelMastersRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describeFormModelMasters(
        (new DescribeFormModelMastersRequest())
            ->withNamespaceName("namespace-0001")
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribeFormModelMastersRequest;
import io.gs2.formation.result.DescribeFormModelMastersResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DescribeFormModelMastersResult result = client.describeFormModelMasters(
        new DescribeFormModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<FormModelMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DescribeFormModelMastersResult> asyncResult = null;
yield return client.DescribeFormModelMasters(
    new Gs2.Gs2Formation.Request.DescribeFormModelMastersRequest()
        .WithNamespaceName("namespace-0001")
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.describeFormModelMasters(
        new Gs2Formation.DescribeFormModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.describe_form_model_masters(
        formation.DescribeFormModelMastersRequest()
            .with_namespace_name('namespace-0001')
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.describe_form_model_masters({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.describe_form_model_masters_async({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```



---

### createFormModelMaster

Create Form Model Master

Creates a new editable Form Model Master definition with a name and slot definitions.
Each slot defines a named position in the form where items (from inventory, simple inventory, or dictionary) can be placed.
Changes do not take effect until the master data is activated via the CurrentFormMaster API.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| name | string |  | ✓|  |  ~ 128 chars | Form Model name<br>Unique Form Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  | |  |  ~ 1024 chars | Description |
| metadata | string |  | |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| slots | [List&lt;SlotModel&gt;](#slotmodel) |  | ✓|  | 1 ~ 10 items | List of Slot Model<br>The ordered list of slot definitions that make up this form. Each slot represents an assignable position, and the slot names must be unique within the form. For equipment, this might include slots like "weapon", "armor", "accessory". For parties, slots like "position_1", "position_2", etc. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [FormModelMaster](#formmodelmaster) | Form Model Master created |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.CreateFormModelMaster(
    &formation.CreateFormModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("form-0001"),
        Description: nil,
        Metadata: nil,
        Slots: []formation.SlotModel{
            formation.SlotModel{
                Name: pointy.String("slot-0001"),
                PropertyRegex: pointy.String(".*"),
            },
            formation.SlotModel{
                Name: pointy.String("slot-0002"),
                PropertyRegex: pointy.String(".*"),
                Metadata: pointy.String("METADATA_0002"),
            },
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\CreateFormModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->createFormModelMaster(
        (new CreateFormModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("form-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withSlots([
                (new \Gs2\Formation\Model\SlotModel())
                    ->withName("slot-0001")
                    ->withPropertyRegex(".*"),
                (new \Gs2\Formation\Model\SlotModel())
                    ->withName("slot-0002")
                    ->withPropertyRegex(".*")
                    ->withMetadata("METADATA_0002"),
            ])
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.CreateFormModelMasterRequest;
import io.gs2.formation.result.CreateFormModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    CreateFormModelMasterResult result = client.createFormModelMaster(
        new CreateFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("form-0001")
            .withDescription(null)
            .withMetadata(null)
            .withSlots(Arrays.asList(
                new io.gs2.formation.model.SlotModel()
                    .withName("slot-0001")
                    .withPropertyRegex(".*"),
                new io.gs2.formation.model.SlotModel()
                    .withName("slot-0002")
                    .withPropertyRegex(".*")
                    .withMetadata("METADATA_0002")
            ))
    );
    FormModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.CreateFormModelMasterResult> asyncResult = null;
yield return client.CreateFormModelMaster(
    new Gs2.Gs2Formation.Request.CreateFormModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("form-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithSlots(new Gs2.Gs2Formation.Model.SlotModel[] {
            new Gs2.Gs2Formation.Model.SlotModel()
                .WithName("slot-0001")
                .WithPropertyRegex(".*"),
            new Gs2.Gs2Formation.Model.SlotModel()
                .WithName("slot-0002")
                .WithPropertyRegex(".*")
                .WithMetadata("METADATA_0002"),
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.createFormModelMaster(
        new Gs2Formation.CreateFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("form-0001")
            .withDescription(null)
            .withMetadata(null)
            .withSlots([
                new Gs2Formation.model.SlotModel()
                    .withName("slot-0001")
                    .withPropertyRegex(".*"),
                new Gs2Formation.model.SlotModel()
                    .withName("slot-0002")
                    .withPropertyRegex(".*")
                    .withMetadata("METADATA_0002"),
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.create_form_model_master(
        formation.CreateFormModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_name('form-0001')
            .with_description(None)
            .with_metadata(None)
            .with_slots([
                formation.SlotModel()
                    .with_name('slot-0001')
                    .with_property_regex('.*'),
                formation.SlotModel()
                    .with_name('slot-0002')
                    .with_property_regex('.*')
                    .with_metadata('METADATA_0002'),
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.create_form_model_master({
    namespaceName="namespace-0001",
    name="form-0001",
    description=nil,
    metadata=nil,
    slots={
        {
            name="slot-0001",
            propertyRegex=".*",
        },
        {
            name="slot-0002",
            propertyRegex=".*",
            metadata="METADATA_0002",
        }
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.create_form_model_master_async({
    namespaceName="namespace-0001",
    name="form-0001",
    description=nil,
    metadata=nil,
    slots={
        {
            name="slot-0001",
            propertyRegex=".*",
        },
        {
            name="slot-0002",
            propertyRegex=".*",
            metadata="METADATA_0002",
        }
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### getFormModelMaster

Get Form Model Master

Retrieves the detailed information of a specific editable Form Model Master by name.
This is used for viewing and editing the master definition before activation.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| formModelName | string |  | ✓|  |  ~ 128 chars | Form Model name<br>Unique Form Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [FormModelMaster](#formmodelmaster) | Form Model Master |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetFormModelMaster(
    &formation.GetFormModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        FormModelName: pointy.String("form-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetFormModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getFormModelMaster(
        (new GetFormModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withFormModelName("form-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetFormModelMasterRequest;
import io.gs2.formation.result.GetFormModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetFormModelMasterResult result = client.getFormModelMaster(
        new GetFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withFormModelName("form-0001")
    );
    FormModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetFormModelMasterResult> asyncResult = null;
yield return client.GetFormModelMaster(
    new Gs2.Gs2Formation.Request.GetFormModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithFormModelName("form-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getFormModelMaster(
        new Gs2Formation.GetFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withFormModelName("form-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_form_model_master(
        formation.GetFormModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_form_model_name('form-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_form_model_master({
    namespaceName="namespace-0001",
    formModelName="form-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_form_model_master_async({
    namespaceName="namespace-0001",
    formModelName="form-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### updateFormModelMaster

Update Form Model Master

Updates the description, metadata, and slot definitions of an existing Form Model Master.
The form model name cannot be changed after creation.
Changes do not take effect until the master data is re-activated via the CurrentFormMaster API.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| formModelName | string |  | ✓|  |  ~ 128 chars | Form Model name<br>Unique Form Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  | |  |  ~ 1024 chars | Description |
| metadata | string |  | |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| slots | [List&lt;SlotModel&gt;](#slotmodel) |  | ✓|  | 1 ~ 10 items | List of Slot Model<br>The ordered list of slot definitions that make up this form. Each slot represents an assignable position, and the slot names must be unique within the form. For equipment, this might include slots like "weapon", "armor", "accessory". For parties, slots like "position_1", "position_2", etc. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [FormModelMaster](#formmodelmaster) | Form Model Master updated |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.UpdateFormModelMaster(
    &formation.UpdateFormModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        FormModelName: pointy.String("form-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("FORM_0001"),
        Slots: []formation.SlotModel{
            formation.SlotModel{
                Name: pointy.String("slot-1101"),
            },
            formation.SlotModel{
                Name: pointy.String("slot-1102"),
                Metadata: pointy.String("METADATA_1102"),
            },
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\UpdateFormModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->updateFormModelMaster(
        (new UpdateFormModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withFormModelName("form-0001")
            ->withDescription("description1")
            ->withMetadata("FORM_0001")
            ->withSlots([
                (new \Gs2\Formation\Model\SlotModel())
                    ->withName("slot-1101"),
                (new \Gs2\Formation\Model\SlotModel())
                    ->withName("slot-1102")
                    ->withMetadata("METADATA_1102"),
            ])
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.UpdateFormModelMasterRequest;
import io.gs2.formation.result.UpdateFormModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    UpdateFormModelMasterResult result = client.updateFormModelMaster(
        new UpdateFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withFormModelName("form-0001")
            .withDescription("description1")
            .withMetadata("FORM_0001")
            .withSlots(Arrays.asList(
                new io.gs2.formation.model.SlotModel()
                    .withName("slot-1101"),
                new io.gs2.formation.model.SlotModel()
                    .withName("slot-1102")
                    .withMetadata("METADATA_1102")
            ))
    );
    FormModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.UpdateFormModelMasterResult> asyncResult = null;
yield return client.UpdateFormModelMaster(
    new Gs2.Gs2Formation.Request.UpdateFormModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithFormModelName("form-0001")
        .WithDescription("description1")
        .WithMetadata("FORM_0001")
        .WithSlots(new Gs2.Gs2Formation.Model.SlotModel[] {
            new Gs2.Gs2Formation.Model.SlotModel()
                .WithName("slot-1101"),
            new Gs2.Gs2Formation.Model.SlotModel()
                .WithName("slot-1102")
                .WithMetadata("METADATA_1102"),
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.updateFormModelMaster(
        new Gs2Formation.UpdateFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withFormModelName("form-0001")
            .withDescription("description1")
            .withMetadata("FORM_0001")
            .withSlots([
                new Gs2Formation.model.SlotModel()
                    .withName("slot-1101"),
                new Gs2Formation.model.SlotModel()
                    .withName("slot-1102")
                    .withMetadata("METADATA_1102"),
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.update_form_model_master(
        formation.UpdateFormModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_form_model_name('form-0001')
            .with_description('description1')
            .with_metadata('FORM_0001')
            .with_slots([
                formation.SlotModel()
                    .with_name('slot-1101'),
                formation.SlotModel()
                    .with_name('slot-1102')
                    .with_metadata('METADATA_1102'),
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.update_form_model_master({
    namespaceName="namespace-0001",
    formModelName="form-0001",
    description="description1",
    metadata="FORM_0001",
    slots={
        {
            name="slot-1101",
        },
        {
            name="slot-1102",
            metadata="METADATA_1102",
        }
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.update_form_model_master_async({
    namespaceName="namespace-0001",
    formModelName="form-0001",
    description="description1",
    metadata="FORM_0001",
    slots={
        {
            name="slot-1101",
        },
        {
            name="slot-1102",
            metadata="METADATA_1102",
        }
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### deleteFormModelMaster

Delete Form Model Master

Deletes an editable Form Model Master definition.
This only affects the master data; the currently active (published) model is not affected until the master data is re-activated.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| formModelName | string |  | ✓|  |  ~ 128 chars | Form Model name<br>Unique Form Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [FormModelMaster](#formmodelmaster) | Form Model Master deleted |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeleteFormModelMaster(
    &formation.DeleteFormModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        FormModelName: pointy.String("form-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeleteFormModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deleteFormModelMaster(
        (new DeleteFormModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withFormModelName("form-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeleteFormModelMasterRequest;
import io.gs2.formation.result.DeleteFormModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DeleteFormModelMasterResult result = client.deleteFormModelMaster(
        new DeleteFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withFormModelName("form-0001")
    );
    FormModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DeleteFormModelMasterResult> asyncResult = null;
yield return client.DeleteFormModelMaster(
    new Gs2.Gs2Formation.Request.DeleteFormModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithFormModelName("form-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.deleteFormModelMaster(
        new Gs2Formation.DeleteFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withFormModelName("form-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.delete_form_model_master(
        formation.DeleteFormModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_form_model_name('form-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.delete_form_model_master({
    namespaceName="namespace-0001",
    formModelName="form-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.delete_form_model_master_async({
    namespaceName="namespace-0001",
    formModelName="form-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### describeMoldModelMasters

List Form Storage Area Masters

Retrieves a paginated list of editable Form Storage Area Masters (Mold Model Masters) with optional name prefix filtering.
Changes to masters do not take effect until the master data is activated via the CurrentFormMaster API.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| namePrefix | string |  | |  |  ~ 64 chars | Filter by Form Storage Area name prefix |
| pageToken | string |  | |  |  ~ 1024 chars | Token specifying the position from which to start acquiring data |
| limit | int |  | | 30 | 1 ~ 1000 | Number of data items to retrieve |

#### Result

|  | Type | Description |
| --- | --- | --- |
| items | [List&lt;MoldModelMaster&gt;](#moldmodelmaster) | List of Form Storage Area Masters |
| nextPageToken | string | Page token to retrieve the rest of the listing |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribeMoldModelMasters(
    &formation.DescribeMoldModelMastersRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribeMoldModelMastersRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describeMoldModelMasters(
        (new DescribeMoldModelMastersRequest())
            ->withNamespaceName("namespace-0001")
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribeMoldModelMastersRequest;
import io.gs2.formation.result.DescribeMoldModelMastersResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DescribeMoldModelMastersResult result = client.describeMoldModelMasters(
        new DescribeMoldModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<MoldModelMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DescribeMoldModelMastersResult> asyncResult = null;
yield return client.DescribeMoldModelMasters(
    new Gs2.Gs2Formation.Request.DescribeMoldModelMastersRequest()
        .WithNamespaceName("namespace-0001")
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.describeMoldModelMasters(
        new Gs2Formation.DescribeMoldModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.describe_mold_model_masters(
        formation.DescribeMoldModelMastersRequest()
            .with_namespace_name('namespace-0001')
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.describe_mold_model_masters({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.describe_mold_model_masters_async({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```



---

### createMoldModelMaster

Create Form Storage Area Master

Creates a new editable Form Storage Area Master (Mold Model Master) definition.
Defines the form model to use (formModelName), initial max capacity (initialMaxCapacity) assigned to users when first accessing the mold, and the absolute max capacity (maxCapacity) that can be reached via capacity additions.
Changes do not take effect until the master data is activated via the CurrentFormMaster API.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| name | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name<br>Unique Form Storage Area Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  | |  |  ~ 1024 chars | Description |
| metadata | string |  | |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| formModelName | string |  | ✓|  |  ~ 128 chars | Form Model name |
| initialMaxCapacity | int |  | ✓|  | 1 ~ 2147483646 | Initial capacity to store forms<br>The default number of form save slots available to each player for this mold. For example, if set to 3, the player can initially save up to 3 different formations (e.g., "fire party", "water party", "wind party"). Can be expanded per-player up to maxCapacity. |
| maxCapacity | int |  | ✓|  | 1 ~ 2147483646 | Maximum capacity to store forms<br>The absolute upper limit for the number of form save slots per player for this mold. Even through capacity expansion operations, the capacity cannot exceed this value. Must be greater than or equal to initialMaxCapacity. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [MoldModelMaster](#moldmodelmaster) | Form Storage Area Master created |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.CreateMoldModelMaster(
    &formation.CreateMoldModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("mold-0001"),
        Description: nil,
        Metadata: nil,
        FormModelName: pointy.String("formModel-0001"),
        InitialMaxCapacity: pointy.Int32(5),
        MaxCapacity: pointy.Int32(10),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\CreateMoldModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->createMoldModelMaster(
        (new CreateMoldModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("mold-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withFormModelName("formModel-0001")
            ->withInitialMaxCapacity(5)
            ->withMaxCapacity(10)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.CreateMoldModelMasterRequest;
import io.gs2.formation.result.CreateMoldModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    CreateMoldModelMasterResult result = client.createMoldModelMaster(
        new CreateMoldModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("mold-0001")
            .withDescription(null)
            .withMetadata(null)
            .withFormModelName("formModel-0001")
            .withInitialMaxCapacity(5)
            .withMaxCapacity(10)
    );
    MoldModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.CreateMoldModelMasterResult> asyncResult = null;
yield return client.CreateMoldModelMaster(
    new Gs2.Gs2Formation.Request.CreateMoldModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("mold-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithFormModelName("formModel-0001")
        .WithInitialMaxCapacity(5)
        .WithMaxCapacity(10),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.createMoldModelMaster(
        new Gs2Formation.CreateMoldModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("mold-0001")
            .withDescription(null)
            .withMetadata(null)
            .withFormModelName("formModel-0001")
            .withInitialMaxCapacity(5)
            .withMaxCapacity(10)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.create_mold_model_master(
        formation.CreateMoldModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_name('mold-0001')
            .with_description(None)
            .with_metadata(None)
            .with_form_model_name('formModel-0001')
            .with_initial_max_capacity(5)
            .with_max_capacity(10)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.create_mold_model_master({
    namespaceName="namespace-0001",
    name="mold-0001",
    description=nil,
    metadata=nil,
    formModelName="formModel-0001",
    initialMaxCapacity=5,
    maxCapacity=10,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.create_mold_model_master_async({
    namespaceName="namespace-0001",
    name="mold-0001",
    description=nil,
    metadata=nil,
    formModelName="formModel-0001",
    initialMaxCapacity=5,
    maxCapacity=10,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### getMoldModelMaster

Get Form Storage Area Master

Retrieves the detailed information of a specific editable Form Storage Area Master by name.
This is used for viewing and editing the master definition before activation.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name<br>Unique Form Storage Area Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [MoldModelMaster](#moldmodelmaster) | Form Storage Area Master |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetMoldModelMaster(
    &formation.GetMoldModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MoldModelName: pointy.String("mold-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetMoldModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getMoldModelMaster(
        (new GetMoldModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMoldModelName("mold-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetMoldModelMasterRequest;
import io.gs2.formation.result.GetMoldModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetMoldModelMasterResult result = client.getMoldModelMaster(
        new GetMoldModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
    );
    MoldModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetMoldModelMasterResult> asyncResult = null;
yield return client.GetMoldModelMaster(
    new Gs2.Gs2Formation.Request.GetMoldModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMoldModelName("mold-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getMoldModelMaster(
        new Gs2Formation.GetMoldModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_mold_model_master(
        formation.GetMoldModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mold_model_name('mold-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_mold_model_master({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_mold_model_master_async({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### updateMoldModelMaster

Update Form Storage Area Master

Updates the description, metadata, form model reference, initial max capacity, and max capacity of an existing Form Storage Area Master.
The mold model name cannot be changed after creation.
Changes do not take effect until the master data is re-activated via the CurrentFormMaster API.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name<br>Unique Form Storage Area Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  | |  |  ~ 1024 chars | Description |
| metadata | string |  | |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| formModelName | string |  | ✓|  |  ~ 128 chars | Form Model name |
| initialMaxCapacity | int |  | ✓|  | 1 ~ 2147483646 | Initial capacity to store forms<br>The default number of form save slots available to each player for this mold. For example, if set to 3, the player can initially save up to 3 different formations (e.g., "fire party", "water party", "wind party"). Can be expanded per-player up to maxCapacity. |
| maxCapacity | int |  | ✓|  | 1 ~ 2147483646 | Maximum capacity to store forms<br>The absolute upper limit for the number of form save slots per player for this mold. Even through capacity expansion operations, the capacity cannot exceed this value. Must be greater than or equal to initialMaxCapacity. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [MoldModelMaster](#moldmodelmaster) | Form Storage Area Master updated |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.UpdateMoldModelMaster(
    &formation.UpdateMoldModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Description: nil,
        Metadata: nil,
        FormModelName: pointy.String("formModel-0001"),
        InitialMaxCapacity: pointy.Int32(5),
        MaxCapacity: pointy.Int32(15),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\UpdateMoldModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->updateMoldModelMaster(
        (new UpdateMoldModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMoldModelName("mold-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withFormModelName("formModel-0001")
            ->withInitialMaxCapacity(5)
            ->withMaxCapacity(15)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.UpdateMoldModelMasterRequest;
import io.gs2.formation.result.UpdateMoldModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    UpdateMoldModelMasterResult result = client.updateMoldModelMaster(
        new UpdateMoldModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
            .withDescription(null)
            .withMetadata(null)
            .withFormModelName("formModel-0001")
            .withInitialMaxCapacity(5)
            .withMaxCapacity(15)
    );
    MoldModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.UpdateMoldModelMasterResult> asyncResult = null;
yield return client.UpdateMoldModelMaster(
    new Gs2.Gs2Formation.Request.UpdateMoldModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMoldModelName("mold-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithFormModelName("formModel-0001")
        .WithInitialMaxCapacity(5)
        .WithMaxCapacity(15),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.updateMoldModelMaster(
        new Gs2Formation.UpdateMoldModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
            .withDescription(null)
            .withMetadata(null)
            .withFormModelName("formModel-0001")
            .withInitialMaxCapacity(5)
            .withMaxCapacity(15)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.update_mold_model_master(
        formation.UpdateMoldModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mold_model_name('mold-0001')
            .with_description(None)
            .with_metadata(None)
            .with_form_model_name('formModel-0001')
            .with_initial_max_capacity(5)
            .with_max_capacity(15)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.update_mold_model_master({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
    description=nil,
    metadata=nil,
    formModelName="formModel-0001",
    initialMaxCapacity=5,
    maxCapacity=15,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.update_mold_model_master_async({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
    description=nil,
    metadata=nil,
    formModelName="formModel-0001",
    initialMaxCapacity=5,
    maxCapacity=15,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### deleteMoldModelMaster

Delete Form Storage Area Master

Deletes an editable Form Storage Area Master definition.
This only affects the master data; the currently active (published) model is not affected until the master data is re-activated.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| moldModelName | string |  | ✓|  |  ~ 128 chars | Form Storage Area Model name<br>Unique Form Storage Area Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [MoldModelMaster](#moldmodelmaster) | Form Storage Area Master deleted |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeleteMoldModelMaster(
    &formation.DeleteMoldModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MoldModelName: pointy.String("mold-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeleteMoldModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deleteMoldModelMaster(
        (new DeleteMoldModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMoldModelName("mold-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeleteMoldModelMasterRequest;
import io.gs2.formation.result.DeleteMoldModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DeleteMoldModelMasterResult result = client.deleteMoldModelMaster(
        new DeleteMoldModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
    );
    MoldModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DeleteMoldModelMasterResult> asyncResult = null;
yield return client.DeleteMoldModelMaster(
    new Gs2.Gs2Formation.Request.DeleteMoldModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMoldModelName("mold-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.deleteMoldModelMaster(
        new Gs2Formation.DeleteMoldModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.delete_mold_model_master(
        formation.DeleteMoldModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mold_model_name('mold-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.delete_mold_model_master({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.delete_mold_model_master_async({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### describePropertyFormModelMasters

List Property Form Model Masters

Retrieves a paginated list of editable Property Form Model Masters with optional name prefix filtering.
Property Form Model Masters define the slot structure for property forms. Changes to masters do not take effect until the master data is activated via the CurrentFormMaster API.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| namePrefix | string |  | |  |  ~ 64 chars | Filter by Property Form Model name prefix |
| pageToken | string |  | |  |  ~ 1024 chars | Token specifying the position from which to start acquiring data |
| limit | int |  | | 30 | 1 ~ 1000 | Number of data items to retrieve |

#### Result

|  | Type | Description |
| --- | --- | --- |
| items | [List&lt;PropertyFormModelMaster&gt;](#propertyformmodelmaster) | List of Form Model Masters |
| nextPageToken | string | Page token to retrieve the rest of the listing |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribePropertyFormModelMasters(
    &formation.DescribePropertyFormModelMastersRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribePropertyFormModelMastersRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describePropertyFormModelMasters(
        (new DescribePropertyFormModelMastersRequest())
            ->withNamespaceName("namespace-0001")
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribePropertyFormModelMastersRequest;
import io.gs2.formation.result.DescribePropertyFormModelMastersResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DescribePropertyFormModelMastersResult result = client.describePropertyFormModelMasters(
        new DescribePropertyFormModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<PropertyFormModelMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DescribePropertyFormModelMastersResult> asyncResult = null;
yield return client.DescribePropertyFormModelMasters(
    new Gs2.Gs2Formation.Request.DescribePropertyFormModelMastersRequest()
        .WithNamespaceName("namespace-0001")
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.describePropertyFormModelMasters(
        new Gs2Formation.DescribePropertyFormModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.describe_property_form_model_masters(
        formation.DescribePropertyFormModelMastersRequest()
            .with_namespace_name('namespace-0001')
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.describe_property_form_model_masters({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.describe_property_form_model_masters_async({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

```



---

### createPropertyFormModelMaster

Create Property Form Model Master

Creates a new editable Property Form Model Master definition with a name and slot definitions.
Property Form Models are similar to Form Models but are used for property forms, which are identified by a custom property ID rather than an index within a mold.
Changes do not take effect until the master data is activated via the CurrentFormMaster API.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| name | string |  | ✓|  |  ~ 128 chars | Property Form Model name<br>Unique Property Form Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  | |  |  ~ 1024 chars | Description |
| metadata | string |  | |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| slots | [List&lt;SlotModel&gt;](#slotmodel) |  | ✓|  | 1 ~ 10 items | List of Slot Model<br>The ordered list of slot definitions for this property form. Unlike Mold/Form where the number of forms is limited by capacity, property forms are identified by a property ID and can exist for any owned resource. Slot names must be unique within the form. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [PropertyFormModelMaster](#propertyformmodelmaster) | Form Model Master created |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.CreatePropertyFormModelMaster(
    &formation.CreatePropertyFormModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("form-0001"),
        Description: nil,
        Metadata: nil,
        Slots: []formation.SlotModel{
            formation.SlotModel{
                Name: pointy.String("slot-0001"),
                PropertyRegex: pointy.String(".*"),
            },
            formation.SlotModel{
                Name: pointy.String("slot-0002"),
                PropertyRegex: pointy.String(".*"),
                Metadata: pointy.String("METADATA_0002"),
            },
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\CreatePropertyFormModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->createPropertyFormModelMaster(
        (new CreatePropertyFormModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("form-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withSlots([
                (new \Gs2\Formation\Model\SlotModel())
                    ->withName("slot-0001")
                    ->withPropertyRegex(".*"),
                (new \Gs2\Formation\Model\SlotModel())
                    ->withName("slot-0002")
                    ->withPropertyRegex(".*")
                    ->withMetadata("METADATA_0002"),
            ])
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.CreatePropertyFormModelMasterRequest;
import io.gs2.formation.result.CreatePropertyFormModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    CreatePropertyFormModelMasterResult result = client.createPropertyFormModelMaster(
        new CreatePropertyFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("form-0001")
            .withDescription(null)
            .withMetadata(null)
            .withSlots(Arrays.asList(
                new io.gs2.formation.model.SlotModel()
                    .withName("slot-0001")
                    .withPropertyRegex(".*"),
                new io.gs2.formation.model.SlotModel()
                    .withName("slot-0002")
                    .withPropertyRegex(".*")
                    .withMetadata("METADATA_0002")
            ))
    );
    PropertyFormModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.CreatePropertyFormModelMasterResult> asyncResult = null;
yield return client.CreatePropertyFormModelMaster(
    new Gs2.Gs2Formation.Request.CreatePropertyFormModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("form-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithSlots(new Gs2.Gs2Formation.Model.SlotModel[] {
            new Gs2.Gs2Formation.Model.SlotModel()
                .WithName("slot-0001")
                .WithPropertyRegex(".*"),
            new Gs2.Gs2Formation.Model.SlotModel()
                .WithName("slot-0002")
                .WithPropertyRegex(".*")
                .WithMetadata("METADATA_0002"),
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.createPropertyFormModelMaster(
        new Gs2Formation.CreatePropertyFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("form-0001")
            .withDescription(null)
            .withMetadata(null)
            .withSlots([
                new Gs2Formation.model.SlotModel()
                    .withName("slot-0001")
                    .withPropertyRegex(".*"),
                new Gs2Formation.model.SlotModel()
                    .withName("slot-0002")
                    .withPropertyRegex(".*")
                    .withMetadata("METADATA_0002"),
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.create_property_form_model_master(
        formation.CreatePropertyFormModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_name('form-0001')
            .with_description(None)
            .with_metadata(None)
            .with_slots([
                formation.SlotModel()
                    .with_name('slot-0001')
                    .with_property_regex('.*'),
                formation.SlotModel()
                    .with_name('slot-0002')
                    .with_property_regex('.*')
                    .with_metadata('METADATA_0002'),
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.create_property_form_model_master({
    namespaceName="namespace-0001",
    name="form-0001",
    description=nil,
    metadata=nil,
    slots={
        {
            name="slot-0001",
            propertyRegex=".*",
        },
        {
            name="slot-0002",
            propertyRegex=".*",
            metadata="METADATA_0002",
        }
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.create_property_form_model_master_async({
    namespaceName="namespace-0001",
    name="form-0001",
    description=nil,
    metadata=nil,
    slots={
        {
            name="slot-0001",
            propertyRegex=".*",
        },
        {
            name="slot-0002",
            propertyRegex=".*",
            metadata="METADATA_0002",
        }
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### getPropertyFormModelMaster

Get Property Form Model Master

Retrieves the detailed information of a specific editable Property Form Model Master by name.
This is used for viewing and editing the master definition before activation.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| propertyFormModelName | string |  | ✓|  |  ~ 128 chars | Property Form Model name<br>Unique Property Form Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [PropertyFormModelMaster](#propertyformmodelmaster) | Form Model Master |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetPropertyFormModelMaster(
    &formation.GetPropertyFormModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetPropertyFormModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getPropertyFormModelMaster(
        (new GetPropertyFormModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withPropertyFormModelName("form-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetPropertyFormModelMasterRequest;
import io.gs2.formation.result.GetPropertyFormModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetPropertyFormModelMasterResult result = client.getPropertyFormModelMaster(
        new GetPropertyFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withPropertyFormModelName("form-0001")
    );
    PropertyFormModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetPropertyFormModelMasterResult> asyncResult = null;
yield return client.GetPropertyFormModelMaster(
    new Gs2.Gs2Formation.Request.GetPropertyFormModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithPropertyFormModelName("form-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getPropertyFormModelMaster(
        new Gs2Formation.GetPropertyFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withPropertyFormModelName("form-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_property_form_model_master(
        formation.GetPropertyFormModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_property_form_model_name('form-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.get_property_form_model_master({
    namespaceName="namespace-0001",
    propertyFormModelName="form-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.get_property_form_model_master_async({
    namespaceName="namespace-0001",
    propertyFormModelName="form-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### updatePropertyFormModelMaster

Update Property Form Model Master

Updates the description, metadata, and slot definitions of an existing Property Form Model Master.
The property form model name cannot be changed after creation.
Changes do not take effect until the master data is re-activated via the CurrentFormMaster API.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| propertyFormModelName | string |  | ✓|  |  ~ 128 chars | Property Form Model name<br>Unique Property Form Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| description | string |  | |  |  ~ 1024 chars | Description |
| metadata | string |  | |  |  ~ 2048 chars | Metadata<br>Arbitrary values can be set in the metadata.<br>Since they do not affect GS2’s behavior, they can be used to store information used in the game. |
| slots | [List&lt;SlotModel&gt;](#slotmodel) |  | ✓|  | 1 ~ 10 items | List of Slot Model<br>The ordered list of slot definitions for this property form. Unlike Mold/Form where the number of forms is limited by capacity, property forms are identified by a property ID and can exist for any owned resource. Slot names must be unique within the form. |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [PropertyFormModelMaster](#propertyformmodelmaster) | Form Model Master updated |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.UpdatePropertyFormModelMaster(
    &formation.UpdatePropertyFormModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("FORM_0001"),
        Slots: []formation.SlotModel{
            formation.SlotModel{
                Name: pointy.String("slot-1101"),
            },
            formation.SlotModel{
                Name: pointy.String("slot-1102"),
                Metadata: pointy.String("METADATA_1102"),
            },
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\UpdatePropertyFormModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->updatePropertyFormModelMaster(
        (new UpdatePropertyFormModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withPropertyFormModelName("form-0001")
            ->withDescription("description1")
            ->withMetadata("FORM_0001")
            ->withSlots([
                (new \Gs2\Formation\Model\SlotModel())
                    ->withName("slot-1101"),
                (new \Gs2\Formation\Model\SlotModel())
                    ->withName("slot-1102")
                    ->withMetadata("METADATA_1102"),
            ])
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.UpdatePropertyFormModelMasterRequest;
import io.gs2.formation.result.UpdatePropertyFormModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    UpdatePropertyFormModelMasterResult result = client.updatePropertyFormModelMaster(
        new UpdatePropertyFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withPropertyFormModelName("form-0001")
            .withDescription("description1")
            .withMetadata("FORM_0001")
            .withSlots(Arrays.asList(
                new io.gs2.formation.model.SlotModel()
                    .withName("slot-1101"),
                new io.gs2.formation.model.SlotModel()
                    .withName("slot-1102")
                    .withMetadata("METADATA_1102")
            ))
    );
    PropertyFormModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.UpdatePropertyFormModelMasterResult> asyncResult = null;
yield return client.UpdatePropertyFormModelMaster(
    new Gs2.Gs2Formation.Request.UpdatePropertyFormModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithPropertyFormModelName("form-0001")
        .WithDescription("description1")
        .WithMetadata("FORM_0001")
        .WithSlots(new Gs2.Gs2Formation.Model.SlotModel[] {
            new Gs2.Gs2Formation.Model.SlotModel()
                .WithName("slot-1101"),
            new Gs2.Gs2Formation.Model.SlotModel()
                .WithName("slot-1102")
                .WithMetadata("METADATA_1102"),
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.updatePropertyFormModelMaster(
        new Gs2Formation.UpdatePropertyFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withPropertyFormModelName("form-0001")
            .withDescription("description1")
            .withMetadata("FORM_0001")
            .withSlots([
                new Gs2Formation.model.SlotModel()
                    .withName("slot-1101"),
                new Gs2Formation.model.SlotModel()
                    .withName("slot-1102")
                    .withMetadata("METADATA_1102"),
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.update_property_form_model_master(
        formation.UpdatePropertyFormModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_property_form_model_name('form-0001')
            .with_description('description1')
            .with_metadata('FORM_0001')
            .with_slots([
                formation.SlotModel()
                    .with_name('slot-1101'),
                formation.SlotModel()
                    .with_name('slot-1102')
                    .with_metadata('METADATA_1102'),
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.update_property_form_model_master({
    namespaceName="namespace-0001",
    propertyFormModelName="form-0001",
    description="description1",
    metadata="FORM_0001",
    slots={
        {
            name="slot-1101",
        },
        {
            name="slot-1102",
            metadata="METADATA_1102",
        }
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.update_property_form_model_master_async({
    namespaceName="namespace-0001",
    propertyFormModelName="form-0001",
    description="description1",
    metadata="FORM_0001",
    slots={
        {
            name="slot-1101",
        },
        {
            name="slot-1102",
            metadata="METADATA_1102",
        }
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---

### deletePropertyFormModelMaster

Delete Property Form Model Master

Deletes an editable Property Form Model Master definition.
This only affects the master data; the currently active (published) model is not affected until the master data is re-activated.


#### Request

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| propertyFormModelName | string |  | ✓|  |  ~ 128 chars | Property Form Model name<br>Unique Property Form Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |

#### Result

|  | Type | Description |
| --- | --- | --- |
| item | [PropertyFormModelMaster](#propertyformmodelmaster) | Form Model Master deleted |

#### Implementation Example




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeletePropertyFormModelMaster(
    &formation.DeletePropertyFormModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeletePropertyFormModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deletePropertyFormModelMaster(
        (new DeletePropertyFormModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withPropertyFormModelName("form-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeletePropertyFormModelMasterRequest;
import io.gs2.formation.result.DeletePropertyFormModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DeletePropertyFormModelMasterResult result = client.deletePropertyFormModelMaster(
        new DeletePropertyFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withPropertyFormModelName("form-0001")
    );
    PropertyFormModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DeletePropertyFormModelMasterResult> asyncResult = null;
yield return client.DeletePropertyFormModelMaster(
    new Gs2.Gs2Formation.Request.DeletePropertyFormModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithPropertyFormModelName("form-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.deletePropertyFormModelMaster(
        new Gs2Formation.DeletePropertyFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withPropertyFormModelName("form-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.delete_property_form_model_master(
        formation.DeletePropertyFormModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_property_form_model_name('form-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('formation')

api_result = client.delete_property_form_model_master({
    namespaceName="namespace-0001",
    propertyFormModelName="form-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```

**GS2-Script(Async)**
```lua

client = gs2('formation')

api_result_handler = client.delete_property_form_model_master_async({
    namespaceName="namespace-0001",
    propertyFormModelName="form-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

```



---



