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

# GS2-SkillTree SDK API 레퍼런스

각종 프로그래밍 언어용 GS2-SkillTree SDK의 모델 사양과 API 레퍼런스



## 모델

### Namespace

네임스페이스<br>

네임스페이스는 하나의 프로젝트 내에서 동일한 서비스를 서로 다른 용도로 여러 개 이용하기 위한 엔티티입니다.<br>
GS2의 각 서비스는 네임스페이스 단위로 관리됩니다. 네임스페이스가 다르면 동일한 서비스라도 완전히 독립된 데이터 공간으로 취급됩니다.<br>

따라서 각 서비스의 이용을 시작하려면 먼저 네임스페이스를 생성해야 합니다.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceId | string |  | ※ |  |  ~ 1024자 | 네임스페이스 GRN<br>※ 서버가 자동으로 설정 |
| name | string |  | ✓ |  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| description | string |  |  |  |  ~ 1024자 | 설명문 |
| transactionSetting | [TransactionSetting](#transactionsetting) |  | ✓ |  |  | 트랜잭션 설정<br>노드 해방·구속 조작을 실행할 때 사용되는 트랜잭션 처리 설정입니다.<br>소비 액션(해방 비용)과 입수 액션(구속 시 반환)이 GS2 트랜잭션 시스템을 통해 어떻게 처리되는지를 정의합니다. |
| releaseScript | [ScriptSetting](#scriptsetting) |  |  |  |  | 노드 해방 시 실행할 스크립트 설정<br>Script 트리거 레퍼런스 - [`release`](../script/#release) |
| restrainScript | [ScriptSetting](#scriptsetting) |  |  |  |  | 노드 해방 상태를 미해방 상태로 되돌릴 때 실행할 스크립트 설정<br>Script 트리거 레퍼런스 - [`restrain`](../script/#restrain) |
| logSetting | [LogSetting](#logsetting) |  |  |  |  | 로그 출력 설정<br>노드 해방·구속·초기화 등 스킬 트리 조작에 대한 로그 출력 설정입니다.<br>설정한 경우, 조작 로그가 지정한 GS2-Log 네임스페이스로 출력됩니다. |
| createdAt | long |  | ※ | 현재 시각 |  | 생성일시<br>UNIX 시간・밀리초<br>※ 서버가 자동으로 설정 |
| updatedAt | long |  | ※ | 현재 시각 |  | 최종 갱신일시<br>UNIX 시간・밀리초<br>※ 서버가 자동으로 설정 |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | 리비전 |

**관련 메서드:**
describeNamespaces - 네임스페이스 목록 조회
createNamespace - 네임스페이스 신규 생성
getNamespace - 네임스페이스 조회
updateNamespace - 네임스페이스 갱신
deleteNamespace - 네임스페이스 삭제



---

### TransactionSetting

트랜잭션 설정<br>

트랜잭션 설정은 트랜잭션의 실행 방식, 정합성, 비동기 처리, 충돌 회피 메커니즘을 제어하는 설정입니다.<br>
자동 실행(AutoRun), 원자적 실행(AtomicCommit), GS2-Distributor를 이용한 비동기 실행, 스크립트 결과의 일괄 적용, GS2-JobQueue를 통한 입수 액션의 비동기화 등을 조합하여 게임 로직에 맞는 견고한 트랜잭션 관리를 가능하게 합니다.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| enableAutoRun | bool |  |  | false |  | 발행한 트랜잭션을 서버 사이드에서 자동으로 실행할지 여부 |
| enableAtomicCommit | bool | {enableAutoRun} == true |  | false |  | 트랜잭션의 실행을 원자적으로 커밋할지 여부<br>※ enableAutoRun이(가) true 이면 활성화 |
| transactionUseDistributor | bool | {enableAtomicCommit} == true |  | false |  | 트랜잭션을 비동기 처리로 실행할지 여부<br>※ enableAtomicCommit이(가) true 이면 활성화 |
| commitScriptResultInUseDistributor | bool | {transactionUseDistributor} == true |  | false |  | 스크립트의 결과 커밋 처리를 비동기 처리로 실행할지 여부<br>※ transactionUseDistributor이(가) true 이면 활성화 |
| acquireActionUseJobQueue | bool | {enableAtomicCommit} == true |  | false |  | 입수 액션을 실행할 때 GS2-JobQueue를 사용할지 여부<br>※ enableAtomicCommit이(가) true 이면 활성화 |
| distributorNamespaceId | string |  |  | "grn:gs2:{region}:{ownerId}:distributor:default" |  ~ 1024자 | 트랜잭션 실행에 사용하는 GS2-Distributor 네임스페이스GRN |
| queueNamespaceId | string |  |  | "grn:gs2:{region}:{ownerId}:queue:default" |  ~ 1024자 | 트랜잭션 실행에 사용하는 GS2-JobQueue의 네임스페이스GRN |

**관련 메서드:**
createNamespace - 네임스페이스 신규 생성
updateNamespace - 네임스페이스 갱신


**관련 모델:**
Namespace - 네임스페이스



---

### ScriptSetting

스크립트 설정<br>

GS2에서는 마이크로서비스의 이벤트에 연결하여 커스텀 스크립트를 실행할 수 있습니다.<br>
이 모델은 스크립트 실행을 트리거하기 위한 설정을 보유합니다.<br>

스크립트 실행 방식은 크게 두 가지로, 바로 "동기 실행"과 "비동기 실행"입니다.<br>
동기 실행은 스크립트 실행이 완료될 때까지 처리가 블록됩니다.<br>
대신 스크립트 실행 결과를 이용하여 API 실행을 중단시키거나 API 응답 내용을 제어할 수 있습니다.<br>

한편, 비동기 실행에서는 스크립트 완료를 기다리기 위해 처리가 블록되는 일이 없습니다.<br>
다만 스크립트 실행 결과를 이용하여 API 실행을 중단하거나 API 응답 내용을 변경할 수는 없습니다.<br>
비동기 실행은 API의 응답 흐름에 영향을 주지 않으므로 원칙적으로 비동기 실행을 권장합니다.<br>

비동기 실행에는 실행 방식이 두 가지 있으며, GS2-Script와 Amazon EventBridge가 있습니다.<br>
Amazon EventBridge를 사용함으로써 Lua 이외의 언어로 처리를 작성할 수 있습니다.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| triggerScriptId | string |  |  |  |  ~ 1024자 | API 실행 시 동기적으로 실행되는 GS2-Script의 스크립트GRN<br>"grn:gs2:"로 시작하는 GRN 형식의 ID로 지정해야 합니다. |
| doneTriggerTargetType | 문자열 열거형<br>enum {<br>"none",<br>"gs2_script",<br>"aws"<br>}<br> |  |  | "none" |  | 비동기 스크립트의 실행 방법<br>비동기 실행에서 사용할 스크립트의 종류를 지정합니다.<br>"비동기 실행의 스크립트를 사용하지 않음(none)", "GS2-Script를 사용함(gs2_script)", "Amazon EventBridge를 사용함(aws)" 중에서 선택할 수 있습니다.none: 없음 / gs2_script: GS2-Script / aws: Amazon EventBridge /  |
| doneTriggerScriptId | string | {doneTriggerTargetType} == "gs2_script" |  |  |  ~ 1024자 | 비동기 실행할 GS2-Script 스크립트GRN<br>"grn:gs2:"로 시작하는 GRN 형식의 ID로 지정해야 합니다.<br>※ doneTriggerTargetType이(가) "gs2_script" 이면 활성화 |
| doneTriggerQueueNamespaceId | string | {doneTriggerTargetType} == "gs2_script" |  |  |  ~ 1024자 | 비동기 실행 스크립트를 실행하는 GS2-JobQueue 네임스페이스GRN<br>비동기 실행 스크립트를 직접 실행하지 않고 GS2-JobQueue를 경유하는 경우 GS2-JobQueue의 네임스페이스GRN을 지정합니다.<br>GS2-JobQueue를 이용해야 할 이유는 많지 않으므로, 특별한 이유가 없다면 지정할 필요는 없습니다.<br>※ doneTriggerTargetType이(가) "gs2_script" 이면 활성화 |

**관련 메서드:**
createNamespace - 네임스페이스 신규 생성
updateNamespace - 네임스페이스 갱신


**관련 모델:**
Namespace - 네임스페이스



---

### LogSetting

로그 출력 설정<br>

로그 데이터의 출력 설정을 관리합니다. 이 타입은 로그 데이터를 출력하기 위해 사용되는 GS2-Log 네임스페이스의 식별자(Namespace ID)를 보관합니다.<br>
로그 네임스페이스ID(loggingNamespaceId)에는 로그 데이터를 수집하여 저장하는 GS2-Log의 네임스페이스를 GRN 형식으로 지정합니다.<br>
이 설정을 하면 설정된 네임스페이스 내에서 발생한 API 요청·응답 로그 데이터가 대상 GS2-Log 네임스페이스 쪽으로 출력됩니다.<br>
GS2-Log에서는 실시간으로 로그가 제공되어 시스템 모니터링, 분석, 디버깅 등에 활용할 수 있습니다.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| loggingNamespaceId | string |  | ✓ |  |  ~ 1024자 | 로그를 출력할 GS2-Log의 네임스페이스GRN<br>"grn:gs2:"로 시작하는 GRN 형식의 ID로 지정해야 합니다. |

**관련 메서드:**
createNamespace - 네임스페이스 신규 생성
updateNamespace - 네임스페이스 갱신


**관련 모델:**
Namespace - 네임스페이스



---

### GitHubCheckoutSetting

GitHub에서 마스터 데이터를 체크아웃하는 설정


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| apiKeyId | string |  | ✓ |  |  ~ 1024자 | GitHub API 키의 GRN |
| repositoryName | string |  | ✓ |  |  ~ 1024자 | 리포지토리 이름 |
| sourcePath | string |  | ✓ |  |  ~ 1024자 | 마스터 데이터(JSON) 파일 경로 |
| referenceType | 문자열 열거형<br>enum {<br>"commit_hash",<br>"branch",<br>"tag"<br>}<br> |  | ✓ |  |  | 코드 출처commit_hash: 커밋 해시 / branch: 브랜치 / tag: 태그 /  |
| commitHash | string | {referenceType} == "commit_hash" | ✓※ |  |  ~ 1024자 | 커밋 해시<br>※ referenceType이(가) "commit_hash" 이면 필수 |
| branchName | string | {referenceType} == "branch" | ✓※ |  |  ~ 1024자 | 브랜치 이름<br>※ referenceType이(가) "branch" 이면 필수 |
| tagName | string | {referenceType} == "tag" | ✓※ |  |  ~ 1024자 | 태그 이름<br>※ referenceType이(가) "tag" 이면 필수 |

**관련 메서드:**
updateCurrentTreeMasterFromGitHub - 현재 활성화된 노드 모델의 마스터 데이터를 GitHub에서 갱신



---

### Status

스킬 트리 해방 상황<br>

특정 플레이어와 프로퍼티에 대한 스킬 트리의 해방 상태를 추적하는 모델입니다.<br>
해방(언락)된 노드명의 목록을 관리합니다. 노드는 해방(목록에 추가), 구속(목록에서 제거), 초기화(전체 삭제)할 수 있습니다.<br>
이미 해방된 노드를 해방하려 하거나, 미해방 노드를 구속하려 하면 오류가 발생합니다.<br>
사용자가 처음 접근했을 때 자동으로 생성됩니다.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| statusId | string |  | ※ |  |  ~ 1024자 | 상태GRN<br>※ 서버가 자동으로 설정 |
| userId | string |  | ✓ |  |  ~ 128자 | 사용자ID |
| propertyId | string |  | ✓ |  |  ~ 1024자 | 프로퍼티 ID<br>사용자마다 여러 개의 독립된 스킬트리 인스턴스를 가지기 위한 식별자입니다.<br>동일한 네임스페이스 내에서 플레이어가 서로 다른 캐릭터나 컨텍스트에 대해 별도의 스킬트리를 가지는 시나리오를 구현합니다.<br>최대 1024자. |
| releasedNodeNames | List&lt;string&gt; |  |  | [] | 0 ~ 1000 items | 해제된 노드 모델명 리스트<br>이 스킬트리에서 플레이어가 잠금 해제한 노드 모델명 리스트입니다.<br>해제(추가), 구속(삭제), 리셋(전체 초기화) 작업으로 갱신됩니다.<br>최대 1000건. |
| createdAt | long |  | ※ | 현재 시각 |  | 생성일시<br>UNIX 시간・밀리초<br>※ 서버가 자동으로 설정 |
| updatedAt | long |  | ※ | 현재 시각 |  | 최종 갱신일시<br>UNIX 시간・밀리초<br>※ 서버가 자동으로 설정 |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | 리비전 |

**관련 메서드:**
markReleaseByUserId - 사용자 ID를 지정하여 해방된 노드 기록
release - 노드 해방
releaseByUserId - 사용자 ID를 지정하여 노드 해방
markRestrain - 노드의 해방 상태를 미해방화
markRestrainByUserId - 사용자 ID를 지정하여 노드의 해방 상태를 미해방화
restrain - 노드의 해방 상태를 미해방 상태로 되돌리기
restrainByUserId - 사용자 ID를 지정하여 노드의 해방 상태를 미해방 상태로 되돌리기
describeStatuses - 스테이터스 목록 조회
describeStatusesByUserId - 사용자 ID를 지정하여 스테이터스 목록 조회
getStatus - 스테이터스 조회
getStatusByUserId - 사용자 ID를 지정하여 스테이터스 조회
reset - 스테이터스 초기화
resetByUserId - 사용자 ID를 지정하여 스테이터스 초기화



---

### NodeModel

노드 모델<br>

스킬 트리 내의 노드를 정의하는 모델로, 해방 비용·전제 조건·반환 동작을 포함합니다.<br>
각 노드에는 검증 액션(해방 전 조건 확인), 소비 액션(지불할 비용), 먼저 해방되어야 하는 전제 노드를 설정할 수 있습니다.<br>
노드를 구속(미해방 상태로 되돌림)하면, 소비한 리소스가 반환율에 따라 부분적으로 반환됩니다.<br>
반환 입수 액션은 소비 액션에 반환율을 곱하여 자동으로 계산됩니다.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| nodeModelId | string |  | ※ |  |  ~ 1024자 | 노드 모델 GRN<br>※ 서버가 자동으로 설정 |
| name | string |  | ✓ |  |  ~ 128자 | 노드 모델명<br>노드 모델 고유의 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| metadata | string |  |  |  |  ~ 2048자 | 메타데이터<br>메타데이터에는 임의의 값을 설정할 수 있습니다.<br>이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. |
| releaseVerifyActions | [List&lt;VerifyAction&gt;](#verifyaction) |  |  | [] | 0 ~ 10 items | 해방 검증 액션 목록<br>이 노드를 해방하기 전에 실행되어 조건이 충족되었는지 확인하는 검증 액션의 목록입니다.<br>예를 들어 플레이어가 특정 레벨에 도달했는지, 특정 아이템을 소지하고 있는지를 검증할 수 있습니다.<br>검증 액션 중 하나라도 실패하면 노드 해방이 거부됩니다. 최대 10개 액션. |
| releaseConsumeActions | [List&lt;ConsumeAction&gt;](#consumeaction) |  |  | [] | 1 ~ 10 items | 해방 소비 액션 목록<br>이 노드를 해방할 때 실행되는 소비 액션의 목록으로, 해방 비용을 나타냅니다.<br>이 액션들은 반환 입수 액션 계산에도 사용됩니다. 노드를 구속할 때 각 소비 액션이 반환율에 따라 역산됩니다.<br>최소 1개의 소비 액션이 필요합니다. 최대 10개 액션. |
| returnAcquireActions | [List&lt;AcquireAction&gt;](#acquireaction) |  |  |  | 0 ~ 10 items | 반환 입수 액션 목록<br>이 노드를 구속(취소)할 때 실행되는 입수 액션의 목록으로, 플레이어에게 반환되는 리소스를 나타냅니다.<br>이 필드는 해방 소비 액션에 반환율을 곱하여 자동 생성됩니다.<br>예를 들어 해방 비용이 골드 100이고 반환율이 0.8인 경우, 구속 시 골드 80이 반환됩니다.<br>최대 10개 액션. |
| restrainReturnRate | float |  |  | 1.0 | 0.0 ~ 1.0 | 반환율<br>이 노드를 구속(미해방 상태로 되돌림)했을 때 소비된 리소스가 반환되는 비율입니다.<br>1.0은 전액 반환, 0.5는 절반 반환, 0.0은 반환 없음을 의미합니다.<br>기본값은 1.0(전액 반환)입니다. 유효 범위: 0.0~1.0. |
| premiseNodeNames | List&lt;string&gt; |  |  | [] | 0 ~ 10 items | 전제 노드명 목록<br>이 노드를 해방하기 전에 먼저 해방되어 있어야 하는 다른 노드 모델의 이름입니다.<br>스킬 트리의 의존 관계 그래프를 정의합니다. 전제 노드가 모두 해방되어 있지 않으면 이 노드는 해방할 수 없습니다.<br>최대 10개의 전제 노드. |

**관련 메서드:**
describeNodeModels - 노드 모델 목록 조회
getNodeModel - 노드 모델 조회



---

### Config

컨피그 설정<br>

트랜잭션의 변수에 적용하는 설정 값


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| key | string |  | ✓ |  |  ~ 64자 | 이름 |
| value | string |  |  |  |  ~ 51200자 | 값 |


---

### ConsumeAction

소비 액션


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| action | 문자열 열거형<br>enum {<br>}<br> |  | ✓ |  |  | 소비 액션에서 실행할 액션의 종류 |
| request | string |  | ✓ |  |  ~ 524288자 | 액션 실행 시 사용되는 요청의 JSON 문자열 |

**관련 모델:**
NodeModel - 노드 모델
NodeModelMaster - 노드 모델 마스터



---

### VerifyAction

검증 액션


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| action | 문자열 열거형<br>enum {<br>}<br> |  | ✓ |  |  | 검증 액션에서 실행할 액션의 종류 |
| request | string |  | ✓ |  |  ~ 524288자 | 액션 실행 시 사용되는 요청의 JSON 문자열 |

**관련 모델:**
NodeModel - 노드 모델
NodeModelMaster - 노드 모델 마스터



---

### AcquireAction

입수 액션


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| action | 문자열 열거형<br>enum {<br>}<br> |  | ✓ |  |  | 입수 액션에서 실행할 액션의 종류 |
| request | string |  | ✓ |  |  ~ 524288자 | 액션 실행 시 사용되는 요청의 JSON 문자열 |

**관련 모델:**
NodeModel - 노드 모델



---

### VerifyActionResult

검증 액션 실행 결과


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| action | 문자열 열거형<br>enum {<br>}<br> |  | ✓ |  |  | 검증 액션에서 실행할 액션의 종류 |
| verifyRequest | string |  | ✓ |  |  ~ 524288자 | 액션 실행 시 사용되는 요청의 JSON 문자열 |
| statusCode | int |  |  |  | 0 ~ 999 | 상태 코드 |
| verifyResult | string |  |  |  |  ~ 1048576자 | 결과 내용 |

**관련 모델:**
TransactionResult - 트랜잭션 실행 결과



---

### ConsumeActionResult

소비 액션 실행 결과


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| action | 문자열 열거형<br>enum {<br>}<br> |  | ✓ |  |  | 소비 액션에서 실행할 액션의 종류 |
| consumeRequest | string |  | ✓ |  |  ~ 524288자 | 액션 실행 시 사용되는 요청의 JSON 문자열 |
| statusCode | int |  |  |  | 0 ~ 999 | 상태 코드 |
| consumeResult | string |  |  |  |  ~ 1048576자 | 결과 내용 |

**관련 모델:**
TransactionResult - 트랜잭션 실행 결과



---

### AcquireActionResult

획득 액션 실행 결과


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| action | 문자열 열거형<br>enum {<br>}<br> |  | ✓ |  |  | 입수 액션에서 실행할 액션의 종류 |
| acquireRequest | string |  | ✓ |  |  ~ 524288자 | 액션 실행 시 사용되는 요청의 JSON 문자열 |
| statusCode | int |  |  |  | 0 ~ 999 | 상태 코드 |
| acquireResult | string |  |  |  |  ~ 1048576자 | 결과 내용 |

**관련 모델:**
TransactionResult - 트랜잭션 실행 결과



---

### TransactionResult

트랜잭션 실행 결과<br>

서버 사이드에서 트랜잭션 자동 실행 기능을 이용하여 실행된 트랜잭션의 실행 결과


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| transactionId | string |  | ✓ |  | 36 ~ 36자 | 트랜잭션 ID |
| verifyResults | [List&lt;VerifyActionResult&gt;](#verifyactionresult) |  |  |  | 0 ~ 10 items | 검증 액션의 실행 결과 목록 |
| consumeResults | [List&lt;ConsumeActionResult&gt;](#consumeactionresult) |  |  | [] | 0 ~ 10 items | 소비 액션의 실행 결과 목록 |
| acquireResults | [List&lt;AcquireActionResult&gt;](#acquireactionresult) |  |  | [] | 0 ~ 100 items | 획득 액션 실행 결과 리스트 |
| hasError | bool |  |  | false |  | 트랜잭션 실행 중 오류가 발생했는지 여부 |

**관련 메서드:**
release - 노드 해방
releaseByUserId - 사용자 ID를 지정하여 노드 해방
restrain - 노드의 해방 상태를 미해방 상태로 되돌리기
restrainByUserId - 사용자 ID를 지정하여 노드의 해방 상태를 미해방 상태로 되돌리기
reset - 스테이터스 초기화
resetByUserId - 사용자 ID를 지정하여 스테이터스 초기화



---

### CurrentTreeMaster

현재 활성화된 노드 모델 마스터 데이터<br>

현재 네임스페이스 내에서 유효한 노드 모델의 정의를 기술한 마스터 데이터입니다.<br>
GS2에서는 마스터 데이터 관리에 JSON 형식의 파일을 사용합니다.<br>
파일을 업로드함으로써 실제로 서버에 설정을 반영할 수 있습니다.<br>

JSON 파일을 작성하는 방법으로, 매니지먼트 콘솔 내에 마스터 데이터 에디터를 제공하고 있습니다.<br>
또한 게임 운영에 더 적합한 도구를 직접 제작하여 적절한 포맷의 JSON 파일을 출력하는 방식으로도 서비스를 이용할 수 있습니다.
**ℹ️ Note**

JSON 파일 형식에 대해서는 [GS2-SkillTree 마스터 데이터 레퍼런스](api_reference/skill_tree/master_data/)를 참조해 주세요.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceId | string |  | ※ |  |  ~ 1024자 | 네임스페이스 GRN<br>※ 서버가 자동으로 설정 |
| settings | string |  | ✓ |  |  ~ 5242880 바이트 (5MB) | 마스터 데이터 |

**관련 메서드:**
exportMaster - 노드 모델 마스터를 활성화 가능한 마스터 데이터 형식으로 내보내기
getCurrentTreeMaster - 현재 활성화된 노드 모델의 마스터 데이터 조회
updateCurrentTreeMaster - 현재 활성화된 노드 모델의 마스터 데이터 갱신
updateCurrentTreeMasterFromGitHub - 현재 활성화된 노드 모델의 마스터 데이터를 GitHub에서 갱신



---

### NodeModelMaster

노드 모델 마스터<br>

노드 모델 마스터는 게임 내에서 사용되는 노드 모델의 편집·관리용 데이터로, 매니지먼트 콘솔의 마스터 데이터 에디터에 일시적으로 보관됩니다.<br>
임포트·업데이트 처리를 수행함으로써 실제로 게임에서 참조되는 노드 모델로 반영됩니다.<br>

각 노드는 해방 비용(소비 액션), 해방 조건(검증 액션), 전제 노드, 반환 동작(반환율)을 정의합니다.<br>
노드를 구속하면 소비한 리소스가 반환율에 따라 부분적으로 반환됩니다. 반환 입수 액션은 자동으로 계산됩니다.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| nodeModelId | string |  | ※ |  |  ~ 1024자 | 노드 모델 마스터 GRN<br>※ 서버가 자동으로 설정 |
| name | string |  | ✓ |  |  ~ 128자 | 노드 모델명<br>노드 모델 고유의 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| description | string |  |  |  |  ~ 1024자 | 설명문 |
| metadata | string |  |  |  |  ~ 2048자 | 메타데이터<br>메타데이터에는 임의의 값을 설정할 수 있습니다.<br>이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. |
| releaseVerifyActions | [List&lt;VerifyAction&gt;](#verifyaction) |  |  | [] | 0 ~ 10 items | 해방 검증 액션 목록<br>이 노드를 해방하기 전에 실행되어 조건이 충족되었는지 확인하는 검증 액션의 목록입니다.<br>예를 들어 플레이어가 특정 레벨에 도달했는지, 특정 아이템을 소지하고 있는지를 검증할 수 있습니다.<br>검증 액션 중 하나라도 실패하면 노드 해방이 거부됩니다. 최대 10개 액션. |
| releaseConsumeActions | [List&lt;ConsumeAction&gt;](#consumeaction) |  |  | [] | 1 ~ 10 items | 해방 소비 액션 목록<br>이 노드를 해방할 때 실행되는 소비 액션의 목록으로, 해방 비용을 나타냅니다.<br>이 액션들은 반환 입수 액션 계산에도 사용됩니다. 노드를 구속할 때 각 소비 액션이 반환율에 따라 역산됩니다.<br>최소 1개의 소비 액션이 필요합니다. 최대 10개 액션. |
| restrainReturnRate | float |  |  | 1.0 | 0.0 ~ 1.0 | 반환율<br>이 노드를 구속(미해방 상태로 되돌림)했을 때 소비된 리소스가 반환되는 비율입니다.<br>1.0은 전액 반환, 0.5는 절반 반환, 0.0은 반환 없음을 의미합니다.<br>기본값은 1.0(전액 반환)입니다. 유효 범위: 0.0~1.0. |
| premiseNodeNames | List&lt;string&gt; |  |  | [] | 0 ~ 10 items | 전제 노드명 목록<br>이 노드를 해방하기 전에 먼저 해방되어 있어야 하는 다른 노드 모델의 이름입니다.<br>스킬 트리의 의존 관계 그래프를 정의합니다. 전제 노드가 모두 해방되어 있지 않으면 이 노드는 해방할 수 없습니다.<br>최대 10개의 전제 노드. |
| createdAt | long |  | ※ | 현재 시각 |  | 생성일시<br>UNIX 시간・밀리초<br>※ 서버가 자동으로 설정 |
| updatedAt | long |  | ※ | 현재 시각 |  | 최종 갱신일시<br>UNIX 시간・밀리초<br>※ 서버가 자동으로 설정 |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | 리비전 |

**관련 메서드:**
describeNodeModelMasters - 노드 모델 마스터 목록 조회
createNodeModelMaster - 노드 모델 마스터 신규 생성
getNodeModelMaster - 노드 모델 마스터 조회
updateNodeModelMaster - 노드 모델 마스터 갱신
deleteNodeModelMaster - 노드 모델 마스터 삭제



---
## 메서드

### describeNamespaces

네임스페이스 목록 조회<br>

프로젝트 내에서 서비스 단위로 생성된 네임스페이스의 목록을 조회합니다.<br>
옵션인 페이지 토큰을 사용하여 목록의 특정 위치부터 데이터 조회를 시작할 수 있습니다.<br>
또한 조회할 네임스페이스의 수를 제한하는 것도 가능합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namePrefix | string |  | |  |  ~ 64자 | 네임스페이스 이름의 필터 접두사 |
| pageToken | string |  | |  |  ~ 1024자 | 데이터 취득을 시작할 위치를 지정하는 토큰 |
| limit | int |  | | 30 | 1 ~ 1000 | 취득할 데이터 건수 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| items | [List&lt;Namespace&gt;](#namespace) | 네임스페이스 목록 |
| nextPageToken | string | 목록의 나머지를 취득하기 위한 페이지 토큰 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.DescribeNamespaces(
    &skill_tree.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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\DescribeNamespacesRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.DescribeNamespacesRequest;
import io.gs2.skillTree.result.DescribeNamespacesResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2SkillTreeRestClient client = new Gs2SkillTreeRestClient(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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.DescribeNamespacesResult> asyncResult = null;
yield return client.DescribeNamespaces(
    new Gs2.Gs2SkillTree.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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.describeNamespaces(
        new Gs2SkillTree.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 skill_tree

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

try:
    result = client.describe_namespaces(
        skill_tree.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('skill_tree')

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('skill_tree')

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

네임스페이스 신규 생성<br>

네임스페이스의 이름, 설명 및 각종 설정을 포함한 상세 정보를 지정해야 합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| name | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| description | string |  | |  |  ~ 1024자 | 설명문 |
| transactionSetting | [TransactionSetting](#transactionsetting) |  | ✓|  |  | 트랜잭션 설정<br>노드 해방·구속 조작을 실행할 때 사용되는 트랜잭션 처리 설정입니다.<br>소비 액션(해방 비용)과 입수 액션(구속 시 반환)이 GS2 트랜잭션 시스템을 통해 어떻게 처리되는지를 정의합니다. |
| releaseScript | [ScriptSetting](#scriptsetting) |  | |  |  | 노드 해방 시 실행할 스크립트 설정<br>Script 트리거 레퍼런스 - [`release`](../script/#release) |
| restrainScript | [ScriptSetting](#scriptsetting) |  | |  |  | 노드 해방 상태를 미해방 상태로 되돌릴 때 실행할 스크립트 설정<br>Script 트리거 레퍼런스 - [`restrain`](../script/#restrain) |
| logSetting | [LogSetting](#logsetting) |  | |  |  | 로그 출력 설정<br>노드 해방·구속·초기화 등 스킬 트리 조작에 대한 로그 출력 설정입니다.<br>설정한 경우, 조작 로그가 지정한 GS2-Log 네임스페이스로 출력됩니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Namespace](#namespace) | 생성한 네임스페이스 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.CreateNamespace(
    &skill_tree.CreateNamespaceRequest {
        Name: pointy.String("namespace-0001"),
        Description: nil,
        TransactionSetting: &skillTree.TransactionSetting{
            EnableAutoRun: pointy.Bool(false),
            QueueNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"),
        },
        ReleaseScript: nil,
        RestrainScript: nil,
        LogSetting: &skillTree.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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\CreateNamespaceRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->createNamespace(
        (new CreateNamespaceRequest())
            ->withName("namespace-0001")
            ->withDescription(null)
            ->withTransactionSetting((new \Gs2\SkillTree\Model\TransactionSetting())
                ->withEnableAutoRun(false)
                ->withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
            ->withReleaseScript(null)
            ->withRestrainScript(null)
            ->withLogSetting((new \Gs2\SkillTree\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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.CreateNamespaceRequest;
import io.gs2.skillTree.result.CreateNamespaceResult;

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

try {
    CreateNamespaceResult result = client.createNamespace(
        new CreateNamespaceRequest()
            .withName("namespace-0001")
            .withDescription(null)
            .withTransactionSetting(new io.gs2.skillTree.model.TransactionSetting()
                .withEnableAutoRun(false)
                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
            .withReleaseScript(null)
            .withRestrainScript(null)
            .withLogSetting(new io.gs2.skillTree.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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.CreateNamespaceResult> asyncResult = null;
yield return client.CreateNamespace(
    new Gs2.Gs2SkillTree.Request.CreateNamespaceRequest()
        .WithName("namespace-0001")
        .WithDescription(null)
        .WithTransactionSetting(new Gs2.Gs2SkillTree.Model.TransactionSetting()
            .WithEnableAutoRun(false)
            .WithQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
        .WithReleaseScript(null)
        .WithRestrainScript(null)
        .WithLogSetting(new Gs2.Gs2SkillTree.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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.createNamespace(
        new Gs2SkillTree.CreateNamespaceRequest()
            .withName("namespace-0001")
            .withDescription(null)
            .withTransactionSetting(new Gs2SkillTree.model.TransactionSetting()
                .withEnableAutoRun(false)
                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
            .withReleaseScript(null)
            .withRestrainScript(null)
            .withLogSetting(new Gs2SkillTree.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 skill_tree

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

try:
    result = client.create_namespace(
        skill_tree.CreateNamespaceRequest()
            .with_name('namespace-0001')
            .with_description(None)
            .with_transaction_setting(
                skill_tree.TransactionSetting()
                    .with_enable_auto_run(False)
                    .with_queue_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001'))
            .with_release_script(None)
            .with_restrain_script(None)
            .with_log_setting(
                skill_tree.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('skill_tree')

api_result = client.create_namespace({
    name="namespace-0001",
    description=nil,
    transactionSetting={
        enableAutoRun=false,
        queueNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001",
    },
    releaseScript=nil,
    restrainScript=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('skill_tree')

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",
    },
    releaseScript=nil,
    restrainScript=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

네임스페이스의 상태 조회<br>

지정된 네임스페이스의 현재 상태를 조회합니다.<br>
상태에는 네임스페이스가 활성 상태인지, 삭제되었는지가 포함됩니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| status | string | 네임스페이스의 상태<br>ACTIVE: 유효 / DELETED: 삭제됨 /  |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.GetNamespaceStatus(
    &skill_tree.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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\GetNamespaceStatusRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.GetNamespaceStatusRequest;
import io.gs2.skillTree.result.GetNamespaceStatusResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2SkillTreeRestClient client = new Gs2SkillTreeRestClient(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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.GetNamespaceStatusResult> asyncResult = null;
yield return client.GetNamespaceStatus(
    new Gs2.Gs2SkillTree.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 Gs2SkillTree from '@/gs2/skillTree';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

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


```

**GS2-Script**
```lua

client = gs2('skill_tree')

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('skill_tree')

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

네임스페이스 조회<br>

지정된 네임스페이스의 상세 정보를 조회합니다.<br>
여기에는 네임스페이스의 이름, 설명 및 기타 설정 정보가 포함됩니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Namespace](#namespace) | 네임스페이스 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.GetNamespace(
    &skill_tree.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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\GetNamespaceRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.GetNamespaceRequest;
import io.gs2.skillTree.result.GetNamespaceResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2SkillTreeRestClient client = new Gs2SkillTreeRestClient(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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.GetNamespaceResult> asyncResult = null;
yield return client.GetNamespace(
    new Gs2.Gs2SkillTree.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 Gs2SkillTree from '@/gs2/skillTree';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

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


```

**GS2-Script**
```lua

client = gs2('skill_tree')

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('skill_tree')

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

네임스페이스 갱신<br>

지정된 네임스페이스의 설정을 갱신합니다.<br>
네임스페이스의 설명이나 특정 설정을 변경할 수 있습니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| description | string |  | |  |  ~ 1024자 | 설명문 |
| transactionSetting | [TransactionSetting](#transactionsetting) |  | ✓|  |  | 트랜잭션 설정<br>노드 해방·구속 조작을 실행할 때 사용되는 트랜잭션 처리 설정입니다.<br>소비 액션(해방 비용)과 입수 액션(구속 시 반환)이 GS2 트랜잭션 시스템을 통해 어떻게 처리되는지를 정의합니다. |
| releaseScript | [ScriptSetting](#scriptsetting) |  | |  |  | 노드 해방 시 실행할 스크립트 설정<br>Script 트리거 레퍼런스 - [`release`](../script/#release) |
| restrainScript | [ScriptSetting](#scriptsetting) |  | |  |  | 노드 해방 상태를 미해방 상태로 되돌릴 때 실행할 스크립트 설정<br>Script 트리거 레퍼런스 - [`restrain`](../script/#restrain) |
| logSetting | [LogSetting](#logsetting) |  | |  |  | 로그 출력 설정<br>노드 해방·구속·초기화 등 스킬 트리 조작에 대한 로그 출력 설정입니다.<br>설정한 경우, 조작 로그가 지정한 GS2-Log 네임스페이스로 출력됩니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Namespace](#namespace) | 갱신한 네임스페이스 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.UpdateNamespace(
    &skill_tree.UpdateNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Description: pointy.String("description1"),
        TransactionSetting: &skillTree.TransactionSetting{
            EnableAutoRun: pointy.Bool(false),
            QueueNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"),
        },
        ReleaseScript: nil,
        RestrainScript: nil,
        LogSetting: &skillTree.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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\UpdateNamespaceRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->updateNamespace(
        (new UpdateNamespaceRequest())
            ->withNamespaceName("namespace-0001")
            ->withDescription("description1")
            ->withTransactionSetting((new \Gs2\SkillTree\Model\TransactionSetting())
                ->withEnableAutoRun(false)
                ->withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
            ->withReleaseScript(null)
            ->withRestrainScript(null)
            ->withLogSetting((new \Gs2\SkillTree\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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.UpdateNamespaceRequest;
import io.gs2.skillTree.result.UpdateNamespaceResult;

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

try {
    UpdateNamespaceResult result = client.updateNamespace(
        new UpdateNamespaceRequest()
            .withNamespaceName("namespace-0001")
            .withDescription("description1")
            .withTransactionSetting(new io.gs2.skillTree.model.TransactionSetting()
                .withEnableAutoRun(false)
                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
            .withReleaseScript(null)
            .withRestrainScript(null)
            .withLogSetting(new io.gs2.skillTree.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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.UpdateNamespaceResult> asyncResult = null;
yield return client.UpdateNamespace(
    new Gs2.Gs2SkillTree.Request.UpdateNamespaceRequest()
        .WithNamespaceName("namespace-0001")
        .WithDescription("description1")
        .WithTransactionSetting(new Gs2.Gs2SkillTree.Model.TransactionSetting()
            .WithEnableAutoRun(false)
            .WithQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
        .WithReleaseScript(null)
        .WithRestrainScript(null)
        .WithLogSetting(new Gs2.Gs2SkillTree.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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.updateNamespace(
        new Gs2SkillTree.UpdateNamespaceRequest()
            .withNamespaceName("namespace-0001")
            .withDescription("description1")
            .withTransactionSetting(new Gs2SkillTree.model.TransactionSetting()
                .withEnableAutoRun(false)
                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
            .withReleaseScript(null)
            .withRestrainScript(null)
            .withLogSetting(new Gs2SkillTree.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 skill_tree

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

try:
    result = client.update_namespace(
        skill_tree.UpdateNamespaceRequest()
            .with_namespace_name('namespace-0001')
            .with_description('description1')
            .with_transaction_setting(
                skill_tree.TransactionSetting()
                    .with_enable_auto_run(False)
                    .with_queue_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001'))
            .with_release_script(None)
            .with_restrain_script(None)
            .with_log_setting(
                skill_tree.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('skill_tree')

api_result = client.update_namespace({
    namespaceName="namespace-0001",
    description="description1",
    transactionSetting={
        enableAutoRun=false,
        queueNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001",
    },
    releaseScript=nil,
    restrainScript=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('skill_tree')

api_result_handler = client.update_namespace_async({
    namespaceName="namespace-0001",
    description="description1",
    transactionSetting={
        enableAutoRun=false,
        queueNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001",
    },
    releaseScript=nil,
    restrainScript=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

네임스페이스 삭제<br>

지정된 네임스페이스를 삭제합니다.<br>
이 작업은 되돌릴 수 없으며, 삭제된 네임스페이스와 관련된 모든 데이터는 복구할 수 없게 됩니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Namespace](#namespace) | 삭제한 네임스페이스 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.DeleteNamespace(
    &skill_tree.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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\DeleteNamespaceRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.DeleteNamespaceRequest;
import io.gs2.skillTree.result.DeleteNamespaceResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2SkillTreeRestClient client = new Gs2SkillTreeRestClient(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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.DeleteNamespaceResult> asyncResult = null;
yield return client.DeleteNamespace(
    new Gs2.Gs2SkillTree.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 Gs2SkillTree from '@/gs2/skillTree';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

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


```

**GS2-Script**
```lua

client = gs2('skill_tree')

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('skill_tree')

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

마이크로서비스 버전 조회


#### Request

요청 파라미터: 없음

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | string | 버전 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.GetServiceVersion(
    &skill_tree.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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\GetServiceVersionRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.GetServiceVersionRequest;
import io.gs2.skillTree.result.GetServiceVersionResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2SkillTreeRestClient client = new Gs2SkillTreeRestClient(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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.GetServiceVersionResult> asyncResult = null;
yield return client.GetServiceVersion(
    new Gs2.Gs2SkillTree.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 Gs2SkillTree from '@/gs2/skillTree';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

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


```

**GS2-Script**
```lua

client = gs2('skill_tree')

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('skill_tree')

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

지정한 사용자 ID에 연결된 데이터의 덤프 취득<br>

개인정보 보호에 관한 법적 요건을 충족시키기 위해 사용하거나, 데이터의 백업 및 이관에 사용할 수 있습니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

반환값: 없음

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.DumpUserDataByUserId(
    &skill_tree.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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\DumpUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.DumpUserDataByUserIdRequest;
import io.gs2.skillTree.result.DumpUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2SkillTreeRestClient client = new Gs2SkillTreeRestClient(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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.DumpUserDataByUserIdResult> asyncResult = null;
yield return client.DumpUserDataByUserId(
    new Gs2.Gs2SkillTree.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 Gs2SkillTree from '@/gs2/skillTree';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

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


```

**GS2-Script**
```lua

client = gs2('skill_tree')

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('skill_tree')

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

지정한 사용자 ID에 연결된 데이터의 덤프가 완료되었는지 확인


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| url | string | 출력 데이터의 URL |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.CheckDumpUserDataByUserId(
    &skill_tree.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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\CheckDumpUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.CheckDumpUserDataByUserIdRequest;
import io.gs2.skillTree.result.CheckDumpUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2SkillTreeRestClient client = new Gs2SkillTreeRestClient(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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.CheckDumpUserDataByUserIdResult> asyncResult = null;
yield return client.CheckDumpUserDataByUserId(
    new Gs2.Gs2SkillTree.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 Gs2SkillTree from '@/gs2/skillTree';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

try:
    result = client.check_dump_user_data_by_user_id(
        skill_tree.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('skill_tree')

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('skill_tree')

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

사용자 데이터 완전 삭제<br>

지정된 사용자 ID에 연결된 데이터의 클리닝을 실행합니다.<br>
이를 통해 특정 사용자 데이터를 프로젝트에서 안전하게 삭제할 수 있습니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

반환값: 없음

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.CleanUserDataByUserId(
    &skill_tree.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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\CleanUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.CleanUserDataByUserIdRequest;
import io.gs2.skillTree.result.CleanUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2SkillTreeRestClient client = new Gs2SkillTreeRestClient(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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.CleanUserDataByUserIdResult> asyncResult = null;
yield return client.CleanUserDataByUserId(
    new Gs2.Gs2SkillTree.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 Gs2SkillTree from '@/gs2/skillTree';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

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


```

**GS2-Script**
```lua

client = gs2('skill_tree')

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('skill_tree')

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

지정한 사용자 ID에 연결된 데이터의 삭제가 완료되었는지 확인


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

반환값: 없음

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.CheckCleanUserDataByUserId(
    &skill_tree.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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\CheckCleanUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.CheckCleanUserDataByUserIdRequest;
import io.gs2.skillTree.result.CheckCleanUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2SkillTreeRestClient client = new Gs2SkillTreeRestClient(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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.CheckCleanUserDataByUserIdResult> asyncResult = null;
yield return client.CheckCleanUserDataByUserId(
    new Gs2.Gs2SkillTree.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 Gs2SkillTree from '@/gs2/skillTree';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

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


```

**GS2-Script**
```lua

client = gs2('skill_tree')

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('skill_tree')

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

지정한 사용자 ID에 연결된 데이터 임포트 실행<br>

임포트에 사용할 수 있는 데이터는 GS2를 통해 익스포트하여 취득한 데이터로 한정되며, 오래된 데이터는 임포트에 실패할 수 있습니다.<br>
익스포트한 사용자 ID와 다른 사용자 ID로 임포트할 수 있지만, 사용자 데이터의 페이로드 내에 사용자 ID가 포함되어 있는 경우에는 그렇지 않을 수 있습니다.<br>

이 API의 반환값으로 응답된 URL에 익스포트한 zip 파일을 업로드하고, importUserDataByUserId를 호출하면 실제 임포트 처리를 시작할 수 있습니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| uploadToken | string | 업로드 후 결과를 반영할 때 사용하는 토큰 |
| uploadUrl | string | 사용자 데이터 업로드 처리 실행에 사용하는 URL |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.PrepareImportUserDataByUserId(
    &skill_tree.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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\PrepareImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.PrepareImportUserDataByUserIdRequest;
import io.gs2.skillTree.result.PrepareImportUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2SkillTreeRestClient client = new Gs2SkillTreeRestClient(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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.PrepareImportUserDataByUserIdResult> asyncResult = null;
yield return client.PrepareImportUserDataByUserId(
    new Gs2.Gs2SkillTree.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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.prepareImportUserDataByUserId(
        new Gs2SkillTree.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 skill_tree

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

try:
    result = client.prepare_import_user_data_by_user_id(
        skill_tree.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('skill_tree')

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('skill_tree')

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

지정한 사용자 ID에 연결된 데이터의 임포트 실행<br>

임포트에 사용할 수 있는 데이터는 GS2 를 통해 익스포트하여 취득한 데이터로 한정되며, 오래된 데이터는 임포트에 실패할 수 있습니다.<br>
익스포트한 사용자 ID와 다른 사용자 ID로 임포트할 수 있지만, 사용자 데이터의 페이로드 내에 사용자 ID가 포함되어 있는 경우에는 그렇지 않을 수 있습니다.<br>

이 API를 호출하기 전에 prepareImportUserDataByUserId 를 호출하여 업로드 준비를 완료해야 합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| uploadToken | string |  | ✓|  |  ~ 1024자 | 업로드 준비 시 수신한 토큰 |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

반환값: 없음

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.ImportUserDataByUserId(
    &skill_tree.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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\ImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.ImportUserDataByUserIdRequest;
import io.gs2.skillTree.result.ImportUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2SkillTreeRestClient client = new Gs2SkillTreeRestClient(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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.ImportUserDataByUserIdResult> asyncResult = null;
yield return client.ImportUserDataByUserId(
    new Gs2.Gs2SkillTree.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 Gs2SkillTree from '@/gs2/skillTree';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

try:
    result = client.import_user_data_by_user_id(
        skill_tree.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('skill_tree')

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('skill_tree')

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

지정한 사용자 ID에 연결된 데이터의 임포트가 완료되었는지 확인


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| uploadToken | string |  | ✓|  |  ~ 1024자 | 업로드 준비 시 수신한 토큰 |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| url | string | 출력 로그의 URL |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.CheckImportUserDataByUserId(
    &skill_tree.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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\CheckImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.CheckImportUserDataByUserIdRequest;
import io.gs2.skillTree.result.CheckImportUserDataByUserIdResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2SkillTreeRestClient client = new Gs2SkillTreeRestClient(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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.CheckImportUserDataByUserIdResult> asyncResult = null;
yield return client.CheckImportUserDataByUserId(
    new Gs2.Gs2SkillTree.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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.checkImportUserDataByUserId(
        new Gs2SkillTree.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 skill_tree

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

try:
    result = client.check_import_user_data_by_user_id(
        skill_tree.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('skill_tree')

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('skill_tree')

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;

```



---

### markReleaseByUserId

사용자 ID를 지정하여 해방된 노드 기록<br>

지정된 노드가 해방 가능한지 검증한 후(전제 노드가 이미 해방되어 있어야 합니다), 해방됨으로 마크합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| propertyId | string |  | ✓|  |  ~ 1024자 | 프로퍼티 ID<br>사용자마다 여러 개의 독립된 스킬트리 인스턴스를 가지기 위한 식별자입니다.<br>동일한 네임스페이스 내에서 플레이어가 서로 다른 캐릭터나 컨텍스트에 대해 별도의 스킬트리를 가지는 시나리오를 구현합니다.<br>최대 1024자. |
| nodeModelNames | List&lt;string&gt; |  | ✓|  | 1 ~ 1000 items | 노드 모델 이름 목록 |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Status](#status) | 상태 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.MarkReleaseByUserId(
    &skill_tree.MarkReleaseByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PropertyId: pointy.String("property-0001"),
        NodeModelNames: []*string{
            pointy.String("node-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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\MarkReleaseByUserIdRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->markReleaseByUserId(
        (new MarkReleaseByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPropertyId("property-0001")
            ->withNodeModelNames([
                "node-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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.MarkReleaseByUserIdRequest;
import io.gs2.skillTree.result.MarkReleaseByUserIdResult;

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

try {
    MarkReleaseByUserIdResult result = client.markReleaseByUserId(
        new MarkReleaseByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyId("property-0001")
            .withNodeModelNames(Arrays.asList(
                "node-0001"
            ))
            .withTimeOffsetToken(null)
    );
    Status 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.MarkReleaseByUserIdResult> asyncResult = null;
yield return client.MarkReleaseByUserId(
    new Gs2.Gs2SkillTree.Request.MarkReleaseByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPropertyId("property-0001")
        .WithNodeModelNames(new string[] {
            "node-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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.markReleaseByUserId(
        new Gs2SkillTree.MarkReleaseByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyId("property-0001")
            .withNodeModelNames([
                "node-0001",
            ])
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

try:
    result = client.mark_release_by_user_id(
        skill_tree.MarkReleaseByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_property_id('property-0001')
            .with_node_model_names([
                'node-0001',
            ])
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('skill_tree')

api_result = client.mark_release_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyId="property-0001",
    nodeModelNames={
        "node-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('skill_tree')

api_result_handler = client.mark_release_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyId="property-0001",
    nodeModelNames={
        "node-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;

```



---

### release

노드 해방<br>

트랜잭션을 생성하여 스킬 트리의 지정 노드를 해방합니다. 트랜잭션에는 노드 모델에 정의된 해방 시 검증 액션(해방 전 검증)과 해방 시 소비 액션(리소스 차감)이 포함됩니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| accessToken | string |  | ✓|  |  ~ 128자 | 액세스 토큰 |
| propertyId | string |  | ✓|  |  ~ 1024자 | 프로퍼티 ID<br>사용자마다 여러 개의 독립된 스킬트리 인스턴스를 가지기 위한 식별자입니다.<br>동일한 네임스페이스 내에서 플레이어가 서로 다른 캐릭터나 컨텍스트에 대해 별도의 스킬트리를 가지는 시나리오를 구현합니다.<br>최대 1024자. |
| nodeModelNames | List&lt;string&gt; |  | ✓|  | 1 ~ 1000 items | 노드 모델 이름 목록 |
| config | [List&lt;Config&gt;](#config) |  | | [] | 0 ~ 32 items | 트랜잭션 변수에 적용할 설정값 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Status](#status) | 상태 |
| transactionId | string | 발행된 트랜잭션 ID |
| stampSheet | string | 해방 처리 실행에 사용하는 스탬프 시트 |
| stampSheetEncryptionKeyId | string | 스탬프 시트의 서명 계산에 사용한 암호화 키 GRN |
| autoRunStampSheet | bool? | 트랜잭션 자동 실행이 활성화되어 있는지 여부 |
| atomicCommit | bool? | 트랜잭션을 원자적으로 커밋할지 여부 |
| transaction | string | 발행된 트랜잭션 |
| transactionResult | [TransactionResult](#transactionresult) | 트랜잭션 실행 결과 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.Release(
    &skill_tree.ReleaseRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PropertyId: pointy.String("property-0001"),
        NodeModelNames: []*string{
            pointy.String("node-0001"),
        },
        Config: 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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\ReleaseRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->release(
        (new ReleaseRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPropertyId("property-0001")
            ->withNodeModelNames([
                "node-0001",
            ])
            ->withConfig(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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.ReleaseRequest;
import io.gs2.skillTree.result.ReleaseResult;

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

try {
    ReleaseResult result = client.release(
        new ReleaseRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyId("property-0001")
            .withNodeModelNames(Arrays.asList(
                "node-0001"
            ))
            .withConfig(null)
    );
    Status 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.ReleaseResult> asyncResult = null;
yield return client.Release(
    new Gs2.Gs2SkillTree.Request.ReleaseRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPropertyId("property-0001")
        .WithNodeModelNames(new string[] {
            "node-0001",
        })
        .WithConfig(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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.release(
        new Gs2SkillTree.ReleaseRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyId("property-0001")
            .withNodeModelNames([
                "node-0001",
            ])
            .withConfig(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 skill_tree

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

try:
    result = client.release(
        skill_tree.ReleaseRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_property_id('property-0001')
            .with_node_model_names([
                'node-0001',
            ])
            .with_config(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('skill_tree')

api_result = client.release({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyId="property-0001",
    nodeModelNames={
        "node-0001"
    },
    config=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('skill_tree')

api_result_handler = client.release_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyId="property-0001",
    nodeModelNames={
        "node-0001"
    },
    config=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;

```



---

### releaseByUserId

사용자 ID를 지정하여 노드 해방<br>

트랜잭션을 생성하여 스킬 트리의 지정 노드를 해방합니다. 트랜잭션에는 노드 모델에 정의된 해방 시 검증 액션(해방 전 검증)과 해방 시 소비 액션(리소스 차감)이 포함됩니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| propertyId | string |  | ✓|  |  ~ 1024자 | 프로퍼티 ID<br>사용자마다 여러 개의 독립된 스킬트리 인스턴스를 가지기 위한 식별자입니다.<br>동일한 네임스페이스 내에서 플레이어가 서로 다른 캐릭터나 컨텍스트에 대해 별도의 스킬트리를 가지는 시나리오를 구현합니다.<br>최대 1024자. |
| nodeModelNames | List&lt;string&gt; |  | ✓|  | 1 ~ 1000 items | 노드 모델 이름 목록 |
| config | [List&lt;Config&gt;](#config) |  | | [] | 0 ~ 32 items | 트랜잭션 변수에 적용할 설정값 |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Status](#status) | 상태 |
| transactionId | string | 발행된 트랜잭션 ID |
| stampSheet | string | 해방 처리 실행에 사용하는 스탬프 시트 |
| stampSheetEncryptionKeyId | string | 스탬프 시트의 서명 계산에 사용한 암호화 키 GRN |
| autoRunStampSheet | bool? | 트랜잭션 자동 실행이 활성화되어 있는지 여부 |
| atomicCommit | bool? | 트랜잭션을 원자적으로 커밋할지 여부 |
| transaction | string | 발행된 트랜잭션 |
| transactionResult | [TransactionResult](#transactionresult) | 트랜잭션 실행 결과 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.ReleaseByUserId(
    &skill_tree.ReleaseByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PropertyId: pointy.String("property-0001"),
        NodeModelNames: []*string{
            pointy.String("node-0001"),
        },
        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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\ReleaseByUserIdRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->releaseByUserId(
        (new ReleaseByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPropertyId("property-0001")
            ->withNodeModelNames([
                "node-0001",
            ])
            ->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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.ReleaseByUserIdRequest;
import io.gs2.skillTree.result.ReleaseByUserIdResult;

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

try {
    ReleaseByUserIdResult result = client.releaseByUserId(
        new ReleaseByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyId("property-0001")
            .withNodeModelNames(Arrays.asList(
                "node-0001"
            ))
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    Status 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.ReleaseByUserIdResult> asyncResult = null;
yield return client.ReleaseByUserId(
    new Gs2.Gs2SkillTree.Request.ReleaseByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPropertyId("property-0001")
        .WithNodeModelNames(new string[] {
            "node-0001",
        })
        .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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.releaseByUserId(
        new Gs2SkillTree.ReleaseByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyId("property-0001")
            .withNodeModelNames([
                "node-0001",
            ])
            .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 skill_tree

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

try:
    result = client.release_by_user_id(
        skill_tree.ReleaseByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_property_id('property-0001')
            .with_node_model_names([
                'node-0001',
            ])
            .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('skill_tree')

api_result = client.release_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyId="property-0001",
    nodeModelNames={
        "node-0001"
    },
    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('skill_tree')

api_result_handler = client.release_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyId="property-0001",
    nodeModelNames={
        "node-0001"
    },
    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;

```



---

### markRestrain

노드의 해방 상태를 미해방화<br>

지정된 노드가 구속 가능한지 검증한 후(의존하는 노드가 해방 상태가 아니어야 합니다), 미해방으로 마크합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| accessToken | string |  | ✓|  |  ~ 128자 | 액세스 토큰 |
| propertyId | string |  | ✓|  |  ~ 1024자 | 프로퍼티 ID<br>사용자마다 여러 개의 독립된 스킬트리 인스턴스를 가지기 위한 식별자입니다.<br>동일한 네임스페이스 내에서 플레이어가 서로 다른 캐릭터나 컨텍스트에 대해 별도의 스킬트리를 가지는 시나리오를 구현합니다.<br>최대 1024자. |
| nodeModelNames | List&lt;string&gt; |  | ✓|  | 1 ~ 1000 items | 노드 모델 이름 목록 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Status](#status) | 상태 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.MarkRestrain(
    &skill_tree.MarkRestrainRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PropertyId: pointy.String("property-0001"),
        NodeModelNames: []*string{
            pointy.String("node-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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\MarkRestrainRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->markRestrain(
        (new MarkRestrainRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPropertyId("property-0001")
            ->withNodeModelNames([
                "node-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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.MarkRestrainRequest;
import io.gs2.skillTree.result.MarkRestrainResult;

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

try {
    MarkRestrainResult result = client.markRestrain(
        new MarkRestrainRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyId("property-0001")
            .withNodeModelNames(Arrays.asList(
                "node-0001"
            ))
    );
    Status 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.MarkRestrainResult> asyncResult = null;
yield return client.MarkRestrain(
    new Gs2.Gs2SkillTree.Request.MarkRestrainRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPropertyId("property-0001")
        .WithNodeModelNames(new string[] {
            "node-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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.markRestrain(
        new Gs2SkillTree.MarkRestrainRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyId("property-0001")
            .withNodeModelNames([
                "node-0001",
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

try:
    result = client.mark_restrain(
        skill_tree.MarkRestrainRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_property_id('property-0001')
            .with_node_model_names([
                'node-0001',
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('skill_tree')

api_result = client.mark_restrain({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyId="property-0001",
    nodeModelNames={
        "node-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('skill_tree')

api_result_handler = client.mark_restrain_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyId="property-0001",
    nodeModelNames={
        "node-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;

```



---

### markRestrainByUserId

사용자 ID를 지정하여 노드의 해방 상태를 미해방화<br>

지정된 노드가 구속 가능한지 검증한 후(의존하는 노드가 해방 상태가 아니어야 합니다), 미해방으로 마크합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| propertyId | string |  | ✓|  |  ~ 1024자 | 프로퍼티 ID<br>사용자마다 여러 개의 독립된 스킬트리 인스턴스를 가지기 위한 식별자입니다.<br>동일한 네임스페이스 내에서 플레이어가 서로 다른 캐릭터나 컨텍스트에 대해 별도의 스킬트리를 가지는 시나리오를 구현합니다.<br>최대 1024자. |
| nodeModelNames | List&lt;string&gt; |  | ✓|  | 1 ~ 1000 items | 노드 모델 이름 목록 |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Status](#status) | 상태 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.MarkRestrainByUserId(
    &skill_tree.MarkRestrainByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PropertyId: pointy.String("property-0001"),
        NodeModelNames: []*string{
            pointy.String("node-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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\MarkRestrainByUserIdRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->markRestrainByUserId(
        (new MarkRestrainByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPropertyId("property-0001")
            ->withNodeModelNames([
                "node-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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.MarkRestrainByUserIdRequest;
import io.gs2.skillTree.result.MarkRestrainByUserIdResult;

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

try {
    MarkRestrainByUserIdResult result = client.markRestrainByUserId(
        new MarkRestrainByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyId("property-0001")
            .withNodeModelNames(Arrays.asList(
                "node-0001"
            ))
            .withTimeOffsetToken(null)
    );
    Status 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.MarkRestrainByUserIdResult> asyncResult = null;
yield return client.MarkRestrainByUserId(
    new Gs2.Gs2SkillTree.Request.MarkRestrainByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPropertyId("property-0001")
        .WithNodeModelNames(new string[] {
            "node-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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.markRestrainByUserId(
        new Gs2SkillTree.MarkRestrainByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyId("property-0001")
            .withNodeModelNames([
                "node-0001",
            ])
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

try:
    result = client.mark_restrain_by_user_id(
        skill_tree.MarkRestrainByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_property_id('property-0001')
            .with_node_model_names([
                'node-0001',
            ])
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('skill_tree')

api_result = client.mark_restrain_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyId="property-0001",
    nodeModelNames={
        "node-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('skill_tree')

api_result_handler = client.mark_restrain_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyId="property-0001",
    nodeModelNames={
        "node-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;

```



---

### restrain

노드의 해방 상태를 미해방 상태로 되돌리기<br>

트랜잭션을 생성하여 지정 노드를 미해방 상태로 되돌립니다. 원래 해방 시 소비된 리소스는 노드 모델에 설정된 구속 반환율에 따라 일부 반환됩니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| accessToken | string |  | ✓|  |  ~ 128자 | 액세스 토큰 |
| propertyId | string |  | ✓|  |  ~ 1024자 | 프로퍼티 ID<br>사용자마다 여러 개의 독립된 스킬트리 인스턴스를 가지기 위한 식별자입니다.<br>동일한 네임스페이스 내에서 플레이어가 서로 다른 캐릭터나 컨텍스트에 대해 별도의 스킬트리를 가지는 시나리오를 구현합니다.<br>최대 1024자. |
| nodeModelNames | List&lt;string&gt; |  | ✓|  | 1 ~ 1000 items | 노드 모델 이름 목록 |
| config | [List&lt;Config&gt;](#config) |  | | [] | 0 ~ 32 items | 트랜잭션 변수에 적용할 설정값 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Status](#status) | 상태 |
| transactionId | string | 발행된 트랜잭션 ID |
| stampSheet | string | 미해방 상태로 되돌리는 처리 실행에 사용하는 스탬프 시트 |
| stampSheetEncryptionKeyId | string | 스탬프 시트의 서명 계산에 사용한 암호화 키 GRN |
| autoRunStampSheet | bool? | 트랜잭션 자동 실행이 활성화되어 있는지 여부 |
| atomicCommit | bool? | 트랜잭션을 원자적으로 커밋할지 여부 |
| transaction | string | 발행된 트랜잭션 |
| transactionResult | [TransactionResult](#transactionresult) | 트랜잭션 실행 결과 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.Restrain(
    &skill_tree.RestrainRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PropertyId: pointy.String("property-0001"),
        NodeModelNames: []*string{
            pointy.String("node-0001"),
        },
        Config: 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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\RestrainRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->restrain(
        (new RestrainRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPropertyId("property-0001")
            ->withNodeModelNames([
                "node-0001",
            ])
            ->withConfig(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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.RestrainRequest;
import io.gs2.skillTree.result.RestrainResult;

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

try {
    RestrainResult result = client.restrain(
        new RestrainRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyId("property-0001")
            .withNodeModelNames(Arrays.asList(
                "node-0001"
            ))
            .withConfig(null)
    );
    Status 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.RestrainResult> asyncResult = null;
yield return client.Restrain(
    new Gs2.Gs2SkillTree.Request.RestrainRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPropertyId("property-0001")
        .WithNodeModelNames(new string[] {
            "node-0001",
        })
        .WithConfig(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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.restrain(
        new Gs2SkillTree.RestrainRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyId("property-0001")
            .withNodeModelNames([
                "node-0001",
            ])
            .withConfig(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 skill_tree

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

try:
    result = client.restrain(
        skill_tree.RestrainRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_property_id('property-0001')
            .with_node_model_names([
                'node-0001',
            ])
            .with_config(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('skill_tree')

api_result = client.restrain({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyId="property-0001",
    nodeModelNames={
        "node-0001"
    },
    config=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('skill_tree')

api_result_handler = client.restrain_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyId="property-0001",
    nodeModelNames={
        "node-0001"
    },
    config=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;

```



---

### restrainByUserId

사용자 ID를 지정하여 노드의 해방 상태를 미해방 상태로 되돌리기<br>

트랜잭션을 생성하여 지정 노드를 미해방 상태로 되돌립니다. 원래 해방 시 소비된 리소스는 노드 모델에 설정된 구속 반환율에 따라 일부 반환됩니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| propertyId | string |  | ✓|  |  ~ 1024자 | 프로퍼티 ID<br>사용자마다 여러 개의 독립된 스킬트리 인스턴스를 가지기 위한 식별자입니다.<br>동일한 네임스페이스 내에서 플레이어가 서로 다른 캐릭터나 컨텍스트에 대해 별도의 스킬트리를 가지는 시나리오를 구현합니다.<br>최대 1024자. |
| nodeModelNames | List&lt;string&gt; |  | ✓|  | 1 ~ 1000 items | 노드 모델 이름 목록 |
| config | [List&lt;Config&gt;](#config) |  | | [] | 0 ~ 32 items | 트랜잭션 변수에 적용할 설정값 |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Status](#status) | 상태 |
| transactionId | string | 발행된 트랜잭션 ID |
| stampSheet | string | 미해방 상태로 되돌리는 처리 실행에 사용하는 스탬프 시트 |
| stampSheetEncryptionKeyId | string | 스탬프 시트의 서명 계산에 사용한 암호화 키 GRN |
| autoRunStampSheet | bool? | 트랜잭션 자동 실행이 활성화되어 있는지 여부 |
| atomicCommit | bool? | 트랜잭션을 원자적으로 커밋할지 여부 |
| transaction | string | 발행된 트랜잭션 |
| transactionResult | [TransactionResult](#transactionresult) | 트랜잭션 실행 결과 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.RestrainByUserId(
    &skill_tree.RestrainByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PropertyId: pointy.String("property-0001"),
        NodeModelNames: []*string{
            pointy.String("node-0001"),
        },
        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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\RestrainByUserIdRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->restrainByUserId(
        (new RestrainByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPropertyId("property-0001")
            ->withNodeModelNames([
                "node-0001",
            ])
            ->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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.RestrainByUserIdRequest;
import io.gs2.skillTree.result.RestrainByUserIdResult;

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

try {
    RestrainByUserIdResult result = client.restrainByUserId(
        new RestrainByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyId("property-0001")
            .withNodeModelNames(Arrays.asList(
                "node-0001"
            ))
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    Status 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.RestrainByUserIdResult> asyncResult = null;
yield return client.RestrainByUserId(
    new Gs2.Gs2SkillTree.Request.RestrainByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPropertyId("property-0001")
        .WithNodeModelNames(new string[] {
            "node-0001",
        })
        .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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.restrainByUserId(
        new Gs2SkillTree.RestrainByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyId("property-0001")
            .withNodeModelNames([
                "node-0001",
            ])
            .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 skill_tree

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

try:
    result = client.restrain_by_user_id(
        skill_tree.RestrainByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_property_id('property-0001')
            .with_node_model_names([
                'node-0001',
            ])
            .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('skill_tree')

api_result = client.restrain_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyId="property-0001",
    nodeModelNames={
        "node-0001"
    },
    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('skill_tree')

api_result_handler = client.restrain_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyId="property-0001",
    nodeModelNames={
        "node-0001"
    },
    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;

```



---

### describeStatuses

스테이터스 목록 조회<br>

요청 사용자의 스킬 트리 스테이터스 페이지네이션 목록을 조회합니다. 각 스테이터스에는 특정 프로퍼티 ID에 대한 스킬 트리 내 모든 노드의 해방 상태가 포함됩니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| accessToken | string |  | ✓|  |  ~ 128자 | 액세스 토큰 |
| pageToken | string |  | |  |  ~ 1024자 | 데이터 취득을 시작할 위치를 지정하는 토큰 |
| limit | int |  | | 30 | 1 ~ 1000 | 조회한 데이터 건수 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| items | [List&lt;Status&gt;](#status) | 스테이터스 리스트 |
| nextPageToken | string | 목록의 나머지를 취득하기 위한 페이지 토큰 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.DescribeStatuses(
    &skill_tree.DescribeStatusesRequest {
        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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\DescribeStatusesRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->describeStatuses(
        (new DescribeStatusesRequest())
            ->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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.DescribeStatusesRequest;
import io.gs2.skillTree.result.DescribeStatusesResult;

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

try {
    DescribeStatusesResult result = client.describeStatuses(
        new DescribeStatusesRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<Status> 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.DescribeStatusesResult> asyncResult = null;
yield return client.DescribeStatuses(
    new Gs2.Gs2SkillTree.Request.DescribeStatusesRequest()
        .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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.describeStatuses(
        new Gs2SkillTree.DescribeStatusesRequest()
            .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 skill_tree

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

try:
    result = client.describe_statuses(
        skill_tree.DescribeStatusesRequest()
            .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('skill_tree')

api_result = client.describe_statuses({
    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('skill_tree')

api_result_handler = client.describe_statuses_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;

```



---

### describeStatusesByUserId

사용자 ID를 지정하여 스테이터스 목록 조회<br>

지정된 사용자의 스킬 트리 스테이터스 페이지네이션 목록을 조회합니다. 각 스테이터스에는 특정 프로퍼티 ID에 대한 스킬 트리 내 모든 노드의 해방 상태가 포함됩니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| pageToken | string |  | |  |  ~ 1024자 | 데이터 취득을 시작할 위치를 지정하는 토큰 |
| limit | int |  | | 30 | 1 ~ 1000 | 조회한 데이터 건수 |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| items | [List&lt;Status&gt;](#status) | 스테이터스 리스트 |
| nextPageToken | string | 목록의 나머지를 취득하기 위한 페이지 토큰 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.DescribeStatusesByUserId(
    &skill_tree.DescribeStatusesByUserIdRequest {
        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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\DescribeStatusesByUserIdRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->describeStatusesByUserId(
        (new DescribeStatusesByUserIdRequest())
            ->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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.DescribeStatusesByUserIdRequest;
import io.gs2.skillTree.result.DescribeStatusesByUserIdResult;

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

try {
    DescribeStatusesByUserIdResult result = client.describeStatusesByUserId(
        new DescribeStatusesByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<Status> 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.DescribeStatusesByUserIdResult> asyncResult = null;
yield return client.DescribeStatusesByUserId(
    new Gs2.Gs2SkillTree.Request.DescribeStatusesByUserIdRequest()
        .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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.describeStatusesByUserId(
        new Gs2SkillTree.DescribeStatusesByUserIdRequest()
            .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 skill_tree

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

try:
    result = client.describe_statuses_by_user_id(
        skill_tree.DescribeStatusesByUserIdRequest()
            .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('skill_tree')

api_result = client.describe_statuses_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('skill_tree')

api_result_handler = client.describe_statuses_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;

```



---

### getStatus

스테이터스 조회<br>

요청 사용자와 지정된 프로퍼티 ID의 스킬 트리 스테이터스를 조회합니다. 스테이터스에는 해방된 노드 이름 목록과 현재 상태가 포함됩니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| accessToken | string |  | ✓|  |  ~ 128자 | 액세스 토큰 |
| propertyId | string |  | ✓|  |  ~ 1024자 | 프로퍼티 ID<br>사용자마다 여러 개의 독립된 스킬트리 인스턴스를 가지기 위한 식별자입니다.<br>동일한 네임스페이스 내에서 플레이어가 서로 다른 캐릭터나 컨텍스트에 대해 별도의 스킬트리를 가지는 시나리오를 구현합니다.<br>최대 1024자. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Status](#status) | 상태 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.GetStatus(
    &skill_tree.GetStatusRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PropertyId: pointy.String("property-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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\GetStatusRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->getStatus(
        (new GetStatusRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPropertyId("property-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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.GetStatusRequest;
import io.gs2.skillTree.result.GetStatusResult;

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

try {
    GetStatusResult result = client.getStatus(
        new GetStatusRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyId("property-0001")
    );
    Status 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.GetStatusResult> asyncResult = null;
yield return client.GetStatus(
    new Gs2.Gs2SkillTree.Request.GetStatusRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPropertyId("property-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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.getStatus(
        new Gs2SkillTree.GetStatusRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyId("property-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

try:
    result = client.get_status(
        skill_tree.GetStatusRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_property_id('property-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('skill_tree')

api_result = client.get_status({
    namespaceName="namespace-0001",
    accessToken="accessToken-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;

```

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

client = gs2('skill_tree')

api_result_handler = client.get_status_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-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;

```



---

### getStatusByUserId

사용자 ID를 지정하여 스테이터스 조회<br>

지정된 사용자와 프로퍼티 ID의 스킬 트리 스테이터스를 조회합니다. 스테이터스에는 해방된 노드 이름 목록과 현재 상태가 포함됩니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| propertyId | string |  | ✓|  |  ~ 1024자 | 프로퍼티 ID<br>사용자마다 여러 개의 독립된 스킬트리 인스턴스를 가지기 위한 식별자입니다.<br>동일한 네임스페이스 내에서 플레이어가 서로 다른 캐릭터나 컨텍스트에 대해 별도의 스킬트리를 가지는 시나리오를 구현합니다.<br>최대 1024자. |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Status](#status) | 상태 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.GetStatusByUserId(
    &skill_tree.GetStatusByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PropertyId: pointy.String("property-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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\GetStatusByUserIdRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->getStatusByUserId(
        (new GetStatusByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPropertyId("property-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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.GetStatusByUserIdRequest;
import io.gs2.skillTree.result.GetStatusByUserIdResult;

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

try {
    GetStatusByUserIdResult result = client.getStatusByUserId(
        new GetStatusByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyId("property-0001")
            .withTimeOffsetToken(null)
    );
    Status 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.GetStatusByUserIdResult> asyncResult = null;
yield return client.GetStatusByUserId(
    new Gs2.Gs2SkillTree.Request.GetStatusByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPropertyId("property-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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.getStatusByUserId(
        new Gs2SkillTree.GetStatusByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyId("property-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

try:
    result = client.get_status_by_user_id(
        skill_tree.GetStatusByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_property_id('property-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('skill_tree')

api_result = client.get_status_by_user_id({
    namespaceName="namespace-0001",
    userId="user-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;

```

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

client = gs2('skill_tree')

api_result_handler = client.get_status_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-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;

```



---

### reset

스테이터스 초기화<br>

모든 해방된 노드를 미해방 상태로 되돌려 스킬 트리 스테이터스를 초기화합니다. 각 노드 모델에 설정된 구속 반환율에 따라 리소스를 반환하는 트랜잭션을 생성합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| accessToken | string |  | ✓|  |  ~ 128자 | 액세스 토큰 |
| propertyId | string |  | ✓|  |  ~ 1024자 | 프로퍼티 ID<br>사용자마다 여러 개의 독립된 스킬트리 인스턴스를 가지기 위한 식별자입니다.<br>동일한 네임스페이스 내에서 플레이어가 서로 다른 캐릭터나 컨텍스트에 대해 별도의 스킬트리를 가지는 시나리오를 구현합니다.<br>최대 1024자. |
| config | [List&lt;Config&gt;](#config) |  | | [] | 0 ~ 32 items | 트랜잭션 변수에 적용할 설정값 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Status](#status) | 상태 |
| transactionId | string | 발행된 트랜잭션 ID |
| stampSheet | string | 초기화 처리 실행에 사용하는 스탬프 시트 |
| stampSheetEncryptionKeyId | string | 스탬프 시트의 서명 계산에 사용한 암호화 키 GRN |
| autoRunStampSheet | bool? | 트랜잭션 자동 실행이 활성화되어 있는지 여부 |
| atomicCommit | bool? | 트랜잭션을 원자적으로 커밋할지 여부 |
| transaction | string | 발행된 트랜잭션 |
| transactionResult | [TransactionResult](#transactionresult) | 트랜잭션 실행 결과 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.Reset(
    &skill_tree.ResetRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PropertyId: pointy.String("property-0001"),
        Config: 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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\ResetRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->reset(
        (new ResetRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPropertyId("property-0001")
            ->withConfig(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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.ResetRequest;
import io.gs2.skillTree.result.ResetResult;

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

try {
    ResetResult result = client.reset(
        new ResetRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyId("property-0001")
            .withConfig(null)
    );
    Status 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.ResetResult> asyncResult = null;
yield return client.Reset(
    new Gs2.Gs2SkillTree.Request.ResetRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPropertyId("property-0001")
        .WithConfig(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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.reset(
        new Gs2SkillTree.ResetRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyId("property-0001")
            .withConfig(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 skill_tree

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

try:
    result = client.reset(
        skill_tree.ResetRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_property_id('property-0001')
            .with_config(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('skill_tree')

api_result = client.reset({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyId="property-0001",
    config=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('skill_tree')

api_result_handler = client.reset_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyId="property-0001",
    config=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;

```



---

### resetByUserId

사용자 ID를 지정하여 스테이터스 초기화<br>

모든 해방된 노드를 미해방 상태로 되돌려 스킬 트리 스테이터스를 초기화합니다. 각 노드 모델에 설정된 구속 반환율에 따라 리소스를 반환하는 트랜잭션을 생성합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| propertyId | string |  | ✓|  |  ~ 1024자 | 프로퍼티 ID<br>사용자마다 여러 개의 독립된 스킬트리 인스턴스를 가지기 위한 식별자입니다.<br>동일한 네임스페이스 내에서 플레이어가 서로 다른 캐릭터나 컨텍스트에 대해 별도의 스킬트리를 가지는 시나리오를 구현합니다.<br>최대 1024자. |
| config | [List&lt;Config&gt;](#config) |  | | [] | 0 ~ 32 items | 트랜잭션 변수에 적용할 설정값 |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Status](#status) | 상태 |
| transactionId | string | 발행된 트랜잭션 ID |
| stampSheet | string | 초기화 처리 실행에 사용하는 스탬프 시트 |
| stampSheetEncryptionKeyId | string | 스탬프 시트의 서명 계산에 사용한 암호화 키 GRN |
| autoRunStampSheet | bool? | 트랜잭션 자동 실행이 활성화되어 있는지 여부 |
| atomicCommit | bool? | 트랜잭션을 원자적으로 커밋할지 여부 |
| transaction | string | 발행된 트랜잭션 |
| transactionResult | [TransactionResult](#transactionresult) | 트랜잭션 실행 결과 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.ResetByUserId(
    &skill_tree.ResetByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PropertyId: pointy.String("property-0001"),
        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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\ResetByUserIdRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->resetByUserId(
        (new ResetByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPropertyId("property-0001")
            ->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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.ResetByUserIdRequest;
import io.gs2.skillTree.result.ResetByUserIdResult;

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

try {
    ResetByUserIdResult result = client.resetByUserId(
        new ResetByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyId("property-0001")
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    Status 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.ResetByUserIdResult> asyncResult = null;
yield return client.ResetByUserId(
    new Gs2.Gs2SkillTree.Request.ResetByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPropertyId("property-0001")
        .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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.resetByUserId(
        new Gs2SkillTree.ResetByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyId("property-0001")
            .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 skill_tree

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

try:
    result = client.reset_by_user_id(
        skill_tree.ResetByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_property_id('property-0001')
            .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('skill_tree')

api_result = client.reset_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyId="property-0001",
    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('skill_tree')

api_result_handler = client.reset_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyId="property-0001",
    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;

```



---

### describeNodeModels

노드 모델 목록 조회<br>

스킬 트리의 활성 노드 모델 목록을 조회합니다. 각 노드 모델은 해방 시 검증·소비 액션, 구속 시 반환율, 전제 노드 이름을 정의합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| items | [List&lt;NodeModel&gt;](#nodemodel) | 노드 모델 리스트 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.DescribeNodeModels(
    &skill_tree.DescribeNodeModelsRequest {
        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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\DescribeNodeModelsRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->describeNodeModels(
        (new DescribeNodeModelsRequest())
            ->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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.DescribeNodeModelsRequest;
import io.gs2.skillTree.result.DescribeNodeModelsResult;

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

try {
    DescribeNodeModelsResult result = client.describeNodeModels(
        new DescribeNodeModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    List<NodeModel> 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.DescribeNodeModelsResult> asyncResult = null;
yield return client.DescribeNodeModels(
    new Gs2.Gs2SkillTree.Request.DescribeNodeModelsRequest()
        .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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.describeNodeModels(
        new Gs2SkillTree.DescribeNodeModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

try:
    result = client.describe_node_models(
        skill_tree.DescribeNodeModelsRequest()
            .with_namespace_name('namespace-0001')
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('skill_tree')

api_result = client.describe_node_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('skill_tree')

api_result_handler = client.describe_node_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;

```



---

### getNodeModel

노드 모델 조회<br>

해방 시 검증 액션, 해방 시 소비 액션, 구속 시 반환율, 전제 노드 이름 설정을 포함하여 지정된 노드 모델을 조회합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| nodeModelName | string |  | ✓|  |  ~ 128자 | 노드 모델명<br>노드 모델 고유의 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [NodeModel](#nodemodel) | 노드 모델 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.GetNodeModel(
    &skill_tree.GetNodeModelRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NodeModelName: pointy.String("node-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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\GetNodeModelRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->getNodeModel(
        (new GetNodeModelRequest())
            ->withNamespaceName("namespace-0001")
            ->withNodeModelName("node-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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.GetNodeModelRequest;
import io.gs2.skillTree.result.GetNodeModelResult;

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

try {
    GetNodeModelResult result = client.getNodeModel(
        new GetNodeModelRequest()
            .withNamespaceName("namespace-0001")
            .withNodeModelName("node-0001")
    );
    NodeModel 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.GetNodeModelResult> asyncResult = null;
yield return client.GetNodeModel(
    new Gs2.Gs2SkillTree.Request.GetNodeModelRequest()
        .WithNamespaceName("namespace-0001")
        .WithNodeModelName("node-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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.getNodeModel(
        new Gs2SkillTree.GetNodeModelRequest()
            .withNamespaceName("namespace-0001")
            .withNodeModelName("node-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

try:
    result = client.get_node_model(
        skill_tree.GetNodeModelRequest()
            .with_namespace_name('namespace-0001')
            .with_node_model_name('node-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('skill_tree')

api_result = client.get_node_model({
    namespaceName="namespace-0001",
    nodeModelName="node-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('skill_tree')

api_result_handler = client.get_node_model_async({
    namespaceName="namespace-0001",
    nodeModelName="node-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

노드 모델 마스터를 활성화 가능한 마스터 데이터 형식으로 내보내기<br>

현재 등록되어 있는 노드 모델 마스터를 활성화 가능한 마스터 데이터 형식으로 내보냅니다. 내보낸 데이터에는 해방 액션, 구속 반환율, 전제 노드 설정을 포함한 모든 노드 모델 정의가 포함됩니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [CurrentTreeMaster](#currenttreemaster) | 활성화 가능한 노드 모델의 마스터 데이터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.ExportMaster(
    &skill_tree.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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\ExportMasterRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.ExportMasterRequest;
import io.gs2.skillTree.result.ExportMasterResult;

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

try {
    ExportMasterResult result = client.exportMaster(
        new ExportMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    CurrentTreeMaster 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.ExportMasterResult> asyncResult = null;
yield return client.ExportMaster(
    new Gs2.Gs2SkillTree.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 Gs2SkillTree from '@/gs2/skillTree';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

try:
    result = client.export_master(
        skill_tree.ExportMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('skill_tree')

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('skill_tree')

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;

```



---

### getCurrentTreeMaster

현재 활성화된 노드 모델의 마스터 데이터 조회<br>

사용 중인 모든 노드 모델 정의(해방 액션, 구속 반환율, 전제 노드 설정 포함)를 포함하여 현재 활성화된 노드 모델 마스터 데이터를 조회합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [CurrentTreeMaster](#currenttreemaster) | 현재 활성화된 노드 모델의 마스터 데이터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.GetCurrentTreeMaster(
    &skill_tree.GetCurrentTreeMasterRequest {
        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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\GetCurrentTreeMasterRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->getCurrentTreeMaster(
        (new GetCurrentTreeMasterRequest())
            ->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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.GetCurrentTreeMasterRequest;
import io.gs2.skillTree.result.GetCurrentTreeMasterResult;

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

try {
    GetCurrentTreeMasterResult result = client.getCurrentTreeMaster(
        new GetCurrentTreeMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    CurrentTreeMaster 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.GetCurrentTreeMasterResult> asyncResult = null;
yield return client.GetCurrentTreeMaster(
    new Gs2.Gs2SkillTree.Request.GetCurrentTreeMasterRequest()
        .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 Gs2SkillTree from '@/gs2/skillTree';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

try:
    result = client.get_current_tree_master(
        skill_tree.GetCurrentTreeMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('skill_tree')

api_result = client.get_current_tree_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('skill_tree')

api_result_handler = client.get_current_tree_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;

```



---

### preUpdateCurrentTreeMaster

현재 활성화된 노드 모델의 마스터 데이터 갱신(3단계 버전)<br>

1MB를 초과하는 마스터 데이터를 업로드하는 경우, 3단계로 나누어 갱신을 수행합니다.<br>
1. 이 API를 실행하여 업로드용 토큰과 URL을 취득합니다.<br>
2. 취득한 URL에 마스터 데이터를 업로드합니다.<br>
3. 업로드로 취득한 토큰을 전달하여 UpdateCurrentTreeMaster를 실행하면 마스터 데이터가 반영됩니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| uploadToken | string | 업로드 후 결과를 반영할 때 사용하는 토큰 |
| uploadUrl | string | 업로드 처리 실행에 사용하는 URL |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.PreUpdateCurrentTreeMaster(
    &skill_tree.PreUpdateCurrentTreeMasterRequest {
        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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\PreUpdateCurrentTreeMasterRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->preUpdateCurrentTreeMaster(
        (new PreUpdateCurrentTreeMasterRequest())
            ->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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.PreUpdateCurrentTreeMasterRequest;
import io.gs2.skillTree.result.PreUpdateCurrentTreeMasterResult;

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

try {
    PreUpdateCurrentTreeMasterResult result = client.preUpdateCurrentTreeMaster(
        new PreUpdateCurrentTreeMasterRequest()
            .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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.PreUpdateCurrentTreeMasterResult> asyncResult = null;
yield return client.PreUpdateCurrentTreeMaster(
    new Gs2.Gs2SkillTree.Request.PreUpdateCurrentTreeMasterRequest()
        .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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.preUpdateCurrentTreeMaster(
        new Gs2SkillTree.PreUpdateCurrentTreeMasterRequest()
            .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 skill_tree

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

try:
    result = client.pre_update_current_tree_master(
        skill_tree.PreUpdateCurrentTreeMasterRequest()
            .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('skill_tree')

api_result = client.pre_update_current_tree_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('skill_tree')

api_result_handler = client.pre_update_current_tree_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;

```



---

### updateCurrentTreeMaster

현재 활성화된 노드 모델의 마스터 데이터 갱신<br>

현재 활성화된 노드 모델 마스터 데이터를 갱신합니다. 대용량 마스터 데이터에 대응하기 위해 직접 갱신 모드와 사전 업로드 모드를 모두 지원합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| mode | 문자열 열거형<br>enum {<br>"direct",<br>"preUpload"<br>}<br> |  | | "direct" |  | 업데이트 모드direct: 마스터 데이터를 직접 업데이트 / preUpload: 마스터 데이터를 업로드한 후 업데이트 /  |
| settings | string | {mode} == "direct" | ✓※|  |  ~ 5242880 바이트 (5MB) | 마스터 데이터<br>※ mode이(가) "direct" 이면 필수 |
| uploadToken | string | {mode} == "preUpload" | ✓※|  |  ~ 1024자 | 사전 업로드로 획득한 토큰<br>업로드한 마스터 데이터를 적용하기 위해 사용됩니다.<br>※ mode이(가) "preUpload" 이면 필수 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [CurrentTreeMaster](#currenttreemaster) | 갱신된 현재 활성화된 노드 모델의 마스터 데이터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentTreeMaster(
    &skill_tree.UpdateCurrentTreeMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Mode: pointy.String("direct"),
        Settings: pointy.String("{\"version\": \"2023-09-06\", \"nodeModels\": [{\"name\": \"node-0001\", \"metadata\": \"NODE-0001\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 10}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": []}, {\"name\": \"node-0002\", \"metadata\": \"NODE-0002\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 15}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": [\"node-0001\"]}, {\"name\": \"node-0003\", \"metadata\": \"NODE-0003\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 20}\"}, {\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0002\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 2}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": [\"node-0002\"]}]}"),
        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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\UpdateCurrentTreeMasterRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->updateCurrentTreeMaster(
        (new UpdateCurrentTreeMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMode("direct")
            ->withSettings("{\"version\": \"2023-09-06\", \"nodeModels\": [{\"name\": \"node-0001\", \"metadata\": \"NODE-0001\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 10}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": []}, {\"name\": \"node-0002\", \"metadata\": \"NODE-0002\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 15}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": [\"node-0001\"]}, {\"name\": \"node-0003\", \"metadata\": \"NODE-0003\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 20}\"}, {\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0002\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 2}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": [\"node-0002\"]}]}")
            ->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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.UpdateCurrentTreeMasterRequest;
import io.gs2.skillTree.result.UpdateCurrentTreeMasterResult;

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

try {
    UpdateCurrentTreeMasterResult result = client.updateCurrentTreeMaster(
        new UpdateCurrentTreeMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMode("direct")
            .withSettings("{\"version\": \"2023-09-06\", \"nodeModels\": [{\"name\": \"node-0001\", \"metadata\": \"NODE-0001\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 10}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": []}, {\"name\": \"node-0002\", \"metadata\": \"NODE-0002\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 15}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": [\"node-0001\"]}, {\"name\": \"node-0003\", \"metadata\": \"NODE-0003\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 20}\"}, {\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0002\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 2}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": [\"node-0002\"]}]}")
            .withUploadToken(null)
    );
    CurrentTreeMaster 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.UpdateCurrentTreeMasterResult> asyncResult = null;
yield return client.UpdateCurrentTreeMaster(
    new Gs2.Gs2SkillTree.Request.UpdateCurrentTreeMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMode("direct")
        .WithSettings("{\"version\": \"2023-09-06\", \"nodeModels\": [{\"name\": \"node-0001\", \"metadata\": \"NODE-0001\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 10}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": []}, {\"name\": \"node-0002\", \"metadata\": \"NODE-0002\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 15}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": [\"node-0001\"]}, {\"name\": \"node-0003\", \"metadata\": \"NODE-0003\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 20}\"}, {\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0002\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 2}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": [\"node-0002\"]}]}")
        .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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.updateCurrentTreeMaster(
        new Gs2SkillTree.UpdateCurrentTreeMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMode("direct")
            .withSettings("{\"version\": \"2023-09-06\", \"nodeModels\": [{\"name\": \"node-0001\", \"metadata\": \"NODE-0001\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 10}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": []}, {\"name\": \"node-0002\", \"metadata\": \"NODE-0002\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 15}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": [\"node-0001\"]}, {\"name\": \"node-0003\", \"metadata\": \"NODE-0003\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 20}\"}, {\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0002\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 2}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": [\"node-0002\"]}]}")
            .withUploadToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

try:
    result = client.update_current_tree_master(
        skill_tree.UpdateCurrentTreeMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mode('direct')
            .with_settings('{"version": "2023-09-06", "nodeModels": [{"name": "node-0001", "metadata": "NODE-0001", "releaseConsumeActions": [{"action": "Gs2Inventory:ConsumeItemSetByUserId", "request": "{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 10}"}], "restrainReturnRate": 0.5, "premiseNodeNames": []}, {"name": "node-0002", "metadata": "NODE-0002", "releaseConsumeActions": [{"action": "Gs2Inventory:ConsumeItemSetByUserId", "request": "{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 15}"}], "restrainReturnRate": 0.5, "premiseNodeNames": ["node-0001"]}, {"name": "node-0003", "metadata": "NODE-0003", "releaseConsumeActions": [{"action": "Gs2Inventory:ConsumeItemSetByUserId", "request": "{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 20}"}, {"action": "Gs2Inventory:ConsumeItemSetByUserId", "request": "{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0002\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 2}"}], "restrainReturnRate": 0.5, "premiseNodeNames": ["node-0002"]}]}')
            .with_upload_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('skill_tree')

api_result = client.update_current_tree_master({
    namespaceName="namespace-0001",
    mode="direct",
    settings="{\"version\": \"2023-09-06\", \"nodeModels\": [{\"name\": \"node-0001\", \"metadata\": \"NODE-0001\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 10}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": []}, {\"name\": \"node-0002\", \"metadata\": \"NODE-0002\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 15}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": [\"node-0001\"]}, {\"name\": \"node-0003\", \"metadata\": \"NODE-0003\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 20}\"}, {\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0002\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 2}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": [\"node-0002\"]}]}",
    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('skill_tree')

api_result_handler = client.update_current_tree_master_async({
    namespaceName="namespace-0001",
    mode="direct",
    settings="{\"version\": \"2023-09-06\", \"nodeModels\": [{\"name\": \"node-0001\", \"metadata\": \"NODE-0001\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 10}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": []}, {\"name\": \"node-0002\", \"metadata\": \"NODE-0002\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 15}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": [\"node-0001\"]}, {\"name\": \"node-0003\", \"metadata\": \"NODE-0003\", \"releaseConsumeActions\": [{\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0001\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 20}\"}, {\"action\": \"Gs2Inventory:ConsumeItemSetByUserId\", \"request\": \"{\\\"namespaceName\\\": \\\"namespace-0001\\\", \\\"inventoryName\\\": \\\"item\\\", \\\"itemName\\\": \\\"item-0002\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"consumeCount\\\": 2}\"}], \"restrainReturnRate\": 0.5, \"premiseNodeNames\": [\"node-0002\"]}]}",
    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;

```



---

### updateCurrentTreeMasterFromGitHub

현재 활성화된 노드 모델의 마스터 데이터를 GitHub에서 갱신<br>

지정된 체크아웃 설정을 사용하여 GitHub 저장소에서 마스터 데이터를 체크아웃하고, 현재 활성화된 노드 모델 마스터 데이터를 갱신합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| checkoutSetting | [GitHubCheckoutSetting](#githubcheckoutsetting) |  | ✓|  |  | GitHub에서 마스터 데이터를 체크아웃하는 설정 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [CurrentTreeMaster](#currenttreemaster) | 갱신된 현재 활성화된 노드 모델의 마스터 데이터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentTreeMasterFromGitHub(
    &skill_tree.UpdateCurrentTreeMasterFromGitHubRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CheckoutSetting: &skillTree.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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\UpdateCurrentTreeMasterFromGitHubRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->updateCurrentTreeMasterFromGitHub(
        (new UpdateCurrentTreeMasterFromGitHubRequest())
            ->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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.UpdateCurrentTreeMasterFromGitHubRequest;
import io.gs2.skillTree.result.UpdateCurrentTreeMasterFromGitHubResult;

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

try {
    UpdateCurrentTreeMasterFromGitHubResult result = client.updateCurrentTreeMasterFromGitHub(
        new UpdateCurrentTreeMasterFromGitHubRequest()
            .withNamespaceName("namespace-0001")
            .withCheckoutSetting(new GitHubCheckoutSetting()
                .withApiKeyId("apiKeyId-0001")
                .withRepositoryName("gs2io/master-data")
                .withSourcePath("path/to/file.json")
                .withReferenceType("branch")
                .withBranchName("develop")
            )
    );
    CurrentTreeMaster 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.UpdateCurrentTreeMasterFromGitHubResult> asyncResult = null;
yield return client.UpdateCurrentTreeMasterFromGitHub(
    new Gs2.Gs2SkillTree.Request.UpdateCurrentTreeMasterFromGitHubRequest()
        .WithNamespaceName("namespace-0001")
        .WithCheckoutSetting(new Gs2.Gs2SkillTree.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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.updateCurrentTreeMasterFromGitHub(
        new Gs2SkillTree.UpdateCurrentTreeMasterFromGitHubRequest()
            .withNamespaceName("namespace-0001")
            .withCheckoutSetting(new Gs2SkillTree.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 skill_tree

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

try:
    result = client.update_current_tree_master_from_git_hub(
        skill_tree.UpdateCurrentTreeMasterFromGitHubRequest()
            .with_namespace_name('namespace-0001')
            .with_checkout_setting(skill_tree.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('skill_tree')

api_result = client.update_current_tree_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('skill_tree')

api_result_handler = client.update_current_tree_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;

```



---

### describeNodeModelMasters

노드 모델 마스터 목록 조회<br>

노드 모델 마스터의 페이지네이션 목록을 조회합니다. 이름의 접두사로 필터링할 수 있습니다. 노드 모델 마스터는 해방 액션, 구속 반환율, 전제 노드를 포함한 스킬 트리 구조를 정의합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| namePrefix | string |  | |  |  ~ 64자 | 노드 모델 이름 필터 접두사 |
| pageToken | string |  | |  |  ~ 1024자 | 데이터 취득을 시작할 위치를 지정하는 토큰 |
| limit | int |  | | 30 | 1 ~ 1000 | 조회한 데이터 건수 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| items | [List&lt;NodeModelMaster&gt;](#nodemodelmaster) | 노드 모델 마스터 리스트 |
| nextPageToken | string | 목록의 나머지를 취득하기 위한 페이지 토큰 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.DescribeNodeModelMasters(
    &skill_tree.DescribeNodeModelMastersRequest {
        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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\DescribeNodeModelMastersRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->describeNodeModelMasters(
        (new DescribeNodeModelMastersRequest())
            ->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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.DescribeNodeModelMastersRequest;
import io.gs2.skillTree.result.DescribeNodeModelMastersResult;

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

try {
    DescribeNodeModelMastersResult result = client.describeNodeModelMasters(
        new DescribeNodeModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<NodeModelMaster> 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.DescribeNodeModelMastersResult> asyncResult = null;
yield return client.DescribeNodeModelMasters(
    new Gs2.Gs2SkillTree.Request.DescribeNodeModelMastersRequest()
        .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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.describeNodeModelMasters(
        new Gs2SkillTree.DescribeNodeModelMastersRequest()
            .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 skill_tree

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

try:
    result = client.describe_node_model_masters(
        skill_tree.DescribeNodeModelMastersRequest()
            .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('skill_tree')

api_result = client.describe_node_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('skill_tree')

api_result_handler = client.describe_node_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;

```



---

### createNodeModelMaster

노드 모델 마스터 신규 생성<br>

해방 시 검증 액션(해방 전 밸리데이션), 해방 시 소비 액션(해방 시 차감하는 리소스), 구속 반환율(구속 시 반환하는 리소스 비율), 전제 노드 이름을 가진 새로운 노드 모델 마스터를 생성합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| name | string |  | ✓|  |  ~ 128자 | 노드 모델명<br>노드 모델 고유의 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| description | string |  | |  |  ~ 1024자 | 설명문 |
| metadata | string |  | |  |  ~ 2048자 | 메타데이터<br>메타데이터에는 임의의 값을 설정할 수 있습니다.<br>이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. |
| releaseVerifyActions | [List&lt;VerifyAction&gt;](#verifyaction) |  | | [] | 0 ~ 10 items | 해방 검증 액션 목록<br>이 노드를 해방하기 전에 실행되어 조건이 충족되었는지 확인하는 검증 액션의 목록입니다.<br>예를 들어 플레이어가 특정 레벨에 도달했는지, 특정 아이템을 소지하고 있는지를 검증할 수 있습니다.<br>검증 액션 중 하나라도 실패하면 노드 해방이 거부됩니다. 최대 10개 액션. |
| releaseConsumeActions | [List&lt;ConsumeAction&gt;](#consumeaction) |  | | [] | 1 ~ 10 items | 해방 소비 액션 목록<br>이 노드를 해방할 때 실행되는 소비 액션의 목록으로, 해방 비용을 나타냅니다.<br>이 액션들은 반환 입수 액션 계산에도 사용됩니다. 노드를 구속할 때 각 소비 액션이 반환율에 따라 역산됩니다.<br>최소 1개의 소비 액션이 필요합니다. 최대 10개 액션. |
| restrainReturnRate | float |  | | 1.0 | 0.0 ~ 1.0 | 반환율<br>이 노드를 구속(미해방 상태로 되돌림)했을 때 소비된 리소스가 반환되는 비율입니다.<br>1.0은 전액 반환, 0.5는 절반 반환, 0.0은 반환 없음을 의미합니다.<br>기본값은 1.0(전액 반환)입니다. 유효 범위: 0.0~1.0. |
| premiseNodeNames | List&lt;string&gt; |  | | [] | 0 ~ 10 items | 전제 노드명 목록<br>이 노드를 해방하기 전에 먼저 해방되어 있어야 하는 다른 노드 모델의 이름입니다.<br>스킬 트리의 의존 관계 그래프를 정의합니다. 전제 노드가 모두 해방되어 있지 않으면 이 노드는 해방할 수 없습니다.<br>최대 10개의 전제 노드. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [NodeModelMaster](#nodemodelmaster) | 생성한 노드 모델 마스터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.CreateNodeModelMaster(
    &skill_tree.CreateNodeModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("node-0001"),
        Description: nil,
        Metadata: pointy.String("NODE-0001"),
        ReleaseVerifyActions: nil,
        ReleaseConsumeActions: []skillTree.ConsumeAction{
            skillTree.ConsumeAction{
                Action: pointy.String("Gs2Inventory:ConsumeItemSetByUserId"),
                Request: pointy.String("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"potion\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
            },
        },
        RestrainReturnRate: pointy.Float32(1.0),
        PremiseNodeNames: []*string{},
    }
)
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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\CreateNodeModelMasterRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->createNodeModelMaster(
        (new CreateNodeModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("node-0001")
            ->withDescription(null)
            ->withMetadata("NODE-0001")
            ->withReleaseVerifyActions(null)
            ->withReleaseConsumeActions([
                (new \Gs2\SkillTree\Model\ConsumeAction())
                    ->withAction("Gs2Inventory:ConsumeItemSetByUserId")
                    ->withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"potion\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
            ])
            ->withRestrainReturnRate(1.0)
            ->withPremiseNodeNames([])
    );
    $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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.CreateNodeModelMasterRequest;
import io.gs2.skillTree.result.CreateNodeModelMasterResult;

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

try {
    CreateNodeModelMasterResult result = client.createNodeModelMaster(
        new CreateNodeModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("node-0001")
            .withDescription(null)
            .withMetadata("NODE-0001")
            .withReleaseVerifyActions(null)
            .withReleaseConsumeActions(Arrays.asList(
                new io.gs2.skillTree.model.ConsumeAction()
                    .withAction("Gs2Inventory:ConsumeItemSetByUserId")
                    .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"potion\", \"userId\": \"#{userId}\", \"consumeCount\": 10}")
            ))
            .withRestrainReturnRate(1.0f)
            .withPremiseNodeNames(new ArrayList<String>())
    );
    NodeModelMaster 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.CreateNodeModelMasterResult> asyncResult = null;
yield return client.CreateNodeModelMaster(
    new Gs2.Gs2SkillTree.Request.CreateNodeModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("node-0001")
        .WithDescription(null)
        .WithMetadata("NODE-0001")
        .WithReleaseVerifyActions(null)
        .WithReleaseConsumeActions(new Gs2.Core.Model.ConsumeAction[] {
            new Gs2.Core.Model.ConsumeAction()
                .WithAction("Gs2Inventory:ConsumeItemSetByUserId")
                .WithRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"potion\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
        })
        .WithRestrainReturnRate(1.0f)
        .WithPremiseNodeNames(new string[] {}),
    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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.createNodeModelMaster(
        new Gs2SkillTree.CreateNodeModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("node-0001")
            .withDescription(null)
            .withMetadata("NODE-0001")
            .withReleaseVerifyActions(null)
            .withReleaseConsumeActions([
                new Gs2SkillTree.model.ConsumeAction()
                    .withAction("Gs2Inventory:ConsumeItemSetByUserId")
                    .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"potion\", \"userId\": \"#{userId}\", \"consumeCount\": 10}"),
            ])
            .withRestrainReturnRate(1.0)
            .withPremiseNodeNames([])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

try:
    result = client.create_node_model_master(
        skill_tree.CreateNodeModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_name('node-0001')
            .with_description(None)
            .with_metadata('NODE-0001')
            .with_release_verify_actions(None)
            .with_release_consume_actions([
                skill_tree.ConsumeAction()
                    .with_action('Gs2Inventory:ConsumeItemSetByUserId')
                    .with_request('{"namespaceName": "namespace-0001", "inventoryName": "item", "itemName": "potion", "userId": "#{userId}", "consumeCount": 10}'),
            ])
            .with_restrain_return_rate(1.0)
            .with_premise_node_names([])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('skill_tree')

api_result = client.create_node_model_master({
    namespaceName="namespace-0001",
    name="node-0001",
    description=nil,
    metadata="NODE-0001",
    releaseVerifyActions=nil,
    releaseConsumeActions={
        {
            action="Gs2Inventory:ConsumeItemSetByUserId",
            request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"potion\", \"userId\": \"#{userId}\", \"consumeCount\": 10}",
        }
    },
    restrainReturnRate=1.0,
    premiseNodeNames={},
})

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('skill_tree')

api_result_handler = client.create_node_model_master_async({
    namespaceName="namespace-0001",
    name="node-0001",
    description=nil,
    metadata="NODE-0001",
    releaseVerifyActions=nil,
    releaseConsumeActions={
        {
            action="Gs2Inventory:ConsumeItemSetByUserId",
            request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"potion\", \"userId\": \"#{userId}\", \"consumeCount\": 10}",
        }
    },
    restrainReturnRate=1.0,
    premiseNodeNames={},
})

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;

```



---

### getNodeModelMaster

노드 모델 마스터 조회<br>

해방 시 검증 액션, 해방 시 소비 액션, 구속 반환율, 전제 노드 이름 설정을 포함하여 지정된 노드 모델 마스터를 조회합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| nodeModelName | string |  | ✓|  |  ~ 128자 | 노드 모델명<br>노드 모델 고유의 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [NodeModelMaster](#nodemodelmaster) | 노드 모델 마스터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.GetNodeModelMaster(
    &skill_tree.GetNodeModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NodeModelName: pointy.String("node-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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\GetNodeModelMasterRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->getNodeModelMaster(
        (new GetNodeModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withNodeModelName("node-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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.GetNodeModelMasterRequest;
import io.gs2.skillTree.result.GetNodeModelMasterResult;

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

try {
    GetNodeModelMasterResult result = client.getNodeModelMaster(
        new GetNodeModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withNodeModelName("node-0001")
    );
    NodeModelMaster 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.GetNodeModelMasterResult> asyncResult = null;
yield return client.GetNodeModelMaster(
    new Gs2.Gs2SkillTree.Request.GetNodeModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithNodeModelName("node-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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.getNodeModelMaster(
        new Gs2SkillTree.GetNodeModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withNodeModelName("node-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

try:
    result = client.get_node_model_master(
        skill_tree.GetNodeModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_node_model_name('node-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('skill_tree')

api_result = client.get_node_model_master({
    namespaceName="namespace-0001",
    nodeModelName="node-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('skill_tree')

api_result_handler = client.get_node_model_master_async({
    namespaceName="namespace-0001",
    nodeModelName="node-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;

```



---

### updateNodeModelMaster

노드 모델 마스터 갱신<br>

지정된 노드 모델 마스터의 설명, 메타데이터, 해방 시 검증 액션, 해방 시 소비 액션, 구속 반환율, 전제 노드 이름을 갱신합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| nodeModelName | string |  | ✓|  |  ~ 128자 | 노드 모델명<br>노드 모델 고유의 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| description | string |  | |  |  ~ 1024자 | 설명문 |
| metadata | string |  | |  |  ~ 2048자 | 메타데이터<br>메타데이터에는 임의의 값을 설정할 수 있습니다.<br>이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. |
| releaseVerifyActions | [List&lt;VerifyAction&gt;](#verifyaction) |  | | [] | 0 ~ 10 items | 해방 검증 액션 목록<br>이 노드를 해방하기 전에 실행되어 조건이 충족되었는지 확인하는 검증 액션의 목록입니다.<br>예를 들어 플레이어가 특정 레벨에 도달했는지, 특정 아이템을 소지하고 있는지를 검증할 수 있습니다.<br>검증 액션 중 하나라도 실패하면 노드 해방이 거부됩니다. 최대 10개 액션. |
| releaseConsumeActions | [List&lt;ConsumeAction&gt;](#consumeaction) |  | | [] | 1 ~ 10 items | 해방 소비 액션 목록<br>이 노드를 해방할 때 실행되는 소비 액션의 목록으로, 해방 비용을 나타냅니다.<br>이 액션들은 반환 입수 액션 계산에도 사용됩니다. 노드를 구속할 때 각 소비 액션이 반환율에 따라 역산됩니다.<br>최소 1개의 소비 액션이 필요합니다. 최대 10개 액션. |
| restrainReturnRate | float |  | | 1.0 | 0.0 ~ 1.0 | 반환율<br>이 노드를 구속(미해방 상태로 되돌림)했을 때 소비된 리소스가 반환되는 비율입니다.<br>1.0은 전액 반환, 0.5는 절반 반환, 0.0은 반환 없음을 의미합니다.<br>기본값은 1.0(전액 반환)입니다. 유효 범위: 0.0~1.0. |
| premiseNodeNames | List&lt;string&gt; |  | | [] | 0 ~ 10 items | 전제 노드명 목록<br>이 노드를 해방하기 전에 먼저 해방되어 있어야 하는 다른 노드 모델의 이름입니다.<br>스킬 트리의 의존 관계 그래프를 정의합니다. 전제 노드가 모두 해방되어 있지 않으면 이 노드는 해방할 수 없습니다.<br>최대 10개의 전제 노드. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [NodeModelMaster](#nodemodelmaster) | 갱신한 노드 모델 마스터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.UpdateNodeModelMaster(
    &skill_tree.UpdateNodeModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NodeModelName: pointy.String("node-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("NODE-0001"),
        ReleaseVerifyActions: nil,
        ReleaseConsumeActions: []skillTree.ConsumeAction{
            skillTree.ConsumeAction{
                Action: pointy.String("Gs2Inventory:ConsumeItemSetByUserId"),
                Request: pointy.String("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"potion\", \"userId\": \"#{userId}\", \"consumeCount\": 20}"),
            },
        },
        RestrainReturnRate: pointy.Float32(0.9),
        PremiseNodeNames: 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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\UpdateNodeModelMasterRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->updateNodeModelMaster(
        (new UpdateNodeModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withNodeModelName("node-0001")
            ->withDescription("description1")
            ->withMetadata("NODE-0001")
            ->withReleaseVerifyActions(null)
            ->withReleaseConsumeActions([
                (new \Gs2\SkillTree\Model\ConsumeAction())
                    ->withAction("Gs2Inventory:ConsumeItemSetByUserId")
                    ->withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"potion\", \"userId\": \"#{userId}\", \"consumeCount\": 20}"),
            ])
            ->withRestrainReturnRate(0.9)
            ->withPremiseNodeNames(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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.UpdateNodeModelMasterRequest;
import io.gs2.skillTree.result.UpdateNodeModelMasterResult;

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

try {
    UpdateNodeModelMasterResult result = client.updateNodeModelMaster(
        new UpdateNodeModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withNodeModelName("node-0001")
            .withDescription("description1")
            .withMetadata("NODE-0001")
            .withReleaseVerifyActions(null)
            .withReleaseConsumeActions(Arrays.asList(
                new io.gs2.skillTree.model.ConsumeAction()
                    .withAction("Gs2Inventory:ConsumeItemSetByUserId")
                    .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"potion\", \"userId\": \"#{userId}\", \"consumeCount\": 20}")
            ))
            .withRestrainReturnRate(0.9f)
            .withPremiseNodeNames(null)
    );
    NodeModelMaster 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.UpdateNodeModelMasterResult> asyncResult = null;
yield return client.UpdateNodeModelMaster(
    new Gs2.Gs2SkillTree.Request.UpdateNodeModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithNodeModelName("node-0001")
        .WithDescription("description1")
        .WithMetadata("NODE-0001")
        .WithReleaseVerifyActions(null)
        .WithReleaseConsumeActions(new Gs2.Core.Model.ConsumeAction[] {
            new Gs2.Core.Model.ConsumeAction()
                .WithAction("Gs2Inventory:ConsumeItemSetByUserId")
                .WithRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"potion\", \"userId\": \"#{userId}\", \"consumeCount\": 20}"),
        })
        .WithRestrainReturnRate(0.9f)
        .WithPremiseNodeNames(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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.updateNodeModelMaster(
        new Gs2SkillTree.UpdateNodeModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withNodeModelName("node-0001")
            .withDescription("description1")
            .withMetadata("NODE-0001")
            .withReleaseVerifyActions(null)
            .withReleaseConsumeActions([
                new Gs2SkillTree.model.ConsumeAction()
                    .withAction("Gs2Inventory:ConsumeItemSetByUserId")
                    .withRequest("{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"potion\", \"userId\": \"#{userId}\", \"consumeCount\": 20}"),
            ])
            .withRestrainReturnRate(0.9)
            .withPremiseNodeNames(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

try:
    result = client.update_node_model_master(
        skill_tree.UpdateNodeModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_node_model_name('node-0001')
            .with_description('description1')
            .with_metadata('NODE-0001')
            .with_release_verify_actions(None)
            .with_release_consume_actions([
                skill_tree.ConsumeAction()
                    .with_action('Gs2Inventory:ConsumeItemSetByUserId')
                    .with_request('{"namespaceName": "namespace-0001", "inventoryName": "item", "itemName": "potion", "userId": "#{userId}", "consumeCount": 20}'),
            ])
            .with_restrain_return_rate(0.9)
            .with_premise_node_names(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('skill_tree')

api_result = client.update_node_model_master({
    namespaceName="namespace-0001",
    nodeModelName="node-0001",
    description="description1",
    metadata="NODE-0001",
    releaseVerifyActions=nil,
    releaseConsumeActions={
        {
            action="Gs2Inventory:ConsumeItemSetByUserId",
            request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"potion\", \"userId\": \"#{userId}\", \"consumeCount\": 20}",
        }
    },
    restrainReturnRate=0.9,
    premiseNodeNames=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('skill_tree')

api_result_handler = client.update_node_model_master_async({
    namespaceName="namespace-0001",
    nodeModelName="node-0001",
    description="description1",
    metadata="NODE-0001",
    releaseVerifyActions=nil,
    releaseConsumeActions={
        {
            action="Gs2Inventory:ConsumeItemSetByUserId",
            request="{\"namespaceName\": \"namespace-0001\", \"inventoryName\": \"item\", \"itemName\": \"potion\", \"userId\": \"#{userId}\", \"consumeCount\": 20}",
        }
    },
    restrainReturnRate=0.9,
    premiseNodeNames=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;

```



---

### deleteNodeModelMaster

노드 모델 마스터 삭제<br>

지정된 노드 모델 마스터를 삭제합니다. 이는 마스터 정의만 삭제하며, 현재 활성화된 스킬 트리에는 영향을 주지 않습니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| nodeModelName | string |  | ✓|  |  ~ 128자 | 노드 모델명<br>노드 모델 고유의 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [NodeModelMaster](#nodemodelmaster) | 삭제한 노드 모델 마스터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/skillTree"
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 := skill_tree.Gs2SkillTreeRestClient{
    Session: &session,
}
result, err := client.DeleteNodeModelMaster(
    &skill_tree.DeleteNodeModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NodeModelName: pointy.String("node-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\SkillTree\Gs2SkillTreeRestClient;
use Gs2\SkillTree\Request\DeleteNodeModelMasterRequest;

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

$session->open();

$client = new Gs2SkillTreeRestClient(
    $session
);

try {
    $result = $client->deleteNodeModelMaster(
        (new DeleteNodeModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withNodeModelName("node-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.skillTree.rest.Gs2SkillTreeRestClient;
import io.gs2.skillTree.request.DeleteNodeModelMasterRequest;
import io.gs2.skillTree.result.DeleteNodeModelMasterResult;

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

try {
    DeleteNodeModelMasterResult result = client.deleteNodeModelMaster(
        new DeleteNodeModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withNodeModelName("node-0001")
    );
    NodeModelMaster 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 Gs2SkillTreeRestClient(session);

AsyncResult<Gs2.Gs2SkillTree.Result.DeleteNodeModelMasterResult> asyncResult = null;
yield return client.DeleteNodeModelMaster(
    new Gs2.Gs2SkillTree.Request.DeleteNodeModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithNodeModelName("node-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 Gs2SkillTree from '@/gs2/skillTree';

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

try {
    const result = await client.deleteNodeModelMaster(
        new Gs2SkillTree.DeleteNodeModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withNodeModelName("node-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import skill_tree

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

try:
    result = client.delete_node_model_master(
        skill_tree.DeleteNodeModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_node_model_name('node-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('skill_tree')

api_result = client.delete_node_model_master({
    namespaceName="namespace-0001",
    nodeModelName="node-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('skill_tree')

api_result_handler = client.delete_node_model_master_async({
    namespaceName="namespace-0001",
    nodeModelName="node-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;

```



---



