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

# GS2-Mission SDK API 레퍼런스

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



## 모델

### Namespace

네임스페이스<br>

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

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


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceId | string |  | ※ |  |  ~ 1024자 | 네임스페이스 GRN<br>※ 서버가 자동으로 설정 |
| name | string |  | ✓ |  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| description | string |  |  |  |  ~ 1024자 | 설명문 |
| transactionSetting | [TransactionSetting](#transactionsetting) |  | ✓ |  |  | 트랜잭션 설정<br>미션 달성 보상 부여 시 사용되는 분산 트랜잭션 설정입니다. |
| missionCompleteScript | [ScriptSetting](#scriptsetting) |  |  |  |  | 미션을 달성했을 때 실행할 스크립트 설정<br>Script 트리거 레퍼런스 - [`missionComplete`](../script/#missioncomplete) |
| counterIncrementScript | [ScriptSetting](#scriptsetting) |  |  |  |  | 카운터가 상승했을 때 실행할 스크립트 설정<br>Script 트리거 레퍼런스 - [`counterIncrement`](../script/#counterincrement) |
| receiveRewardsScript | [ScriptSetting](#scriptsetting) |  |  |  |  | 보상을 받았을 때 실행할 스크립트 설정<br>Script 트리거 레퍼런스 - [`receiveRewards`](../script/#receiverewards) |
| completeNotification | [NotificationSetting](#notificationsetting) |  | ✓ |  |  | 미션 태스크를 달성했을 때의 푸시 통지<br>미션 태스크의 달성 조건이 충족되었을 때 GS2-Gateway를 통해 전달되는 푸시 통지 설정입니다. 게임 클라이언트가 달성 상황을 즉시 UI에 반영할 수 있도록 합니다. |
| logSetting | [LogSetting](#logsetting) |  |  |  |  | 로그 출력 설정<br>이 네임스페이스에 대한 API 요청·응답 로그의 출력 대상이 되는 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 - 네임스페이스



---

### NotificationSetting

푸시 통지에 관한 설정<br>

GS2의 마이크로서비스 내에서 어떠한 이벤트가 발생했을 때, 푸시 통지를 전송하기 위한 설정입니다.<br>
여기서 말하는 푸시 통지란 GS2-Gateway가 제공하는 WebSocket 인터페이스를 경유하는 처리이며, 스마트폰의 푸시 통지와는 성질이 다릅니다.<br>
예를 들어 매치메이킹이 완료되었을 때나 친구 요청이 도착했을 때 등, 게임 클라이언트의 조작과는 관계없이 상태가 변화했을 때 GS2-Gateway를 경유하여 푸시 통지를 함으로써, 게임 클라이언트는 상태 변화를 감지할 수 있습니다.<br>

GS2-Gateway의 푸시 통지는 통지 대상 디바이스가 오프라인이었을 때 추가 처리로 모바일 푸시 통지를 전송할 수 있습니다.<br>
모바일 푸시 통지를 잘 활용하면, 매치메이킹 중에 게임을 종료하더라도 모바일 푸시 통지를 사용하여 플레이어에게 알리고, 게임으로 복귀하도록 하는 흐름을 구현할 수 있을 가능성이 있습니다.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| gatewayNamespaceId | string |  |  | "grn:gs2:{region}:{ownerId}:gateway:default" |  ~ 1024자 | 푸시 통지에 사용할 GS2-Gateway의 네임스페이스<br>"grn:gs2:"로 시작하는 GRN 형식으로 GS2-Gateway의 네임스페이스 ID를 지정합니다. |
| enableTransferMobileNotification | bool? |  |  | false |  | 모바일 푸시 통지로 전달할지 여부<br>이 통지를 전송하려 할 때, 통지 대상 디바이스가 오프라인일 경우 모바일 푸시 통지로 전달할지 여부를 지정합니다. |
| sound | string | {enableTransferMobileNotification} == true |  |  |  ~ 1024자 | 모바일 푸시 통지에서 사용할 사운드 파일명<br>여기서 지정한 사운드 파일명은 모바일 푸시 통지를 전송할 때 사용되며, 특별한 사운드로 통지를 출력할 수 있습니다.<br>※ enableTransferMobileNotification이(가) true 이면 활성화 |
| enable | 문자열 열거형<br>enum {<br>"Enabled",<br>"Disabled"<br>}<br> |  |  | "Enabled" |  | 푸시 통지를 활성화할지 여부Enabled: 활성화 / Disabled: 비활성화 /  |

**관련 메서드:**
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" 이면 필수 |

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



---

### Complete

미션 달성 상황<br>

특정 미션 그룹에 대한 사용자의 미션 달성 상황과 보상 수령 상황을 추적합니다. 달성 완료된 태스크명과 보상 수령 완료된 태스크명을 각각 별도의 목록으로 관리하여, 달성된 태스크와 실제로 보상을 수령한 태스크를 구분합니다.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| completeId | string |  | ※ |  |  ~ 1024자 | 달성 상황 GRN<br>※ 서버가 자동으로 설정 |
| userId | string |  | ✓ |  |  ~ 128자 | 사용자ID |
| missionGroupName | string |  | ✓ |  |  ~ 128자 | 미션 그룹명<br>이 달성 상황 레코드가 속한 미션 그룹의 이름입니다. 사용자별·미션 그룹별로 하나의 달성 상황 레코드가 존재합니다. |
| completedMissionTaskNames | List&lt;string&gt; |  |  | [] | 0 ~ 1000 items | 달성 완료된 태스크명 목록<br>사용자가 달성한(달성 조건을 충족한) 미션 태스크의 이름입니다. 카운터가 목표값에 도달하거나 검증 액션이 성공한 시점에 이 목록에 추가됩니다. 보상 수령 여부는 관계없습니다. |
| receivedMissionTaskNames | List&lt;string&gt; |  |  | [] | 0 ~ 1000 items | 보상 수령 완료된 태스크명 목록<br>사용자가 달성 보상을 이미 수령한 미션 태스크의 이름입니다. 보상을 받으려면 태스크가 달성 완료 목록에 포함되어 있어야 합니다. |
| nextResetAt | long |  |  |  |  | 다음 리셋 타이밍<br>이 미션 그룹의 달성 상황이 리셋되는 일시입니다. 미션 그룹의 리셋 타입과 타이밍 설정에 따라 결정됩니다. 리셋 타입이 "notReset"인 경우 null입니다. |
| createdAt | long |  | ※ | 현재 시각 |  | 생성일시<br>UNIX 시간・밀리초<br>※ 서버가 자동으로 설정 |
| updatedAt | long |  | ※ | 현재 시각 |  | 최종 갱신일시<br>UNIX 시간・밀리초<br>※ 서버가 자동으로 설정 |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | 리비전 |

**관련 메서드:**
describeCompletes - 달성 상황 목록 조회
describeCompletesByUserId - 사용자 ID를 지정하여 달성 상황 목록 조회
receiveByUserId - 미션 달성 보상 수령
batchReceiveByUserId - 여러 미션 태스크의 달성 보상을 일괄로 수령 상태로 변경
revertReceiveByUserId - 미션 달성 보상을 미수령 상태로 되돌리기
getComplete - 달성 상황 조회
getCompleteByUserId - 사용자 ID를 지정하여 달성 상황 조회
evaluateComplete - 달성 상황 재평가
evaluateCompleteByUserId - 사용자 ID를 지정하여 달성 상황 재평가
deleteCompleteByUserId - 달성 상황 삭제
verifyComplete - 미션 달성 상황 검증
verifyCompleteByUserId - 사용자 ID를 지정하여 미션 달성 상황 검증
increaseCounterByUserId - 사용자 ID를 지정하여 카운터를 가산
setCounterByUserId - 사용자 ID를 지정하여 카운터를 설정
decreaseCounter - 카운터 감산
decreaseCounterByUserId - 사용자 ID를 지정하여 카운터 감산



---

### Counter

카운터<br>

카운터는 미션 진행 상황을 게임 플레이어별로 보관하는 엔티티입니다.<br>
카운터의 값은 연결된 태스크의 기간별로 집계됩니다.<br>

따라서 하나의 카운터는 여러 개의 값을 가집니다.<br>
예를 들어, 퀘스트 클리어 횟수 카운터라면 이번 달 클리어 횟수, 이번 주 클리어 횟수, 오늘 클리어 횟수와 같은 식입니다.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| counterId | string |  | ※ |  |  ~ 1024자 | 카운터 GRN<br>※ 서버가 자동으로 설정 |
| userId | string |  | ✓ |  |  ~ 128자 | 사용자ID |
| name | string |  | ✓ |  |  ~ 128자 | 카운터 모델 이름<br>이 카운터 인스턴스의 기반이 되는 카운터 모델의 이름입니다. 스코프와 리셋 타이밍을 정의하는 카운터 모델 정의에 연결됩니다. |
| values | [List&lt;ScopedValue&gt;](#scopedvalue) |  |  | [] | 0 ~ 32 items | 값<br>이 카운터의 스코프별 값 리스트입니다. 각 엔트리는 특정 스코프(리셋 타이밍 또는 검증 액션 조건)의 카운터 값과 다음 리셋 시각을 보관합니다. 하나의 카운터가 여러 스코프의 값을 동시에 보관합니다. |
| createdAt | long |  | ※ | 현재 시각 |  | 생성일시<br>UNIX 시간・밀리초<br>※ 서버가 자동으로 설정 |
| updatedAt | long |  | ※ | 현재 시각 |  | 최종 갱신일시<br>UNIX 시간・밀리초<br>※ 서버가 자동으로 설정 |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | 리비전 |

**관련 메서드:**
describeCounters - 카운터 목록 취득
describeCountersByUserId - 사용자 ID를 지정하여 카운터 목록 취득
increaseCounterByUserId - 사용자 ID를 지정하여 카운터를 가산
setCounterByUserId - 사용자 ID를 지정하여 카운터를 설정
decreaseCounter - 카운터 감산
decreaseCounterByUserId - 사용자 ID를 지정하여 카운터 감산
getCounter - 카운터 조회
getCounterByUserId - 사용자 ID를 지정하여 카운터 조회
verifyCounterValue - 카운터 값 검증
verifyCounterValueByUserId - 사용자 ID를 지정하여 카운터 값 검증
resetCounter - 카운터 리셋
resetCounterByUserId - 사용자 ID를 지정하여 카운터 리셋
deleteCounter - 카운터 삭제
deleteCounterByUserId - 사용자 ID를 지정하여 카운터 삭제



---

### CounterScopeModel

카운터 리셋 타이밍 모델<br>

카운터의 스코프를 정의하고, 카운터 값의 리셋 방법과 타이밍을 결정합니다. 스코프는 리셋 타이밍(매일, 매주, 매월, 일정 일수마다, 또는 리셋 없음) 또는 검증 액션 조건 중 하나입니다. 각 카운터는 여러 스코프를 가질 수 있으며, 서로 다른 기간의 값을 추적할 수 있습니다.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| scopeType | 문자열 열거형<br>enum {<br>"resetTiming",<br>"verifyAction"<br>}<br> |  |  | "resetTiming" |  | 스코프의 종류<br>카운터 스코프의 정의 방법을 결정합니다. "resetTiming" 은 정기적인 리셋 스케줄을 사용하고, "verifyAction" 은 검증 액션으로 카운터 값이 적용되는지 여부를 판정합니다.resetTiming: 리셋 타이밍 / verifyAction: 검증 액션 /  |
| resetType | 문자열 열거형<br>enum {<br>"notReset",<br>"daily",<br>"weekly",<br>"monthly",<br>"days"<br>}<br> |  |  | "notReset" |  | 리셋 타이밍<br>이 스코프의 카운터 값이 리셋되는 타이밍을 결정합니다. 리셋하지 않음(영구 누계), 매일, 매주, 매월, 일정 일수마다 중에서 선택합니다. scopeType 이 "resetTiming" 인 경우에만 사용됩니다.notReset: 리셋 안 함 / daily: 매일 / weekly: 매주 / monthly: 매월 / days: 일정 일수마다 /  |
| resetDayOfMonth | int | {resetType} == "monthly" | ✓※ |  | 1 ~ 31 | 리셋할 날짜<br>카운터 값이 리셋되는 월의 날짜입니다. 지정한 값이 해당 월의 일수를 초과하는 경우, 그 달의 마지막 날로 처리됩니다. resetType 이 "monthly" 인 경우에만 사용됩니다.<br>※ resetType이(가) "monthly" 이면 필수 |
| resetDayOfWeek | 문자열 열거형<br>enum {<br>"sunday",<br>"monday",<br>"tuesday",<br>"wednesday",<br>"thursday",<br>"friday",<br>"saturday"<br>}<br> | {resetType} == "weekly" | ✓※ |  |  | 리셋할 요일<br>카운터 값이 리셋되는 요일입니다. resetType 이 "weekly" 인 경우에만 사용됩니다.sunday: 일요일 / monday: 월요일 / tuesday: 화요일 / wednesday: 수요일 / thursday: 목요일 / friday: 금요일 / saturday: 토요일 / <br>※ resetType이(가) "weekly" 이면 필수 |
| resetHour | int | {resetType} in ["monthly", "weekly", "daily"] | ✓※ |  | 0 ~ 23 | 리셋 시각<br>카운터 값이 리셋되는 시각(0~23)입니다. 매일, 매주, 매월 리셋 타입과 조합하여 사용됩니다.<br>※ resetType이(가) "monthly","weekly","daily"이면 필수 |
| conditionName | string | {scopeType} == "verifyAction" | ✓※ |  |  ~ 128자 | 조건명<br>이 검증 액션 조건 스코프를 식별하는 고유한 이름입니다. 카운터 내에서 대응하는 스코프 값을 조회하는 데 사용됩니다. scopeType 이 "verifyAction" 인 경우에만 사용됩니다.<br>※ scopeType이(가) "verifyAction" 이면 필수 |
| condition | [VerifyAction](#verifyaction) | {scopeType} == "verifyAction" | ✓※ |  |  | 조건<br>이 스코프의 카운터 값이 적용되는지 여부를 판정하는 검증 액션입니다. scopeType이 "verifyAction"인 경우에만 사용됩니다.<br>※ scopeType이(가) "verifyAction" 이면 필수 |
| anchorTimestamp | long | {resetType} == "days" | ✓※ |  |  | 경과 일수를 계산하는 기준 일시<br>UNIX 시간(밀리초)<br>※ resetType이(가) "days" 이면 필수 |
| days | int | {resetType} == "days" | ✓※ |  | 1 ~ 2147483646 | 리셋하는 일수<br>기준 일시부터 카운트되는 카운터 값의 리셋 간격 일수입니다. resetType이 "days"인 경우에만 사용됩니다.<br>※ resetType이(가) "days" 이면 필수 |

**관련 모델:**
CounterModel - 카운터 모델
CounterModelMaster - 카운터 모델 마스터



---

### CounterModel

카운터 모델<br>

카운터 모델은 미션 태스크의 달성 조건으로 설정할 수 있는 엔티티입니다.<br>
카운터 값은 여러 미션 그룹에서 참조할 수 있기 때문에, 하나의 카운터를 위클리 미션과 데일리 미션 같은 여러 미션 그룹의 달성 조건으로 설정할 수 있습니다.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| counterId | string |  | ※ |  |  ~ 1024자 | 카운터 모델 GRN<br>※ 서버가 자동으로 설정 |
| name | string |  | ✓ |  |  ~ 128자 | 카운터 모델명<br>카운터 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| metadata | string |  |  |  |  ~ 1024자 | 메타데이터<br>메타데이터에는 임의의 값을 설정할 수 있습니다.<br>이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. |
| scopes | [List&lt;CounterScopeModel&gt;](#counterscopemodel) |  |  | [] | 1 ~ 20 items | 카운터의 리셋 타이밍 목록<br>이 카운터의 스코프(리셋 타이밍 또는 검증 액션 조건)를 정의합니다. 하나의 카운터에 여러 스코프를 설정할 수 있으며, 서로 다른 기간의 값(예: 데일리, 위클리, 누계를 동시에)을 추적할 수 있습니다. |
| challengePeriodEventId | string |  |  |  |  ~ 1024자 | 카운터를 조작할 수 있는 기간을 설정한 GS2-Schedule 이벤트 GRN<br>이 카운터의 증감이 가능한 기간을 정의하는 GS2-Schedule 이벤트를 지정합니다. 설정하지 않은 경우, 카운터는 언제든지 조작할 수 있습니다. |

**관련 메서드:**
describeCounterModels - 카운터 모델 목록 취득
getCounterModel - 카운터 모델을 취득



---

### MissionGroupModel

미션 그룹 모델<br>

미션 그룹은 카운터의 리셋 타이밍으로 태스크를 그룹화하는 엔티티입니다.<br>
예를 들어, 데일리 미션으로 하나의 그룹, 위클리 미션으로 하나의 그룹이 됩니다.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| missionGroupId | string |  | ※ |  |  ~ 1024자 | 미션 그룹 GRN<br>※ 서버가 자동으로 설정 |
| name | string |  | ✓ |  |  ~ 128자 | 미션 그룹 모델 이름<br>미션 그룹 모델 고유의 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| metadata | string |  |  |  |  ~ 1024자 | 메타데이터<br>메타데이터에는 임의의 값을 설정할 수 있습니다.<br>이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. |
| tasks | [List&lt;MissionTaskModel&gt;](#missiontaskmodel) |  |  | [] | 0 ~ 1000 items | 미션 태스크 리스트<br>이 그룹에 속하는 미션 태스크입니다. 각 태스크는 달성 조건(카운터의 임계값 또는 검증 액션)과 달성 시 부여되는 보상을 정의합니다. |
| resetType | 문자열 열거형<br>enum {<br>"notReset",<br>"daily",<br>"weekly",<br>"monthly",<br>"days"<br>}<br> |  |  | "notReset" |  | 리셋 타이밍<br>미션 그룹의 달성 상황이 리셋되는 타이밍을 결정합니다. 리셋하지 않음(영구), 매일, 매주, 매월, 기준 일시부터 일정 일수마다 중에서 선택합니다.notReset: 리셋 안 함 / daily: 매일 / weekly: 매주 / monthly: 매월 / days: 일정 일수마다 /  |
| resetDayOfMonth | int | {resetType} == "monthly" | ✓※ |  | 1 ~ 31 | 리셋하는 날짜<br>미션 그룹이 리셋되는 월의 날짜입니다. 지정한 값이 해당 월의 일수를 초과하는 경우, 그 달의 마지막 날로 처리됩니다. resetType이 "monthly"인 경우에만 사용됩니다.<br>※ resetType이(가) "monthly" 이면 필수 |
| resetDayOfWeek | 문자열 열거형<br>enum {<br>"sunday",<br>"monday",<br>"tuesday",<br>"wednesday",<br>"thursday",<br>"friday",<br>"saturday"<br>}<br> | {resetType} == "weekly" | ✓※ |  |  | 리셋하는 요일<br>미션 그룹이 리셋되는 요일입니다. resetType이 "weekly"인 경우에만 사용됩니다.sunday: 일요일 / monday: 월요일 / tuesday: 화요일 / wednesday: 수요일 / thursday: 목요일 / friday: 금요일 / saturday: 토요일 / <br>※ resetType이(가) "weekly" 이면 필수 |
| resetHour | int | {resetType} in ["monthly", "weekly", "daily"] | ✓※ |  | 0 ~ 23 | 리셋 시각<br>미션 그룹이 리셋되는 시각(0~23)입니다. 매일, 매주, 매월 리셋 타입과 조합하여 사용됩니다.<br>※ resetType이(가) "monthly","weekly","daily"이면 필수 |
| completeNotificationNamespaceId | string |  |  |  |  ~ 1024자 | 미션 태스크를 달성했을 때의 푸시 통지<br>이 그룹 내의 미션 태스크가 달성되었을 때 푸시 통지를 전송하는 데 사용되는 GS2-Gateway의 네임스페이스 GRN입니다. 게임 클라이언트에 실시간으로 통지할 수 있습니다. |
| anchorTimestamp | long | {resetType} == "days" | ✓※ |  |  | 경과 일수를 계산하는 기준 일시<br>UNIX 시간(밀리초)<br>※ resetType이(가) "days" 이면 필수 |
| days | int | {resetType} == "days" | ✓※ |  | 1 ~ 2147483646 | 리셋하는 일수<br>기준 일시부터 카운트되는 리셋 간격 일수입니다. resetType이 "days"인 경우에만 사용됩니다.<br>※ resetType이(가) "days" 이면 필수 |

**관련 메서드:**
describeMissionGroupModels - 미션 그룹 모델 목록 취득
getMissionGroupModel - 미션 그룹 모델을 취득



---

### MissionTaskModel

미션 태스크 모델<br>

미션 태스크는 연결된 카운터의 값이 일정 수준을 초과하면 보상을 받을 수 있는 조건을 정의하는 엔티티입니다.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| missionTaskId | string |  | ※ |  |  ~ 1024자 | 미션 태스크 GRN<br>※ 서버가 자동으로 설정 |
| name | string |  | ✓ |  |  ~ 128자 | 미션 태스크 모델 이름<br>미션 태스크 모델 고유의 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| metadata | string |  |  |  |  ~ 1024자 | 메타데이터<br>메타데이터에는 임의의 값을 설정할 수 있습니다.<br>이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. |
| verifyCompleteType | 문자열 열거형<br>enum {<br>"counter",<br>"verifyActions"<br>}<br> |  |  | "counter" |  | 달성 조건 종류<br>미션 태스크의 달성 판정 방법을 지정합니다. "counter"는 관련된 카운터의 스코프 값이 목표 임곗값에 도달했는지 확인합니다. "verifyActions"는 검증 액션을 사용하여 달성 조건을 확인합니다.counter: 카운터 / verifyActions: 검증 액션 /  |
| targetCounter | [TargetCounterModel](#targetcountermodel) | {verifyCompleteType} == "counter" | ✓※ |  |  | 목표 카운터<br>미션 태스크의 달성 판정에 사용되는 카운터, 스코프, 목표값을 정의합니다. 카운터의 스코프 값이 지정된 목표값에 도달하거나 초과한 경우, 태스크가 달성된 것으로 간주됩니다.<br>※ verifyCompleteType이(가) "counter" 이면 필수 |
| verifyCompleteConsumeActions | [List&lt;VerifyAction&gt;](#verifyaction) | {verifyCompleteType} == "verifyActions" |  | [] | 0 ~ 10 items | 태스크 달성 판정에 사용하는 검증 액션<br>미션 태스크의 달성 판정에 사용되는 검증 액션의 목록입니다. 모든 검증 액션이 성공한 경우 태스크가 달성된 것으로 간주됩니다. verifyCompleteType이 "verifyActions"인 경우에만 사용됩니다.<br>※ verifyCompleteType이(가) "verifyActions" 이면 활성화 |
| completeAcquireActions | [List&lt;AcquireAction&gt;](#acquireaction) |  |  | [] | 0 ~ 100 items | 미션 달성 시 보상<br>플레이어가 미션 달성 보상을 받을 때 실행되는 입수 액션의 목록입니다. |
| challengePeriodEventId | string |  |  |  |  ~ 1024자 | 보상을 받을 수 있는 기간을 설정한 GS2-Schedule 이벤트 GRN<br>미션 태스크의 보상을 받을 수 있는 기간을 정의하는 GS2-Schedule 이벤트를 지정합니다. 설정하지 않은 경우, 달성 후 언제든지 보상을 받을 수 있습니다. |
| premiseMissionTaskName | string |  |  |  |  ~ 128자 | 이 태스크에 도전하기 위해 달성해 두어야 하는 태스크의 이름<br>이 태스크의 보상을 받기 전에 달성해 두어야 하는, 같은 그룹 내의 전제 미션 태스크를 지정합니다. 단계적인 미션 체인을 만드는 데 사용합니다. |

**관련 메서드:**
describeMissionTaskModels - 미션 태스크 모델 목록 취득
getMissionTaskModel - 미션 태스크 모델을 취득


**관련 모델:**
MissionGroupModel - 미션 그룹 모델



---

### TargetCounterModel

목표 카운터<br>

미션의 달성 목표가 되는 카운터의 정보


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| counterName | string |  | ✓ |  |  ~ 128자 | 카운터 모델명<br>카운터 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| scopeType | 문자열 열거형<br>enum {<br>"resetTiming",<br>"verifyAction"<br>}<br> |  |  | "resetTiming" |  | 스코프 종류<br>미션 달성 판정에 사용하는 카운터 스코프의 종류를 지정합니다. "resetTiming"은 특정 리셋 기간의 카운터 값을 평가하고, "verifyAction"은 이름이 지정된 조건의 값을 평가합니다.resetTiming: 리셋 타이밍 / verifyAction: 검증 액션 /  |
| resetType | 문자열 열거형<br>enum {<br>"notReset",<br>"daily",<br>"weekly",<br>"monthly",<br>"days"<br>}<br> | {scopeType} == "resetTiming" |  |  |  | 목표 리셋 타이밍<br>목표값과 비교할 카운터의 리셋 타이밍 스코프를 지정합니다. 예를 들어 "daily"를 선택하면 데일리 카운터 값을 확인합니다. 생략한 경우, 미션 그룹의 리셋 타이밍이 사용됩니다.notReset: 리셋 안 함 / daily: 매일 / weekly: 매주 / monthly: 매월 / days: 일정 일수마다 / <br>※ scopeType이(가) "resetTiming" 이면 활성화 |
| conditionName | string | {scopeType} == "verifyAction" | ✓※ |  |  ~ 128자 | 조건 이름<br>목표값과 비교할 검증 액션 조건 스코프의 이름입니다. 카운터 모델의 스코프에서 정의된 conditionName과 일치해야 합니다. scopeType이 "verifyAction"인 경우에만 사용됩니다.<br>※ scopeType이(가) "verifyAction" 이면 필수 |
| value | long |  | ✓ |  | 0 ~ 9223372036854775805 | 목표값<br>미션 태스크가 달성된 것으로 간주되기 위해, 카운터의 스코프 값이 도달하거나 초과해야 하는 임곗값입니다. |

**관련 메서드:**
createMissionTaskModelMaster - 미션 태스크 모델 마스터를 신규 작성
updateMissionTaskModelMaster - 미션 태스크 모델 마스터를 갱신


**관련 모델:**
MissionTaskModel - 미션 태스크 모델
MissionTaskModelMaster - 미션 태스크 모델 마스터



---

### ScopedValue

스코프 값<br>

특정 스코프 내의 카운터 값을 나타냅니다. 각 스코프 값은 특정 리셋 타이밍(예: 매일, 매주, 매월) 또는 검증 액션 조건의 누적 카운트를 보유합니다. 리셋 타이밍이 도래하면 값은 0으로 리셋됩니다. 카운터 값에는 상한이 있으며, 증가하더라도 최댓값을 초과하지 않습니다.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| scopeType | 문자열 열거형<br>enum {<br>"resetTiming",<br>"verifyAction"<br>}<br> |  |  | "resetTiming" |  | 스코프 종류<br>이 스코프 값이 리셋 타이밍 스케줄에 기반한 것인지, 검증 액션 조건에 기반한 것인지를 나타냅니다.resetTiming: 리셋 타이밍 / verifyAction: 검증 액션 /  |
| resetType | 문자열 열거형<br>enum {<br>"notReset",<br>"daily",<br>"weekly",<br>"monthly",<br>"days"<br>}<br> | {scopeType} == "resetTiming" | ✓※ |  |  | 리셋 타이밍<br>이 스코프 값의 리셋 타이밍입니다. 카운터 값이 리셋될 때까지의 누적 기간을 결정합니다. scopeType이 "resetTiming"인 경우에만 적용됩니다.notReset: 리셋 안 함 / daily: 매일 / weekly: 매주 / monthly: 매월 / days: 일정 일수마다 / <br>※ scopeType이(가) "resetTiming" 이면 필수 |
| conditionName | string | {scopeType} == "verifyAction" | ✓※ |  |  ~ 128자 | 조건 이름<br>이 스코프 값이 대응하는 검증 액션 조건의 이름입니다. 이 값이 어느 조건 스코프에 속하는지 식별하는 데 사용됩니다. scopeType이 "verifyAction"인 경우에만 적용됩니다.<br>※ scopeType이(가) "verifyAction" 이면 필수 |
| value | long |  |  | 0 | 0 ~ 9223372036854775805 | 카운트<br>이 스코프의 누적 카운터 값입니다. 카운터가 증가하면 늘어나고 감소하면 줄어듭니다. 값은 최댓값으로 상한이 설정되며, 0 미만으로 내려가지 않습니다. |
| nextResetAt | long |  |  |  |  | 다음 리셋 타이밍<br>이 스코프 값이 0으로 리셋되는 일시입니다. 리셋 타입과 타이밍 설정에 따라 산출됩니다. 리셋 타입이 "notReset"인 경우, 또는 스코프 타입이 "verifyAction"인 경우에는 null입니다. |
| updatedAt | long |  | ※ | 현재 시각 |  | 최종 갱신일시<br>UNIX 시간・밀리초<br>※ 서버가 자동으로 설정 |

**관련 모델:**
Counter - 카운터



---

### AcquireAction

입수 액션


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

**관련 모델:**
MissionTaskModel - 미션 태스크 모델
MissionTaskModelMaster - 미션 태스크 모델 마스터



---

### ConsumeAction

소비 액션


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


---

### VerifyAction

검증 액션


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

**관련 모델:**
CounterScopeModel - 카운터 리셋 타이밍 모델
MissionTaskModel - 미션 태스크 모델
MissionTaskModelMaster - 미션 태스크 모델 마스터



---

### Config

컨피그 설정<br>

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


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


---

### 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 |  | 트랜잭션 실행 중 오류가 발생했는지 여부 |

**관련 메서드:**
complete - 미션 달성 보상을 수령하기 위한 트랜잭션 발행
completeByUserId - 사용자 ID를 지정하여 미션 달성 보상을 수령하기 위한 트랜잭션 발행
batchComplete - 미션 달성 보상을 일괄로 수령하기 위한 트랜잭션 발행
batchCompleteByUserId - 사용자 ID를 지정하여 미션 달성 보상을 일괄로 수령하기 위한 트랜잭션 발행



---

### CurrentMissionMaster

현재 활성화된 미션 모델의 마스터 데이터<br>

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

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

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


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

**관련 메서드:**
exportMaster - 미션 모델 마스터를 활성화 가능한 마스터 데이터 형식으로 내보내기
getCurrentMissionMaster - 현재 활성화된 미션 모델의 마스터 데이터를 취득
updateCurrentMissionMaster - 현재 활성화된 미션 모델의 마스터 데이터를 갱신
updateCurrentMissionMasterFromGitHub - 현재 활성화된 미션 모델의 마스터 데이터를 GitHub에서 갱신



---

### CounterModelMaster

카운터 모델 마스터<br>

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

카운터 모델은 미션 태스크의 달성 조건으로 설정할 수 있는 엔티티입니다.<br>
카운터의 값은 여러 미션 그룹에서 참조할 수 있으므로, 하나의 카운터로 위클리 미션과 데일리 미션 등 여러 미션 그룹의 달성 조건을 설정할 수 있습니다.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| counterId | string |  | ※ |  |  ~ 1024자 | 카운터 모델 마스터 GRN<br>※ 서버가 자동으로 설정 |
| name | string |  | ✓ |  |  ~ 128자 | 카운터 모델명<br>카운터 모델 고유 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| metadata | string |  |  |  |  ~ 1024자 | 메타데이터<br>메타데이터에는 임의의 값을 설정할 수 있습니다.<br>이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. |
| description | string |  |  |  |  ~ 1024자 | 설명문 |
| scopes | [List&lt;CounterScopeModel&gt;](#counterscopemodel) |  |  | [] | 1 ~ 20 items | 카운터의 리셋 타이밍 목록<br>이 카운터의 스코프(리셋 타이밍 또는 검증 액션 조건)를 정의합니다. 하나의 카운터에 여러 스코프를 설정할 수 있으며, 서로 다른 기간의 값(예: 데일리, 위클리, 누계를 동시에)을 추적할 수 있습니다. |
| challengePeriodEventId | string |  |  |  |  ~ 1024자 | 카운터를 조작할 수 있는 기간을 설정한 GS2-Schedule 이벤트 GRN<br>이 카운터의 증감이 가능한 기간을 정의하는 GS2-Schedule 이벤트를 지정합니다. 설정하지 않은 경우, 카운터는 언제든지 조작할 수 있습니다. |
| createdAt | long |  | ※ | 현재 시각 |  | 생성일시<br>UNIX 시간・밀리초<br>※ 서버가 자동으로 설정 |
| updatedAt | long |  | ※ | 현재 시각 |  | 최종 갱신일시<br>UNIX 시간・밀리초<br>※ 서버가 자동으로 설정 |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | 리비전 |

**관련 메서드:**
describeCounterModelMasters - 카운터 모델 마스터 목록 취득
createCounterModelMaster - 카운터 모델 마스터를 신규 작성
getCounterModelMaster - 카운터 모델 마스터를 취득
updateCounterModelMaster - 카운터 모델 마스터를 갱신
deleteCounterModelMaster - 카운터 모델 마스터를 삭제



---

### MissionGroupModelMaster

미션 그룹 모델 마스터<br>

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

미션 그룹은 카운터의 리셋 타이밍으로 태스크를 그룹화하는 엔티티입니다.<br>
예를 들어 데일리 미션으로 하나의 그룹, 위클리 미션으로 하나의 그룹이 됩니다.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| missionGroupId | string |  | ※ |  |  ~ 1024자 | 미션 그룹 모델 마스터 GRN<br>※ 서버가 자동으로 설정 |
| name | string |  | ✓ |  |  ~ 128자 | 미션 그룹 모델명<br>미션 그룹 모델 고유 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| metadata | string |  |  |  |  ~ 1024자 | 메타데이터<br>메타데이터에는 임의의 값을 설정할 수 있습니다.<br>이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. |
| description | string |  |  |  |  ~ 1024자 | 설명문 |
| resetType | 문자열 열거형<br>enum {<br>"notReset",<br>"daily",<br>"weekly",<br>"monthly",<br>"days"<br>}<br> |  |  | "notReset" |  | 리셋 타이밍<br>미션 그룹의 달성 상황이 리셋되는 타이밍을 결정합니다. 리셋하지 않음(영구), 매일, 매주, 매월, 기준 일시부터 일정 일수마다 중에서 선택합니다.notReset: 리셋 안 함 / daily: 매일 / weekly: 매주 / monthly: 매월 / days: 일정 일수마다 /  |
| resetDayOfMonth | int | {resetType} == "monthly" | ✓※ |  | 1 ~ 31 | 리셋하는 날짜<br>미션 그룹이 리셋되는 월의 날짜입니다. 지정한 값이 해당 월의 일수를 초과하는 경우, 그 달의 마지막 날로 처리됩니다. resetType이 "monthly"인 경우에만 사용됩니다.<br>※ resetType이(가) "monthly" 이면 필수 |
| resetDayOfWeek | 문자열 열거형<br>enum {<br>"sunday",<br>"monday",<br>"tuesday",<br>"wednesday",<br>"thursday",<br>"friday",<br>"saturday"<br>}<br> | {resetType} == "weekly" | ✓※ |  |  | 리셋하는 요일<br>미션 그룹이 리셋되는 요일입니다. resetType이 "weekly"인 경우에만 사용됩니다.sunday: 일요일 / monday: 월요일 / tuesday: 화요일 / wednesday: 수요일 / thursday: 목요일 / friday: 금요일 / saturday: 토요일 / <br>※ resetType이(가) "weekly" 이면 필수 |
| resetHour | int | {resetType} in ["monthly", "weekly", "daily"] | ✓※ |  | 0 ~ 23 | 리셋 시각<br>미션 그룹이 리셋되는 시각(0~23)입니다. 매일, 매주, 매월 리셋 타입과 조합하여 사용됩니다.<br>※ resetType이(가) "monthly","weekly","daily"이면 필수 |
| anchorTimestamp | long | {resetType} == "days" | ✓※ |  |  | 경과 일수를 계산하는 기준 일시<br>UNIX 시간(밀리초)<br>※ resetType이(가) "days" 이면 필수 |
| days | int | {resetType} == "days" | ✓※ |  | 1 ~ 2147483646 | 리셋하는 일수<br>기준 일시부터 카운트되는 리셋 간격 일수입니다. resetType이 "days"인 경우에만 사용됩니다.<br>※ resetType이(가) "days" 이면 필수 |
| completeNotificationNamespaceId | string |  |  |  |  ~ 1024자 | 미션 태스크를 달성했을 때의 푸시 통지<br>이 그룹 내의 미션 태스크가 달성되었을 때 푸시 통지를 전송하는 데 사용되는 GS2-Gateway의 네임스페이스 GRN입니다. 게임 클라이언트에 실시간으로 통지할 수 있습니다. |
| createdAt | long |  | ※ | 현재 시각 |  | 생성일시<br>UNIX 시간・밀리초<br>※ 서버가 자동으로 설정 |
| updatedAt | long |  | ※ | 현재 시각 |  | 최종 갱신일시<br>UNIX 시간・밀리초<br>※ 서버가 자동으로 설정 |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | 리비전 |

**관련 메서드:**
describeMissionGroupModelMasters - 미션 그룹 모델 마스터 목록 취득
createMissionGroupModelMaster - 미션 그룹 모델 마스터를 신규 작성
getMissionGroupModelMaster - 미션 그룹 모델 마스터를 취득
updateMissionGroupModelMaster - 미션 그룹 모델 마스터를 갱신
deleteMissionGroupModelMaster - 미션 그룹 모델 마스터를 삭제



---

### MissionTaskModelMaster

미션 태스크 모델 마스터<br>

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

미션 태스크는 연관된 카운터의 값이 일정 수준을 초과하면 보상을 받을 수 있는 조건을 정의하는 엔티티입니다.


|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| missionTaskId | string |  | ※ |  |  ~ 1024자 | 미션 태스크 모델 마스터 GRN<br>※ 서버가 자동으로 설정 |
| name | string |  | ✓ |  |  ~ 128자 | 미션 태스크 모델명<br>미션 태스크 모델 고유 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| metadata | string |  |  |  |  ~ 1024자 | 메타데이터<br>메타데이터에는 임의의 값을 설정할 수 있습니다.<br>이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. |
| description | string |  |  |  |  ~ 1024자 | 설명문 |
| verifyCompleteType | 문자열 열거형<br>enum {<br>"counter",<br>"verifyActions"<br>}<br> |  |  | "counter" |  | 달성 조건 종류<br>미션 태스크의 달성 판정 방법을 지정합니다. "counter"는 관련된 카운터의 스코프 값이 목표 임곗값에 도달했는지 확인합니다. "verifyActions"는 검증 액션을 사용하여 달성 조건을 확인합니다.counter: 카운터 / verifyActions: 검증 액션 /  |
| targetCounter | [TargetCounterModel](#targetcountermodel) | {verifyCompleteType} == "counter" | ✓※ |  |  | 목표 카운터<br>미션 태스크의 달성 판정에 사용되는 카운터, 스코프, 목표값을 정의합니다. 카운터의 스코프 값이 지정된 목표값에 도달하거나 초과한 경우, 태스크가 달성된 것으로 간주됩니다.<br>※ verifyCompleteType이(가) "counter" 이면 필수 |
| verifyCompleteConsumeActions | [List&lt;VerifyAction&gt;](#verifyaction) | {verifyCompleteType} == "verifyActions" |  |  | 0 ~ 10 items | 태스크 달성 판정에 사용하는 검증 액션<br>미션 태스크의 달성 판정에 사용되는 검증 액션의 목록입니다. 모든 검증 액션이 성공한 경우 태스크가 달성된 것으로 간주됩니다. verifyCompleteType이 "verifyActions"인 경우에만 사용됩니다.<br>※ verifyCompleteType이(가) "verifyActions" 이면 활성화 |
| completeAcquireActions | [List&lt;AcquireAction&gt;](#acquireaction) |  |  | [] | 0 ~ 100 items | 미션 달성 시 보상<br>플레이어가 미션 달성 보상을 받을 때 실행되는 입수 액션의 목록입니다. |
| challengePeriodEventId | string |  |  |  |  ~ 1024자 | 보상을 받을 수 있는 기간을 설정한 GS2-Schedule 이벤트 GRN<br>미션 태스크의 보상을 받을 수 있는 기간을 정의하는 GS2-Schedule 이벤트를 지정합니다. 설정하지 않은 경우, 달성 후 언제든지 보상을 받을 수 있습니다. |
| premiseMissionTaskName | string |  |  |  |  ~ 128자 | 이 태스크에 도전하기 위해 달성해 두어야 하는 태스크의 이름<br>이 태스크의 보상을 받기 전에 달성해 두어야 하는, 같은 그룹 내의 전제 미션 태스크를 지정합니다. 단계적인 미션 체인을 만드는 데 사용합니다. |
| createdAt | long |  | ※ | 현재 시각 |  | 생성일시<br>UNIX 시간・밀리초<br>※ 서버가 자동으로 설정 |
| updatedAt | long |  | ※ | 현재 시각 |  | 최종 갱신일시<br>UNIX 시간・밀리초<br>※ 서버가 자동으로 설정 |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | 리비전 |

**관련 메서드:**
describeMissionTaskModelMasters - 미션 태스크 모델 마스터 목록 취득
createMissionTaskModelMaster - 미션 태스크 모델 마스터를 신규 작성
getMissionTaskModelMaster - 미션 태스크 모델 마스터를 취득
updateMissionTaskModelMaster - 미션 태스크 모델 마스터를 갱신
deleteMissionTaskModelMaster - 미션 태스크 모델 마스터를 삭제



---
## 메서드

### 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/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DescribeNamespaces(
    &mission.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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DescribeNamespacesRequest;

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

$session->open();

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

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

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

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

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

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

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

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

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>미션 달성 보상 부여 시 사용되는 분산 트랜잭션 설정입니다. |
| missionCompleteScript | [ScriptSetting](#scriptsetting) |  | |  |  | 미션을 달성했을 때 실행할 스크립트 설정<br>Script 트리거 레퍼런스 - [`missionComplete`](../script/#missioncomplete) |
| counterIncrementScript | [ScriptSetting](#scriptsetting) |  | |  |  | 카운터가 상승했을 때 실행할 스크립트 설정<br>Script 트리거 레퍼런스 - [`counterIncrement`](../script/#counterincrement) |
| receiveRewardsScript | [ScriptSetting](#scriptsetting) |  | |  |  | 보상을 받았을 때 실행할 스크립트 설정<br>Script 트리거 레퍼런스 - [`receiveRewards`](../script/#receiverewards) |
| completeNotification | [NotificationSetting](#notificationsetting) |  | ✓|  |  | 미션 태스크를 달성했을 때의 푸시 통지<br>미션 태스크의 달성 조건이 충족되었을 때 GS2-Gateway를 통해 전달되는 푸시 통지 설정입니다. 게임 클라이언트가 달성 상황을 즉시 UI에 반영할 수 있도록 합니다. |
| logSetting | [LogSetting](#logsetting) |  | |  |  | 로그 출력 설정<br>이 네임스페이스에 대한 API 요청·응답 로그의 출력 대상이 되는 GS2-Log의 네임스페이스를 지정합니다. 카운터 증가, 미션 달성, 보상 수령의 디버깅에 도움이 됩니다. |

#### Result

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

#### 구현 예제




**Go**
```go

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

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

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

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

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

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

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

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

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

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

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

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",
    },
    missionCompleteScript=nil,
    counterIncrementScript=nil,
    receiveRewardsScript=nil,
    completeNotification=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/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.GetNamespaceStatus(
    &mission.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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\GetNamespaceStatusRequest;

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

$session->open();

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

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

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

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

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

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

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


```

**GS2-Script**
```lua

client = gs2('mission')

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

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/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.GetNamespace(
    &mission.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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\GetNamespaceRequest;

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

$session->open();

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

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

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

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

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

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

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


```

**GS2-Script**
```lua

client = gs2('mission')

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

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>미션 달성 보상 부여 시 사용되는 분산 트랜잭션 설정입니다. |
| missionCompleteScript | [ScriptSetting](#scriptsetting) |  | |  |  | 미션을 달성했을 때 실행할 스크립트 설정<br>Script 트리거 레퍼런스 - [`missionComplete`](../script/#missioncomplete) |
| counterIncrementScript | [ScriptSetting](#scriptsetting) |  | |  |  | 카운터가 상승했을 때 실행할 스크립트 설정<br>Script 트리거 레퍼런스 - [`counterIncrement`](../script/#counterincrement) |
| receiveRewardsScript | [ScriptSetting](#scriptsetting) |  | |  |  | 보상을 받았을 때 실행할 스크립트 설정<br>Script 트리거 레퍼런스 - [`receiveRewards`](../script/#receiverewards) |
| completeNotification | [NotificationSetting](#notificationsetting) |  | ✓|  |  | 미션 태스크를 달성했을 때의 푸시 통지<br>미션 태스크의 달성 조건이 충족되었을 때 GS2-Gateway를 통해 전달되는 푸시 통지 설정입니다. 게임 클라이언트가 달성 상황을 즉시 UI에 반영할 수 있도록 합니다. |
| logSetting | [LogSetting](#logsetting) |  | |  |  | 로그 출력 설정<br>이 네임스페이스에 대한 API 요청·응답 로그의 출력 대상이 되는 GS2-Log의 네임스페이스를 지정합니다. 카운터 증가, 미션 달성, 보상 수령의 디버깅에 도움이 됩니다. |

#### Result

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

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.UpdateNamespace(
    &mission.UpdateNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Description: pointy.String("description1"),
        TransactionSetting: &mission.TransactionSetting{
            EnableAutoRun: pointy.Bool(false),
            QueueNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"),
        },
        MissionCompleteScript: &mission.ScriptSetting{
            TriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002"),
            DoneTriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002"),
        },
        CounterIncrementScript: &mission.ScriptSetting{
            TriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002"),
            DoneTriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002"),
        },
        ReceiveRewardsScript: &mission.ScriptSetting{
            TriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002"),
            DoneTriggerScriptId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002"),
        },
        CompleteNotification: nil,
        LogSetting: &mission.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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\UpdateNamespaceRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->updateNamespace(
        (new UpdateNamespaceRequest())
            ->withNamespaceName("namespace-0001")
            ->withDescription("description1")
            ->withTransactionSetting((new \Gs2\Mission\Model\TransactionSetting())
                ->withEnableAutoRun(false)
                ->withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"))
            ->withMissionCompleteScript((new \Gs2\Mission\Model\ScriptSetting())
                ->withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002")
                ->withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002"))
            ->withCounterIncrementScript((new \Gs2\Mission\Model\ScriptSetting())
                ->withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002")
                ->withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002"))
            ->withReceiveRewardsScript((new \Gs2\Mission\Model\ScriptSetting())
                ->withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002")
                ->withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002"))
            ->withCompleteNotification(null)
            ->withLogSetting((new \Gs2\Mission\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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.UpdateNamespaceRequest;
import io.gs2.mission.result.UpdateNamespaceResult;

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

try {
    UpdateNamespaceResult result = client.updateNamespace(
        new UpdateNamespaceRequest()
            .withNamespaceName("namespace-0001")
            .withDescription("description1")
            .withTransactionSetting(new io.gs2.mission.model.TransactionSetting()
                .withEnableAutoRun(false)
                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"))
            .withMissionCompleteScript(new io.gs2.mission.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002"))
            .withCounterIncrementScript(new io.gs2.mission.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002"))
            .withReceiveRewardsScript(new io.gs2.mission.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002"))
            .withCompleteNotification(null)
            .withLogSetting(new io.gs2.mission.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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.UpdateNamespaceResult> asyncResult = null;
yield return client.UpdateNamespace(
    new Gs2.Gs2Mission.Request.UpdateNamespaceRequest()
        .WithNamespaceName("namespace-0001")
        .WithDescription("description1")
        .WithTransactionSetting(new Gs2.Gs2Mission.Model.TransactionSetting()
            .WithEnableAutoRun(false)
            .WithQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"))
        .WithMissionCompleteScript(new Gs2.Gs2Mission.Model.ScriptSetting()
            .WithTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002")
            .WithDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002"))
        .WithCounterIncrementScript(new Gs2.Gs2Mission.Model.ScriptSetting()
            .WithTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002")
            .WithDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002"))
        .WithReceiveRewardsScript(new Gs2.Gs2Mission.Model.ScriptSetting()
            .WithTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002")
            .WithDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002"))
        .WithCompleteNotification(null)
        .WithLogSetting(new Gs2.Gs2Mission.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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.updateNamespace(
        new Gs2Mission.UpdateNamespaceRequest()
            .withNamespaceName("namespace-0001")
            .withDescription("description1")
            .withTransactionSetting(new Gs2Mission.model.TransactionSetting()
                .withEnableAutoRun(false)
                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"))
            .withMissionCompleteScript(new Gs2Mission.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002"))
            .withCounterIncrementScript(new Gs2Mission.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002"))
            .withReceiveRewardsScript(new Gs2Mission.model.ScriptSetting()
                .withTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002")
                .withDoneTriggerScriptId("grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002"))
            .withCompleteNotification(null)
            .withLogSetting(new Gs2Mission.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 mission

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

try:
    result = client.update_namespace(
        mission.UpdateNamespaceRequest()
            .with_namespace_name('namespace-0001')
            .with_description('description1')
            .with_transaction_setting(
                mission.TransactionSetting()
                    .with_enable_auto_run(False)
                    .with_queue_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002'))
            .with_mission_complete_script(
                mission.ScriptSetting()
                    .with_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002')
                    .with_done_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002'))
            .with_counter_increment_script(
                mission.ScriptSetting()
                    .with_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002')
                    .with_done_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002'))
            .with_receive_rewards_script(
                mission.ScriptSetting()
                    .with_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002')
                    .with_done_trigger_script_id('grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002'))
            .with_complete_notification(None)
            .with_log_setting(
                mission.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('mission')

api_result = client.update_namespace({
    namespaceName="namespace-0001",
    description="description1",
    transactionSetting={
        enableAutoRun=false,
        queueNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002",
    },
    missionCompleteScript={
        triggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002",
        doneTriggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002",
    },
    counterIncrementScript={
        triggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002",
        doneTriggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002",
    },
    receiveRewardsScript={
        triggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002",
        doneTriggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002",
    },
    completeNotification=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('mission')

api_result_handler = client.update_namespace_async({
    namespaceName="namespace-0001",
    description="description1",
    transactionSetting={
        enableAutoRun=false,
        queueNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002",
    },
    missionCompleteScript={
        triggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002",
        doneTriggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002",
    },
    counterIncrementScript={
        triggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002",
        doneTriggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002",
    },
    receiveRewardsScript={
        triggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002",
        doneTriggerScriptId="grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script-0002",
    },
    completeNotification=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/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DeleteNamespace(
    &mission.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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DeleteNamespaceRequest;

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

$session->open();

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

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

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

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

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

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

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


```

**GS2-Script**
```lua

client = gs2('mission')

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

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/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.GetServiceVersion(
    &mission.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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\GetServiceVersionRequest;

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

$session->open();

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

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

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

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

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

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

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


```

**GS2-Script**
```lua

client = gs2('mission')

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

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/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DumpUserDataByUserId(
    &mission.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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DumpUserDataByUserIdRequest;

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

$session->open();

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

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

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

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

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

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

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


```

**GS2-Script**
```lua

client = gs2('mission')

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

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/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.CheckDumpUserDataByUserId(
    &mission.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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\CheckDumpUserDataByUserIdRequest;

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

$session->open();

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

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

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

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

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

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

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

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

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/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.CleanUserDataByUserId(
    &mission.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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\CleanUserDataByUserIdRequest;

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

$session->open();

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

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

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

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

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

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

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


```

**GS2-Script**
```lua

client = gs2('mission')

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

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/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.CheckCleanUserDataByUserId(
    &mission.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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\CheckCleanUserDataByUserIdRequest;

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

$session->open();

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

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

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

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

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

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

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


```

**GS2-Script**
```lua

client = gs2('mission')

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

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/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.PrepareImportUserDataByUserId(
    &mission.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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\PrepareImportUserDataByUserIdRequest;

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

$session->open();

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

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

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

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

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

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

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

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

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/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.ImportUserDataByUserId(
    &mission.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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\ImportUserDataByUserIdRequest;

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

$session->open();

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

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

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

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

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

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

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

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

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/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.CheckImportUserDataByUserId(
    &mission.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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\CheckImportUserDataByUserIdRequest;

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

$session->open();

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

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

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

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

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

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

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

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

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;

```



---

### describeCompletes

달성 상황 목록 조회<br>

요청 사용자의 미션 달성 상황을 페이지네이션된 목록으로 조회합니다.<br>
각 달성 상황은 미션 그룹 내에서 어떤 미션 태스크가 달성되었고 어떤 보상을 수령했는지를 추적합니다.


#### Request

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

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| items | [List&lt;Complete&gt;](#complete) | 달성 상황 리스트 |
| nextPageToken | string | 목록의 나머지를 취득하기 위한 페이지 토큰 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DescribeCompletes(
    &mission.DescribeCompletesRequest {
        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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DescribeCompletesRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->describeCompletes(
        (new DescribeCompletesRequest())
            ->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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.DescribeCompletesRequest;
import io.gs2.mission.result.DescribeCompletesResult;

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

try {
    DescribeCompletesResult result = client.describeCompletes(
        new DescribeCompletesRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<Complete> 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.DescribeCompletesResult> asyncResult = null;
yield return client.DescribeCompletes(
    new Gs2.Gs2Mission.Request.DescribeCompletesRequest()
        .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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.describeCompletes(
        new Gs2Mission.DescribeCompletesRequest()
            .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 mission

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

try:
    result = client.describe_completes(
        mission.DescribeCompletesRequest()
            .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('mission')

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

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

```



---

### describeCompletesByUserId

사용자 ID를 지정하여 달성 상황 목록 조회<br>

지정된 사용자의 미션 달성 상황을 페이지네이션된 목록으로 조회합니다.


#### Request

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

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| items | [List&lt;Complete&gt;](#complete) | 달성 상황 리스트 |
| nextPageToken | string | 목록의 나머지를 취득하기 위한 페이지 토큰 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DescribeCompletesByUserId(
    &mission.DescribeCompletesByUserIdRequest {
        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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DescribeCompletesByUserIdRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->describeCompletesByUserId(
        (new DescribeCompletesByUserIdRequest())
            ->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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.DescribeCompletesByUserIdRequest;
import io.gs2.mission.result.DescribeCompletesByUserIdResult;

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

try {
    DescribeCompletesByUserIdResult result = client.describeCompletesByUserId(
        new DescribeCompletesByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<Complete> 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.DescribeCompletesByUserIdResult> asyncResult = null;
yield return client.DescribeCompletesByUserId(
    new Gs2.Gs2Mission.Request.DescribeCompletesByUserIdRequest()
        .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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.describeCompletesByUserId(
        new Gs2Mission.DescribeCompletesByUserIdRequest()
            .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 mission

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

try:
    result = client.describe_completes_by_user_id(
        mission.DescribeCompletesByUserIdRequest()
            .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('mission')

api_result = client.describe_completes_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('mission')

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

```



---

### complete

미션 달성 보상을 수령하기 위한 트랜잭션 발행<br>

지정된 미션 태스크가 달성 완료 상태인지 확인하고, 설정된 보상 입수 액션을 포함하는 트랜잭션을 발행합니다.<br>
태스크는 달성 완료(카운터 조건을 충족) 상태이며 아직 미수령 상태여야 합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| missionGroupName | string |  | ✓|  |  ~ 128자 | 미션 그룹명<br>이 달성 상황 레코드가 속한 미션 그룹의 이름입니다. 사용자별·미션 그룹별로 하나의 달성 상황 레코드가 존재합니다. |
| missionTaskName | string |  | ✓|  |  ~ 128자 | 태스크 이름<br>태스크 고유의 이름입니다. 영숫자와 -(하이픈), _(언더스코어), .(마침표)를 사용하여 지정합니다. |
| accessToken | string |  | ✓|  |  ~ 128자 | 액세스 토큰 |
| config | [List&lt;Config&gt;](#config) |  | | [] | 0 ~ 32 items | 트랜잭션 변수에 적용할 설정값 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| 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/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.Complete(
    &mission.CompleteRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-0001"),
        MissionTaskName: pointy.String("mission-task-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Config: nil,
    }
)
if err != nil {
    panic("error occurred")
}
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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\CompleteRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->complete(
        (new CompleteRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-0001")
            ->withMissionTaskName("mission-task-0001")
            ->withAccessToken("accessToken-0001")
            ->withConfig(null)
    );
    $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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.CompleteRequest;
import io.gs2.mission.result.CompleteResult;

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

try {
    CompleteResult result = client.complete(
        new CompleteRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withMissionTaskName("mission-task-0001")
            .withAccessToken("accessToken-0001")
            .withConfig(null)
    );
    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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.CompleteResult> asyncResult = null;
yield return client.Complete(
    new Gs2.Gs2Mission.Request.CompleteRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-0001")
        .WithMissionTaskName("mission-task-0001")
        .WithAccessToken("accessToken-0001")
        .WithConfig(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.complete(
        new Gs2Mission.CompleteRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withMissionTaskName("mission-task-0001")
            .withAccessToken("accessToken-0001")
            .withConfig(null)
    );
    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 mission

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

try:
    result = client.complete(
        mission.CompleteRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
            .with_mission_task_name('mission-task-0001')
            .with_access_token('accessToken-0001')
            .with_config(None)
    )
    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('mission')

api_result = client.complete({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    missionTaskName="mission-task-0001",
    accessToken="accessToken-0001",
    config=nil,
})

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

result = api_result.result
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('mission')

api_result_handler = client.complete_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    missionTaskName="mission-task-0001",
    accessToken="accessToken-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
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

```



---

### completeByUserId

사용자 ID를 지정하여 미션 달성 보상을 수령하기 위한 트랜잭션 발행<br>

지정된 미션 태스크가 달성 완료 상태인지 확인하고, 설정된 보상 입수 액션을 포함하는 트랜잭션을 발행합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| missionGroupName | string |  | ✓|  |  ~ 128자 | 미션 그룹명<br>이 달성 상황 레코드가 속한 미션 그룹의 이름입니다. 사용자별·미션 그룹별로 하나의 달성 상황 레코드가 존재합니다. |
| missionTaskName | string |  | ✓|  |  ~ 128자 | 태스크 이름<br>태스크 고유의 이름입니다. 영숫자와 -(하이픈), _(언더스코어), .(마침표)를 사용하여 지정합니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| config | [List&lt;Config&gt;](#config) |  | | [] | 0 ~ 32 items | 트랜잭션 변수에 적용할 설정값 |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| 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/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.CompleteByUserId(
    &mission.CompleteByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-0001"),
        MissionTaskName: pointy.String("mission-task-0001"),
        UserId: pointy.String("user-0001"),
        Config: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\CompleteByUserIdRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->completeByUserId(
        (new CompleteByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-0001")
            ->withMissionTaskName("mission-task-0001")
            ->withUserId("user-0001")
            ->withConfig(null)
            ->withTimeOffsetToken(null)
    );
    $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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.CompleteByUserIdRequest;
import io.gs2.mission.result.CompleteByUserIdResult;

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

try {
    CompleteByUserIdResult result = client.completeByUserId(
        new CompleteByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withMissionTaskName("mission-task-0001")
            .withUserId("user-0001")
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.CompleteByUserIdResult> asyncResult = null;
yield return client.CompleteByUserId(
    new Gs2.Gs2Mission.Request.CompleteByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-0001")
        .WithMissionTaskName("mission-task-0001")
        .WithUserId("user-0001")
        .WithConfig(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.completeByUserId(
        new Gs2Mission.CompleteByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withMissionTaskName("mission-task-0001")
            .withUserId("user-0001")
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    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 mission

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

try:
    result = client.complete_by_user_id(
        mission.CompleteByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
            .with_mission_task_name('mission-task-0001')
            .with_user_id('user-0001')
            .with_config(None)
            .with_time_offset_token(None)
    )
    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('mission')

api_result = client.complete_by_user_id({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    missionTaskName="mission-task-0001",
    userId="user-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
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('mission')

api_result_handler = client.complete_by_user_id_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    missionTaskName="mission-task-0001",
    userId="user-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
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

```



---

### batchComplete

미션 달성 보상을 일괄로 수령하기 위한 트랜잭션 발행<br>

동일한 미션 그룹 내 여러 미션 태스크의 달성 처리를 일괄로 수행하고, 모든 보상을 포함하는 트랜잭션을 발행합니다.<br>
각 태스크는 달성 완료 상태이며 아직 미수령 상태여야 합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| missionGroupName | string |  | ✓|  |  ~ 128자 | 미션 그룹명<br>이 달성 상황 레코드가 속한 미션 그룹의 이름입니다. 사용자별·미션 그룹별로 하나의 달성 상황 레코드가 존재합니다. |
| accessToken | string |  | ✓|  |  ~ 128자 | 액세스 토큰 |
| missionTaskNames | List&lt;string&gt; |  | ✓|  | 1 ~ 100 items | 태스크 이름 리스트 |
| config | [List&lt;Config&gt;](#config) |  | | [] | 0 ~ 32 items | 트랜잭션 변수에 적용할 설정값 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| 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/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.BatchComplete(
    &mission.BatchCompleteRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MissionTaskNames: []*string{
            pointy.String("mission-task-0001"),
            pointy.String("mission-task-0002"),
        },
        Config: nil,
    }
)
if err != nil {
    panic("error occurred")
}
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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\BatchCompleteRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->batchComplete(
        (new BatchCompleteRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-0001")
            ->withAccessToken("accessToken-0001")
            ->withMissionTaskNames([
                "mission-task-0001",
                "mission-task-0002",
            ])
            ->withConfig(null)
    );
    $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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.BatchCompleteRequest;
import io.gs2.mission.result.BatchCompleteResult;

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

try {
    BatchCompleteResult result = client.batchComplete(
        new BatchCompleteRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withAccessToken("accessToken-0001")
            .withMissionTaskNames(Arrays.asList(
                "mission-task-0001",
                "mission-task-0002"
            ))
            .withConfig(null)
    );
    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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.BatchCompleteResult> asyncResult = null;
yield return client.BatchComplete(
    new Gs2.Gs2Mission.Request.BatchCompleteRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-0001")
        .WithAccessToken("accessToken-0001")
        .WithMissionTaskNames(new string[] {
            "mission-task-0001",
            "mission-task-0002",
        })
        .WithConfig(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.batchComplete(
        new Gs2Mission.BatchCompleteRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withAccessToken("accessToken-0001")
            .withMissionTaskNames([
                "mission-task-0001",
                "mission-task-0002",
            ])
            .withConfig(null)
    );
    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 mission

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

try:
    result = client.batch_complete(
        mission.BatchCompleteRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
            .with_access_token('accessToken-0001')
            .with_mission_task_names([
                'mission-task-0001',
                'mission-task-0002',
            ])
            .with_config(None)
    )
    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('mission')

api_result = client.batch_complete({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    accessToken="accessToken-0001",
    missionTaskNames={
        "mission-task-0001",
        "mission-task-0002"
    },
    config=nil,
})

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

result = api_result.result
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('mission')

api_result_handler = client.batch_complete_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    accessToken="accessToken-0001",
    missionTaskNames={
        "mission-task-0001",
        "mission-task-0002"
    },
    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
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

```



---

### batchCompleteByUserId

사용자 ID를 지정하여 미션 달성 보상을 일괄로 수령하기 위한 트랜잭션 발행<br>

동일한 미션 그룹 내 여러 미션 태스크의 달성 처리를 일괄로 수행합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| missionGroupName | string |  | ✓|  |  ~ 128자 | 미션 그룹명<br>이 달성 상황 레코드가 속한 미션 그룹의 이름입니다. 사용자별·미션 그룹별로 하나의 달성 상황 레코드가 존재합니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| missionTaskNames | List&lt;string&gt; |  | ✓|  | 1 ~ 100 items | 태스크 이름 리스트 |
| config | [List&lt;Config&gt;](#config) |  | | [] | 0 ~ 32 items | 트랜잭션 변수에 적용할 설정값 |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| 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/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.BatchCompleteByUserId(
    &mission.BatchCompleteByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-0001"),
        UserId: pointy.String("user-0001"),
        MissionTaskNames: []*string{
            pointy.String("mission-task-0001"),
            pointy.String("mission-task-0002"),
        },
        Config: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\BatchCompleteByUserIdRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->batchCompleteByUserId(
        (new BatchCompleteByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-0001")
            ->withUserId("user-0001")
            ->withMissionTaskNames([
                "mission-task-0001",
                "mission-task-0002",
            ])
            ->withConfig(null)
            ->withTimeOffsetToken(null)
    );
    $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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.BatchCompleteByUserIdRequest;
import io.gs2.mission.result.BatchCompleteByUserIdResult;

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

try {
    BatchCompleteByUserIdResult result = client.batchCompleteByUserId(
        new BatchCompleteByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withUserId("user-0001")
            .withMissionTaskNames(Arrays.asList(
                "mission-task-0001",
                "mission-task-0002"
            ))
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.BatchCompleteByUserIdResult> asyncResult = null;
yield return client.BatchCompleteByUserId(
    new Gs2.Gs2Mission.Request.BatchCompleteByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-0001")
        .WithUserId("user-0001")
        .WithMissionTaskNames(new string[] {
            "mission-task-0001",
            "mission-task-0002",
        })
        .WithConfig(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.batchCompleteByUserId(
        new Gs2Mission.BatchCompleteByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withUserId("user-0001")
            .withMissionTaskNames([
                "mission-task-0001",
                "mission-task-0002",
            ])
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    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 mission

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

try:
    result = client.batch_complete_by_user_id(
        mission.BatchCompleteByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
            .with_user_id('user-0001')
            .with_mission_task_names([
                'mission-task-0001',
                'mission-task-0002',
            ])
            .with_config(None)
            .with_time_offset_token(None)
    )
    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('mission')

api_result = client.batch_complete_by_user_id({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    userId="user-0001",
    missionTaskNames={
        "mission-task-0001",
        "mission-task-0002"
    },
    config=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
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('mission')

api_result_handler = client.batch_complete_by_user_id_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    userId="user-0001",
    missionTaskNames={
        "mission-task-0001",
        "mission-task-0002"
    },
    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
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

```



---

### receiveByUserId

미션 달성 보상 수령<br>

지정된 사용자의 지정 미션 태스크를 수령 완료 상태로 표시합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| missionGroupName | string |  | ✓|  |  ~ 128자 | 미션 그룹명<br>이 달성 상황 레코드가 속한 미션 그룹의 이름입니다. 사용자별·미션 그룹별로 하나의 달성 상황 레코드가 존재합니다. |
| missionTaskName | string |  | ✓|  |  ~ 128자 | 태스크 이름 |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Complete](#complete) | 수령한 달성 상황 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.ReceiveByUserId(
    &mission.ReceiveByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-0001"),
        MissionTaskName: pointy.String("mission-task-0001"),
        UserId: pointy.String("user-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\ReceiveByUserIdRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->receiveByUserId(
        (new ReceiveByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-0001")
            ->withMissionTaskName("mission-task-0001")
            ->withUserId("user-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.ReceiveByUserIdRequest;
import io.gs2.mission.result.ReceiveByUserIdResult;

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

try {
    ReceiveByUserIdResult result = client.receiveByUserId(
        new ReceiveByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withMissionTaskName("mission-task-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    Complete 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.ReceiveByUserIdResult> asyncResult = null;
yield return client.ReceiveByUserId(
    new Gs2.Gs2Mission.Request.ReceiveByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-0001")
        .WithMissionTaskName("mission-task-0001")
        .WithUserId("user-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.receiveByUserId(
        new Gs2Mission.ReceiveByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withMissionTaskName("mission-task-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.receive_by_user_id(
        mission.ReceiveByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
            .with_mission_task_name('mission-task-0001')
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.receive_by_user_id({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    missionTaskName="mission-task-0001",
    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
item = result.item;

```

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

client = gs2('mission')

api_result_handler = client.receive_by_user_id_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    missionTaskName="mission-task-0001",
    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
item = result.item;

```



---

### batchReceiveByUserId

여러 미션 태스크의 달성 보상을 일괄로 수령 상태로 변경<br>

동일한 미션 그룹 내 여러 미션 태스크를 일괄로 수령 완료 상태로 표시합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| missionGroupName | string |  | ✓|  |  ~ 128자 | 미션 그룹명<br>이 달성 상황 레코드가 속한 미션 그룹의 이름입니다. 사용자별·미션 그룹별로 하나의 달성 상황 레코드가 존재합니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| missionTaskNames | List&lt;string&gt; |  | ✓|  | 1 ~ 100 items | 태스크 이름 리스트 |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Complete](#complete) | 수령한 달성 상황 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.BatchReceiveByUserId(
    &mission.BatchReceiveByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-0001"),
        UserId: pointy.String("user-0001"),
        MissionTaskNames: []*string{
            pointy.String("mission-task-0001"),
            pointy.String("mission-task-0002"),
        },
        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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\BatchReceiveByUserIdRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->batchReceiveByUserId(
        (new BatchReceiveByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-0001")
            ->withUserId("user-0001")
            ->withMissionTaskNames([
                "mission-task-0001",
                "mission-task-0002",
            ])
            ->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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.BatchReceiveByUserIdRequest;
import io.gs2.mission.result.BatchReceiveByUserIdResult;

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

try {
    BatchReceiveByUserIdResult result = client.batchReceiveByUserId(
        new BatchReceiveByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withUserId("user-0001")
            .withMissionTaskNames(Arrays.asList(
                "mission-task-0001",
                "mission-task-0002"
            ))
            .withTimeOffsetToken(null)
    );
    Complete 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.BatchReceiveByUserIdResult> asyncResult = null;
yield return client.BatchReceiveByUserId(
    new Gs2.Gs2Mission.Request.BatchReceiveByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-0001")
        .WithUserId("user-0001")
        .WithMissionTaskNames(new string[] {
            "mission-task-0001",
            "mission-task-0002",
        })
        .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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.batchReceiveByUserId(
        new Gs2Mission.BatchReceiveByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withUserId("user-0001")
            .withMissionTaskNames([
                "mission-task-0001",
                "mission-task-0002",
            ])
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.batch_receive_by_user_id(
        mission.BatchReceiveByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
            .with_user_id('user-0001')
            .with_mission_task_names([
                'mission-task-0001',
                'mission-task-0002',
            ])
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.batch_receive_by_user_id({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    userId="user-0001",
    missionTaskNames={
        "mission-task-0001",
        "mission-task-0002"
    },
    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('mission')

api_result_handler = client.batch_receive_by_user_id_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    userId="user-0001",
    missionTaskNames={
        "mission-task-0001",
        "mission-task-0002"
    },
    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;

```



---

### revertReceiveByUserId

미션 달성 보상을 미수령 상태로 되돌리기<br>

미션 태스크의 수령 상태를 미수령으로 되돌립니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| missionGroupName | string |  | ✓|  |  ~ 128자 | 미션 그룹명<br>이 달성 상황 레코드가 속한 미션 그룹의 이름입니다. 사용자별·미션 그룹별로 하나의 달성 상황 레코드가 존재합니다. |
| missionTaskName | string |  | ✓|  |  ~ 128자 | 태스크 이름 |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Complete](#complete) | 수령한 달성 상황 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.RevertReceiveByUserId(
    &mission.RevertReceiveByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-0001"),
        MissionTaskName: pointy.String("mission-task-0001"),
        UserId: pointy.String("user-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\RevertReceiveByUserIdRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->revertReceiveByUserId(
        (new RevertReceiveByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-0001")
            ->withMissionTaskName("mission-task-0001")
            ->withUserId("user-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.RevertReceiveByUserIdRequest;
import io.gs2.mission.result.RevertReceiveByUserIdResult;

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

try {
    RevertReceiveByUserIdResult result = client.revertReceiveByUserId(
        new RevertReceiveByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withMissionTaskName("mission-task-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    Complete 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.RevertReceiveByUserIdResult> asyncResult = null;
yield return client.RevertReceiveByUserId(
    new Gs2.Gs2Mission.Request.RevertReceiveByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-0001")
        .WithMissionTaskName("mission-task-0001")
        .WithUserId("user-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.revertReceiveByUserId(
        new Gs2Mission.RevertReceiveByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withMissionTaskName("mission-task-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.revert_receive_by_user_id(
        mission.RevertReceiveByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
            .with_mission_task_name('mission-task-0001')
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.revert_receive_by_user_id({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    missionTaskName="mission-task-0001",
    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
item = result.item;

```

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

client = gs2('mission')

api_result_handler = client.revert_receive_by_user_id_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    missionTaskName="mission-task-0001",
    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
item = result.item;

```



---

### getComplete

달성 상황 조회<br>

요청 사용자의 지정된 미션 그룹의 달성 상황을 조회합니다.<br>
달성 완료된 미션 태스크와 수령 완료된 미션 태스크의 목록이 포함됩니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| missionGroupName | string |  | ✓|  |  ~ 128자 | 미션 그룹명<br>이 달성 상황 레코드가 속한 미션 그룹의 이름입니다. 사용자별·미션 그룹별로 하나의 달성 상황 레코드가 존재합니다. |
| accessToken | string |  | ✓|  |  ~ 128자 | 액세스 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Complete](#complete) | 달성 상황 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.GetComplete(
    &mission.GetCompleteRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-0001"),
        AccessToken: pointy.String("accessToken-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\GetCompleteRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->getComplete(
        (new GetCompleteRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-0001")
            ->withAccessToken("accessToken-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.GetCompleteRequest;
import io.gs2.mission.result.GetCompleteResult;

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

try {
    GetCompleteResult result = client.getComplete(
        new GetCompleteRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withAccessToken("accessToken-0001")
    );
    Complete 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.GetCompleteResult> asyncResult = null;
yield return client.GetComplete(
    new Gs2.Gs2Mission.Request.GetCompleteRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-0001")
        .WithAccessToken("accessToken-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.getComplete(
        new Gs2Mission.GetCompleteRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withAccessToken("accessToken-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.get_complete(
        mission.GetCompleteRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
            .with_access_token('accessToken-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.get_complete({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    accessToken="accessToken-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('mission')

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

```



---

### getCompleteByUserId

사용자 ID를 지정하여 달성 상황 조회<br>

지정된 사용자의 지정된 미션 그룹의 달성 상황을 조회합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| missionGroupName | string |  | ✓|  |  ~ 128자 | 미션 그룹명<br>이 달성 상황 레코드가 속한 미션 그룹의 이름입니다. 사용자별·미션 그룹별로 하나의 달성 상황 레코드가 존재합니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Complete](#complete) | 달성 상황 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.GetCompleteByUserId(
    &mission.GetCompleteByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-0001"),
        UserId: pointy.String("user-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\GetCompleteByUserIdRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->getCompleteByUserId(
        (new GetCompleteByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-0001")
            ->withUserId("user-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.GetCompleteByUserIdRequest;
import io.gs2.mission.result.GetCompleteByUserIdResult;

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

try {
    GetCompleteByUserIdResult result = client.getCompleteByUserId(
        new GetCompleteByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    Complete 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.GetCompleteByUserIdResult> asyncResult = null;
yield return client.GetCompleteByUserId(
    new Gs2.Gs2Mission.Request.GetCompleteByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-0001")
        .WithUserId("user-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.getCompleteByUserId(
        new Gs2Mission.GetCompleteByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.get_complete_by_user_id(
        mission.GetCompleteByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.get_complete_by_user_id({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    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
item = result.item;

```

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

client = gs2('mission')

api_result_handler = client.get_complete_by_user_id_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    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
item = result.item;

```



---

### evaluateComplete

달성 상황 재평가<br>

지정된 미션 그룹 내 모든 카운터 값을 미션 태스크 조건과 대조하여 재평가합니다.<br>
카운터가 이미 가산된 후에 미션 태스크가 추가·변경된 경우, 새롭게 달성된 태스크를 판정하기 위해 사용합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| accessToken | string |  | ✓|  |  ~ 128자 | 액세스 토큰 |
| missionGroupName | string |  | ✓|  |  ~ 128자 | 미션 그룹명<br>이 달성 상황 레코드가 속한 미션 그룹의 이름입니다. 사용자별·미션 그룹별로 하나의 달성 상황 레코드가 존재합니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Complete](#complete) | 재평가 후의 달성 상황 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.EvaluateComplete(
    &mission.EvaluateCompleteRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MissionGroupName: pointy.String("mission-group-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\EvaluateCompleteRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->evaluateComplete(
        (new EvaluateCompleteRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withMissionGroupName("mission-group-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.EvaluateCompleteRequest;
import io.gs2.mission.result.EvaluateCompleteResult;

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

try {
    EvaluateCompleteResult result = client.evaluateComplete(
        new EvaluateCompleteRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMissionGroupName("mission-group-0001")
    );
    Complete 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.EvaluateCompleteResult> asyncResult = null;
yield return client.EvaluateComplete(
    new Gs2.Gs2Mission.Request.EvaluateCompleteRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithMissionGroupName("mission-group-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.evaluateComplete(
        new Gs2Mission.EvaluateCompleteRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMissionGroupName("mission-group-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.evaluate_complete(
        mission.EvaluateCompleteRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_mission_group_name('mission-group-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.evaluate_complete({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    missionGroupName="mission-group-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('mission')

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

```



---

### evaluateCompleteByUserId

사용자 ID를 지정하여 달성 상황 재평가<br>

지정된 미션 그룹 내 모든 카운터 값을 미션 태스크 조건과 대조하여 재평가합니다.<br>
카운터가 이미 가산된 후에 미션 태스크가 추가·변경된 경우에 사용합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| missionGroupName | string |  | ✓|  |  ~ 128자 | 미션 그룹명<br>이 달성 상황 레코드가 속한 미션 그룹의 이름입니다. 사용자별·미션 그룹별로 하나의 달성 상황 레코드가 존재합니다. |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Complete](#complete) | 재평가 후의 달성 상황 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.EvaluateCompleteByUserId(
    &mission.EvaluateCompleteByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MissionGroupName: pointy.String("mission-group-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\EvaluateCompleteByUserIdRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->evaluateCompleteByUserId(
        (new EvaluateCompleteByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMissionGroupName("mission-group-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.EvaluateCompleteByUserIdRequest;
import io.gs2.mission.result.EvaluateCompleteByUserIdResult;

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

try {
    EvaluateCompleteByUserIdResult result = client.evaluateCompleteByUserId(
        new EvaluateCompleteByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMissionGroupName("mission-group-0001")
            .withTimeOffsetToken(null)
    );
    Complete 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.EvaluateCompleteByUserIdResult> asyncResult = null;
yield return client.EvaluateCompleteByUserId(
    new Gs2.Gs2Mission.Request.EvaluateCompleteByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithMissionGroupName("mission-group-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.evaluateCompleteByUserId(
        new Gs2Mission.EvaluateCompleteByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMissionGroupName("mission-group-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.evaluate_complete_by_user_id(
        mission.EvaluateCompleteByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_mission_group_name('mission-group-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.evaluate_complete_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    missionGroupName="mission-group-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('mission')

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

```



---

### deleteCompleteByUserId

달성 상황 삭제<br>

지정된 미션 그룹과 사용자의 모든 달성 상황 레코드를 삭제합니다.<br>
달성 완료와 수령 완료 상태가 모두 삭제되며, 해당 미션 그룹에 대한 사용자 진행도가 리셋됩니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| missionGroupName | string |  | ✓|  |  ~ 128자 | 미션 그룹명<br>이 달성 상황 레코드가 속한 미션 그룹의 이름입니다. 사용자별·미션 그룹별로 하나의 달성 상황 레코드가 존재합니다. |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Complete](#complete) | 삭제한 달성 상황 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DeleteCompleteByUserId(
    &mission.DeleteCompleteByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MissionGroupName: pointy.String("mission-group-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DeleteCompleteByUserIdRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->deleteCompleteByUserId(
        (new DeleteCompleteByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMissionGroupName("mission-group-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.DeleteCompleteByUserIdRequest;
import io.gs2.mission.result.DeleteCompleteByUserIdResult;

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

try {
    DeleteCompleteByUserIdResult result = client.deleteCompleteByUserId(
        new DeleteCompleteByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMissionGroupName("mission-group-0001")
            .withTimeOffsetToken(null)
    );
    Complete 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.DeleteCompleteByUserIdResult> asyncResult = null;
yield return client.DeleteCompleteByUserId(
    new Gs2.Gs2Mission.Request.DeleteCompleteByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithMissionGroupName("mission-group-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.deleteCompleteByUserId(
        new Gs2Mission.DeleteCompleteByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMissionGroupName("mission-group-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.delete_complete_by_user_id(
        mission.DeleteCompleteByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_mission_group_name('mission-group-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.delete_complete_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    missionGroupName="mission-group-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('mission')

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

```



---

### verifyComplete

미션 달성 상황 검증<br>

미션 태스크의 달성 상황 또는 수령 상황을 검증합니다.<br>
지원되는 검증 타입: 'completed'(달성 완료), 'notCompleted'(미달성), 'received'(수령 완료), 'notReceived'(미수령), 'completedAndNotReceived'(달성 완료이면서 미수령).


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| missionGroupName | string |  | ✓|  |  ~ 128자 | 미션 그룹명<br>이 달성 상황 레코드가 속한 미션 그룹의 이름입니다. 사용자별·미션 그룹별로 하나의 달성 상황 레코드가 존재합니다. |
| accessToken | string |  | ✓|  |  ~ 128자 | 액세스 토큰 |
| verifyType | 문자열 열거형<br>enum {<br>"completed",<br>"notCompleted",<br>"received",<br>"notReceived",<br>"completedAndNotReceived"<br>}<br> |  | ✓|  |  | 검증 종류completed: 조건이 달성 완료 상태임 / notCompleted: 조건이 미달성 상태임 / received: 보상이 수령 완료 상태임 / notReceived: 보상이 미수령 상태임 / completedAndNotReceived: 조건이 달성 완료 상태이고 보상이 미수령 상태임 /  |
| missionTaskName | string |  | ✓|  |  ~ 128자 | 미션 태스크 모델 이름<br>미션 태스크 모델 고유의 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| multiplyValueSpecifyingQuantity | bool |  | | false |  | 수량을 지정했을 때, 검증에 사용하는 값도 곱할지 여부 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Complete](#complete) | 삭제한 달성 상황 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.VerifyComplete(
    &mission.VerifyCompleteRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        VerifyType: pointy.String("completed"),
        MissionTaskName: pointy.String("task-0001"),
        MultiplyValueSpecifyingQuantity: 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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\VerifyCompleteRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->verifyComplete(
        (new VerifyCompleteRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-0001")
            ->withAccessToken("accessToken-0001")
            ->withVerifyType("completed")
            ->withMissionTaskName("task-0001")
            ->withMultiplyValueSpecifyingQuantity(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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.VerifyCompleteRequest;
import io.gs2.mission.result.VerifyCompleteResult;

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

try {
    VerifyCompleteResult result = client.verifyComplete(
        new VerifyCompleteRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withAccessToken("accessToken-0001")
            .withVerifyType("completed")
            .withMissionTaskName("task-0001")
            .withMultiplyValueSpecifyingQuantity(null)
    );
    Complete 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.VerifyCompleteResult> asyncResult = null;
yield return client.VerifyComplete(
    new Gs2.Gs2Mission.Request.VerifyCompleteRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-0001")
        .WithAccessToken("accessToken-0001")
        .WithVerifyType("completed")
        .WithMissionTaskName("task-0001")
        .WithMultiplyValueSpecifyingQuantity(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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.verifyComplete(
        new Gs2Mission.VerifyCompleteRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withAccessToken("accessToken-0001")
            .withVerifyType("completed")
            .withMissionTaskName("task-0001")
            .withMultiplyValueSpecifyingQuantity(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.verify_complete(
        mission.VerifyCompleteRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
            .with_access_token('accessToken-0001')
            .with_verify_type('completed')
            .with_mission_task_name('task-0001')
            .with_multiply_value_specifying_quantity(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.verify_complete({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    accessToken="accessToken-0001",
    verifyType="completed",
    missionTaskName="task-0001",
    multiplyValueSpecifyingQuantity=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('mission')

api_result_handler = client.verify_complete_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    accessToken="accessToken-0001",
    verifyType="completed",
    missionTaskName="task-0001",
    multiplyValueSpecifyingQuantity=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;

```



---

### verifyCompleteByUserId

사용자 ID를 지정하여 미션 달성 상황 검증<br>

지정된 사용자의 미션 태스크의 달성 상황 또는 수령 상황을 검증합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| missionGroupName | string |  | ✓|  |  ~ 128자 | 미션 그룹명<br>이 달성 상황 레코드가 속한 미션 그룹의 이름입니다. 사용자별·미션 그룹별로 하나의 달성 상황 레코드가 존재합니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| verifyType | 문자열 열거형<br>enum {<br>"completed",<br>"notCompleted",<br>"received",<br>"notReceived",<br>"completedAndNotReceived"<br>}<br> |  | ✓|  |  | 검증 종류completed: 조건이 달성 완료 상태임 / notCompleted: 조건이 미달성 상태임 / received: 보상이 수령 완료 상태임 / notReceived: 보상이 미수령 상태임 / completedAndNotReceived: 조건이 달성 완료 상태이고 보상이 미수령 상태임 /  |
| missionTaskName | string |  | ✓|  |  ~ 128자 | 미션 태스크 모델 이름<br>미션 태스크 모델 고유의 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| multiplyValueSpecifyingQuantity | bool |  | | false |  | 수량을 지정했을 때, 검증에 사용하는 값도 곱할지 여부 |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Complete](#complete) | 삭제한 달성 상황 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.VerifyCompleteByUserId(
    &mission.VerifyCompleteByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-0001"),
        UserId: pointy.String("user-0001"),
        VerifyType: pointy.String("completed"),
        MissionTaskName: pointy.String("task-0001"),
        MultiplyValueSpecifyingQuantity: nil,
        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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\VerifyCompleteByUserIdRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->verifyCompleteByUserId(
        (new VerifyCompleteByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-0001")
            ->withUserId("user-0001")
            ->withVerifyType("completed")
            ->withMissionTaskName("task-0001")
            ->withMultiplyValueSpecifyingQuantity(null)
            ->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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.VerifyCompleteByUserIdRequest;
import io.gs2.mission.result.VerifyCompleteByUserIdResult;

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

try {
    VerifyCompleteByUserIdResult result = client.verifyCompleteByUserId(
        new VerifyCompleteByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withUserId("user-0001")
            .withVerifyType("completed")
            .withMissionTaskName("task-0001")
            .withMultiplyValueSpecifyingQuantity(null)
            .withTimeOffsetToken(null)
    );
    Complete 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.VerifyCompleteByUserIdResult> asyncResult = null;
yield return client.VerifyCompleteByUserId(
    new Gs2.Gs2Mission.Request.VerifyCompleteByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-0001")
        .WithUserId("user-0001")
        .WithVerifyType("completed")
        .WithMissionTaskName("task-0001")
        .WithMultiplyValueSpecifyingQuantity(null)
        .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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.verifyCompleteByUserId(
        new Gs2Mission.VerifyCompleteByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withUserId("user-0001")
            .withVerifyType("completed")
            .withMissionTaskName("task-0001")
            .withMultiplyValueSpecifyingQuantity(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.verify_complete_by_user_id(
        mission.VerifyCompleteByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
            .with_user_id('user-0001')
            .with_verify_type('completed')
            .with_mission_task_name('task-0001')
            .with_multiply_value_specifying_quantity(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.verify_complete_by_user_id({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    userId="user-0001",
    verifyType="completed",
    missionTaskName="task-0001",
    multiplyValueSpecifyingQuantity=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;

```

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

client = gs2('mission')

api_result_handler = client.verify_complete_by_user_id_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    userId="user-0001",
    verifyType="completed",
    missionTaskName="task-0001",
    multiplyValueSpecifyingQuantity=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;

```



---

### describeCounters

카운터 목록 취득<br>

요청 사용자의 카운터의 페이지네이션 리스트를 취득합니다.<br>
각 카운터는 미션 태스크 조건에 대한 진행 상황을 추적하는 스코프 값을 포함하며, 리셋 기간(일간·주간·월간 등)별로 값이 관리됩니다.


#### Request

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

#### Result

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

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DescribeCounters(
    &mission.DescribeCountersRequest {
        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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DescribeCountersRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->describeCounters(
        (new DescribeCountersRequest())
            ->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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.DescribeCountersRequest;
import io.gs2.mission.result.DescribeCountersResult;

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

try {
    DescribeCountersResult result = client.describeCounters(
        new DescribeCountersRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<Counter> 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.DescribeCountersResult> asyncResult = null;
yield return client.DescribeCounters(
    new Gs2.Gs2Mission.Request.DescribeCountersRequest()
        .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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.describeCounters(
        new Gs2Mission.DescribeCountersRequest()
            .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 mission

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

try:
    result = client.describe_counters(
        mission.DescribeCountersRequest()
            .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('mission')

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

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

```



---

### describeCountersByUserId

사용자 ID를 지정하여 카운터 목록 취득<br>

지정된 사용자의 카운터의 페이지네이션 리스트를 취득합니다.


#### Request

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

#### Result

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

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DescribeCountersByUserId(
    &mission.DescribeCountersByUserIdRequest {
        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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DescribeCountersByUserIdRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->describeCountersByUserId(
        (new DescribeCountersByUserIdRequest())
            ->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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.DescribeCountersByUserIdRequest;
import io.gs2.mission.result.DescribeCountersByUserIdResult;

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

try {
    DescribeCountersByUserIdResult result = client.describeCountersByUserId(
        new DescribeCountersByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<Counter> 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.DescribeCountersByUserIdResult> asyncResult = null;
yield return client.DescribeCountersByUserId(
    new Gs2.Gs2Mission.Request.DescribeCountersByUserIdRequest()
        .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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.describeCountersByUserId(
        new Gs2Mission.DescribeCountersByUserIdRequest()
            .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 mission

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

try:
    result = client.describe_counters_by_user_id(
        mission.DescribeCountersByUserIdRequest()
            .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('mission')

api_result = client.describe_counters_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('mission')

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

```



---

### increaseCounterByUserId

사용자 ID를 지정하여 카운터를 가산<br>

지정된 사용자의 카운터에 지정한 값을 가산합니다.<br>
가산 후, 이 카운터를 참조하는 모든 미션 태스크가 자동으로 재평가되며, 새롭게 달성된 미션은 changedCompletes 응답에서 반환됩니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| counterName | string |  | ✓|  |  ~ 128자 | 카운터 모델 이름<br>이 카운터 인스턴스의 기반이 되는 카운터 모델의 이름입니다. 스코프와 리셋 타이밍을 정의하는 카운터 모델 정의에 연결됩니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| value | long |  | ✓|  | 1 ~ 9223372036854775805 | 가산할 값 |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Counter](#counter) | 가산된 카운터 |
| changedCompletes | [List&lt;Complete&gt;](#complete) | 갱신된 달성 상황 리스트 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.IncreaseCounterByUserId(
    &mission.IncreaseCounterByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CounterName: pointy.String("quest_complete"),
        UserId: pointy.String("user-0001"),
        Value: pointy.Int64(1),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
changedCompletes := result.ChangedCompletes

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\IncreaseCounterByUserIdRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->increaseCounterByUserId(
        (new IncreaseCounterByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withCounterName("quest_complete")
            ->withUserId("user-0001")
            ->withValue(1)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $changedCompletes = $result->getChangedCompletes();
} 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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.IncreaseCounterByUserIdRequest;
import io.gs2.mission.result.IncreaseCounterByUserIdResult;

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

try {
    IncreaseCounterByUserIdResult result = client.increaseCounterByUserId(
        new IncreaseCounterByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("quest_complete")
            .withUserId("user-0001")
            .withValue(1L)
            .withTimeOffsetToken(null)
    );
    Counter item = result.getItem();
    List<Complete> changedCompletes = result.getChangedCompletes();
} 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.IncreaseCounterByUserIdResult> asyncResult = null;
yield return client.IncreaseCounterByUserId(
    new Gs2.Gs2Mission.Request.IncreaseCounterByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithCounterName("quest_complete")
        .WithUserId("user-0001")
        .WithValue(1L)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var changedCompletes = result.ChangedCompletes;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.increaseCounterByUserId(
        new Gs2Mission.IncreaseCounterByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("quest_complete")
            .withUserId("user-0001")
            .withValue(1)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const changedCompletes = result.getChangedCompletes();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.increase_counter_by_user_id(
        mission.IncreaseCounterByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_counter_name('quest_complete')
            .with_user_id('user-0001')
            .with_value(1)
            .with_time_offset_token(None)
    )
    item = result.item
    changed_completes = result.changed_completes
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.increase_counter_by_user_id({
    namespaceName="namespace-0001",
    counterName="quest_complete",
    userId="user-0001",
    value=1,
    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;
changedCompletes = result.changedCompletes;

```

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

client = gs2('mission')

api_result_handler = client.increase_counter_by_user_id_async({
    namespaceName="namespace-0001",
    counterName="quest_complete",
    userId="user-0001",
    value=1,
    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;
changedCompletes = result.changedCompletes;

```



---

### setCounterByUserId

사용자 ID를 지정하여 카운터를 설정<br>

지정된 사용자의 카운터의 스코프 값을 직접 설정하여 기존 값을 대체합니다.<br>
변경 전과 변경 후의 카운터 상태, 그리고 새롭게 달성된 미션이 changedCompletes 응답에서 반환됩니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| counterName | string |  | ✓|  |  ~ 128자 | 카운터 모델 이름<br>이 카운터 인스턴스의 기반이 되는 카운터 모델의 이름입니다. 스코프와 리셋 타이밍을 정의하는 카운터 모델 정의에 연결됩니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| values | [List&lt;ScopedValue&gt;](#scopedvalue) |  | |  | 0 ~ 20 items | 설정할 값의 리스트 |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Counter](#counter) | 가산된 카운터 |
| old | [Counter](#counter) | 카운터 가산 후의 카운터 |
| changedCompletes | [List&lt;Complete&gt;](#complete) | 갱신된 달성 상황 리스트 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.SetCounterByUserId(
    &mission.SetCounterByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CounterName: pointy.String("counter-0001"),
        UserId: pointy.String("user-0001"),
        Values: []mission.ScopedValue{
            mission.ScopedValue{
                ResetType: pointy.String("daily"),
                Value: pointy.Int64(1),
            },
            mission.ScopedValue{
                ResetType: pointy.String("weekly"),
                Value: pointy.Int64(2),
            },
        },
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
old := result.Old
changedCompletes := result.ChangedCompletes

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\SetCounterByUserIdRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->setCounterByUserId(
        (new SetCounterByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withCounterName("counter-0001")
            ->withUserId("user-0001")
            ->withValues([
                (new ScopedValue())
                    ->withResetType("daily")
                    ->withValue(1),
                (new ScopedValue())
                    ->withResetType("weekly")
                    ->withValue(2),
            ])
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $old = $result->getOld();
    $changedCompletes = $result->getChangedCompletes();
} 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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.SetCounterByUserIdRequest;
import io.gs2.mission.result.SetCounterByUserIdResult;

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

try {
    SetCounterByUserIdResult result = client.setCounterByUserId(
        new SetCounterByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("counter-0001")
            .withUserId("user-0001")
            .withValues(Arrays.asList(
                new ScopedValue()
                    .withResetType("daily")
                    .withValue(1L),
                new ScopedValue()
                    .withResetType("weekly")
                    .withValue(2L)
            ))
            .withTimeOffsetToken(null)
    );
    Counter item = result.getItem();
    Counter old = result.getOld();
    List<Complete> changedCompletes = result.getChangedCompletes();
} 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.SetCounterByUserIdResult> asyncResult = null;
yield return client.SetCounterByUserId(
    new Gs2.Gs2Mission.Request.SetCounterByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithCounterName("counter-0001")
        .WithUserId("user-0001")
        .WithValues(new Gs2.Gs2Mission.Model.ScopedValue[] {
            new Gs2.Gs2Mission.Model.ScopedValue()
                .WithResetType("daily")
                .WithValue(1L),
            new Gs2.Gs2Mission.Model.ScopedValue()
                .WithResetType("weekly")
                .WithValue(2L),
        })
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var old = result.Old;
var changedCompletes = result.ChangedCompletes;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.setCounterByUserId(
        new Gs2Mission.SetCounterByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("counter-0001")
            .withUserId("user-0001")
            .withValues([
                new Gs2Mission.model.ScopedValue()
                    .withResetType("daily")
                    .withValue(1),
                new Gs2Mission.model.ScopedValue()
                    .withResetType("weekly")
                    .withValue(2),
            ])
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const old = result.getOld();
    const changedCompletes = result.getChangedCompletes();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.set_counter_by_user_id(
        mission.SetCounterByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_counter_name('counter-0001')
            .with_user_id('user-0001')
            .with_values([
                mission.ScopedValue()
                    .with_reset_type('daily')
                    .with_value(1),
                mission.ScopedValue()
                    .with_reset_type('weekly')
                    .with_value(2),
            ])
            .with_time_offset_token(None)
    )
    item = result.item
    old = result.old
    changed_completes = result.changed_completes
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.set_counter_by_user_id({
    namespaceName="namespace-0001",
    counterName="counter-0001",
    userId="user-0001",
    values={
        {
            reset_type="daily",
            value=1,
        },
        {
            reset_type="weekly",
            value=2,
        }
    },
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
old = result.old;
changedCompletes = result.changedCompletes;

```

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

client = gs2('mission')

api_result_handler = client.set_counter_by_user_id_async({
    namespaceName="namespace-0001",
    counterName="counter-0001",
    userId="user-0001",
    values={
        {
            reset_type="daily",
            value=1,
        },
        {
            reset_type="weekly",
            value=2,
        }
    },
    timeOffsetToken=nil,
})

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

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

result = api_result.result
item = result.item;
old = result.old;
changedCompletes = result.changedCompletes;

```



---

### decreaseCounter

카운터 감산<br>

요청 사용자의 카운터에서 지정한 값을 감산합니다.<br>
감산 후, 이 카운터를 참조하는 모든 미션 태스크가 자동으로 재평가되며, 달성 상황이 변경된 미션은 changedCompletes 응답으로 반환됩니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| counterName | string |  | ✓|  |  ~ 128자 | 카운터 모델 이름<br>이 카운터 인스턴스의 기반이 되는 카운터 모델의 이름입니다. 스코프와 리셋 타이밍을 정의하는 카운터 모델 정의에 연결됩니다. |
| accessToken | string |  | ✓|  |  ~ 128자 | 액세스 토큰 |
| value | long |  | ✓|  | 1 ~ 9223372036854775805 | 감산할 값 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Counter](#counter) | 감산된 카운터 |
| changedCompletes | [List&lt;Complete&gt;](#complete) | 갱신된 달성 상황 리스트 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DecreaseCounter(
    &mission.DecreaseCounterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CounterName: pointy.String("counter-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        Value: pointy.Int64(1),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
changedCompletes := result.ChangedCompletes

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DecreaseCounterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->decreaseCounter(
        (new DecreaseCounterRequest())
            ->withNamespaceName("namespace-0001")
            ->withCounterName("counter-0001")
            ->withAccessToken("accessToken-0001")
            ->withValue(1)
    );
    $item = $result->getItem();
    $changedCompletes = $result->getChangedCompletes();
} 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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.DecreaseCounterRequest;
import io.gs2.mission.result.DecreaseCounterResult;

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

try {
    DecreaseCounterResult result = client.decreaseCounter(
        new DecreaseCounterRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("counter-0001")
            .withAccessToken("accessToken-0001")
            .withValue(1L)
    );
    Counter item = result.getItem();
    List<Complete> changedCompletes = result.getChangedCompletes();
} 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.DecreaseCounterResult> asyncResult = null;
yield return client.DecreaseCounter(
    new Gs2.Gs2Mission.Request.DecreaseCounterRequest()
        .WithNamespaceName("namespace-0001")
        .WithCounterName("counter-0001")
        .WithAccessToken("accessToken-0001")
        .WithValue(1L),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var changedCompletes = result.ChangedCompletes;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.decreaseCounter(
        new Gs2Mission.DecreaseCounterRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("counter-0001")
            .withAccessToken("accessToken-0001")
            .withValue(1)
    );
    const item = result.getItem();
    const changedCompletes = result.getChangedCompletes();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.decrease_counter(
        mission.DecreaseCounterRequest()
            .with_namespace_name('namespace-0001')
            .with_counter_name('counter-0001')
            .with_access_token('accessToken-0001')
            .with_value(1)
    )
    item = result.item
    changed_completes = result.changed_completes
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.decrease_counter({
    namespaceName="namespace-0001",
    counterName="counter-0001",
    accessToken="accessToken-0001",
    value=1,
})

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

result = api_result.result
item = result.item;
changedCompletes = result.changedCompletes;

```

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

client = gs2('mission')

api_result_handler = client.decrease_counter_async({
    namespaceName="namespace-0001",
    counterName="counter-0001",
    accessToken="accessToken-0001",
    value=1,
})

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;
changedCompletes = result.changedCompletes;

```



---

### decreaseCounterByUserId

사용자 ID를 지정하여 카운터 감산<br>

지정된 사용자의 카운터에서 지정한 값을 감산합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| counterName | string |  | ✓|  |  ~ 128자 | 카운터 모델 이름<br>이 카운터 인스턴스의 기반이 되는 카운터 모델의 이름입니다. 스코프와 리셋 타이밍을 정의하는 카운터 모델 정의에 연결됩니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| value | long |  | ✓|  | 1 ~ 9223372036854775805 | 감산할 값 |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Counter](#counter) | 감산된 카운터 |
| changedCompletes | [List&lt;Complete&gt;](#complete) | 갱신된 달성 상황 리스트 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DecreaseCounterByUserId(
    &mission.DecreaseCounterByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CounterName: pointy.String("counter-0001"),
        UserId: pointy.String("user-0001"),
        Value: pointy.Int64(1),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
changedCompletes := result.ChangedCompletes

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DecreaseCounterByUserIdRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->decreaseCounterByUserId(
        (new DecreaseCounterByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withCounterName("counter-0001")
            ->withUserId("user-0001")
            ->withValue(1)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $changedCompletes = $result->getChangedCompletes();
} 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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.DecreaseCounterByUserIdRequest;
import io.gs2.mission.result.DecreaseCounterByUserIdResult;

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

try {
    DecreaseCounterByUserIdResult result = client.decreaseCounterByUserId(
        new DecreaseCounterByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("counter-0001")
            .withUserId("user-0001")
            .withValue(1L)
            .withTimeOffsetToken(null)
    );
    Counter item = result.getItem();
    List<Complete> changedCompletes = result.getChangedCompletes();
} 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.DecreaseCounterByUserIdResult> asyncResult = null;
yield return client.DecreaseCounterByUserId(
    new Gs2.Gs2Mission.Request.DecreaseCounterByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithCounterName("counter-0001")
        .WithUserId("user-0001")
        .WithValue(1L)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var changedCompletes = result.ChangedCompletes;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.decreaseCounterByUserId(
        new Gs2Mission.DecreaseCounterByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("counter-0001")
            .withUserId("user-0001")
            .withValue(1)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const changedCompletes = result.getChangedCompletes();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.decrease_counter_by_user_id(
        mission.DecreaseCounterByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_counter_name('counter-0001')
            .with_user_id('user-0001')
            .with_value(1)
            .with_time_offset_token(None)
    )
    item = result.item
    changed_completes = result.changed_completes
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.decrease_counter_by_user_id({
    namespaceName="namespace-0001",
    counterName="counter-0001",
    userId="user-0001",
    value=1,
    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;
changedCompletes = result.changedCompletes;

```

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

client = gs2('mission')

api_result_handler = client.decrease_counter_by_user_id_async({
    namespaceName="namespace-0001",
    counterName="counter-0001",
    userId="user-0001",
    value=1,
    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;
changedCompletes = result.changedCompletes;

```



---

### getCounter

카운터 조회<br>

요청 사용자의 지정된 카운터를 모든 스코프별 값(리셋 기간별)을 포함하여 조회합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| counterName | string |  | ✓|  |  ~ 128자 | 카운터 모델 이름<br>이 카운터 인스턴스의 기반이 되는 카운터 모델의 이름입니다. 스코프와 리셋 타이밍을 정의하는 카운터 모델 정의에 연결됩니다. |
| accessToken | string |  | ✓|  |  ~ 128자 | 액세스 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Counter](#counter) | 카운터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.GetCounter(
    &mission.GetCounterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CounterName: pointy.String("quest_complete"),
        AccessToken: pointy.String("accessToken-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\GetCounterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->getCounter(
        (new GetCounterRequest())
            ->withNamespaceName("namespace-0001")
            ->withCounterName("quest_complete")
            ->withAccessToken("accessToken-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.GetCounterRequest;
import io.gs2.mission.result.GetCounterResult;

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

try {
    GetCounterResult result = client.getCounter(
        new GetCounterRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("quest_complete")
            .withAccessToken("accessToken-0001")
    );
    Counter 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.GetCounterResult> asyncResult = null;
yield return client.GetCounter(
    new Gs2.Gs2Mission.Request.GetCounterRequest()
        .WithNamespaceName("namespace-0001")
        .WithCounterName("quest_complete")
        .WithAccessToken("accessToken-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.getCounter(
        new Gs2Mission.GetCounterRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("quest_complete")
            .withAccessToken("accessToken-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.get_counter(
        mission.GetCounterRequest()
            .with_namespace_name('namespace-0001')
            .with_counter_name('quest_complete')
            .with_access_token('accessToken-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.get_counter({
    namespaceName="namespace-0001",
    counterName="quest_complete",
    accessToken="accessToken-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('mission')

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

```



---

### getCounterByUserId

사용자 ID를 지정하여 카운터 조회<br>

지정된 사용자의 지정된 카운터를 모든 스코프별 값을 포함하여 조회합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| counterName | string |  | ✓|  |  ~ 128자 | 카운터 모델 이름<br>이 카운터 인스턴스의 기반이 되는 카운터 모델의 이름입니다. 스코프와 리셋 타이밍을 정의하는 카운터 모델 정의에 연결됩니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Counter](#counter) | 카운터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.GetCounterByUserId(
    &mission.GetCounterByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CounterName: pointy.String("counter-0001"),
        UserId: pointy.String("user-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\GetCounterByUserIdRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->getCounterByUserId(
        (new GetCounterByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withCounterName("counter-0001")
            ->withUserId("user-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.GetCounterByUserIdRequest;
import io.gs2.mission.result.GetCounterByUserIdResult;

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

try {
    GetCounterByUserIdResult result = client.getCounterByUserId(
        new GetCounterByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("counter-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    Counter 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.GetCounterByUserIdResult> asyncResult = null;
yield return client.GetCounterByUserId(
    new Gs2.Gs2Mission.Request.GetCounterByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithCounterName("counter-0001")
        .WithUserId("user-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.getCounterByUserId(
        new Gs2Mission.GetCounterByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("counter-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.get_counter_by_user_id(
        mission.GetCounterByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_counter_name('counter-0001')
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.get_counter_by_user_id({
    namespaceName="namespace-0001",
    counterName="counter-0001",
    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
item = result.item;

```

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

client = gs2('mission')

api_result_handler = client.get_counter_by_user_id_async({
    namespaceName="namespace-0001",
    counterName="counter-0001",
    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
item = result.item;

```



---

### verifyCounterValue

카운터 값 검증<br>

카운터의 스코프별 값이 지정된 조건을 충족하는지 검증합니다.<br>
지원되는 검증 타입: 'less'(미만), 'lessEqual'(이하), 'greater'(초과), 'greaterEqual'(이상), 'equal'(일치), 'notEqual'(불일치).<br>
검증은 카운터의 특정 스코프(리셋 타입과 조건)를 대상으로 합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| accessToken | string |  | ✓|  |  ~ 128자 | 액세스 토큰 |
| counterName | string |  | ✓|  |  ~ 128자 | 카운터 모델 이름<br>이 카운터 인스턴스의 기반이 되는 카운터 모델의 이름입니다. 스코프와 리셋 타이밍을 정의하는 카운터 모델 정의에 연결됩니다. |
| verifyType | 문자열 열거형<br>enum {<br>"less",<br>"lessEqual",<br>"greater",<br>"greaterEqual",<br>"equal",<br>"notEqual"<br>}<br> |  | ✓|  |  | 검증 종류less: 카운터 값이 지정 값 미만임 / lessEqual: 카운터 값이 지정 값 이하임 / greater: 카운터 값이 지정 값 초과임 / greaterEqual: 카운터 값이 지정 값 이상임 / equal: 카운터 값이 지정 값과 일치함 / notEqual: 카운터 값이 지정 값과 일치하지 않음 /  |
| scopeType | 문자열 열거형<br>enum {<br>"resetTiming",<br>"verifyAction"<br>}<br> |  | | "resetTiming" |  | 스코프 종류<br>이 스코프 값이 리셋 타이밍 스케줄에 기반한 것인지, 검증 액션 조건에 기반한 것인지를 나타냅니다.resetTiming: 리셋 타이밍 / verifyAction: 검증 액션 /  |
| resetType | 문자열 열거형<br>enum {<br>"notReset",<br>"daily",<br>"weekly",<br>"monthly",<br>"days"<br>}<br> | {scopeType} == "resetTiming" | ✓※|  |  | 리셋 타이밍<br>이 스코프 값의 리셋 타이밍입니다. 카운터 값이 리셋될 때까지의 누적 기간을 결정합니다. scopeType이 "resetTiming"인 경우에만 적용됩니다.notReset: 리셋 안 함 / daily: 매일 / weekly: 매주 / monthly: 매월 / days: 일정 일수마다 / <br>※ scopeType이(가) "resetTiming" 이면 필수 |
| conditionName | string | {scopeType} == "verifyAction" | ✓※|  |  ~ 128자 | 조건 이름<br>이 스코프 값이 대응하는 검증 액션 조건의 이름입니다. 이 값이 어느 조건 스코프에 속하는지 식별하는 데 사용됩니다. scopeType이 "verifyAction"인 경우에만 적용됩니다.<br>※ scopeType이(가) "verifyAction" 이면 필수 |
| value | long |  | | 0 | 0 ~ 9223372036854775805 | 카운트<br>이 스코프의 누적 카운터 값입니다. 카운터가 증가하면 늘어나고 감소하면 줄어듭니다. 값은 최댓값으로 상한이 설정되며, 0 미만으로 내려가지 않습니다. |
| multiplyValueSpecifyingQuantity | bool |  | | false |  | 수량을 지정했을 때, 검증에 사용하는 값도 곱할지 여부 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Counter](#counter) | 카운터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.VerifyCounterValue(
    &mission.VerifyCounterValueRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        CounterName: pointy.String("counter-0001"),
        VerifyType: pointy.String("less"),
        ScopeType: nil,
        ResetType: pointy.String("daily"),
        ConditionName: nil,
        Value: pointy.Int64(10),
        MultiplyValueSpecifyingQuantity: 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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\VerifyCounterValueRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->verifyCounterValue(
        (new VerifyCounterValueRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withCounterName("counter-0001")
            ->withVerifyType("less")
            ->withScopeType(null)
            ->withResetType("daily")
            ->withConditionName(null)
            ->withValue(10)
            ->withMultiplyValueSpecifyingQuantity(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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.VerifyCounterValueRequest;
import io.gs2.mission.result.VerifyCounterValueResult;

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

try {
    VerifyCounterValueResult result = client.verifyCounterValue(
        new VerifyCounterValueRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withCounterName("counter-0001")
            .withVerifyType("less")
            .withScopeType(null)
            .withResetType("daily")
            .withConditionName(null)
            .withValue(10L)
            .withMultiplyValueSpecifyingQuantity(null)
    );
    Counter 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.VerifyCounterValueResult> asyncResult = null;
yield return client.VerifyCounterValue(
    new Gs2.Gs2Mission.Request.VerifyCounterValueRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithCounterName("counter-0001")
        .WithVerifyType("less")
        .WithScopeType(null)
        .WithResetType("daily")
        .WithConditionName(null)
        .WithValue(10L)
        .WithMultiplyValueSpecifyingQuantity(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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.verifyCounterValue(
        new Gs2Mission.VerifyCounterValueRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withCounterName("counter-0001")
            .withVerifyType("less")
            .withScopeType(null)
            .withResetType("daily")
            .withConditionName(null)
            .withValue(10)
            .withMultiplyValueSpecifyingQuantity(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.verify_counter_value(
        mission.VerifyCounterValueRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_counter_name('counter-0001')
            .with_verify_type('less')
            .with_scope_type(None)
            .with_reset_type('daily')
            .with_condition_name(None)
            .with_value(10)
            .with_multiply_value_specifying_quantity(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.verify_counter_value({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    counterName="counter-0001",
    verifyType="less",
    scopeType=nil,
    resetType="daily",
    conditionName=nil,
    value=10,
    multiplyValueSpecifyingQuantity=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('mission')

api_result_handler = client.verify_counter_value_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    counterName="counter-0001",
    verifyType="less",
    scopeType=nil,
    resetType="daily",
    conditionName=nil,
    value=10,
    multiplyValueSpecifyingQuantity=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;

```



---

### verifyCounterValueByUserId

사용자 ID를 지정하여 카운터 값 검증<br>

지정된 사용자의 카운터의 스코프별 값이 지정된 조건을 충족하는지 검증합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| counterName | string |  | ✓|  |  ~ 128자 | 카운터 모델 이름<br>이 카운터 인스턴스의 기반이 되는 카운터 모델의 이름입니다. 스코프와 리셋 타이밍을 정의하는 카운터 모델 정의에 연결됩니다. |
| verifyType | 문자열 열거형<br>enum {<br>"less",<br>"lessEqual",<br>"greater",<br>"greaterEqual",<br>"equal",<br>"notEqual"<br>}<br> |  | ✓|  |  | 검증 종류less: 카운터 값이 지정 값 미만임 / lessEqual: 카운터 값이 지정 값 이하임 / greater: 카운터 값이 지정 값 초과임 / greaterEqual: 카운터 값이 지정 값 이상임 / equal: 카운터 값이 지정 값과 일치함 / notEqual: 카운터 값이 지정 값과 일치하지 않음 /  |
| scopeType | 문자열 열거형<br>enum {<br>"resetTiming",<br>"verifyAction"<br>}<br> |  | | "resetTiming" |  | 스코프 종류<br>이 스코프 값이 리셋 타이밍 스케줄에 기반한 것인지, 검증 액션 조건에 기반한 것인지를 나타냅니다.resetTiming: 리셋 타이밍 / verifyAction: 검증 액션 /  |
| resetType | 문자열 열거형<br>enum {<br>"notReset",<br>"daily",<br>"weekly",<br>"monthly",<br>"days"<br>}<br> | {scopeType} == "resetTiming" | ✓※|  |  | 리셋 타이밍<br>이 스코프 값의 리셋 타이밍입니다. 카운터 값이 리셋될 때까지의 누적 기간을 결정합니다. scopeType이 "resetTiming"인 경우에만 적용됩니다.notReset: 리셋 안 함 / daily: 매일 / weekly: 매주 / monthly: 매월 / days: 일정 일수마다 / <br>※ scopeType이(가) "resetTiming" 이면 필수 |
| conditionName | string | {scopeType} == "verifyAction" | ✓※|  |  ~ 128자 | 조건 이름<br>이 스코프 값이 대응하는 검증 액션 조건의 이름입니다. 이 값이 어느 조건 스코프에 속하는지 식별하는 데 사용됩니다. scopeType이 "verifyAction"인 경우에만 적용됩니다.<br>※ scopeType이(가) "verifyAction" 이면 필수 |
| value | long |  | | 0 | 0 ~ 9223372036854775805 | 카운트<br>이 스코프의 누적 카운터 값입니다. 카운터가 증가하면 늘어나고 감소하면 줄어듭니다. 값은 최댓값으로 상한이 설정되며, 0 미만으로 내려가지 않습니다. |
| multiplyValueSpecifyingQuantity | bool |  | | false |  | 수량을 지정했을 때, 검증에 사용하는 값도 곱할지 여부 |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Counter](#counter) | 카운터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.VerifyCounterValueByUserId(
    &mission.VerifyCounterValueByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        CounterName: pointy.String("counter-0001"),
        VerifyType: pointy.String("less"),
        ScopeType: nil,
        ResetType: pointy.String("daily"),
        ConditionName: nil,
        Value: pointy.Int64(10),
        MultiplyValueSpecifyingQuantity: nil,
        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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\VerifyCounterValueByUserIdRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->verifyCounterValueByUserId(
        (new VerifyCounterValueByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withCounterName("counter-0001")
            ->withVerifyType("less")
            ->withScopeType(null)
            ->withResetType("daily")
            ->withConditionName(null)
            ->withValue(10)
            ->withMultiplyValueSpecifyingQuantity(null)
            ->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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.VerifyCounterValueByUserIdRequest;
import io.gs2.mission.result.VerifyCounterValueByUserIdResult;

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

try {
    VerifyCounterValueByUserIdResult result = client.verifyCounterValueByUserId(
        new VerifyCounterValueByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withCounterName("counter-0001")
            .withVerifyType("less")
            .withScopeType(null)
            .withResetType("daily")
            .withConditionName(null)
            .withValue(10L)
            .withMultiplyValueSpecifyingQuantity(null)
            .withTimeOffsetToken(null)
    );
    Counter 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.VerifyCounterValueByUserIdResult> asyncResult = null;
yield return client.VerifyCounterValueByUserId(
    new Gs2.Gs2Mission.Request.VerifyCounterValueByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithCounterName("counter-0001")
        .WithVerifyType("less")
        .WithScopeType(null)
        .WithResetType("daily")
        .WithConditionName(null)
        .WithValue(10L)
        .WithMultiplyValueSpecifyingQuantity(null)
        .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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.verifyCounterValueByUserId(
        new Gs2Mission.VerifyCounterValueByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withCounterName("counter-0001")
            .withVerifyType("less")
            .withScopeType(null)
            .withResetType("daily")
            .withConditionName(null)
            .withValue(10)
            .withMultiplyValueSpecifyingQuantity(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.verify_counter_value_by_user_id(
        mission.VerifyCounterValueByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_counter_name('counter-0001')
            .with_verify_type('less')
            .with_scope_type(None)
            .with_reset_type('daily')
            .with_condition_name(None)
            .with_value(10)
            .with_multiply_value_specifying_quantity(None)
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.verify_counter_value_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    counterName="counter-0001",
    verifyType="less",
    scopeType=nil,
    resetType="daily",
    conditionName=nil,
    value=10,
    multiplyValueSpecifyingQuantity=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;

```

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

client = gs2('mission')

api_result_handler = client.verify_counter_value_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    counterName="counter-0001",
    verifyType="less",
    scopeType=nil,
    resetType="daily",
    conditionName=nil,
    value=10,
    multiplyValueSpecifyingQuantity=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;

```



---

### resetCounter

카운터 리셋<br>

지정된 스코프의 카운터 값을 리셋합니다.<br>
지정된 스코프 타입과 일치하는 스코프별 값만 리셋되며, 다른 스코프별 값은 변경되지 않습니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| accessToken | string |  | ✓|  |  ~ 128자 | 액세스 토큰 |
| counterName | string |  | ✓|  |  ~ 128자 | 카운터 모델 이름<br>이 카운터 인스턴스의 기반이 되는 카운터 모델의 이름입니다. 스코프와 리셋 타이밍을 정의하는 카운터 모델 정의에 연결됩니다. |
| scopes | [List&lt;ScopedValue&gt;](#scopedvalue) |  | ✓|  | 1 ~ 20 items | 스코프 리스트 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Counter](#counter) | 삭제한 카운터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.ResetCounter(
    &mission.ResetCounterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        CounterName: pointy.String("counter-0001"),
        Scopes: []mission.ScopedValue{
            mission.ScopedValue{
                ResetType: pointy.String("daily"),
            },
            mission.ScopedValue{
                ResetType: pointy.String("weekly"),
            },
        },
    }
)
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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\ResetCounterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->resetCounter(
        (new ResetCounterRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withCounterName("counter-0001")
            ->withScopes([
                (new ScopedValue())
                    ->withResetType("daily"),
                (new ScopedValue())
                    ->withResetType("weekly"),
            ])
    );
    $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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.ResetCounterRequest;
import io.gs2.mission.result.ResetCounterResult;

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

try {
    ResetCounterResult result = client.resetCounter(
        new ResetCounterRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withCounterName("counter-0001")
            .withScopes(Arrays.asList(
                new ScopedValue()
                    .withResetType("daily"),
                new ScopedValue()
                    .withResetType("weekly")
            ))
    );
    Counter 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.ResetCounterResult> asyncResult = null;
yield return client.ResetCounter(
    new Gs2.Gs2Mission.Request.ResetCounterRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithCounterName("counter-0001")
        .WithScopes(new Gs2.Gs2Mission.Model.ScopedValue[] {
            new Gs2.Gs2Mission.Model.ScopedValue()
                .WithResetType("daily"),
            new Gs2.Gs2Mission.Model.ScopedValue()
                .WithResetType("weekly"),
        }),
    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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.resetCounter(
        new Gs2Mission.ResetCounterRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withCounterName("counter-0001")
            .withScopes([
                new Gs2Mission.model.ScopedValue()
                    .withResetType("daily"),
                new Gs2Mission.model.ScopedValue()
                    .withResetType("weekly"),
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.reset_counter(
        mission.ResetCounterRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_counter_name('counter-0001')
            .with_scopes([
                mission.ScopedValue()
                    .with_reset_type('daily'),
                mission.ScopedValue()
                    .with_reset_type('weekly'),
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.reset_counter({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    counterName="counter-0001",
    scopes={
        {
            reset_type="daily",
        },
        {
            reset_type="weekly",
        }
    },
})

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

api_result_handler = client.reset_counter_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    counterName="counter-0001",
    scopes={
        {
            reset_type="daily",
        },
        {
            reset_type="weekly",
        }
    },
})

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;

```



---

### resetCounterByUserId

사용자 ID를 지정하여 카운터 리셋<br>

지정된 사용자의 지정된 스코프의 카운터 값을 리셋합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| counterName | string |  | ✓|  |  ~ 128자 | 카운터 모델 이름<br>이 카운터 인스턴스의 기반이 되는 카운터 모델의 이름입니다. 스코프와 리셋 타이밍을 정의하는 카운터 모델 정의에 연결됩니다. |
| scopes | [List&lt;ScopedValue&gt;](#scopedvalue) |  | ✓|  | 1 ~ 20 items | 스코프 리스트 |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Counter](#counter) | 삭제한 카운터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.ResetCounterByUserId(
    &mission.ResetCounterByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        CounterName: pointy.String("counter-0001"),
        Scopes: []mission.ScopedValue{
            mission.ScopedValue{
                ResetType: pointy.String("daily"),
            },
            mission.ScopedValue{
                ResetType: pointy.String("weekly"),
            },
        },
        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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\ResetCounterByUserIdRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->resetCounterByUserId(
        (new ResetCounterByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withCounterName("counter-0001")
            ->withScopes([
                (new ScopedValue())
                    ->withResetType("daily"),
                (new ScopedValue())
                    ->withResetType("weekly"),
            ])
            ->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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.ResetCounterByUserIdRequest;
import io.gs2.mission.result.ResetCounterByUserIdResult;

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

try {
    ResetCounterByUserIdResult result = client.resetCounterByUserId(
        new ResetCounterByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withCounterName("counter-0001")
            .withScopes(Arrays.asList(
                new ScopedValue()
                    .withResetType("daily"),
                new ScopedValue()
                    .withResetType("weekly")
            ))
            .withTimeOffsetToken(null)
    );
    Counter 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.ResetCounterByUserIdResult> asyncResult = null;
yield return client.ResetCounterByUserId(
    new Gs2.Gs2Mission.Request.ResetCounterByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithCounterName("counter-0001")
        .WithScopes(new Gs2.Gs2Mission.Model.ScopedValue[] {
            new Gs2.Gs2Mission.Model.ScopedValue()
                .WithResetType("daily"),
            new Gs2.Gs2Mission.Model.ScopedValue()
                .WithResetType("weekly"),
        })
        .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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.resetCounterByUserId(
        new Gs2Mission.ResetCounterByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withCounterName("counter-0001")
            .withScopes([
                new Gs2Mission.model.ScopedValue()
                    .withResetType("daily"),
                new Gs2Mission.model.ScopedValue()
                    .withResetType("weekly"),
            ])
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.reset_counter_by_user_id(
        mission.ResetCounterByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_counter_name('counter-0001')
            .with_scopes([
                mission.ScopedValue()
                    .with_reset_type('daily'),
                mission.ScopedValue()
                    .with_reset_type('weekly'),
            ])
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.reset_counter_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    counterName="counter-0001",
    scopes={
        {
            reset_type="daily",
        },
        {
            reset_type="weekly",
        }
    },
    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('mission')

api_result_handler = client.reset_counter_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    counterName="counter-0001",
    scopes={
        {
            reset_type="daily",
        },
        {
            reset_type="weekly",
        }
    },
    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;

```



---

### deleteCounter

카운터 삭제<br>

요청 사용자의 지정된 카운터와 그에 속한 모든 스코프별 값을 삭제합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| accessToken | string |  | ✓|  |  ~ 128자 | 액세스 토큰 |
| counterName | string |  | ✓|  |  ~ 128자 | 카운터 모델 이름<br>이 카운터 인스턴스의 기반이 되는 카운터 모델의 이름입니다. 스코프와 리셋 타이밍을 정의하는 카운터 모델 정의에 연결됩니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Counter](#counter) | 삭제한 카운터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DeleteCounter(
    &mission.DeleteCounterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        CounterName: pointy.String("counter-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DeleteCounterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->deleteCounter(
        (new DeleteCounterRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withCounterName("counter-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.DeleteCounterRequest;
import io.gs2.mission.result.DeleteCounterResult;

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

try {
    DeleteCounterResult result = client.deleteCounter(
        new DeleteCounterRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withCounterName("counter-0001")
    );
    Counter 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.DeleteCounterResult> asyncResult = null;
yield return client.DeleteCounter(
    new Gs2.Gs2Mission.Request.DeleteCounterRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithCounterName("counter-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.deleteCounter(
        new Gs2Mission.DeleteCounterRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withCounterName("counter-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.delete_counter(
        mission.DeleteCounterRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_counter_name('counter-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.delete_counter({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    counterName="counter-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('mission')

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

```



---

### deleteCounterByUserId

사용자 ID를 지정하여 카운터 삭제<br>

지정된 사용자의 지정된 카운터와 그에 속한 모든 스코프별 값을 삭제합니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| userId | string |  | ✓|  |  ~ 128자 | 사용자ID |
| counterName | string |  | ✓|  |  ~ 128자 | 카운터 모델 이름<br>이 카운터 인스턴스의 기반이 되는 카운터 모델의 이름입니다. 스코프와 리셋 타이밍을 정의하는 카운터 모델 정의에 연결됩니다. |
| timeOffsetToken | string |  | |  |  ~ 1024자 | 타임 오프셋 토큰 |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [Counter](#counter) | 삭제한 카운터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DeleteCounterByUserId(
    &mission.DeleteCounterByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        CounterName: pointy.String("quest_complete"),
        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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DeleteCounterByUserIdRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->deleteCounterByUserId(
        (new DeleteCounterByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withCounterName("quest_complete")
            ->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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.DeleteCounterByUserIdRequest;
import io.gs2.mission.result.DeleteCounterByUserIdResult;

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

try {
    DeleteCounterByUserIdResult result = client.deleteCounterByUserId(
        new DeleteCounterByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withCounterName("quest_complete")
            .withTimeOffsetToken(null)
    );
    Counter 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.DeleteCounterByUserIdResult> asyncResult = null;
yield return client.DeleteCounterByUserId(
    new Gs2.Gs2Mission.Request.DeleteCounterByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithCounterName("quest_complete")
        .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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.deleteCounterByUserId(
        new Gs2Mission.DeleteCounterByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withCounterName("quest_complete")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.delete_counter_by_user_id(
        mission.DeleteCounterByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_counter_name('quest_complete')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.delete_counter_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    counterName="quest_complete",
    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('mission')

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

```



---

### describeCounterModels

카운터 모델 목록 취득<br>

지정된 네임스페이스의 현재 활성화된 카운터 모델의 목록을 취득합니다.<br>
카운터 모델은 카운터가 동작하는 스코프(일간·주간·월간 등의 리셋 타이밍)와 조건을 정의합니다.


#### Request

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

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| items | [List&lt;CounterModel&gt;](#countermodel) | 카운터 모델 리스트 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DescribeCounterModels(
    &mission.DescribeCounterModelsRequest {
        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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DescribeCounterModelsRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->describeCounterModels(
        (new DescribeCounterModelsRequest())
            ->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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.DescribeCounterModelsRequest;
import io.gs2.mission.result.DescribeCounterModelsResult;

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

try {
    DescribeCounterModelsResult result = client.describeCounterModels(
        new DescribeCounterModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    List<CounterModel> 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.DescribeCounterModelsResult> asyncResult = null;
yield return client.DescribeCounterModels(
    new Gs2.Gs2Mission.Request.DescribeCounterModelsRequest()
        .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 Gs2Mission from '@/gs2/mission';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.describe_counter_models(
        mission.DescribeCounterModelsRequest()
            .with_namespace_name('namespace-0001')
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.describe_counter_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('mission')

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

```



---

### getCounterModel

카운터 모델을 취득<br>

지정된 카운터 모델의 스코프, 리셋 조건, 챌린지 기간 이벤트 설정을 포함한 정보를 취득합니다.


#### Request

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

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [CounterModel](#countermodel) | 카운터 모델 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.GetCounterModel(
    &mission.GetCounterModelRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CounterName: pointy.String("counter-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\GetCounterModelRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->getCounterModel(
        (new GetCounterModelRequest())
            ->withNamespaceName("namespace-0001")
            ->withCounterName("counter-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.GetCounterModelRequest;
import io.gs2.mission.result.GetCounterModelResult;

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

try {
    GetCounterModelResult result = client.getCounterModel(
        new GetCounterModelRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("counter-0001")
    );
    CounterModel 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.GetCounterModelResult> asyncResult = null;
yield return client.GetCounterModel(
    new Gs2.Gs2Mission.Request.GetCounterModelRequest()
        .WithNamespaceName("namespace-0001")
        .WithCounterName("counter-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.getCounterModel(
        new Gs2Mission.GetCounterModelRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("counter-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.get_counter_model(
        mission.GetCounterModelRequest()
            .with_namespace_name('namespace-0001')
            .with_counter_name('counter-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.get_counter_model({
    namespaceName="namespace-0001",
    counterName="counter-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('mission')

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

```



---

### describeMissionGroupModels

미션 그룹 모델 목록 취득<br>

지정된 네임스페이스의 현재 활성화된 미션 그룹 모델의 목록을 취득합니다.<br>
미션 그룹 모델은 공통의 리셋 타입(일간·주간·월간·없음)을 가진 미션 태스크의 그룹을 정의합니다.


#### Request

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

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| items | [List&lt;MissionGroupModel&gt;](#missiongroupmodel) | 미션 그룹 모델 리스트 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DescribeMissionGroupModels(
    &mission.DescribeMissionGroupModelsRequest {
        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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DescribeMissionGroupModelsRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->describeMissionGroupModels(
        (new DescribeMissionGroupModelsRequest())
            ->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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.DescribeMissionGroupModelsRequest;
import io.gs2.mission.result.DescribeMissionGroupModelsResult;

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

try {
    DescribeMissionGroupModelsResult result = client.describeMissionGroupModels(
        new DescribeMissionGroupModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    List<MissionGroupModel> 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.DescribeMissionGroupModelsResult> asyncResult = null;
yield return client.DescribeMissionGroupModels(
    new Gs2.Gs2Mission.Request.DescribeMissionGroupModelsRequest()
        .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 Gs2Mission from '@/gs2/mission';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.describe_mission_group_models(
        mission.DescribeMissionGroupModelsRequest()
            .with_namespace_name('namespace-0001')
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.describe_mission_group_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('mission')

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

```



---

### getMissionGroupModel

미션 그룹 모델을 취득<br>

지정된 미션 그룹 모델의 리셋 타입, 리셋 타이밍 설정, 및 포함된 미션 태스크의 리스트를 취득합니다.


#### Request

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

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [MissionGroupModel](#missiongroupmodel) | 미션 그룹 모델 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.GetMissionGroupModel(
    &mission.GetMissionGroupModelRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\GetMissionGroupModelRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->getMissionGroupModel(
        (new GetMissionGroupModelRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.GetMissionGroupModelRequest;
import io.gs2.mission.result.GetMissionGroupModelResult;

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

try {
    GetMissionGroupModelResult result = client.getMissionGroupModel(
        new GetMissionGroupModelRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
    );
    MissionGroupModel 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.GetMissionGroupModelResult> asyncResult = null;
yield return client.GetMissionGroupModel(
    new Gs2.Gs2Mission.Request.GetMissionGroupModelRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.getMissionGroupModel(
        new Gs2Mission.GetMissionGroupModelRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.get_mission_group_model(
        mission.GetMissionGroupModelRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.get_mission_group_model({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-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('mission')

api_result_handler = client.get_mission_group_model_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-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;

```



---

### describeMissionTaskModels

미션 태스크 모델 목록 취득<br>

지정된 미션 그룹 내의 현재 활성화된 미션 태스크 모델의 목록을 취득합니다.<br>
미션 태스크 모델은 대상 카운터 조건, 달성 검증 타입, 보상 액션을 가진 개별 태스크를 정의합니다.


#### Request

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

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| items | [List&lt;MissionTaskModel&gt;](#missiontaskmodel) | 미션 태스크 모델 리스트 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DescribeMissionTaskModels(
    &mission.DescribeMissionTaskModelsRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DescribeMissionTaskModelsRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->describeMissionTaskModels(
        (new DescribeMissionTaskModelsRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.DescribeMissionTaskModelsRequest;
import io.gs2.mission.result.DescribeMissionTaskModelsResult;

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

try {
    DescribeMissionTaskModelsResult result = client.describeMissionTaskModels(
        new DescribeMissionTaskModelsRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
    );
    List<MissionTaskModel> 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.DescribeMissionTaskModelsResult> asyncResult = null;
yield return client.DescribeMissionTaskModels(
    new Gs2.Gs2Mission.Request.DescribeMissionTaskModelsRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.describeMissionTaskModels(
        new Gs2Mission.DescribeMissionTaskModelsRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.describe_mission_task_models(
        mission.DescribeMissionTaskModelsRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.describe_mission_task_models({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-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('mission')

api_result_handler = client.describe_mission_task_models_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-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;

```



---

### getMissionTaskModel

미션 태스크 모델을 취득<br>

지정된 미션 태스크 모델의 대상 카운터, 달성 검증 타입, 보상 입수 액션, 전제 미션 태스크 설정을 포함한 정보를 취득합니다.


#### Request

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

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [MissionTaskModel](#missiontaskmodel) | 미션 태스크 모델 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.GetMissionTaskModel(
    &mission.GetMissionTaskModelRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-0001"),
        MissionTaskName: pointy.String("mission-task-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\GetMissionTaskModelRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->getMissionTaskModel(
        (new GetMissionTaskModelRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-0001")
            ->withMissionTaskName("mission-task-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.GetMissionTaskModelRequest;
import io.gs2.mission.result.GetMissionTaskModelResult;

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

try {
    GetMissionTaskModelResult result = client.getMissionTaskModel(
        new GetMissionTaskModelRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withMissionTaskName("mission-task-0001")
    );
    MissionTaskModel 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.GetMissionTaskModelResult> asyncResult = null;
yield return client.GetMissionTaskModel(
    new Gs2.Gs2Mission.Request.GetMissionTaskModelRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-0001")
        .WithMissionTaskName("mission-task-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.getMissionTaskModel(
        new Gs2Mission.GetMissionTaskModelRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withMissionTaskName("mission-task-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.get_mission_task_model(
        mission.GetMissionTaskModelRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
            .with_mission_task_name('mission-task-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.get_mission_task_model({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    missionTaskName="mission-task-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('mission')

api_result_handler = client.get_mission_task_model_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    missionTaskName="mission-task-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>

현재 활성화된 미션 그룹 모델, 미션 태스크 모델, 카운터 모델을 활성화 가능한 형식으로 내보냅니다.<br>
내보낸 데이터는 다른 네임스페이스의 마스터 데이터 갱신이나 백업으로 사용할 수 있습니다.


#### Request

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

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [CurrentMissionMaster](#currentmissionmaster) | 활성화 가능한 미션 모델의 마스터 데이터 |

#### 구현 예제




**Go**
```go

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

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

$session->open();

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

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

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

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

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

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

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

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


```

**GS2-Script**
```lua

client = gs2('mission')

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

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;

```



---

### getCurrentMissionMaster

현재 활성화된 미션 모델의 마스터 데이터를 취득<br>

지정된 네임스페이스의 현재 활성화된 미션 모델의 마스터 데이터(미션 그룹 모델, 미션 태스크 모델, 카운터 모델을 포함)를 취득합니다.


#### Request

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

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [CurrentMissionMaster](#currentmissionmaster) | 현재 활성화된 미션 모델의 마스터 데이터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.GetCurrentMissionMaster(
    &mission.GetCurrentMissionMasterRequest {
        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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\GetCurrentMissionMasterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->getCurrentMissionMaster(
        (new GetCurrentMissionMasterRequest())
            ->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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.GetCurrentMissionMasterRequest;
import io.gs2.mission.result.GetCurrentMissionMasterResult;

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

try {
    GetCurrentMissionMasterResult result = client.getCurrentMissionMaster(
        new GetCurrentMissionMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    CurrentMissionMaster 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.GetCurrentMissionMasterResult> asyncResult = null;
yield return client.GetCurrentMissionMaster(
    new Gs2.Gs2Mission.Request.GetCurrentMissionMasterRequest()
        .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 Gs2Mission from '@/gs2/mission';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.get_current_mission_master(
        mission.GetCurrentMissionMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.get_current_mission_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('mission')

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

```



---

### preUpdateCurrentMissionMaster

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

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


#### 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/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.PreUpdateCurrentMissionMaster(
    &mission.PreUpdateCurrentMissionMasterRequest {
        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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\PreUpdateCurrentMissionMasterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->preUpdateCurrentMissionMaster(
        (new PreUpdateCurrentMissionMasterRequest())
            ->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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.PreUpdateCurrentMissionMasterRequest;
import io.gs2.mission.result.PreUpdateCurrentMissionMasterResult;

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

try {
    PreUpdateCurrentMissionMasterResult result = client.preUpdateCurrentMissionMaster(
        new PreUpdateCurrentMissionMasterRequest()
            .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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.PreUpdateCurrentMissionMasterResult> asyncResult = null;
yield return client.PreUpdateCurrentMissionMaster(
    new Gs2.Gs2Mission.Request.PreUpdateCurrentMissionMasterRequest()
        .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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.preUpdateCurrentMissionMaster(
        new Gs2Mission.PreUpdateCurrentMissionMasterRequest()
            .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 mission

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

try:
    result = client.pre_update_current_mission_master(
        mission.PreUpdateCurrentMissionMasterRequest()
            .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('mission')

api_result = client.pre_update_current_mission_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('mission')

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

```



---

### updateCurrentMissionMaster

현재 활성화된 미션 모델의 마스터 데이터를 갱신<br>

현재 활성화된 미션 모델의 마스터 데이터를 갱신합니다.<br>
2가지 모드를 지원합니다: 인라인 설정용 'direct' 모드와, 3단계 갱신 프로세스에서 사전에 업로드한 설정을 적용하는 'preUpload' 모드입니다.


#### 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 | [CurrentMissionMaster](#currentmissionmaster) | 갱신된 현재 활성화된 미션 모델의 마스터 데이터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentMissionMaster(
    &mission.UpdateCurrentMissionMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Mode: pointy.String("direct"),
        Settings: pointy.String("{\n  \"version\": \"2019-05-28\",\n  \"groups\": [\n    {\n      \"name\": \"daily\",\n      \"metadata\": \"DAILY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_x10\",\n          \"metadata\": \"QUEST_X10\",\n          \"counterName\": \"quest_complete\",\n          \"targetValue\": 10,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 10}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"quest_x20\",\n          \"metadata\": \"QUEST_X20\",\n          \"counterName\": \"quest_complete\",\n          \"premiseMissionTaskName\": \"quest_x10\",\n          \"targetValue\": 20,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 20}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"gacha\",\n          \"metadata\": \"GACHA\",\n          \"counterName\": \"lot_gacha\",\n          \"targetValue\": 1,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 30}\"\n            }\n          ]\n        }\n      ],\n      \"resetType\": \"daily\",\n      \"resetHour\": 10\n    },\n    {\n      \"name\": \"weekly\",\n      \"metadata\": \"WEEKLY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_x100\",\n          \"metadata\": \"QUEST_X100\",\n          \"counterName\": \"quest_complete\",\n          \"targetValue\": 100,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 40}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"quest_x1000\",\n          \"metadata\": \"QUEST_X1000\",\n          \"counterName\": \"quest_complete\",\n          \"premiseMissionTaskName\": \"quest_x100\",\n          \"targetValue\": 1000,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 50}\"\n            }\n          ]\n        }\n      ],\n      \"resetType\": \"weekly\",\n      \"resetDayOfWeek\": \"monday\",\n      \"resetHour\": 10\n    },\n    {\n      \"name\": \"story\",\n      \"metadata\": \"STORY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_1-1\",\n          \"metadata\": \"QUEST_1-1\",\n          \"counterName\": \"quest1\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-2\",\n          \"metadata\": \"QUEST_1-2\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-1\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-3\",\n          \"metadata\": \"QUEST_1-3\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-2\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-4\",\n          \"metadata\": \"QUEST_1-4\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-3\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_2-1\",\n          \"metadata\": \"QUEST_2-1\",\n          \"counterName\": \"quest2\",\n          \"premiseMissionTaskName\": \"quest_1-4\",\n          \"targetValue\": 1\n        }\n      ],\n      \"resetType\": \"notReset\"\n    }\n  ],\n  \"counters\": [\n    {\n      \"name\": \"quest_complete\",\n      \"metadata\": \"QUEST_COMPLETE\",\n      \"scopes\": [\n        {\n          \"resetType\": \"daily\",\n          \"resetHour\": 5\n        },\n        {\n          \"resetType\": \"weekly\",\n          \"resetDayOfWeek\": \"monday\",\n          \"resetHour\": 5\n        }\n      ]\n    },\n    {\n      \"name\": \"lot_gacha\",\n      \"metadata\": \"LOT_GACHA\",\n      \"scopes\": [\n        {\n          \"resetType\": \"daily\",\n          \"resetHour\": 5\n        }\n      ]\n    },\n    {\n      \"name\": \"quest1\",\n      \"metadata\": \"QUEST1\",\n      \"scopes\": [\n        {\n          \"resetType\": \"notReset\"\n        }\n      ]\n    },\n    {\n      \"name\": \"quest2\",\n      \"metadata\": \"QUEST2\",\n      \"scopes\": [\n        {\n          \"resetType\": \"notReset\"\n        }\n      ]\n    }\n  ]\n}"),
        UploadToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\UpdateCurrentMissionMasterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->updateCurrentMissionMaster(
        (new UpdateCurrentMissionMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMode("direct")
            ->withSettings("{\n  \"version\": \"2019-05-28\",\n  \"groups\": [\n    {\n      \"name\": \"daily\",\n      \"metadata\": \"DAILY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_x10\",\n          \"metadata\": \"QUEST_X10\",\n          \"counterName\": \"quest_complete\",\n          \"targetValue\": 10,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 10}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"quest_x20\",\n          \"metadata\": \"QUEST_X20\",\n          \"counterName\": \"quest_complete\",\n          \"premiseMissionTaskName\": \"quest_x10\",\n          \"targetValue\": 20,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 20}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"gacha\",\n          \"metadata\": \"GACHA\",\n          \"counterName\": \"lot_gacha\",\n          \"targetValue\": 1,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 30}\"\n            }\n          ]\n        }\n      ],\n      \"resetType\": \"daily\",\n      \"resetHour\": 10\n    },\n    {\n      \"name\": \"weekly\",\n      \"metadata\": \"WEEKLY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_x100\",\n          \"metadata\": \"QUEST_X100\",\n          \"counterName\": \"quest_complete\",\n          \"targetValue\": 100,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 40}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"quest_x1000\",\n          \"metadata\": \"QUEST_X1000\",\n          \"counterName\": \"quest_complete\",\n          \"premiseMissionTaskName\": \"quest_x100\",\n          \"targetValue\": 1000,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 50}\"\n            }\n          ]\n        }\n      ],\n      \"resetType\": \"weekly\",\n      \"resetDayOfWeek\": \"monday\",\n      \"resetHour\": 10\n    },\n    {\n      \"name\": \"story\",\n      \"metadata\": \"STORY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_1-1\",\n          \"metadata\": \"QUEST_1-1\",\n          \"counterName\": \"quest1\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-2\",\n          \"metadata\": \"QUEST_1-2\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-1\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-3\",\n          \"metadata\": \"QUEST_1-3\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-2\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-4\",\n          \"metadata\": \"QUEST_1-4\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-3\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_2-1\",\n          \"metadata\": \"QUEST_2-1\",\n          \"counterName\": \"quest2\",\n          \"premiseMissionTaskName\": \"quest_1-4\",\n          \"targetValue\": 1\n        }\n      ],\n      \"resetType\": \"notReset\"\n    }\n  ],\n  \"counters\": [\n    {\n      \"name\": \"quest_complete\",\n      \"metadata\": \"QUEST_COMPLETE\",\n      \"scopes\": [\n        {\n          \"resetType\": \"daily\",\n          \"resetHour\": 5\n        },\n        {\n          \"resetType\": \"weekly\",\n          \"resetDayOfWeek\": \"monday\",\n          \"resetHour\": 5\n        }\n      ]\n    },\n    {\n      \"name\": \"lot_gacha\",\n      \"metadata\": \"LOT_GACHA\",\n      \"scopes\": [\n        {\n          \"resetType\": \"daily\",\n          \"resetHour\": 5\n        }\n      ]\n    },\n    {\n      \"name\": \"quest1\",\n      \"metadata\": \"QUEST1\",\n      \"scopes\": [\n        {\n          \"resetType\": \"notReset\"\n        }\n      ]\n    },\n    {\n      \"name\": \"quest2\",\n      \"metadata\": \"QUEST2\",\n      \"scopes\": [\n        {\n          \"resetType\": \"notReset\"\n        }\n      ]\n    }\n  ]\n}")
            ->withUploadToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.UpdateCurrentMissionMasterRequest;
import io.gs2.mission.result.UpdateCurrentMissionMasterResult;

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

try {
    UpdateCurrentMissionMasterResult result = client.updateCurrentMissionMaster(
        new UpdateCurrentMissionMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMode("direct")
            .withSettings("{\n  \"version\": \"2019-05-28\",\n  \"groups\": [\n    {\n      \"name\": \"daily\",\n      \"metadata\": \"DAILY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_x10\",\n          \"metadata\": \"QUEST_X10\",\n          \"counterName\": \"quest_complete\",\n          \"targetValue\": 10,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 10}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"quest_x20\",\n          \"metadata\": \"QUEST_X20\",\n          \"counterName\": \"quest_complete\",\n          \"premiseMissionTaskName\": \"quest_x10\",\n          \"targetValue\": 20,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 20}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"gacha\",\n          \"metadata\": \"GACHA\",\n          \"counterName\": \"lot_gacha\",\n          \"targetValue\": 1,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 30}\"\n            }\n          ]\n        }\n      ],\n      \"resetType\": \"daily\",\n      \"resetHour\": 10\n    },\n    {\n      \"name\": \"weekly\",\n      \"metadata\": \"WEEKLY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_x100\",\n          \"metadata\": \"QUEST_X100\",\n          \"counterName\": \"quest_complete\",\n          \"targetValue\": 100,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 40}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"quest_x1000\",\n          \"metadata\": \"QUEST_X1000\",\n          \"counterName\": \"quest_complete\",\n          \"premiseMissionTaskName\": \"quest_x100\",\n          \"targetValue\": 1000,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 50}\"\n            }\n          ]\n        }\n      ],\n      \"resetType\": \"weekly\",\n      \"resetDayOfWeek\": \"monday\",\n      \"resetHour\": 10\n    },\n    {\n      \"name\": \"story\",\n      \"metadata\": \"STORY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_1-1\",\n          \"metadata\": \"QUEST_1-1\",\n          \"counterName\": \"quest1\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-2\",\n          \"metadata\": \"QUEST_1-2\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-1\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-3\",\n          \"metadata\": \"QUEST_1-3\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-2\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-4\",\n          \"metadata\": \"QUEST_1-4\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-3\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_2-1\",\n          \"metadata\": \"QUEST_2-1\",\n          \"counterName\": \"quest2\",\n          \"premiseMissionTaskName\": \"quest_1-4\",\n          \"targetValue\": 1\n        }\n      ],\n      \"resetType\": \"notReset\"\n    }\n  ],\n  \"counters\": [\n    {\n      \"name\": \"quest_complete\",\n      \"metadata\": \"QUEST_COMPLETE\",\n      \"scopes\": [\n        {\n          \"resetType\": \"daily\",\n          \"resetHour\": 5\n        },\n        {\n          \"resetType\": \"weekly\",\n          \"resetDayOfWeek\": \"monday\",\n          \"resetHour\": 5\n        }\n      ]\n    },\n    {\n      \"name\": \"lot_gacha\",\n      \"metadata\": \"LOT_GACHA\",\n      \"scopes\": [\n        {\n          \"resetType\": \"daily\",\n          \"resetHour\": 5\n        }\n      ]\n    },\n    {\n      \"name\": \"quest1\",\n      \"metadata\": \"QUEST1\",\n      \"scopes\": [\n        {\n          \"resetType\": \"notReset\"\n        }\n      ]\n    },\n    {\n      \"name\": \"quest2\",\n      \"metadata\": \"QUEST2\",\n      \"scopes\": [\n        {\n          \"resetType\": \"notReset\"\n        }\n      ]\n    }\n  ]\n}")
            .withUploadToken(null)
    );
    CurrentMissionMaster 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.UpdateCurrentMissionMasterResult> asyncResult = null;
yield return client.UpdateCurrentMissionMaster(
    new Gs2.Gs2Mission.Request.UpdateCurrentMissionMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMode("direct")
        .WithSettings("{\n  \"version\": \"2019-05-28\",\n  \"groups\": [\n    {\n      \"name\": \"daily\",\n      \"metadata\": \"DAILY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_x10\",\n          \"metadata\": \"QUEST_X10\",\n          \"counterName\": \"quest_complete\",\n          \"targetValue\": 10,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 10}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"quest_x20\",\n          \"metadata\": \"QUEST_X20\",\n          \"counterName\": \"quest_complete\",\n          \"premiseMissionTaskName\": \"quest_x10\",\n          \"targetValue\": 20,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 20}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"gacha\",\n          \"metadata\": \"GACHA\",\n          \"counterName\": \"lot_gacha\",\n          \"targetValue\": 1,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 30}\"\n            }\n          ]\n        }\n      ],\n      \"resetType\": \"daily\",\n      \"resetHour\": 10\n    },\n    {\n      \"name\": \"weekly\",\n      \"metadata\": \"WEEKLY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_x100\",\n          \"metadata\": \"QUEST_X100\",\n          \"counterName\": \"quest_complete\",\n          \"targetValue\": 100,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 40}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"quest_x1000\",\n          \"metadata\": \"QUEST_X1000\",\n          \"counterName\": \"quest_complete\",\n          \"premiseMissionTaskName\": \"quest_x100\",\n          \"targetValue\": 1000,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 50}\"\n            }\n          ]\n        }\n      ],\n      \"resetType\": \"weekly\",\n      \"resetDayOfWeek\": \"monday\",\n      \"resetHour\": 10\n    },\n    {\n      \"name\": \"story\",\n      \"metadata\": \"STORY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_1-1\",\n          \"metadata\": \"QUEST_1-1\",\n          \"counterName\": \"quest1\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-2\",\n          \"metadata\": \"QUEST_1-2\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-1\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-3\",\n          \"metadata\": \"QUEST_1-3\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-2\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-4\",\n          \"metadata\": \"QUEST_1-4\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-3\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_2-1\",\n          \"metadata\": \"QUEST_2-1\",\n          \"counterName\": \"quest2\",\n          \"premiseMissionTaskName\": \"quest_1-4\",\n          \"targetValue\": 1\n        }\n      ],\n      \"resetType\": \"notReset\"\n    }\n  ],\n  \"counters\": [\n    {\n      \"name\": \"quest_complete\",\n      \"metadata\": \"QUEST_COMPLETE\",\n      \"scopes\": [\n        {\n          \"resetType\": \"daily\",\n          \"resetHour\": 5\n        },\n        {\n          \"resetType\": \"weekly\",\n          \"resetDayOfWeek\": \"monday\",\n          \"resetHour\": 5\n        }\n      ]\n    },\n    {\n      \"name\": \"lot_gacha\",\n      \"metadata\": \"LOT_GACHA\",\n      \"scopes\": [\n        {\n          \"resetType\": \"daily\",\n          \"resetHour\": 5\n        }\n      ]\n    },\n    {\n      \"name\": \"quest1\",\n      \"metadata\": \"QUEST1\",\n      \"scopes\": [\n        {\n          \"resetType\": \"notReset\"\n        }\n      ]\n    },\n    {\n      \"name\": \"quest2\",\n      \"metadata\": \"QUEST2\",\n      \"scopes\": [\n        {\n          \"resetType\": \"notReset\"\n        }\n      ]\n    }\n  ]\n}")
        .WithUploadToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.updateCurrentMissionMaster(
        new Gs2Mission.UpdateCurrentMissionMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMode("direct")
            .withSettings("{\n  \"version\": \"2019-05-28\",\n  \"groups\": [\n    {\n      \"name\": \"daily\",\n      \"metadata\": \"DAILY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_x10\",\n          \"metadata\": \"QUEST_X10\",\n          \"counterName\": \"quest_complete\",\n          \"targetValue\": 10,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 10}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"quest_x20\",\n          \"metadata\": \"QUEST_X20\",\n          \"counterName\": \"quest_complete\",\n          \"premiseMissionTaskName\": \"quest_x10\",\n          \"targetValue\": 20,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 20}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"gacha\",\n          \"metadata\": \"GACHA\",\n          \"counterName\": \"lot_gacha\",\n          \"targetValue\": 1,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 30}\"\n            }\n          ]\n        }\n      ],\n      \"resetType\": \"daily\",\n      \"resetHour\": 10\n    },\n    {\n      \"name\": \"weekly\",\n      \"metadata\": \"WEEKLY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_x100\",\n          \"metadata\": \"QUEST_X100\",\n          \"counterName\": \"quest_complete\",\n          \"targetValue\": 100,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 40}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"quest_x1000\",\n          \"metadata\": \"QUEST_X1000\",\n          \"counterName\": \"quest_complete\",\n          \"premiseMissionTaskName\": \"quest_x100\",\n          \"targetValue\": 1000,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 50}\"\n            }\n          ]\n        }\n      ],\n      \"resetType\": \"weekly\",\n      \"resetDayOfWeek\": \"monday\",\n      \"resetHour\": 10\n    },\n    {\n      \"name\": \"story\",\n      \"metadata\": \"STORY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_1-1\",\n          \"metadata\": \"QUEST_1-1\",\n          \"counterName\": \"quest1\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-2\",\n          \"metadata\": \"QUEST_1-2\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-1\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-3\",\n          \"metadata\": \"QUEST_1-3\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-2\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-4\",\n          \"metadata\": \"QUEST_1-4\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-3\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_2-1\",\n          \"metadata\": \"QUEST_2-1\",\n          \"counterName\": \"quest2\",\n          \"premiseMissionTaskName\": \"quest_1-4\",\n          \"targetValue\": 1\n        }\n      ],\n      \"resetType\": \"notReset\"\n    }\n  ],\n  \"counters\": [\n    {\n      \"name\": \"quest_complete\",\n      \"metadata\": \"QUEST_COMPLETE\",\n      \"scopes\": [\n        {\n          \"resetType\": \"daily\",\n          \"resetHour\": 5\n        },\n        {\n          \"resetType\": \"weekly\",\n          \"resetDayOfWeek\": \"monday\",\n          \"resetHour\": 5\n        }\n      ]\n    },\n    {\n      \"name\": \"lot_gacha\",\n      \"metadata\": \"LOT_GACHA\",\n      \"scopes\": [\n        {\n          \"resetType\": \"daily\",\n          \"resetHour\": 5\n        }\n      ]\n    },\n    {\n      \"name\": \"quest1\",\n      \"metadata\": \"QUEST1\",\n      \"scopes\": [\n        {\n          \"resetType\": \"notReset\"\n        }\n      ]\n    },\n    {\n      \"name\": \"quest2\",\n      \"metadata\": \"QUEST2\",\n      \"scopes\": [\n        {\n          \"resetType\": \"notReset\"\n        }\n      ]\n    }\n  ]\n}")
            .withUploadToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.update_current_mission_master(
        mission.UpdateCurrentMissionMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mode('direct')
            .with_settings('{\n  "version": "2019-05-28",\n  "groups": [\n    {\n      "name": "daily",\n      "metadata": "DAILY",\n      "tasks": [\n        {\n          "name": "quest_x10",\n          "metadata": "QUEST_X10",\n          "counterName": "quest_complete",\n          "targetValue": 10,\n          "completeAcquireActions": [\n            {\n              "action": "Gs2Experience:AddExperienceByUserId",\n              "request": "{\\"experienceName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"experienceModelName\\": \\"player\\", \\"propertyId\\": \\"player\\", \\"experienceValue\\": 10}"\n            }\n          ]\n        },\n        {\n          "name": "quest_x20",\n          "metadata": "QUEST_X20",\n          "counterName": "quest_complete",\n          "premiseMissionTaskName": "quest_x10",\n          "targetValue": 20,\n          "completeAcquireActions": [\n            {\n              "action": "Gs2Experience:AddExperienceByUserId",\n              "request": "{\\"experienceName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"experienceModelName\\": \\"player\\", \\"propertyId\\": \\"player\\", \\"experienceValue\\": 20}"\n            }\n          ]\n        },\n        {\n          "name": "gacha",\n          "metadata": "GACHA",\n          "counterName": "lot_gacha",\n          "targetValue": 1,\n          "completeAcquireActions": [\n            {\n              "action": "Gs2Experience:AddExperienceByUserId",\n              "request": "{\\"experienceName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"experienceModelName\\": \\"player\\", \\"propertyId\\": \\"player\\", \\"experienceValue\\": 30}"\n            }\n          ]\n        }\n      ],\n      "resetType": "daily",\n      "resetHour": 10\n    },\n    {\n      "name": "weekly",\n      "metadata": "WEEKLY",\n      "tasks": [\n        {\n          "name": "quest_x100",\n          "metadata": "QUEST_X100",\n          "counterName": "quest_complete",\n          "targetValue": 100,\n          "completeAcquireActions": [\n            {\n              "action": "Gs2Experience:AddExperienceByUserId",\n              "request": "{\\"experienceName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"experienceModelName\\": \\"player\\", \\"propertyId\\": \\"player\\", \\"experienceValue\\": 40}"\n            }\n          ]\n        },\n        {\n          "name": "quest_x1000",\n          "metadata": "QUEST_X1000",\n          "counterName": "quest_complete",\n          "premiseMissionTaskName": "quest_x100",\n          "targetValue": 1000,\n          "completeAcquireActions": [\n            {\n              "action": "Gs2Experience:AddExperienceByUserId",\n              "request": "{\\"experienceName\\": \\"basic\\", \\"userId\\": \\"#{userId}\\", \\"experienceModelName\\": \\"player\\", \\"propertyId\\": \\"player\\", \\"experienceValue\\": 50}"\n            }\n          ]\n        }\n      ],\n      "resetType": "weekly",\n      "resetDayOfWeek": "monday",\n      "resetHour": 10\n    },\n    {\n      "name": "story",\n      "metadata": "STORY",\n      "tasks": [\n        {\n          "name": "quest_1-1",\n          "metadata": "QUEST_1-1",\n          "counterName": "quest1",\n          "targetValue": 1\n        },\n        {\n          "name": "quest_1-2",\n          "metadata": "QUEST_1-2",\n          "counterName": "quest1",\n          "premiseMissionTaskName": "quest_1-1",\n          "targetValue": 1\n        },\n        {\n          "name": "quest_1-3",\n          "metadata": "QUEST_1-3",\n          "counterName": "quest1",\n          "premiseMissionTaskName": "quest_1-2",\n          "targetValue": 1\n        },\n        {\n          "name": "quest_1-4",\n          "metadata": "QUEST_1-4",\n          "counterName": "quest1",\n          "premiseMissionTaskName": "quest_1-3",\n          "targetValue": 1\n        },\n        {\n          "name": "quest_2-1",\n          "metadata": "QUEST_2-1",\n          "counterName": "quest2",\n          "premiseMissionTaskName": "quest_1-4",\n          "targetValue": 1\n        }\n      ],\n      "resetType": "notReset"\n    }\n  ],\n  "counters": [\n    {\n      "name": "quest_complete",\n      "metadata": "QUEST_COMPLETE",\n      "scopes": [\n        {\n          "resetType": "daily",\n          "resetHour": 5\n        },\n        {\n          "resetType": "weekly",\n          "resetDayOfWeek": "monday",\n          "resetHour": 5\n        }\n      ]\n    },\n    {\n      "name": "lot_gacha",\n      "metadata": "LOT_GACHA",\n      "scopes": [\n        {\n          "resetType": "daily",\n          "resetHour": 5\n        }\n      ]\n    },\n    {\n      "name": "quest1",\n      "metadata": "QUEST1",\n      "scopes": [\n        {\n          "resetType": "notReset"\n        }\n      ]\n    },\n    {\n      "name": "quest2",\n      "metadata": "QUEST2",\n      "scopes": [\n        {\n          "resetType": "notReset"\n        }\n      ]\n    }\n  ]\n}')
            .with_upload_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.update_current_mission_master({
    namespaceName="namespace-0001",
    mode="direct",
    settings="{\n  \"version\": \"2019-05-28\",\n  \"groups\": [\n    {\n      \"name\": \"daily\",\n      \"metadata\": \"DAILY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_x10\",\n          \"metadata\": \"QUEST_X10\",\n          \"counterName\": \"quest_complete\",\n          \"targetValue\": 10,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 10}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"quest_x20\",\n          \"metadata\": \"QUEST_X20\",\n          \"counterName\": \"quest_complete\",\n          \"premiseMissionTaskName\": \"quest_x10\",\n          \"targetValue\": 20,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 20}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"gacha\",\n          \"metadata\": \"GACHA\",\n          \"counterName\": \"lot_gacha\",\n          \"targetValue\": 1,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 30}\"\n            }\n          ]\n        }\n      ],\n      \"resetType\": \"daily\",\n      \"resetHour\": 10\n    },\n    {\n      \"name\": \"weekly\",\n      \"metadata\": \"WEEKLY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_x100\",\n          \"metadata\": \"QUEST_X100\",\n          \"counterName\": \"quest_complete\",\n          \"targetValue\": 100,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 40}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"quest_x1000\",\n          \"metadata\": \"QUEST_X1000\",\n          \"counterName\": \"quest_complete\",\n          \"premiseMissionTaskName\": \"quest_x100\",\n          \"targetValue\": 1000,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 50}\"\n            }\n          ]\n        }\n      ],\n      \"resetType\": \"weekly\",\n      \"resetDayOfWeek\": \"monday\",\n      \"resetHour\": 10\n    },\n    {\n      \"name\": \"story\",\n      \"metadata\": \"STORY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_1-1\",\n          \"metadata\": \"QUEST_1-1\",\n          \"counterName\": \"quest1\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-2\",\n          \"metadata\": \"QUEST_1-2\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-1\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-3\",\n          \"metadata\": \"QUEST_1-3\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-2\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-4\",\n          \"metadata\": \"QUEST_1-4\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-3\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_2-1\",\n          \"metadata\": \"QUEST_2-1\",\n          \"counterName\": \"quest2\",\n          \"premiseMissionTaskName\": \"quest_1-4\",\n          \"targetValue\": 1\n        }\n      ],\n      \"resetType\": \"notReset\"\n    }\n  ],\n  \"counters\": [\n    {\n      \"name\": \"quest_complete\",\n      \"metadata\": \"QUEST_COMPLETE\",\n      \"scopes\": [\n        {\n          \"resetType\": \"daily\",\n          \"resetHour\": 5\n        },\n        {\n          \"resetType\": \"weekly\",\n          \"resetDayOfWeek\": \"monday\",\n          \"resetHour\": 5\n        }\n      ]\n    },\n    {\n      \"name\": \"lot_gacha\",\n      \"metadata\": \"LOT_GACHA\",\n      \"scopes\": [\n        {\n          \"resetType\": \"daily\",\n          \"resetHour\": 5\n        }\n      ]\n    },\n    {\n      \"name\": \"quest1\",\n      \"metadata\": \"QUEST1\",\n      \"scopes\": [\n        {\n          \"resetType\": \"notReset\"\n        }\n      ]\n    },\n    {\n      \"name\": \"quest2\",\n      \"metadata\": \"QUEST2\",\n      \"scopes\": [\n        {\n          \"resetType\": \"notReset\"\n        }\n      ]\n    }\n  ]\n}",
    uploadToken=nil,
})

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

result = api_result.result
item = result.item;

```

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

client = gs2('mission')

api_result_handler = client.update_current_mission_master_async({
    namespaceName="namespace-0001",
    mode="direct",
    settings="{\n  \"version\": \"2019-05-28\",\n  \"groups\": [\n    {\n      \"name\": \"daily\",\n      \"metadata\": \"DAILY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_x10\",\n          \"metadata\": \"QUEST_X10\",\n          \"counterName\": \"quest_complete\",\n          \"targetValue\": 10,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 10}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"quest_x20\",\n          \"metadata\": \"QUEST_X20\",\n          \"counterName\": \"quest_complete\",\n          \"premiseMissionTaskName\": \"quest_x10\",\n          \"targetValue\": 20,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 20}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"gacha\",\n          \"metadata\": \"GACHA\",\n          \"counterName\": \"lot_gacha\",\n          \"targetValue\": 1,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 30}\"\n            }\n          ]\n        }\n      ],\n      \"resetType\": \"daily\",\n      \"resetHour\": 10\n    },\n    {\n      \"name\": \"weekly\",\n      \"metadata\": \"WEEKLY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_x100\",\n          \"metadata\": \"QUEST_X100\",\n          \"counterName\": \"quest_complete\",\n          \"targetValue\": 100,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 40}\"\n            }\n          ]\n        },\n        {\n          \"name\": \"quest_x1000\",\n          \"metadata\": \"QUEST_X1000\",\n          \"counterName\": \"quest_complete\",\n          \"premiseMissionTaskName\": \"quest_x100\",\n          \"targetValue\": 1000,\n          \"completeAcquireActions\": [\n            {\n              \"action\": \"Gs2Experience:AddExperienceByUserId\",\n              \"request\": \"{\\\"experienceName\\\": \\\"basic\\\", \\\"userId\\\": \\\"#{userId}\\\", \\\"experienceModelName\\\": \\\"player\\\", \\\"propertyId\\\": \\\"player\\\", \\\"experienceValue\\\": 50}\"\n            }\n          ]\n        }\n      ],\n      \"resetType\": \"weekly\",\n      \"resetDayOfWeek\": \"monday\",\n      \"resetHour\": 10\n    },\n    {\n      \"name\": \"story\",\n      \"metadata\": \"STORY\",\n      \"tasks\": [\n        {\n          \"name\": \"quest_1-1\",\n          \"metadata\": \"QUEST_1-1\",\n          \"counterName\": \"quest1\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-2\",\n          \"metadata\": \"QUEST_1-2\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-1\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-3\",\n          \"metadata\": \"QUEST_1-3\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-2\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_1-4\",\n          \"metadata\": \"QUEST_1-4\",\n          \"counterName\": \"quest1\",\n          \"premiseMissionTaskName\": \"quest_1-3\",\n          \"targetValue\": 1\n        },\n        {\n          \"name\": \"quest_2-1\",\n          \"metadata\": \"QUEST_2-1\",\n          \"counterName\": \"quest2\",\n          \"premiseMissionTaskName\": \"quest_1-4\",\n          \"targetValue\": 1\n        }\n      ],\n      \"resetType\": \"notReset\"\n    }\n  ],\n  \"counters\": [\n    {\n      \"name\": \"quest_complete\",\n      \"metadata\": \"QUEST_COMPLETE\",\n      \"scopes\": [\n        {\n          \"resetType\": \"daily\",\n          \"resetHour\": 5\n        },\n        {\n          \"resetType\": \"weekly\",\n          \"resetDayOfWeek\": \"monday\",\n          \"resetHour\": 5\n        }\n      ]\n    },\n    {\n      \"name\": \"lot_gacha\",\n      \"metadata\": \"LOT_GACHA\",\n      \"scopes\": [\n        {\n          \"resetType\": \"daily\",\n          \"resetHour\": 5\n        }\n      ]\n    },\n    {\n      \"name\": \"quest1\",\n      \"metadata\": \"QUEST1\",\n      \"scopes\": [\n        {\n          \"resetType\": \"notReset\"\n        }\n      ]\n    },\n    {\n      \"name\": \"quest2\",\n      \"metadata\": \"QUEST2\",\n      \"scopes\": [\n        {\n          \"resetType\": \"notReset\"\n        }\n      ]\n    }\n  ]\n}",
    uploadToken=nil,
})

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

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

result = api_result.result
item = result.item;

```



---

### updateCurrentMissionMasterFromGitHub

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

지정된 GitHub 리포지토리에서 마스터 데이터를 가져와, 현재 활성화된 미션 모델의 마스터 데이터를 갱신합니다.<br>
GS2-Key 에 저장된 API 키가 인증에 사용되며, 체크아웃할 브랜치, 태그 또는 커밋 해시를 지정할 수 있습니다.


#### Request

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

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [CurrentMissionMaster](#currentmissionmaster) | 갱신된 현재 활성화된 미션 모델의 마스터 데이터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentMissionMasterFromGitHub(
    &mission.UpdateCurrentMissionMasterFromGitHubRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CheckoutSetting: &mission.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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\UpdateCurrentMissionMasterFromGitHubRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->updateCurrentMissionMasterFromGitHub(
        (new UpdateCurrentMissionMasterFromGitHubRequest())
            ->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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.UpdateCurrentMissionMasterFromGitHubRequest;
import io.gs2.mission.result.UpdateCurrentMissionMasterFromGitHubResult;

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

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

AsyncResult<Gs2.Gs2Mission.Result.UpdateCurrentMissionMasterFromGitHubResult> asyncResult = null;
yield return client.UpdateCurrentMissionMasterFromGitHub(
    new Gs2.Gs2Mission.Request.UpdateCurrentMissionMasterFromGitHubRequest()
        .WithNamespaceName("namespace-0001")
        .WithCheckoutSetting(new Gs2.Gs2Mission.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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.updateCurrentMissionMasterFromGitHub(
        new Gs2Mission.UpdateCurrentMissionMasterFromGitHubRequest()
            .withNamespaceName("namespace-0001")
            .withCheckoutSetting(new Gs2Mission.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 mission

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

try:
    result = client.update_current_mission_master_from_git_hub(
        mission.UpdateCurrentMissionMasterFromGitHubRequest()
            .with_namespace_name('namespace-0001')
            .with_checkout_setting(mission.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('mission')

api_result = client.update_current_mission_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('mission')

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

```



---

### describeCounterModelMasters

카운터 모델 마스터 목록 취득<br>

지정된 네임스페이스의 카운터 모델 마스터의 페이지네이션 리스트를 취득합니다.<br>
이름의 접두사로 필터링할 수 있습니다.


#### Request

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

#### Result

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

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DescribeCounterModelMasters(
    &mission.DescribeCounterModelMastersRequest {
        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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DescribeCounterModelMastersRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->describeCounterModelMasters(
        (new DescribeCounterModelMastersRequest())
            ->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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.DescribeCounterModelMastersRequest;
import io.gs2.mission.result.DescribeCounterModelMastersResult;

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

try {
    DescribeCounterModelMastersResult result = client.describeCounterModelMasters(
        new DescribeCounterModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<CounterModelMaster> 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.DescribeCounterModelMastersResult> asyncResult = null;
yield return client.DescribeCounterModelMasters(
    new Gs2.Gs2Mission.Request.DescribeCounterModelMastersRequest()
        .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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.describeCounterModelMasters(
        new Gs2Mission.DescribeCounterModelMastersRequest()
            .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 mission

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

try:
    result = client.describe_counter_model_masters(
        mission.DescribeCounterModelMastersRequest()
            .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('mission')

api_result = client.describe_counter_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('mission')

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

```



---

### createCounterModelMaster

카운터 모델 마스터를 신규 작성<br>

지정된 설정으로 새로운 카운터 모델 마스터를 작성합니다.<br>
리셋 조건(일간·주간·월간·커스텀)을 정의하는 스코프와, 카운터가 유효한 기간을 제어하는 챌린지 기간 이벤트를 설정할 수 있습니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| name | string |  | ✓|  |  ~ 128자 | 카운터 모델명<br>카운터 모델 고유 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| metadata | string |  | |  |  ~ 1024자 | 메타데이터<br>메타데이터에는 임의의 값을 설정할 수 있습니다.<br>이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. |
| description | string |  | |  |  ~ 1024자 | 설명문 |
| scopes | [List&lt;CounterScopeModel&gt;](#counterscopemodel) |  | | [] | 1 ~ 20 items | 카운터의 리셋 타이밍 목록<br>이 카운터의 스코프(리셋 타이밍 또는 검증 액션 조건)를 정의합니다. 하나의 카운터에 여러 스코프를 설정할 수 있으며, 서로 다른 기간의 값(예: 데일리, 위클리, 누계를 동시에)을 추적할 수 있습니다. |
| challengePeriodEventId | string |  | |  |  ~ 1024자 | 카운터를 조작할 수 있는 기간을 설정한 GS2-Schedule 이벤트 GRN<br>이 카운터의 증감이 가능한 기간을 정의하는 GS2-Schedule 이벤트를 지정합니다. 설정하지 않은 경우, 카운터는 언제든지 조작할 수 있습니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [CounterModelMaster](#countermodelmaster) | 작성한 카운터 모델 마스터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.CreateCounterModelMaster(
    &mission.CreateCounterModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("counter-0001"),
        Metadata: nil,
        Description: nil,
        Scopes: []mission.CounterScopeModel{
            mission.CounterScopeModel{
                ResetType: pointy.String("notReset"),
            },
        },
        ChallengePeriodEventId: 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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\CreateCounterModelMasterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->createCounterModelMaster(
        (new CreateCounterModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("counter-0001")
            ->withMetadata(null)
            ->withDescription(null)
            ->withScopes([
                (new \Gs2\Mission\Model\CounterScopeModel())
                    ->withResetType("notReset"),
            ])
            ->withChallengePeriodEventId(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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.CreateCounterModelMasterRequest;
import io.gs2.mission.result.CreateCounterModelMasterResult;

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

try {
    CreateCounterModelMasterResult result = client.createCounterModelMaster(
        new CreateCounterModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("counter-0001")
            .withMetadata(null)
            .withDescription(null)
            .withScopes(Arrays.asList(
                new io.gs2.mission.model.CounterScopeModel()
                    .withResetType("notReset")
            ))
            .withChallengePeriodEventId(null)
    );
    CounterModelMaster 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.CreateCounterModelMasterResult> asyncResult = null;
yield return client.CreateCounterModelMaster(
    new Gs2.Gs2Mission.Request.CreateCounterModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("counter-0001")
        .WithMetadata(null)
        .WithDescription(null)
        .WithScopes(new Gs2.Gs2Mission.Model.CounterScopeModel[] {
            new Gs2.Gs2Mission.Model.CounterScopeModel()
                .WithResetType("notReset"),
        })
        .WithChallengePeriodEventId(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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.createCounterModelMaster(
        new Gs2Mission.CreateCounterModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("counter-0001")
            .withMetadata(null)
            .withDescription(null)
            .withScopes([
                new Gs2Mission.model.CounterScopeModel()
                    .withResetType("notReset"),
            ])
            .withChallengePeriodEventId(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.create_counter_model_master(
        mission.CreateCounterModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_name('counter-0001')
            .with_metadata(None)
            .with_description(None)
            .with_scopes([
                mission.CounterScopeModel()
                    .with_reset_type('notReset'),
            ])
            .with_challenge_period_event_id(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.create_counter_model_master({
    namespaceName="namespace-0001",
    name="counter-0001",
    metadata=nil,
    description=nil,
    scopes={
        {
            resetType="notReset",
        }
    },
    challengePeriodEventId=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('mission')

api_result_handler = client.create_counter_model_master_async({
    namespaceName="namespace-0001",
    name="counter-0001",
    metadata=nil,
    description=nil,
    scopes={
        {
            resetType="notReset",
        }
    },
    challengePeriodEventId=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;

```



---

### getCounterModelMaster

카운터 모델 마스터를 취득<br>

지정된 카운터 모델 마스터의 스코프, 리셋 조건, 챌린지 기간 이벤트 설정을 포함한 정보를 취득합니다.


#### Request

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

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [CounterModelMaster](#countermodelmaster) | 카운터 모델 마스터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.GetCounterModelMaster(
    &mission.GetCounterModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CounterName: pointy.String("counter-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\GetCounterModelMasterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->getCounterModelMaster(
        (new GetCounterModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withCounterName("counter-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.GetCounterModelMasterRequest;
import io.gs2.mission.result.GetCounterModelMasterResult;

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

try {
    GetCounterModelMasterResult result = client.getCounterModelMaster(
        new GetCounterModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("counter-0001")
    );
    CounterModelMaster 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.GetCounterModelMasterResult> asyncResult = null;
yield return client.GetCounterModelMaster(
    new Gs2.Gs2Mission.Request.GetCounterModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithCounterName("counter-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.getCounterModelMaster(
        new Gs2Mission.GetCounterModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("counter-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.get_counter_model_master(
        mission.GetCounterModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_counter_name('counter-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.get_counter_model_master({
    namespaceName="namespace-0001",
    counterName="counter-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('mission')

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

```



---

### updateCounterModelMaster

카운터 모델 마스터를 갱신<br>

지정된 카운터 모델 마스터를 갱신합니다. 메타데이터, 설명, 스코프, 챌린지 기간 이벤트 ID를 변경할 수 있습니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| counterName | string |  | ✓|  |  ~ 128자 | 카운터 모델명<br>카운터 모델 고유 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| metadata | string |  | |  |  ~ 1024자 | 메타데이터<br>메타데이터에는 임의의 값을 설정할 수 있습니다.<br>이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. |
| description | string |  | |  |  ~ 1024자 | 설명문 |
| scopes | [List&lt;CounterScopeModel&gt;](#counterscopemodel) |  | | [] | 1 ~ 20 items | 카운터의 리셋 타이밍 목록<br>이 카운터의 스코프(리셋 타이밍 또는 검증 액션 조건)를 정의합니다. 하나의 카운터에 여러 스코프를 설정할 수 있으며, 서로 다른 기간의 값(예: 데일리, 위클리, 누계를 동시에)을 추적할 수 있습니다. |
| challengePeriodEventId | string |  | |  |  ~ 1024자 | 카운터를 조작할 수 있는 기간을 설정한 GS2-Schedule 이벤트 GRN<br>이 카운터의 증감이 가능한 기간을 정의하는 GS2-Schedule 이벤트를 지정합니다. 설정하지 않은 경우, 카운터는 언제든지 조작할 수 있습니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [CounterModelMaster](#countermodelmaster) | 갱신한 카운터 모델 마스터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.UpdateCounterModelMaster(
    &mission.UpdateCounterModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CounterName: pointy.String("counter-0001"),
        Metadata: pointy.String("COUNTER1"),
        Description: pointy.String("description1"),
        Scopes: []mission.CounterScopeModel{
            mission.CounterScopeModel{
                ResetType: pointy.String("monthly"),
                ResetHour: pointy.Int32(5),
                ResetDayOfMonth: pointy.Int32(1),
            },
        },
        ChallengePeriodEventId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\UpdateCounterModelMasterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->updateCounterModelMaster(
        (new UpdateCounterModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withCounterName("counter-0001")
            ->withMetadata("COUNTER1")
            ->withDescription("description1")
            ->withScopes([
                (new \Gs2\Mission\Model\CounterScopeModel())
                    ->withResetType("monthly")
                    ->withResetHour(5)
                    ->withResetDayOfMonth(1),
            ])
            ->withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.UpdateCounterModelMasterRequest;
import io.gs2.mission.result.UpdateCounterModelMasterResult;

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

try {
    UpdateCounterModelMasterResult result = client.updateCounterModelMaster(
        new UpdateCounterModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("counter-0001")
            .withMetadata("COUNTER1")
            .withDescription("description1")
            .withScopes(Arrays.asList(
                new io.gs2.mission.model.CounterScopeModel()
                    .withResetType("monthly")
                    .withResetHour(5)
                    .withResetDayOfMonth(1)
            ))
            .withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001")
    );
    CounterModelMaster 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.UpdateCounterModelMasterResult> asyncResult = null;
yield return client.UpdateCounterModelMaster(
    new Gs2.Gs2Mission.Request.UpdateCounterModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithCounterName("counter-0001")
        .WithMetadata("COUNTER1")
        .WithDescription("description1")
        .WithScopes(new Gs2.Gs2Mission.Model.CounterScopeModel[] {
            new Gs2.Gs2Mission.Model.CounterScopeModel()
                .WithResetType("monthly")
                .WithResetHour(5)
                .WithResetDayOfMonth(1),
        })
        .WithChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.updateCounterModelMaster(
        new Gs2Mission.UpdateCounterModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("counter-0001")
            .withMetadata("COUNTER1")
            .withDescription("description1")
            .withScopes([
                new Gs2Mission.model.CounterScopeModel()
                    .withResetType("monthly")
                    .withResetHour(5)
                    .withResetDayOfMonth(1),
            ])
            .withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.update_counter_model_master(
        mission.UpdateCounterModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_counter_name('counter-0001')
            .with_metadata('COUNTER1')
            .with_description('description1')
            .with_scopes([
                mission.CounterScopeModel()
                    .with_reset_type('monthly')
                    .with_reset_hour(5)
                    .with_reset_day_of_month(1),
            ])
            .with_challenge_period_event_id('grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.update_counter_model_master({
    namespaceName="namespace-0001",
    counterName="counter-0001",
    metadata="COUNTER1",
    description="description1",
    scopes={
        {
            resetType="monthly",
            resetHour=5,
            resetDayOfMonth=1,
        }
    },
    challengePeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-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('mission')

api_result_handler = client.update_counter_model_master_async({
    namespaceName="namespace-0001",
    counterName="counter-0001",
    metadata="COUNTER1",
    description="description1",
    scopes={
        {
            resetType="monthly",
            resetHour=5,
            resetDayOfMonth=1,
        }
    },
    challengePeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-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;

```



---

### deleteCounterModelMaster

카운터 모델 마스터를 삭제<br>

지정된 카운터 모델 마스터를 삭제합니다.<br>
다음 마스터 데이터 갱신까지, 현재 활성화된 마스터 데이터에는 영향을 미치지 않습니다.


#### Request

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

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [CounterModelMaster](#countermodelmaster) | 삭제한 카운터 모델 마스터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DeleteCounterModelMaster(
    &mission.DeleteCounterModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CounterName: pointy.String("counter-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DeleteCounterModelMasterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->deleteCounterModelMaster(
        (new DeleteCounterModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withCounterName("counter-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.DeleteCounterModelMasterRequest;
import io.gs2.mission.result.DeleteCounterModelMasterResult;

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

try {
    DeleteCounterModelMasterResult result = client.deleteCounterModelMaster(
        new DeleteCounterModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("counter-0001")
    );
    CounterModelMaster 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.DeleteCounterModelMasterResult> asyncResult = null;
yield return client.DeleteCounterModelMaster(
    new Gs2.Gs2Mission.Request.DeleteCounterModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithCounterName("counter-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.deleteCounterModelMaster(
        new Gs2Mission.DeleteCounterModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withCounterName("counter-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.delete_counter_model_master(
        mission.DeleteCounterModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_counter_name('counter-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.delete_counter_model_master({
    namespaceName="namespace-0001",
    counterName="counter-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('mission')

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

```



---

### describeMissionGroupModelMasters

미션 그룹 모델 마스터 목록 취득<br>

지정된 네임스페이스의 미션 그룹 모델 마스터의 페이지네이션 리스트를 취득합니다.<br>
이름의 접두사로 필터링할 수 있습니다.


#### Request

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

#### Result

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

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DescribeMissionGroupModelMasters(
    &mission.DescribeMissionGroupModelMastersRequest {
        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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DescribeMissionGroupModelMastersRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->describeMissionGroupModelMasters(
        (new DescribeMissionGroupModelMastersRequest())
            ->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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.DescribeMissionGroupModelMastersRequest;
import io.gs2.mission.result.DescribeMissionGroupModelMastersResult;

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

try {
    DescribeMissionGroupModelMastersResult result = client.describeMissionGroupModelMasters(
        new DescribeMissionGroupModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<MissionGroupModelMaster> 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.DescribeMissionGroupModelMastersResult> asyncResult = null;
yield return client.DescribeMissionGroupModelMasters(
    new Gs2.Gs2Mission.Request.DescribeMissionGroupModelMastersRequest()
        .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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.describeMissionGroupModelMasters(
        new Gs2Mission.DescribeMissionGroupModelMastersRequest()
            .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 mission

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

try:
    result = client.describe_mission_group_model_masters(
        mission.DescribeMissionGroupModelMastersRequest()
            .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('mission')

api_result = client.describe_mission_group_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('mission')

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

```



---

### createMissionGroupModelMaster

미션 그룹 모델 마스터를 신규 작성<br>

지정된 설정으로 새로운 미션 그룹 모델 마스터를 작성합니다.<br>
리셋 타입(일간·주간·월간·없음), 리셋 타이밍(시간·요일·월일·기준 타임스탬프), 달성 시 통지 네임스페이스를 설정할 수 있습니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| name | string |  | ✓|  |  ~ 128자 | 미션 그룹 모델명<br>미션 그룹 모델 고유 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| metadata | string |  | |  |  ~ 1024자 | 메타데이터<br>메타데이터에는 임의의 값을 설정할 수 있습니다.<br>이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. |
| description | string |  | |  |  ~ 1024자 | 설명문 |
| resetType | 문자열 열거형<br>enum {<br>"notReset",<br>"daily",<br>"weekly",<br>"monthly",<br>"days"<br>}<br> |  | | "notReset" |  | 리셋 타이밍<br>미션 그룹의 달성 상황이 리셋되는 타이밍을 결정합니다. 리셋하지 않음(영구), 매일, 매주, 매월, 기준 일시부터 일정 일수마다 중에서 선택합니다.notReset: 리셋 안 함 / daily: 매일 / weekly: 매주 / monthly: 매월 / days: 일정 일수마다 /  |
| resetDayOfMonth | int | {resetType} == "monthly" | ✓※|  | 1 ~ 31 | 리셋하는 날짜<br>미션 그룹이 리셋되는 월의 날짜입니다. 지정한 값이 해당 월의 일수를 초과하는 경우, 그 달의 마지막 날로 처리됩니다. resetType이 "monthly"인 경우에만 사용됩니다.<br>※ resetType이(가) "monthly" 이면 필수 |
| resetDayOfWeek | 문자열 열거형<br>enum {<br>"sunday",<br>"monday",<br>"tuesday",<br>"wednesday",<br>"thursday",<br>"friday",<br>"saturday"<br>}<br> | {resetType} == "weekly" | ✓※|  |  | 리셋하는 요일<br>미션 그룹이 리셋되는 요일입니다. resetType이 "weekly"인 경우에만 사용됩니다.sunday: 일요일 / monday: 월요일 / tuesday: 화요일 / wednesday: 수요일 / thursday: 목요일 / friday: 금요일 / saturday: 토요일 / <br>※ resetType이(가) "weekly" 이면 필수 |
| resetHour | int | {resetType} in ["monthly", "weekly", "daily"] | ✓※|  | 0 ~ 23 | 리셋 시각<br>미션 그룹이 리셋되는 시각(0~23)입니다. 매일, 매주, 매월 리셋 타입과 조합하여 사용됩니다.<br>※ resetType이(가) "monthly","weekly","daily"이면 필수 |
| anchorTimestamp | long | {resetType} == "days" | ✓※|  |  | 경과 일수를 계산하는 기준 일시<br>UNIX 시간(밀리초)<br>※ resetType이(가) "days" 이면 필수 |
| days | int | {resetType} == "days" | ✓※|  | 1 ~ 2147483646 | 리셋하는 일수<br>기준 일시부터 카운트되는 리셋 간격 일수입니다. resetType이 "days"인 경우에만 사용됩니다.<br>※ resetType이(가) "days" 이면 필수 |
| completeNotificationNamespaceId | string |  | |  |  ~ 1024자 | 미션 태스크를 달성했을 때의 푸시 통지<br>이 그룹 내의 미션 태스크가 달성되었을 때 푸시 통지를 전송하는 데 사용되는 GS2-Gateway의 네임스페이스 GRN입니다. 게임 클라이언트에 실시간으로 통지할 수 있습니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [MissionGroupModelMaster](#missiongroupmodelmaster) | 작성한 미션 그룹 모델 마스터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.CreateMissionGroupModelMaster(
    &mission.CreateMissionGroupModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("mission-group-0001"),
        Metadata: nil,
        Description: nil,
        ResetType: pointy.String("notReset"),
        ResetDayOfMonth: pointy.Int32(1),
        ResetDayOfWeek: pointy.String("monday"),
        ResetHour: pointy.Int32(10),
        AnchorTimestamp: pointy.Int64(100000),
        Days: pointy.Int32(3),
        CompleteNotificationNamespaceId: 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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\CreateMissionGroupModelMasterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->createMissionGroupModelMaster(
        (new CreateMissionGroupModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("mission-group-0001")
            ->withMetadata(null)
            ->withDescription(null)
            ->withResetType("notReset")
            ->withResetDayOfMonth(1)
            ->withResetDayOfWeek("monday")
            ->withResetHour(10)
            ->withAnchorTimestamp(100000)
            ->withDays(3)
            ->withCompleteNotificationNamespaceId(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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.CreateMissionGroupModelMasterRequest;
import io.gs2.mission.result.CreateMissionGroupModelMasterResult;

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

try {
    CreateMissionGroupModelMasterResult result = client.createMissionGroupModelMaster(
        new CreateMissionGroupModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("mission-group-0001")
            .withMetadata(null)
            .withDescription(null)
            .withResetType("notReset")
            .withResetDayOfMonth(1)
            .withResetDayOfWeek("monday")
            .withResetHour(10)
            .withAnchorTimestamp(100000L)
            .withDays(3)
            .withCompleteNotificationNamespaceId(null)
    );
    MissionGroupModelMaster 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.CreateMissionGroupModelMasterResult> asyncResult = null;
yield return client.CreateMissionGroupModelMaster(
    new Gs2.Gs2Mission.Request.CreateMissionGroupModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("mission-group-0001")
        .WithMetadata(null)
        .WithDescription(null)
        .WithResetType("notReset")
        .WithResetDayOfMonth(1)
        .WithResetDayOfWeek("monday")
        .WithResetHour(10)
        .WithAnchorTimestamp(100000L)
        .WithDays(3)
        .WithCompleteNotificationNamespaceId(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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.createMissionGroupModelMaster(
        new Gs2Mission.CreateMissionGroupModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("mission-group-0001")
            .withMetadata(null)
            .withDescription(null)
            .withResetType("notReset")
            .withResetDayOfMonth(1)
            .withResetDayOfWeek("monday")
            .withResetHour(10)
            .withAnchorTimestamp(100000)
            .withDays(3)
            .withCompleteNotificationNamespaceId(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.create_mission_group_model_master(
        mission.CreateMissionGroupModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_name('mission-group-0001')
            .with_metadata(None)
            .with_description(None)
            .with_reset_type('notReset')
            .with_reset_day_of_month(1)
            .with_reset_day_of_week('monday')
            .with_reset_hour(10)
            .with_anchor_timestamp(100000)
            .with_days(3)
            .with_complete_notification_namespace_id(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.create_mission_group_model_master({
    namespaceName="namespace-0001",
    name="mission-group-0001",
    metadata=nil,
    description=nil,
    resetType="notReset",
    resetDayOfMonth=1,
    resetDayOfWeek="monday",
    resetHour=10,
    anchorTimestamp=100000,
    days=3,
    completeNotificationNamespaceId=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('mission')

api_result_handler = client.create_mission_group_model_master_async({
    namespaceName="namespace-0001",
    name="mission-group-0001",
    metadata=nil,
    description=nil,
    resetType="notReset",
    resetDayOfMonth=1,
    resetDayOfWeek="monday",
    resetHour=10,
    anchorTimestamp=100000,
    days=3,
    completeNotificationNamespaceId=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;

```



---

### getMissionGroupModelMaster

미션 그룹 모델 마스터를 취득<br>

지정된 미션 그룹 모델 마스터의 리셋 타입, 리셋 타이밍, 통지 설정을 포함한 정보를 취득합니다.


#### Request

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

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [MissionGroupModelMaster](#missiongroupmodelmaster) | 미션 그룹 모델 마스터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.GetMissionGroupModelMaster(
    &mission.GetMissionGroupModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\GetMissionGroupModelMasterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->getMissionGroupModelMaster(
        (new GetMissionGroupModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.GetMissionGroupModelMasterRequest;
import io.gs2.mission.result.GetMissionGroupModelMasterResult;

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

try {
    GetMissionGroupModelMasterResult result = client.getMissionGroupModelMaster(
        new GetMissionGroupModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
    );
    MissionGroupModelMaster 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.GetMissionGroupModelMasterResult> asyncResult = null;
yield return client.GetMissionGroupModelMaster(
    new Gs2.Gs2Mission.Request.GetMissionGroupModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.getMissionGroupModelMaster(
        new Gs2Mission.GetMissionGroupModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.get_mission_group_model_master(
        mission.GetMissionGroupModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.get_mission_group_model_master({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-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('mission')

api_result_handler = client.get_mission_group_model_master_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-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;

```



---

### updateMissionGroupModelMaster

미션 그룹 모델 마스터를 갱신<br>

지정된 미션 그룹 모델 마스터를 갱신합니다. 메타데이터, 설명, 리셋 타입, 리셋 타이밍, 통지 설정을 변경할 수 있습니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| missionGroupName | string |  | ✓|  |  ~ 128자 | 미션 그룹 모델명<br>미션 그룹 모델 고유 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| metadata | string |  | |  |  ~ 1024자 | 메타데이터<br>메타데이터에는 임의의 값을 설정할 수 있습니다.<br>이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. |
| description | string |  | |  |  ~ 1024자 | 설명문 |
| resetType | 문자열 열거형<br>enum {<br>"notReset",<br>"daily",<br>"weekly",<br>"monthly",<br>"days"<br>}<br> |  | | "notReset" |  | 리셋 타이밍<br>미션 그룹의 달성 상황이 리셋되는 타이밍을 결정합니다. 리셋하지 않음(영구), 매일, 매주, 매월, 기준 일시부터 일정 일수마다 중에서 선택합니다.notReset: 리셋 안 함 / daily: 매일 / weekly: 매주 / monthly: 매월 / days: 일정 일수마다 /  |
| resetDayOfMonth | int | {resetType} == "monthly" | ✓※|  | 1 ~ 31 | 리셋하는 날짜<br>미션 그룹이 리셋되는 월의 날짜입니다. 지정한 값이 해당 월의 일수를 초과하는 경우, 그 달의 마지막 날로 처리됩니다. resetType이 "monthly"인 경우에만 사용됩니다.<br>※ resetType이(가) "monthly" 이면 필수 |
| resetDayOfWeek | 문자열 열거형<br>enum {<br>"sunday",<br>"monday",<br>"tuesday",<br>"wednesday",<br>"thursday",<br>"friday",<br>"saturday"<br>}<br> | {resetType} == "weekly" | ✓※|  |  | 리셋하는 요일<br>미션 그룹이 리셋되는 요일입니다. resetType이 "weekly"인 경우에만 사용됩니다.sunday: 일요일 / monday: 월요일 / tuesday: 화요일 / wednesday: 수요일 / thursday: 목요일 / friday: 금요일 / saturday: 토요일 / <br>※ resetType이(가) "weekly" 이면 필수 |
| resetHour | int | {resetType} in ["monthly", "weekly", "daily"] | ✓※|  | 0 ~ 23 | 리셋 시각<br>미션 그룹이 리셋되는 시각(0~23)입니다. 매일, 매주, 매월 리셋 타입과 조합하여 사용됩니다.<br>※ resetType이(가) "monthly","weekly","daily"이면 필수 |
| anchorTimestamp | long | {resetType} == "days" | ✓※|  |  | 경과 일수를 계산하는 기준 일시<br>UNIX 시간(밀리초)<br>※ resetType이(가) "days" 이면 필수 |
| days | int | {resetType} == "days" | ✓※|  | 1 ~ 2147483646 | 리셋하는 일수<br>기준 일시부터 카운트되는 리셋 간격 일수입니다. resetType이 "days"인 경우에만 사용됩니다.<br>※ resetType이(가) "days" 이면 필수 |
| completeNotificationNamespaceId | string |  | |  |  ~ 1024자 | 미션 태스크를 달성했을 때의 푸시 통지<br>이 그룹 내의 미션 태스크가 달성되었을 때 푸시 통지를 전송하는 데 사용되는 GS2-Gateway의 네임스페이스 GRN입니다. 게임 클라이언트에 실시간으로 통지할 수 있습니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [MissionGroupModelMaster](#missiongroupmodelmaster) | 갱신한 미션 그룹 모델 마스터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.UpdateMissionGroupModelMaster(
    &mission.UpdateMissionGroupModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-0001"),
        Metadata: pointy.String("MISSION_GROUP1"),
        Description: pointy.String("description1"),
        ResetType: pointy.String("weekly"),
        ResetDayOfMonth: pointy.Int32(5),
        ResetDayOfWeek: pointy.String("monday"),
        ResetHour: pointy.Int32(10),
        AnchorTimestamp: pointy.Int64(100000),
        Days: pointy.Int32(3),
        CompleteNotificationNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:gateway:game-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\UpdateMissionGroupModelMasterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->updateMissionGroupModelMaster(
        (new UpdateMissionGroupModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-0001")
            ->withMetadata("MISSION_GROUP1")
            ->withDescription("description1")
            ->withResetType("weekly")
            ->withResetDayOfMonth(5)
            ->withResetDayOfWeek("monday")
            ->withResetHour(10)
            ->withAnchorTimestamp(100000)
            ->withDays(3)
            ->withCompleteNotificationNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:gateway:game-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.UpdateMissionGroupModelMasterRequest;
import io.gs2.mission.result.UpdateMissionGroupModelMasterResult;

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

try {
    UpdateMissionGroupModelMasterResult result = client.updateMissionGroupModelMaster(
        new UpdateMissionGroupModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withMetadata("MISSION_GROUP1")
            .withDescription("description1")
            .withResetType("weekly")
            .withResetDayOfMonth(5)
            .withResetDayOfWeek("monday")
            .withResetHour(10)
            .withAnchorTimestamp(100000L)
            .withDays(3)
            .withCompleteNotificationNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:gateway:game-0001")
    );
    MissionGroupModelMaster 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.UpdateMissionGroupModelMasterResult> asyncResult = null;
yield return client.UpdateMissionGroupModelMaster(
    new Gs2.Gs2Mission.Request.UpdateMissionGroupModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-0001")
        .WithMetadata("MISSION_GROUP1")
        .WithDescription("description1")
        .WithResetType("weekly")
        .WithResetDayOfMonth(5)
        .WithResetDayOfWeek("monday")
        .WithResetHour(10)
        .WithAnchorTimestamp(100000L)
        .WithDays(3)
        .WithCompleteNotificationNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:gateway:game-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.updateMissionGroupModelMaster(
        new Gs2Mission.UpdateMissionGroupModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withMetadata("MISSION_GROUP1")
            .withDescription("description1")
            .withResetType("weekly")
            .withResetDayOfMonth(5)
            .withResetDayOfWeek("monday")
            .withResetHour(10)
            .withAnchorTimestamp(100000)
            .withDays(3)
            .withCompleteNotificationNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:gateway:game-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.update_mission_group_model_master(
        mission.UpdateMissionGroupModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
            .with_metadata('MISSION_GROUP1')
            .with_description('description1')
            .with_reset_type('weekly')
            .with_reset_day_of_month(5)
            .with_reset_day_of_week('monday')
            .with_reset_hour(10)
            .with_anchor_timestamp(100000)
            .with_days(3)
            .with_complete_notification_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:gateway:game-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.update_mission_group_model_master({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    metadata="MISSION_GROUP1",
    description="description1",
    resetType="weekly",
    resetDayOfMonth=5,
    resetDayOfWeek="monday",
    resetHour=10,
    anchorTimestamp=100000,
    days=3,
    completeNotificationNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:gateway:game-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('mission')

api_result_handler = client.update_mission_group_model_master_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    metadata="MISSION_GROUP1",
    description="description1",
    resetType="weekly",
    resetDayOfMonth=5,
    resetDayOfWeek="monday",
    resetHour=10,
    anchorTimestamp=100000,
    days=3,
    completeNotificationNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:gateway:game-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;

```



---

### deleteMissionGroupModelMaster

미션 그룹 모델 마스터를 삭제<br>

지정된 미션 그룹 모델 마스터를 삭제합니다.<br>
다음 마스터 데이터 갱신까지, 현재 활성화된 마스터 데이터에는 영향을 미치지 않습니다.


#### Request

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

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [MissionGroupModelMaster](#missiongroupmodelmaster) | 삭제한 미션 그룹 모델 마스터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DeleteMissionGroupModelMaster(
    &mission.DeleteMissionGroupModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DeleteMissionGroupModelMasterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->deleteMissionGroupModelMaster(
        (new DeleteMissionGroupModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.DeleteMissionGroupModelMasterRequest;
import io.gs2.mission.result.DeleteMissionGroupModelMasterResult;

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

try {
    DeleteMissionGroupModelMasterResult result = client.deleteMissionGroupModelMaster(
        new DeleteMissionGroupModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
    );
    MissionGroupModelMaster 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.DeleteMissionGroupModelMasterResult> asyncResult = null;
yield return client.DeleteMissionGroupModelMaster(
    new Gs2.Gs2Mission.Request.DeleteMissionGroupModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.deleteMissionGroupModelMaster(
        new Gs2Mission.DeleteMissionGroupModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.delete_mission_group_model_master(
        mission.DeleteMissionGroupModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.delete_mission_group_model_master({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-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('mission')

api_result_handler = client.delete_mission_group_model_master_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-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;

```



---

### describeMissionTaskModelMasters

미션 태스크 모델 마스터 목록 취득<br>

지정된 미션 그룹 내의 미션 태스크 모델 마스터의 페이지네이션 리스트를 취득합니다.<br>
이름의 접두사로 필터링할 수 있습니다.


#### Request

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

#### Result

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

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DescribeMissionTaskModelMasters(
    &mission.DescribeMissionTaskModelMastersRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NamePrefix: nil,
        MissionGroupName: pointy.String("mission-group-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DescribeMissionTaskModelMastersRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->describeMissionTaskModelMasters(
        (new DescribeMissionTaskModelMastersRequest())
            ->withNamespaceName("namespace-0001")
            ->withNamePrefix(null)
            ->withMissionGroupName("mission-group-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.DescribeMissionTaskModelMastersRequest;
import io.gs2.mission.result.DescribeMissionTaskModelMastersResult;

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

try {
    DescribeMissionTaskModelMastersResult result = client.describeMissionTaskModelMasters(
        new DescribeMissionTaskModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withMissionGroupName("mission-group-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<MissionTaskModelMaster> 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.DescribeMissionTaskModelMastersResult> asyncResult = null;
yield return client.DescribeMissionTaskModelMasters(
    new Gs2.Gs2Mission.Request.DescribeMissionTaskModelMastersRequest()
        .WithNamespaceName("namespace-0001")
        .WithNamePrefix(null)
        .WithMissionGroupName("mission-group-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.describeMissionTaskModelMasters(
        new Gs2Mission.DescribeMissionTaskModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withMissionGroupName("mission-group-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 mission

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

try:
    result = client.describe_mission_task_model_masters(
        mission.DescribeMissionTaskModelMastersRequest()
            .with_namespace_name('namespace-0001')
            .with_name_prefix(None)
            .with_mission_group_name('mission-group-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('mission')

api_result = client.describe_mission_task_model_masters({
    namespaceName="namespace-0001",
    namePrefix=nil,
    missionGroupName="mission-group-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('mission')

api_result_handler = client.describe_mission_task_model_masters_async({
    namespaceName="namespace-0001",
    namePrefix=nil,
    missionGroupName="mission-group-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;

```



---

### createMissionTaskModelMaster

미션 태스크 모델 마스터를 신규 작성<br>

지정된 설정으로 새로운 미션 태스크 모델 마스터를 작성합니다.<br>
대상 카운터와 임계값, 달성 검증 타입(카운터 값 또는 커스텀 소비 액션), 보상 입수 액션, 챌린지 기간 이벤트, 전제 미션 태스크를 설정할 수 있습니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| missionGroupName | string |  | ✓|  |  ~ 128자 | 미션 그룹 모델명<br>미션 그룹 모델 고유 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| name | string |  | ✓|  |  ~ 128자 | 미션 태스크 모델명<br>미션 태스크 모델 고유 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| metadata | string |  | |  |  ~ 1024자 | 메타데이터<br>메타데이터에는 임의의 값을 설정할 수 있습니다.<br>이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. |
| description | string |  | |  |  ~ 1024자 | 설명문 |
| verifyCompleteType | 문자열 열거형<br>enum {<br>"counter",<br>"verifyActions"<br>}<br> |  | | "counter" |  | 달성 조건 종류<br>미션 태스크의 달성 판정 방법을 지정합니다. "counter"는 관련된 카운터의 스코프 값이 목표 임곗값에 도달했는지 확인합니다. "verifyActions"는 검증 액션을 사용하여 달성 조건을 확인합니다.counter: 카운터 / verifyActions: 검증 액션 /  |
| targetCounter | [TargetCounterModel](#targetcountermodel) | {verifyCompleteType} == "counter" | ✓※|  |  | 목표 카운터<br>미션 태스크의 달성 판정에 사용되는 카운터, 스코프, 목표값을 정의합니다. 카운터의 스코프 값이 지정된 목표값에 도달하거나 초과한 경우, 태스크가 달성된 것으로 간주됩니다.<br>※ verifyCompleteType이(가) "counter" 이면 필수 |
| verifyCompleteConsumeActions | [List&lt;VerifyAction&gt;](#verifyaction) | {verifyCompleteType} == "verifyActions" | |  | 0 ~ 10 items | 태스크 달성 판정에 사용하는 검증 액션<br>미션 태스크의 달성 판정에 사용되는 검증 액션의 목록입니다. 모든 검증 액션이 성공한 경우 태스크가 달성된 것으로 간주됩니다. verifyCompleteType이 "verifyActions"인 경우에만 사용됩니다.<br>※ verifyCompleteType이(가) "verifyActions" 이면 활성화 |
| completeAcquireActions | [List&lt;AcquireAction&gt;](#acquireaction) |  | | [] | 0 ~ 100 items | 미션 달성 시 보상<br>플레이어가 미션 달성 보상을 받을 때 실행되는 입수 액션의 목록입니다. |
| challengePeriodEventId | string |  | |  |  ~ 1024자 | 보상을 받을 수 있는 기간을 설정한 GS2-Schedule 이벤트 GRN<br>미션 태스크의 보상을 받을 수 있는 기간을 정의하는 GS2-Schedule 이벤트를 지정합니다. 설정하지 않은 경우, 달성 후 언제든지 보상을 받을 수 있습니다. |
| premiseMissionTaskName | string |  | |  |  ~ 128자 | 이 태스크에 도전하기 위해 달성해 두어야 하는 태스크의 이름<br>이 태스크의 보상을 받기 전에 달성해 두어야 하는, 같은 그룹 내의 전제 미션 태스크를 지정합니다. 단계적인 미션 체인을 만드는 데 사용합니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [MissionTaskModelMaster](#missiontaskmodelmaster) | 작성한 미션 태스크 모델 마스터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.CreateMissionTaskModelMaster(
    &mission.CreateMissionTaskModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-0001"),
        Name: pointy.String("mission-task-0001"),
        Metadata: nil,
        Description: nil,
        VerifyCompleteType: pointy.String("counter"),
        TargetCounter: &mission.TargetCounterModel{
            CounterName: pointy.String("counter-0001"),
            Value: pointy.Int64(10),
        },
        VerifyCompleteConsumeActions: nil,
        CompleteAcquireActions: []mission.AcquireAction{
            mission.AcquireAction{
                Action: pointy.String("Gs2Experience:AddExperienceByUserId"),
                Request: pointy.String("Gs2Experience:AddExperienceByUserId-request1"),
            },
        },
        ChallengePeriodEventId: nil,
        PremiseMissionTaskName: 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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\CreateMissionTaskModelMasterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->createMissionTaskModelMaster(
        (new CreateMissionTaskModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-0001")
            ->withName("mission-task-0001")
            ->withMetadata(null)
            ->withDescription(null)
            ->withVerifyCompleteType("counter")
            ->withTargetCounter((new \Gs2\Mission\Model\TargetCounterModel())
                ->withCounterName("counter-0001")
                ->withValue(10))
            ->withVerifyCompleteConsumeActions(null)
            ->withCompleteAcquireActions([
                (new \Gs2\Mission\Model\AcquireAction())
                    ->withAction("Gs2Experience:AddExperienceByUserId")
                    ->withRequest("Gs2Experience:AddExperienceByUserId-request1"),
            ])
            ->withChallengePeriodEventId(null)
            ->withPremiseMissionTaskName(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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.CreateMissionTaskModelMasterRequest;
import io.gs2.mission.result.CreateMissionTaskModelMasterResult;

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

try {
    CreateMissionTaskModelMasterResult result = client.createMissionTaskModelMaster(
        new CreateMissionTaskModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withName("mission-task-0001")
            .withMetadata(null)
            .withDescription(null)
            .withVerifyCompleteType("counter")
            .withTargetCounter(new io.gs2.mission.model.TargetCounterModel()
                .withCounterName("counter-0001")
                .withValue(10L))
            .withVerifyCompleteConsumeActions(null)
            .withCompleteAcquireActions(Arrays.asList(
                new io.gs2.mission.model.AcquireAction()
                    .withAction("Gs2Experience:AddExperienceByUserId")
                    .withRequest("Gs2Experience:AddExperienceByUserId-request1")
            ))
            .withChallengePeriodEventId(null)
            .withPremiseMissionTaskName(null)
    );
    MissionTaskModelMaster 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.CreateMissionTaskModelMasterResult> asyncResult = null;
yield return client.CreateMissionTaskModelMaster(
    new Gs2.Gs2Mission.Request.CreateMissionTaskModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-0001")
        .WithName("mission-task-0001")
        .WithMetadata(null)
        .WithDescription(null)
        .WithVerifyCompleteType("counter")
        .WithTargetCounter(new Gs2.Gs2Mission.Model.TargetCounterModel()
            .WithCounterName("counter-0001")
            .WithValue(10L))
        .WithVerifyCompleteConsumeActions(null)
        .WithCompleteAcquireActions(new Gs2.Core.Model.AcquireAction[] {
            new Gs2.Core.Model.AcquireAction()
                .WithAction("Gs2Experience:AddExperienceByUserId")
                .WithRequest("Gs2Experience:AddExperienceByUserId-request1"),
        })
        .WithChallengePeriodEventId(null)
        .WithPremiseMissionTaskName(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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.createMissionTaskModelMaster(
        new Gs2Mission.CreateMissionTaskModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withName("mission-task-0001")
            .withMetadata(null)
            .withDescription(null)
            .withVerifyCompleteType("counter")
            .withTargetCounter(new Gs2Mission.model.TargetCounterModel()
                .withCounterName("counter-0001")
                .withValue(10))
            .withVerifyCompleteConsumeActions(null)
            .withCompleteAcquireActions([
                new Gs2Mission.model.AcquireAction()
                    .withAction("Gs2Experience:AddExperienceByUserId")
                    .withRequest("Gs2Experience:AddExperienceByUserId-request1"),
            ])
            .withChallengePeriodEventId(null)
            .withPremiseMissionTaskName(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.create_mission_task_model_master(
        mission.CreateMissionTaskModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
            .with_name('mission-task-0001')
            .with_metadata(None)
            .with_description(None)
            .with_verify_complete_type('counter')
            .with_target_counter(
                mission.TargetCounterModel()
                    .with_counter_name('counter-0001')
                    .with_value(10))
            .with_verify_complete_consume_actions(None)
            .with_complete_acquire_actions([
                mission.AcquireAction()
                    .with_action('Gs2Experience:AddExperienceByUserId')
                    .with_request('Gs2Experience:AddExperienceByUserId-request1'),
            ])
            .with_challenge_period_event_id(None)
            .with_premise_mission_task_name(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.create_mission_task_model_master({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    name="mission-task-0001",
    metadata=nil,
    description=nil,
    verifyCompleteType="counter",
    targetCounter={
        counterName="counter-0001",
        value=10,
    },
    verifyCompleteConsumeActions=nil,
    completeAcquireActions={
        {
            action="Gs2Experience:AddExperienceByUserId",
            request="Gs2Experience:AddExperienceByUserId-request1",
        }
    },
    challengePeriodEventId=nil,
    premiseMissionTaskName=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('mission')

api_result_handler = client.create_mission_task_model_master_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    name="mission-task-0001",
    metadata=nil,
    description=nil,
    verifyCompleteType="counter",
    targetCounter={
        counterName="counter-0001",
        value=10,
    },
    verifyCompleteConsumeActions=nil,
    completeAcquireActions={
        {
            action="Gs2Experience:AddExperienceByUserId",
            request="Gs2Experience:AddExperienceByUserId-request1",
        }
    },
    challengePeriodEventId=nil,
    premiseMissionTaskName=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;

```



---

### getMissionTaskModelMaster

미션 태스크 모델 마스터를 취득<br>

지정된 미션 태스크 모델 마스터의 대상 카운터, 달성 검증 타입, 보상 액션, 전제 설정을 포함한 정보를 취득합니다.


#### Request

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

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [MissionTaskModelMaster](#missiontaskmodelmaster) | 미션 태스크 모델 마스터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.GetMissionTaskModelMaster(
    &mission.GetMissionTaskModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-0001"),
        MissionTaskName: pointy.String("mission-task-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\GetMissionTaskModelMasterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->getMissionTaskModelMaster(
        (new GetMissionTaskModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-0001")
            ->withMissionTaskName("mission-task-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.GetMissionTaskModelMasterRequest;
import io.gs2.mission.result.GetMissionTaskModelMasterResult;

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

try {
    GetMissionTaskModelMasterResult result = client.getMissionTaskModelMaster(
        new GetMissionTaskModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withMissionTaskName("mission-task-0001")
    );
    MissionTaskModelMaster 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.GetMissionTaskModelMasterResult> asyncResult = null;
yield return client.GetMissionTaskModelMaster(
    new Gs2.Gs2Mission.Request.GetMissionTaskModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-0001")
        .WithMissionTaskName("mission-task-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.getMissionTaskModelMaster(
        new Gs2Mission.GetMissionTaskModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withMissionTaskName("mission-task-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.get_mission_task_model_master(
        mission.GetMissionTaskModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
            .with_mission_task_name('mission-task-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.get_mission_task_model_master({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    missionTaskName="mission-task-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('mission')

api_result_handler = client.get_mission_task_model_master_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    missionTaskName="mission-task-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;

```



---

### updateMissionTaskModelMaster

미션 태스크 모델 마스터를 갱신<br>

지정된 미션 태스크 모델 마스터를 갱신합니다. 메타데이터, 설명, 대상 카운터, 달성 검증 타입, 보상 액션, 챌린지 기간 이벤트, 전제 미션 태스크를 변경할 수 있습니다.


#### Request

|  | 타입 | 활성화 조건 | 필수 | 기본값 | 값 제한 | 설명 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128자 | 네임스페이스 이름<br>네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| missionGroupName | string |  | ✓|  |  ~ 128자 | 미션 그룹 모델명<br>미션 그룹 모델 고유 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| missionTaskName | string |  | ✓|  |  ~ 128자 | 미션 태스크 모델명<br>미션 태스크 모델 고유 이름. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다. |
| metadata | string |  | |  |  ~ 1024자 | 메타데이터<br>메타데이터에는 임의의 값을 설정할 수 있습니다.<br>이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다. |
| description | string |  | |  |  ~ 1024자 | 설명문 |
| verifyCompleteType | 문자열 열거형<br>enum {<br>"counter",<br>"verifyActions"<br>}<br> |  | | "counter" |  | 달성 조건 종류<br>미션 태스크의 달성 판정 방법을 지정합니다. "counter"는 관련된 카운터의 스코프 값이 목표 임곗값에 도달했는지 확인합니다. "verifyActions"는 검증 액션을 사용하여 달성 조건을 확인합니다.counter: 카운터 / verifyActions: 검증 액션 /  |
| targetCounter | [TargetCounterModel](#targetcountermodel) | {verifyCompleteType} == "counter" | ✓※|  |  | 목표 카운터<br>미션 태스크의 달성 판정에 사용되는 카운터, 스코프, 목표값을 정의합니다. 카운터의 스코프 값이 지정된 목표값에 도달하거나 초과한 경우, 태스크가 달성된 것으로 간주됩니다.<br>※ verifyCompleteType이(가) "counter" 이면 필수 |
| verifyCompleteConsumeActions | [List&lt;VerifyAction&gt;](#verifyaction) | {verifyCompleteType} == "verifyActions" | |  | 0 ~ 10 items | 태스크 달성 판정에 사용하는 검증 액션<br>미션 태스크의 달성 판정에 사용되는 검증 액션의 목록입니다. 모든 검증 액션이 성공한 경우 태스크가 달성된 것으로 간주됩니다. verifyCompleteType이 "verifyActions"인 경우에만 사용됩니다.<br>※ verifyCompleteType이(가) "verifyActions" 이면 활성화 |
| completeAcquireActions | [List&lt;AcquireAction&gt;](#acquireaction) |  | | [] | 0 ~ 100 items | 미션 달성 시 보상<br>플레이어가 미션 달성 보상을 받을 때 실행되는 입수 액션의 목록입니다. |
| challengePeriodEventId | string |  | |  |  ~ 1024자 | 보상을 받을 수 있는 기간을 설정한 GS2-Schedule 이벤트 GRN<br>미션 태스크의 보상을 받을 수 있는 기간을 정의하는 GS2-Schedule 이벤트를 지정합니다. 설정하지 않은 경우, 달성 후 언제든지 보상을 받을 수 있습니다. |
| premiseMissionTaskName | string |  | |  |  ~ 128자 | 이 태스크에 도전하기 위해 달성해 두어야 하는 태스크의 이름<br>이 태스크의 보상을 받기 전에 달성해 두어야 하는, 같은 그룹 내의 전제 미션 태스크를 지정합니다. 단계적인 미션 체인을 만드는 데 사용합니다. |

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [MissionTaskModelMaster](#missiontaskmodelmaster) | 갱신한 미션 태스크 모델 마스터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.UpdateMissionTaskModelMaster(
    &mission.UpdateMissionTaskModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-0001"),
        MissionTaskName: pointy.String("mission-task-0001"),
        Metadata: pointy.String("MISSION_TASK1"),
        Description: pointy.String("description1"),
        VerifyCompleteType: pointy.String("counter"),
        TargetCounter: &mission.TargetCounterModel{
            CounterName: pointy.String("counter-0001"),
            Value: pointy.Int64(100),
        },
        VerifyCompleteConsumeActions: nil,
        CompleteAcquireActions: []mission.AcquireAction{
            mission.AcquireAction{
                Action: pointy.String("Gs2Stamina:RecoverStaminaByUserId"),
                Request: pointy.String("Gs2Stamina:RecoverStaminaByUserId-request"),
            },
        },
        ChallengePeriodEventId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001"),
        PremiseMissionTaskName: 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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\UpdateMissionTaskModelMasterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->updateMissionTaskModelMaster(
        (new UpdateMissionTaskModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-0001")
            ->withMissionTaskName("mission-task-0001")
            ->withMetadata("MISSION_TASK1")
            ->withDescription("description1")
            ->withVerifyCompleteType("counter")
            ->withTargetCounter((new \Gs2\Mission\Model\TargetCounterModel())
                ->withCounterName("counter-0001")
                ->withValue(100))
            ->withVerifyCompleteConsumeActions(null)
            ->withCompleteAcquireActions([
                (new \Gs2\Mission\Model\AcquireAction())
                    ->withAction("Gs2Stamina:RecoverStaminaByUserId")
                    ->withRequest("Gs2Stamina:RecoverStaminaByUserId-request"),
            ])
            ->withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001")
            ->withPremiseMissionTaskName(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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.UpdateMissionTaskModelMasterRequest;
import io.gs2.mission.result.UpdateMissionTaskModelMasterResult;

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

try {
    UpdateMissionTaskModelMasterResult result = client.updateMissionTaskModelMaster(
        new UpdateMissionTaskModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withMissionTaskName("mission-task-0001")
            .withMetadata("MISSION_TASK1")
            .withDescription("description1")
            .withVerifyCompleteType("counter")
            .withTargetCounter(new io.gs2.mission.model.TargetCounterModel()
                .withCounterName("counter-0001")
                .withValue(100L))
            .withVerifyCompleteConsumeActions(null)
            .withCompleteAcquireActions(Arrays.asList(
                new io.gs2.mission.model.AcquireAction()
                    .withAction("Gs2Stamina:RecoverStaminaByUserId")
                    .withRequest("Gs2Stamina:RecoverStaminaByUserId-request")
            ))
            .withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001")
            .withPremiseMissionTaskName(null)
    );
    MissionTaskModelMaster 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.UpdateMissionTaskModelMasterResult> asyncResult = null;
yield return client.UpdateMissionTaskModelMaster(
    new Gs2.Gs2Mission.Request.UpdateMissionTaskModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-0001")
        .WithMissionTaskName("mission-task-0001")
        .WithMetadata("MISSION_TASK1")
        .WithDescription("description1")
        .WithVerifyCompleteType("counter")
        .WithTargetCounter(new Gs2.Gs2Mission.Model.TargetCounterModel()
            .WithCounterName("counter-0001")
            .WithValue(100L))
        .WithVerifyCompleteConsumeActions(null)
        .WithCompleteAcquireActions(new Gs2.Core.Model.AcquireAction[] {
            new Gs2.Core.Model.AcquireAction()
                .WithAction("Gs2Stamina:RecoverStaminaByUserId")
                .WithRequest("Gs2Stamina:RecoverStaminaByUserId-request"),
        })
        .WithChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001")
        .WithPremiseMissionTaskName(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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.updateMissionTaskModelMaster(
        new Gs2Mission.UpdateMissionTaskModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withMissionTaskName("mission-task-0001")
            .withMetadata("MISSION_TASK1")
            .withDescription("description1")
            .withVerifyCompleteType("counter")
            .withTargetCounter(new Gs2Mission.model.TargetCounterModel()
                .withCounterName("counter-0001")
                .withValue(100))
            .withVerifyCompleteConsumeActions(null)
            .withCompleteAcquireActions([
                new Gs2Mission.model.AcquireAction()
                    .withAction("Gs2Stamina:RecoverStaminaByUserId")
                    .withRequest("Gs2Stamina:RecoverStaminaByUserId-request"),
            ])
            .withChallengePeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001")
            .withPremiseMissionTaskName(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.update_mission_task_model_master(
        mission.UpdateMissionTaskModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
            .with_mission_task_name('mission-task-0001')
            .with_metadata('MISSION_TASK1')
            .with_description('description1')
            .with_verify_complete_type('counter')
            .with_target_counter(
                mission.TargetCounterModel()
                    .with_counter_name('counter-0001')
                    .with_value(100))
            .with_verify_complete_consume_actions(None)
            .with_complete_acquire_actions([
                mission.AcquireAction()
                    .with_action('Gs2Stamina:RecoverStaminaByUserId')
                    .with_request('Gs2Stamina:RecoverStaminaByUserId-request'),
            ])
            .with_challenge_period_event_id('grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001')
            .with_premise_mission_task_name(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.update_mission_task_model_master({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    missionTaskName="mission-task-0001",
    metadata="MISSION_TASK1",
    description="description1",
    verifyCompleteType="counter",
    targetCounter={
        counterName="counter-0001",
        value=100,
    },
    verifyCompleteConsumeActions=nil,
    completeAcquireActions={
        {
            action="Gs2Stamina:RecoverStaminaByUserId",
            request="Gs2Stamina:RecoverStaminaByUserId-request",
        }
    },
    challengePeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001",
    premiseMissionTaskName=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('mission')

api_result_handler = client.update_mission_task_model_master_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    missionTaskName="mission-task-0001",
    metadata="MISSION_TASK1",
    description="description1",
    verifyCompleteType="counter",
    targetCounter={
        counterName="counter-0001",
        value=100,
    },
    verifyCompleteConsumeActions=nil,
    completeAcquireActions={
        {
            action="Gs2Stamina:RecoverStaminaByUserId",
            request="Gs2Stamina:RecoverStaminaByUserId-request",
        }
    },
    challengePeriodEventId="grn:gs2:ap-northeast-1:YourOwnerId:schedule:namespace-0001:event:event-0001",
    premiseMissionTaskName=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;

```



---

### deleteMissionTaskModelMaster

미션 태스크 모델 마스터를 삭제<br>

지정된 미션 태스크 모델 마스터를 삭제합니다.<br>
다음 마스터 데이터 갱신까지, 현재 활성화된 마스터 데이터에는 영향을 미치지 않습니다.


#### Request

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

#### Result

|  | 타입 | 설명 |
| --- | --- | --- |
| item | [MissionTaskModelMaster](#missiontaskmodelmaster) | 삭제한 미션 태스크 모델 마스터 |

#### 구현 예제




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/mission"
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 := mission.Gs2MissionRestClient{
    Session: &session,
}
result, err := client.DeleteMissionTaskModelMaster(
    &mission.DeleteMissionTaskModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MissionGroupName: pointy.String("mission-group-0001"),
        MissionTaskName: pointy.String("mission-task-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\Mission\Gs2MissionRestClient;
use Gs2\Mission\Request\DeleteMissionTaskModelMasterRequest;

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

$session->open();

$client = new Gs2MissionRestClient(
    $session
);

try {
    $result = $client->deleteMissionTaskModelMaster(
        (new DeleteMissionTaskModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMissionGroupName("mission-group-0001")
            ->withMissionTaskName("mission-task-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.mission.rest.Gs2MissionRestClient;
import io.gs2.mission.request.DeleteMissionTaskModelMasterRequest;
import io.gs2.mission.result.DeleteMissionTaskModelMasterResult;

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

try {
    DeleteMissionTaskModelMasterResult result = client.deleteMissionTaskModelMaster(
        new DeleteMissionTaskModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withMissionTaskName("mission-task-0001")
    );
    MissionTaskModelMaster 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 Gs2MissionRestClient(session);

AsyncResult<Gs2.Gs2Mission.Result.DeleteMissionTaskModelMasterResult> asyncResult = null;
yield return client.DeleteMissionTaskModelMaster(
    new Gs2.Gs2Mission.Request.DeleteMissionTaskModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMissionGroupName("mission-group-0001")
        .WithMissionTaskName("mission-task-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 Gs2Mission from '@/gs2/mission';

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

try {
    const result = await client.deleteMissionTaskModelMaster(
        new Gs2Mission.DeleteMissionTaskModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMissionGroupName("mission-group-0001")
            .withMissionTaskName("mission-task-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import mission

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

try:
    result = client.delete_mission_task_model_master(
        mission.DeleteMissionTaskModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mission_group_name('mission-group-0001')
            .with_mission_task_name('mission-task-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('mission')

api_result = client.delete_mission_task_model_master({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    missionTaskName="mission-task-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('mission')

api_result_handler = client.delete_mission_task_model_master_async({
    namespaceName="namespace-0001",
    missionGroupName="mission-group-0001",
    missionTaskName="mission-task-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;

```



---



