Documentation index for AI agents

GS2-Formation SDK API 레퍼런스

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

모델

Namespace

네임스페이스

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

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

상세
타입활성화 조건필수기본값값 제한설명
namespaceIdstring
~ 1024자네임스페이스 GRN
※ 서버가 자동으로 설정
namestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
transactionSettingTransactionSetting트랜잭션 설정
편성 조작 시 트랜잭션 처리 방법을 제어하는 설정입니다.
updateMoldScriptScriptSetting폼 저장 영역의 캐파시티를 업데이트할 때 실행하는 스크립트 설정
Script 트리거 레퍼런스 - updateMold
updateFormScriptScriptSetting폼을 업데이트할 때 실행하는 스크립트 설정
Script 트리거 레퍼런스 - updateForm
updatePropertyFormScriptScriptSetting프로퍼티 폼을 업데이트할 때 실행하는 스크립트 설정
Script 트리거 레퍼런스 - updatePropertyForm
logSettingLogSetting로그 출력 설정
편성 조작의 로그 데이터를 GS2-Log에 출력하기 위한 설정입니다. GS2-Log의 네임스페이스를 지정함으로써 폼 업데이트, 저장 영역 캐파시티 변경, 프로퍼티 폼 변경의 API 요청·응답 로그를 수집할 수 있습니다.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
updatedAtlong
현재 시각최종 갱신일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
revisionlong00 ~ 9223372036854775805리비전

TransactionSetting

트랜잭션 설정

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

상세
타입활성화 조건필수기본값값 제한설명
enableAutoRunboolfalse발행한 트랜잭션을 서버 사이드에서 자동으로 실행할지 여부
enableAtomicCommitbool{enableAutoRun} == truefalse트랜잭션의 실행을 원자적으로 커밋할지 여부
※ enableAutoRun이(가) true 이면 활성화
transactionUseDistributorbool{enableAtomicCommit} == truefalse트랜잭션을 비동기 처리로 실행할지 여부
※ enableAtomicCommit이(가) true 이면 활성화
commitScriptResultInUseDistributorbool{transactionUseDistributor} == truefalse스크립트의 결과 커밋 처리를 비동기 처리로 실행할지 여부
※ transactionUseDistributor이(가) true 이면 활성화
acquireActionUseJobQueuebool{enableAtomicCommit} == truefalse입수 액션을 실행할 때 GS2-JobQueue를 사용할지 여부
※ enableAtomicCommit이(가) true 이면 활성화
distributorNamespaceIdstring“grn:gs2:{region}:{ownerId}:distributor:default”~ 1024자트랜잭션 실행에 사용하는 GS2-Distributor 네임스페이스 GRN
queueNamespaceIdstring“grn:gs2:{region}:{ownerId}:queue:default”~ 1024자트랜잭션 실행에 사용하는 GS2-JobQueue의 네임스페이스 GRN

ScriptSetting

스크립트 설정

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

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

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

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

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

LogSetting

로그 출력 설정

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

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

GitHubCheckoutSetting

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

상세
타입활성화 조건필수기본값값 제한설명
apiKeyIdstring
~ 1024자GitHub API 키의 GRN
repositoryNamestring
~ 1024자리포지토리 이름
sourcePathstring
~ 1024자마스터 데이터(JSON) 파일 경로
referenceType문자열 열거형
enum {
  “commit_hash”,
  “branch”,
  “tag”
}
코드 출처
정의설명
commit_hash커밋 해시
branch브랜치
tag태그
commitHashstring{referenceType} == “commit_hash”
✓※
~ 1024자커밋 해시
※ referenceType이(가) “commit_hash” 이면 필수
branchNamestring{referenceType} == “branch”
✓※
~ 1024자브랜치 이름
※ referenceType이(가) “branch” 이면 필수
tagNamestring{referenceType} == “tag”
✓※
~ 1024자태그 이름
※ referenceType이(가) “tag” 이면 필수

Mold

폼 저장 영역

게임 플레이어가 편성한 정보를 보유하는 엔티티입니다.
편성 정보(Form)는 폼 저장 영역(Mold)마다 여러 개 보유할 수 있으며, 몇 개까지 보유할 수 있는지에 대한 캐파시티를 게임 플레이어 × 폼 저장 영역마다 개별적으로 설정할 수 있습니다.

상세
타입활성화 조건필수기본값값 제한설명
moldIdstring
~ 1024자폼 저장 영역 GRN
※ 서버가 자동으로 설정
namestring
~ 128자폼 저장 영역 모델의 이름
폼 저장 영역 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
capacityint
0 ~ 2147483646현재 캐파시티
이 저장 영역에서 이 플레이어가 현재 이용할 수 있는 폼 저장 슬롯 수입니다. 초기값은 저장 영역 모델의 initialMaxCapacity로 설정되며, 캐파시티 증가 조작을 통해 maxCapacity까지 확장할 수 있습니다.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
updatedAtlong
현재 시각최종 갱신일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
revisionlong00 ~ 9223372036854775805리비전

Form


폼은 편성 상태를 나타내는 엔티티입니다.
편성 가능한 영역으로 슬롯을 정의할 수 있습니다.

무기·방어구라면 「오른손」「왼손」「몸통」「팔」과 같은 부위를 슬롯으로 하고,
파티라면 「전위」「중위」「후위」와 같은 포지션을 슬롯으로 표현할 수 있습니다.

상세
타입활성화 조건필수기본값값 제한설명
formIdstring
~ 1024자GRN
※ 서버가 자동으로 설정
namestring
~ 128자폼 이름
이 폼이 속한 저장 영역 모델의 이름입니다. 이 폼 인스턴스에 적용되는 폼 모델(슬롯 구성)을 식별합니다.
indexint
0 ~ 2147483646폼의 인덱스
저장 영역 내에서 이 폼이 차지하는 저장 슬롯을 식별하는 0부터 시작하는 인덱스입니다. 최대 인덱스는 저장 영역의 현재 캐파시티에 의해 제한됩니다. 예를 들어 인덱스 0을 「파티 1」, 인덱스 1을 「파티 2」와 같은 식으로 사용할 수 있습니다.
slotsList<Slot>0 ~ 10 items슬롯 목록
이 폼의 현재 슬롯 할당입니다. 각 항목은 폼 모델에서 정의된 슬롯에 대응하며, 해당 포지션에 할당된 리소스의 프로퍼티 ID를 보유합니다. 슬롯 이름은 폼 모델에서 정의된 것과 일치해야 합니다.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
updatedAtlong
현재 시각최종 갱신일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
revisionlong00 ~ 9223372036854775805리비전

PropertyForm

프로퍼티 폼

프로퍼티 폼은 편성 상태를 나타내는 엔티티입니다.
Mold / Form과의 차이점은, 슬롯 수를 정의하고 각 슬롯에 편성을 기록하는 것이 Mold / Form이며,
보유하고 있는 장비에 스킬을 설정하는 것처럼 수를 사전에 정하기 어려운 편성을 표현할 때 사용하는 것이 프로퍼티 폼입니다.

상세
타입활성화 조건필수기본값값 제한설명
formIdstring
~ 1024자프로퍼티 폼 GRN
※ 서버가 자동으로 설정
userIdstring
~ 128자사용자ID
namestring
~ 128자프로퍼티 폼 이름
이 프로퍼티 폼의 슬롯 구성을 정의하는 프로퍼티 폼 모델의 이름입니다. 할당 가능한 슬롯을 결정합니다.
propertyIdstring
~ 1024자프로퍼티 ID
이 프로퍼티 폼 인스턴스를 고유하게 식별하는 개발자 정의 식별자입니다. 일반적으로 이 폼이 설정하는 소유 리소스(예: GS2-Inventory의 아이템 세트)의 GRN을 설정합니다. 특정 장비에 스킬을 설정하는 등의 용도로 사용됩니다.
slotsList<Slot>0 ~ 10 items슬롯 목록
이 프로퍼티 폼의 현재 슬롯 할당입니다. 각 항목은 프로퍼티 폼 모델에서 정의된 슬롯에 대응합니다. 예를 들어 프로퍼티 폼이 장비의 스킬 설정을 나타내는 경우, 각 슬롯은 서로 다른 스킬 할당을 보유합니다.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
updatedAtlong
현재 시각최종 갱신일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
revisionlong00 ~ 9223372036854775805리비전

FormModel

폼 모델

폼 모델은 편성 상태를 나타내는 엔티티입니다.
편성 가능한 영역으로 슬롯을 정의할 수 있습니다.

무기·방어구라면 「오른손」「왼손」「몸통」「팔」과 같은 부위를 슬롯으로 하고,
파티라면 「전위」「중위」「후위」와 같은 포지션을 슬롯으로 표현할 수 있습니다.

상세
타입활성화 조건필수기본값값 제한설명
formModelIdstring
~ 1024자폼 모델 GRN
※ 서버가 자동으로 설정
namestring
~ 128자폼 모델명
폼 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
metadatastring~ 2048자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
slotsList<SlotModel>
1 ~ 10 items슬롯 모델 리스트
이 폼을 구성하는 슬롯 정의의 순서가 있는 리스트입니다. 각 슬롯은 할당 가능한 포지션을 나타내며, 슬롯명은 폼 내에서 고유해야 합니다. 장비에서는 “weapon”, “armor”, “accessory"와 같은 슬롯, 파티에서는 “position_1”, “position_2"와 같은 슬롯을 생각할 수 있습니다.

MoldModel

폼 저장 영역 모델

폼 저장 영역 모델은 파티 편성이라면 「불 속성 파티」「물 속성 파티」와 같은 형태로 저장하는 것을 상정하고 있습니다.
저장할 수 있는 영역의 수는 제한할 수 있으며, 개별적으로 확장할 수도 있습니다.

상세
타입활성화 조건필수기본값값 제한설명
moldModelIdstring
~ 1024자폼 저장 영역 GRN
※ 서버가 자동으로 설정
namestring
~ 128자폼 저장 영역 모델의 이름
폼 저장 영역 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
metadatastring~ 2048자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
initialMaxCapacityint
1 ~ 2147483646폼을 저장할 수 있는 초기 캐파시티
이 저장 영역에서 각 플레이어가 이용할 수 있는 기본 폼 저장 슬롯 수입니다. 예를 들어 3으로 설정하면 플레이어는 초기 상태에서 최대 3개의 서로 다른 편성(예: 「불 속성 파티」「물 속성 파티」「바람 속성 파티」)을 저장할 수 있습니다. 플레이어별로 maxCapacity까지 확장할 수 있습니다.
maxCapacityint
1 ~ 2147483646폼을 저장할 수 있는 최대 캐파시티
이 저장 영역에서 플레이어별 폼 저장 슬롯 수의 절대적인 상한입니다. 캐파시티 확장 조작을 수행하더라도 캐파시티는 이 값을 초과할 수 없습니다. initialMaxCapacity 이상의 값이어야 합니다.
formModelFormModel
폼 모델

PropertyFormModel

프로퍼티 폼 모델

프로퍼티 폼 모델은 편성 상태를 나타내는 엔티티입니다.
Mold / Form과의 차이점은, 슬롯 수를 정의하고 각 슬롯에 편성을 기록하는 것이 Mold / Form이며,
보유하고 있는 장비에 스킬을 설정하는 것처럼 수를 사전에 정하기 어려운 편성을 표현할 때 사용하는 것이 프로퍼티 폼 모델입니다.

상세
타입활성화 조건필수기본값값 제한설명
propertyFormModelIdstring
~ 1024자프로퍼티 폼 모델 GRN
※ 서버가 자동으로 설정
namestring
~ 128자프로퍼티 폼 모델 이름
프로퍼티 폼 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
metadatastring~ 2048자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
slotsList<SlotModel>
1 ~ 10 items슬롯 모델 목록
이 프로퍼티 폼의 슬롯 정의를 순서대로 나열한 목록입니다. 캐파시티에 의해 폼 수가 제한되는 Mold/Form과 달리, 프로퍼티 폼은 프로퍼티 ID로 식별되며 보유하는 리소스마다 존재할 수 있습니다. 슬롯 이름은 폼 내에서 고유해야 합니다.

SlotModel

슬롯 모델

폼 모델 내의 하나의 슬롯을 정의합니다. 슬롯은 게임 리소스(아이템, 캐릭터, 장비 등)를 배치할 수 있는 할당 가능한 포지션을 나타냅니다. 프로퍼티 정규 표현식에 의해 슬롯에 설정 가능한 값이 검증됩니다.

상세
타입활성화 조건필수기본값값 제한설명
namestring
~ 128자슬롯 모델명
폼 모델 내에서 이 슬롯을 고유하게 식별하는 이름입니다. 장비 폼에서는 “right_hand”, “body"와 같은 이름이, 파티 폼에서는 “vanguard”, “rear_guard"와 같은 이름이 일반적으로 사용됩니다.
propertyRegexstring“.*”~ 512자프로퍼티로 설정 가능한 값의 정규 표현식
이 슬롯에 할당 가능한 프로퍼티 ID 값을 검증하는 정규 표현식 패턴입니다. 예를 들어 특정 GS2-Inventory 아이템 GRN이나 GS2-Dictionary 엔트리 GRN으로 제한할 수 있습니다. 기본값은 “.*“이며 임의의 값을 허용합니다.
metadatastring~ 512자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.

Slot

슬롯

폼 내의 하나의 슬롯의 실제 할당 상태를 나타냅니다. 각 슬롯은 플레이어가 해당 포지션에 배치한 게임 리소스(GS2-Inventory의 아이템 세트나 GS2-Dictionary의 엔트리 등)를 참조하는 프로퍼티 ID를 보유합니다.

상세
타입활성화 조건필수기본값값 제한설명
namestring
~ 128자슬롯 모델명
폼 모델 내에서 이 슬롯을 고유하게 식별하는 이름입니다. 장비 폼에서는 “right_hand”, “body"와 같은 이름이, 파티 폼에서는 “vanguard”, “rear_guard"와 같은 이름이 일반적으로 사용됩니다.
propertyIdstring~ 1024자프로퍼티 ID
이 슬롯에 할당된 게임 리소스를 참조하는 개발자 정의 식별자입니다. 일반적으로 GS2-Inventory의 아이템 세트 GRN, GS2-Dictionary의 엔트리 GRN, 또는 기타 리소스 식별자입니다. 슬롯 모델의 propertyRegex 패턴과 일치해야 합니다.
metadatastring~ 1024자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.

SlotWithSignature

서명된 슬롯

플레이어가 참조하는 리소스를 소유하고 있음을 증명하는 암호 서명을 포함한 슬롯 할당입니다. 폼 업데이트 시 플레이어가 슬롯에 배치하는 아이템, 엔트리, 또는 기타 리소스를 실제로 소유하고 있는지 검증하여 부정한 할당을 방지하는 데 사용됩니다.

상세
타입활성화 조건필수기본값값 제한설명
namestring
~ 128자슬롯 모델 이름
슬롯 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
propertyType문자열 열거형
enum {
  “gs2_inventory”,
  “gs2_simple_inventory”,
  “gs2_dictionary”
}
프로퍼티 종류
이 슬롯이 참조하는 GS2 리소스의 종류를 지정합니다. 서명 검증 방법을 결정합니다. GS2-Inventory의 아이템 세트, GS2-Inventory의 심플 아이템, GS2-Dictionary의 엔트리는 각각 서로 다른 서명 형식을 가집니다.
정의설명
gs2_inventoryGS2-Inventory::ItemSet
gs2_simple_inventoryGS2-Inventory::SimpleItem
gs2_dictionaryGS2-Dictionary::Entry
bodystring~ 1048576자페이로드
리소스를 소유한 GS2 서비스로부터 취득한 직렬화된 리소스 데이터입니다. 서명을 검증하고 소유권을 확인하는 데 필요한 리소스 상태 정보를 포함합니다.
signaturestring~ 1024자프로퍼티 ID가 가리키는 리소스를 소유하고 있음을 증명하는 서명
리소스를 소유한 GS2 서비스에 의해 생성된 암호 서명입니다. 폼 업데이트 시 플레이어가 참조하는 아이템 세트, 심플 아이템, 또는 딕셔너리 엔트리를 소유하고 있는지 확인하기 위해 검증됩니다.
metadatastring~ 1024자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.

AcquireAction

입수 액션

상세
타입활성화 조건필수기본값값 제한설명
action문자열 열거형
enum {
"Gs2AdReward:AcquirePointByUserId",
"Gs2Dictionary:AddEntriesByUserId",
"Gs2Enchant:ReDrawBalanceParameterStatusByUserId",
"Gs2Enchant:SetBalanceParameterStatusByUserId",
"Gs2Enchant:ReDrawRarityParameterStatusByUserId",
"Gs2Enchant:AddRarityParameterStatusByUserId",
"Gs2Enchant:SetRarityParameterStatusByUserId",
"Gs2Enhance:DirectEnhanceByUserId",
"Gs2Enhance:UnleashByUserId",
"Gs2Enhance:CreateProgressByUserId",
"Gs2Exchange:ExchangeByUserId",
"Gs2Exchange:IncrementalExchangeByUserId",
"Gs2Exchange:CreateAwaitByUserId",
"Gs2Exchange:AcquireForceByUserId",
"Gs2Exchange:SkipByUserId",
"Gs2Experience:AddExperienceByUserId",
"Gs2Experience:SetExperienceByUserId",
"Gs2Experience:AddRankCapByUserId",
"Gs2Experience:SetRankCapByUserId",
"Gs2Experience:MultiplyAcquireActionsByUserId",
"Gs2Formation:AddMoldCapacityByUserId",
"Gs2Formation:SetMoldCapacityByUserId",
"Gs2Formation:AcquireActionsToFormProperties",
"Gs2Formation:SetFormByUserId",
"Gs2Formation:AcquireActionsToPropertyFormProperties",
"Gs2Friend:UpdateProfileByUserId",
"Gs2Grade:AddGradeByUserId",
"Gs2Grade:ApplyRankCapByUserId",
"Gs2Grade:MultiplyAcquireActionsByUserId",
"Gs2Guild:IncreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Guild:SetMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:IncreaseMaximumIdleMinutesByUserId",
"Gs2Idle:SetMaximumIdleMinutesByUserId",
"Gs2Idle:ReceiveByUserId",
"Gs2Inbox:SendMessageByUserId",
"Gs2Inventory:AddCapacityByUserId",
"Gs2Inventory:SetCapacityByUserId",
"Gs2Inventory:AcquireItemSetByUserId",
"Gs2Inventory:AcquireItemSetWithGradeByUserId",
"Gs2Inventory:AddReferenceOfByUserId",
"Gs2Inventory:DeleteReferenceOfByUserId",
"Gs2Inventory:AcquireSimpleItemsByUserId",
"Gs2Inventory:SetSimpleItemsByUserId",
"Gs2Inventory:AcquireBigItemByUserId",
"Gs2Inventory:SetBigItemByUserId",
"Gs2JobQueue:PushByUserId",
"Gs2Limit:CountDownByUserId",
"Gs2Limit:DeleteCounterByUserId",
"Gs2LoginReward:DeleteReceiveStatusByUserId",
"Gs2LoginReward:UnmarkReceivedByUserId",
"Gs2Lottery:DrawByUserId",
"Gs2Lottery:ResetBoxByUserId",
"Gs2Mission:RevertReceiveByUserId",
"Gs2Mission:IncreaseCounterByUserId",
"Gs2Mission:SetCounterByUserId",
"Gs2Money:DepositByUserId",
"Gs2Money:RevertRecordReceipt",
"Gs2Money2:DepositByUserId",
"Gs2Quest:CreateProgressByUserId",
"Gs2Schedule:TriggerByUserId",
"Gs2Schedule:ExtendTriggerByUserId",
"Gs2Script:InvokeScript",
"Gs2SerialKey:RevertUseByUserId",
"Gs2SerialKey:IssueOnce",
"Gs2Showcase:DecrementPurchaseCountByUserId",
"Gs2Showcase:ForceReDrawByUserId",
"Gs2SkillTree:MarkReleaseByUserId",
"Gs2Stamina:RecoverStaminaByUserId",
"Gs2Stamina:RaiseMaxValueByUserId",
"Gs2Stamina:SetMaxValueByUserId",
"Gs2Stamina:SetRecoverIntervalByUserId",
"Gs2Stamina:SetRecoverValueByUserId",
"Gs2StateMachine:StartStateMachineByUserId",
}
입수 액션에서 실행할 액션의 종류
requeststring
~ 524288자액션 실행 시 사용되는 요청의 JSON 문자열

Config

컨피그 설정

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

상세
타입활성화 조건필수기본값값 제한설명
keystring
~ 64자이름
valuestring~ 51200자

VerifyActionResult

검증 액션 실행 결과

상세
타입활성화 조건필수기본값값 제한설명
action문자열 열거형
enum {
"Gs2Dictionary:VerifyEntryByUserId",
"Gs2Distributor:IfExpressionByUserId",
"Gs2Distributor:AndExpressionByUserId",
"Gs2Distributor:OrExpressionByUserId",
"Gs2Enchant:VerifyRarityParameterStatusByUserId",
"Gs2Experience:VerifyRankByUserId",
"Gs2Experience:VerifyRankCapByUserId",
"Gs2Grade:VerifyGradeByUserId",
"Gs2Grade:VerifyGradeUpMaterialByUserId",
"Gs2Guild:VerifyCurrentMaximumMemberCountByGuildName",
"Gs2Guild:VerifyIncludeMemberByUserId",
"Gs2Inventory:VerifyInventoryCurrentMaxCapacityByUserId",
"Gs2Inventory:VerifyItemSetByUserId",
"Gs2Inventory:VerifyReferenceOfByUserId",
"Gs2Inventory:VerifySimpleItemByUserId",
"Gs2Inventory:VerifyBigItemByUserId",
"Gs2Limit:VerifyCounterByUserId",
"Gs2Matchmaking:VerifyIncludeParticipantByUserId",
"Gs2Mission:VerifyCompleteByUserId",
"Gs2Mission:VerifyCounterValueByUserId",
"Gs2Ranking2:VerifyGlobalRankingScoreByUserId",
"Gs2Ranking2:VerifyClusterRankingScoreByUserId",
"Gs2Ranking2:VerifySubscribeRankingScoreByUserId",
"Gs2Schedule:VerifyTriggerByUserId",
"Gs2Schedule:VerifyEventByUserId",
"Gs2SerialKey:VerifyCodeByUserId",
"Gs2Stamina:VerifyStaminaValueByUserId",
"Gs2Stamina:VerifyStaminaMaxValueByUserId",
"Gs2Stamina:VerifyStaminaRecoverIntervalMinutesByUserId",
"Gs2Stamina:VerifyStaminaRecoverValueByUserId",
"Gs2Stamina:VerifyStaminaOverflowValueByUserId",
}
검증 액션에서 실행할 액션의 종류
verifyRequeststring
~ 524288자액션 실행 시 사용되는 요청의 JSON 문자열
statusCodeint0 ~ 999상태 코드
verifyResultstring~ 1048576자결과 내용

ConsumeActionResult

소비 액션 실행 결과

상세
타입활성화 조건필수기본값값 제한설명
action문자열 열거형
enum {
"Gs2AdReward:ConsumePointByUserId",
"Gs2Dictionary:DeleteEntriesByUserId",
"Gs2Enhance:DeleteProgressByUserId",
"Gs2Exchange:DeleteAwaitByUserId",
"Gs2Experience:SubExperienceByUserId",
"Gs2Experience:SubRankCapByUserId",
"Gs2Formation:SubMoldCapacityByUserId",
"Gs2Grade:SubGradeByUserId",
"Gs2Guild:DecreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:DecreaseMaximumIdleMinutesByUserId",
"Gs2Inbox:OpenMessageByUserId",
"Gs2Inbox:DeleteMessageByUserId",
"Gs2Inventory:ConsumeItemSetByUserId",
"Gs2Inventory:ConsumeSimpleItemsByUserId",
"Gs2Inventory:ConsumeBigItemByUserId",
"Gs2JobQueue:DeleteJobByUserId",
"Gs2Limit:CountUpByUserId",
"Gs2LoginReward:MarkReceivedByUserId",
"Gs2Mission:ReceiveByUserId",
"Gs2Mission:BatchReceiveByUserId",
"Gs2Mission:DecreaseCounterByUserId",
"Gs2Mission:ResetCounterByUserId",
"Gs2Money:WithdrawByUserId",
"Gs2Money:RecordReceipt",
"Gs2Money2:WithdrawByUserId",
"Gs2Money2:VerifyReceiptByUserId",
"Gs2Quest:DeleteProgressByUserId",
"Gs2Ranking2:CreateGlobalRankingReceivedRewardByUserId",
"Gs2Ranking2:CreateClusterRankingReceivedRewardByUserId",
"Gs2Schedule:DeleteTriggerByUserId",
"Gs2SerialKey:UseByUserId",
"Gs2Showcase:IncrementPurchaseCountByUserId",
"Gs2SkillTree:MarkRestrainByUserId",
"Gs2Stamina:DecreaseMaxValueByUserId",
"Gs2Stamina:ConsumeStaminaByUserId",
}
소비 액션에서 실행할 액션의 종류
consumeRequeststring
~ 524288자액션 실행 시 사용되는 요청의 JSON 문자열
statusCodeint0 ~ 999상태 코드
consumeResultstring~ 1048576자결과 내용

AcquireActionResult

획득 액션 실행 결과

상세
타입활성화 조건필수기본값값 제한설명
action문자열 열거형
enum {
"Gs2AdReward:AcquirePointByUserId",
"Gs2Dictionary:AddEntriesByUserId",
"Gs2Enchant:ReDrawBalanceParameterStatusByUserId",
"Gs2Enchant:SetBalanceParameterStatusByUserId",
"Gs2Enchant:ReDrawRarityParameterStatusByUserId",
"Gs2Enchant:AddRarityParameterStatusByUserId",
"Gs2Enchant:SetRarityParameterStatusByUserId",
"Gs2Enhance:DirectEnhanceByUserId",
"Gs2Enhance:UnleashByUserId",
"Gs2Enhance:CreateProgressByUserId",
"Gs2Exchange:ExchangeByUserId",
"Gs2Exchange:IncrementalExchangeByUserId",
"Gs2Exchange:CreateAwaitByUserId",
"Gs2Exchange:AcquireForceByUserId",
"Gs2Exchange:SkipByUserId",
"Gs2Experience:AddExperienceByUserId",
"Gs2Experience:SetExperienceByUserId",
"Gs2Experience:AddRankCapByUserId",
"Gs2Experience:SetRankCapByUserId",
"Gs2Experience:MultiplyAcquireActionsByUserId",
"Gs2Formation:AddMoldCapacityByUserId",
"Gs2Formation:SetMoldCapacityByUserId",
"Gs2Formation:AcquireActionsToFormProperties",
"Gs2Formation:SetFormByUserId",
"Gs2Formation:AcquireActionsToPropertyFormProperties",
"Gs2Friend:UpdateProfileByUserId",
"Gs2Grade:AddGradeByUserId",
"Gs2Grade:ApplyRankCapByUserId",
"Gs2Grade:MultiplyAcquireActionsByUserId",
"Gs2Guild:IncreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Guild:SetMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:IncreaseMaximumIdleMinutesByUserId",
"Gs2Idle:SetMaximumIdleMinutesByUserId",
"Gs2Idle:ReceiveByUserId",
"Gs2Inbox:SendMessageByUserId",
"Gs2Inventory:AddCapacityByUserId",
"Gs2Inventory:SetCapacityByUserId",
"Gs2Inventory:AcquireItemSetByUserId",
"Gs2Inventory:AcquireItemSetWithGradeByUserId",
"Gs2Inventory:AddReferenceOfByUserId",
"Gs2Inventory:DeleteReferenceOfByUserId",
"Gs2Inventory:AcquireSimpleItemsByUserId",
"Gs2Inventory:SetSimpleItemsByUserId",
"Gs2Inventory:AcquireBigItemByUserId",
"Gs2Inventory:SetBigItemByUserId",
"Gs2JobQueue:PushByUserId",
"Gs2Limit:CountDownByUserId",
"Gs2Limit:DeleteCounterByUserId",
"Gs2LoginReward:DeleteReceiveStatusByUserId",
"Gs2LoginReward:UnmarkReceivedByUserId",
"Gs2Lottery:DrawByUserId",
"Gs2Lottery:ResetBoxByUserId",
"Gs2Mission:RevertReceiveByUserId",
"Gs2Mission:IncreaseCounterByUserId",
"Gs2Mission:SetCounterByUserId",
"Gs2Money:DepositByUserId",
"Gs2Money:RevertRecordReceipt",
"Gs2Money2:DepositByUserId",
"Gs2Quest:CreateProgressByUserId",
"Gs2Schedule:TriggerByUserId",
"Gs2Schedule:ExtendTriggerByUserId",
"Gs2Script:InvokeScript",
"Gs2SerialKey:RevertUseByUserId",
"Gs2SerialKey:IssueOnce",
"Gs2Showcase:DecrementPurchaseCountByUserId",
"Gs2Showcase:ForceReDrawByUserId",
"Gs2SkillTree:MarkReleaseByUserId",
"Gs2Stamina:RecoverStaminaByUserId",
"Gs2Stamina:RaiseMaxValueByUserId",
"Gs2Stamina:SetMaxValueByUserId",
"Gs2Stamina:SetRecoverIntervalByUserId",
"Gs2Stamina:SetRecoverValueByUserId",
"Gs2StateMachine:StartStateMachineByUserId",
}
입수 액션에서 실행할 액션의 종류
acquireRequeststring
~ 524288자액션 실행 시 사용되는 요청의 JSON 문자열
statusCodeint0 ~ 999상태 코드
acquireResultstring~ 1048576자결과 내용

TransactionResult

트랜잭션 실행 결과

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

상세
타입활성화 조건필수기본값값 제한설명
transactionIdstring
36 ~ 36자트랜잭션 ID
verifyResultsList<VerifyActionResult>0 ~ 10 items검증 액션의 실행 결과 목록
consumeResultsList<ConsumeActionResult>[]0 ~ 10 items소비 액션의 실행 결과 목록
acquireResultsList<AcquireActionResult>[]0 ~ 100 items획득 액션 실행 결과 리스트
hasErrorboolfalse트랜잭션 실행 중 오류가 발생했는지 여부

CurrentFormMaster

현재 활성화된 폼 모델 마스터 데이터

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

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

상세
타입활성화 조건필수기본값값 제한설명
namespaceIdstring
~ 1024자네임스페이스 GRN
※ 서버가 자동으로 설정
settingsstring
~ 5242880 바이트 (5MB)마스터 데이터

FormModelMaster

폼 모델 마스터

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

폼 모델은 편성 상태를 나타내는 엔티티입니다.
편성 가능한 영역으로 슬롯을 정의할 수 있습니다.

무기·방어구라면 “오른손”, “왼손”, “몸통”, “팔"과 같은 부위를 슬롯으로,
파티라면 “전위”, “중위”, “후위"와 같은 포지션을 슬롯으로 표현할 수 있습니다.

상세
타입활성화 조건필수기본값값 제한설명
formModelIdstring
~ 1024자폼 모델 마스터 GRN
※ 서버가 자동으로 설정
namestring
~ 128자폼 모델명
폼 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
metadatastring~ 2048자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
slotsList<SlotModel>
1 ~ 10 items슬롯 모델 리스트
이 폼을 구성하는 슬롯 정의의 순서가 있는 리스트입니다. 각 슬롯은 할당 가능한 포지션을 나타내며, 슬롯명은 폼 내에서 고유해야 합니다. 장비에서는 “weapon”, “armor”, “accessory"와 같은 슬롯, 파티에서는 “position_1”, “position_2"와 같은 슬롯을 생각할 수 있습니다.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
updatedAtlong
현재 시각최종 갱신일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
revisionlong00 ~ 9223372036854775805리비전

MoldModelMaster

폼 저장 영역 모델 마스터

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

폼 저장 영역 모델은 파티 편성이라면 「불 속성 파티」「물 속성 파티」와 같은 형태로 저장하는 것을 상정하고 있습니다.
저장할 수 있는 영역의 수는 제한할 수 있으며, 개별적으로 확장할 수도 있습니다.

상세
타입활성화 조건필수기본값값 제한설명
moldModelIdstring
~ 1024자폼 저장 영역 모델 마스터 GRN
※ 서버가 자동으로 설정
namestring
~ 128자폼 저장 영역 모델 이름
폼 저장 영역 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
metadatastring~ 2048자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
initialMaxCapacityint
1 ~ 2147483646폼을 저장할 수 있는 초기 캐파시티
이 저장 영역에서 각 플레이어가 이용할 수 있는 기본 폼 저장 슬롯 수입니다. 예를 들어 3으로 설정하면 플레이어는 초기 상태에서 최대 3개의 서로 다른 편성(예: 「불 속성 파티」「물 속성 파티」「바람 속성 파티」)을 저장할 수 있습니다. 플레이어별로 maxCapacity까지 확장할 수 있습니다.
maxCapacityint
1 ~ 2147483646폼을 저장할 수 있는 최대 캐파시티
이 저장 영역에서 플레이어별 폼 저장 슬롯 수의 절대적인 상한입니다. 캐파시티 확장 조작을 수행하더라도 캐파시티는 이 값을 초과할 수 없습니다. initialMaxCapacity 이상의 값이어야 합니다.
formModelNamestring
~ 128자폼 모델 이름
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
updatedAtlong
현재 시각최종 갱신일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
revisionlong00 ~ 9223372036854775805리비전

PropertyFormModelMaster

프로퍼티 폼 모델 마스터

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

프로퍼티 폼 모델은 편성 상태를 나타내는 엔티티입니다.
Mold / Form과의 차이점은, 슬롯 수를 정의하고 각 슬롯에 편성을 기록하는 것이 Mold / Form이며,
보유하고 있는 장비에 스킬을 설정하는 것처럼 수를 사전에 정하기 어려운 편성을 표현할 때 사용하는 것이 프로퍼티 폼 모델입니다.

상세
타입활성화 조건필수기본값값 제한설명
propertyFormModelIdstring
~ 1024자프로퍼티 폼 모델 마스터 GRN
※ 서버가 자동으로 설정
namestring
~ 128자프로퍼티 폼 모델 이름
프로퍼티 폼 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
metadatastring~ 2048자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
slotsList<SlotModel>
1 ~ 10 items슬롯 모델 목록
이 프로퍼티 폼의 슬롯 정의를 순서대로 나열한 목록입니다. 캐파시티에 의해 폼 수가 제한되는 Mold/Form과 달리, 프로퍼티 폼은 프로퍼티 ID로 식별되며 보유하는 리소스마다 존재할 수 있습니다. 슬롯 이름은 폼 내에서 고유해야 합니다.
createdAtlong
현재 시각생성일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
updatedAtlong
현재 시각최종 갱신일시
UNIX 시간·밀리초
※ 서버가 자동으로 설정
revisionlong00 ~ 9223372036854775805리비전

메서드

describeNamespaces

네임스페이스 목록 조회

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

상세

Request

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

Result

타입설명
itemsList<Namespace>네임스페이스 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribeNamespaces(
    &formation.DescribeNamespacesRequest {
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribeNamespacesRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describeNamespaces(
        (new DescribeNamespacesRequest())
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribeNamespacesRequest;
import io.gs2.formation.result.DescribeNamespacesResult;

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

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

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

AsyncResult<Gs2.Gs2Formation.Result.DescribeNamespacesResult> asyncResult = null;
yield return client.DescribeNamespaces(
    new Gs2.Gs2Formation.Request.DescribeNamespacesRequest()
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

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

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

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

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

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('formation')

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

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

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

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

createNamespace

네임스페이스 신규 생성

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

상세

Request

타입활성화 조건필수기본값값 제한설명
namestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
transactionSettingTransactionSetting트랜잭션 설정
편성 조작 시 트랜잭션 처리 방법을 제어하는 설정입니다.
updateMoldScriptScriptSetting폼 저장 영역의 캐파시티를 업데이트할 때 실행하는 스크립트 설정
Script 트리거 레퍼런스 - updateMold
updateFormScriptScriptSetting폼을 업데이트할 때 실행하는 스크립트 설정
Script 트리거 레퍼런스 - updateForm
updatePropertyFormScriptScriptSetting프로퍼티 폼을 업데이트할 때 실행하는 스크립트 설정
Script 트리거 레퍼런스 - updatePropertyForm
logSettingLogSetting로그 출력 설정
편성 조작의 로그 데이터를 GS2-Log에 출력하기 위한 설정입니다. GS2-Log의 네임스페이스를 지정함으로써 폼 업데이트, 저장 영역 캐파시티 변경, 프로퍼티 폼 변경의 API 요청·응답 로그를 수집할 수 있습니다.

Result

타입설명
itemNamespace생성한 네임스페이스

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.CreateNamespace(
    &formation.CreateNamespaceRequest {
        Name: pointy.String("namespace-0001"),
        Description: nil,
        TransactionSetting: &formation.TransactionSetting{
            EnableAutoRun: pointy.Bool(false),
            QueueNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"),
        },
        UpdateMoldScript: nil,
        UpdateFormScript: nil,
        UpdatePropertyFormScript: nil,
        LogSetting: &formation.LogSetting{
            LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\CreateNamespaceRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->createNamespace(
        (new CreateNamespaceRequest())
            ->withName("namespace-0001")
            ->withDescription(null)
            ->withTransactionSetting((new \Gs2\Formation\Model\TransactionSetting())
                ->withEnableAutoRun(false)
                ->withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"))
            ->withUpdateMoldScript(null)
            ->withUpdateFormScript(null)
            ->withUpdatePropertyFormScript(null)
            ->withLogSetting((new \Gs2\Formation\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.CreateNamespaceRequest;
import io.gs2.formation.result.CreateNamespaceResult;

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

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

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

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('formation')

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

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

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

result = api_result.result
item = result.item;

getNamespaceStatus

네임스페이스의 상태 조회

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

상세

Request

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

Result

타입설명
statusstring네임스페이스의 상태
정의설명
ACTIVE유효
DELETED삭제됨

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetNamespaceStatus(
    &formation.GetNamespaceStatusRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
status := result.Status
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetNamespaceStatusRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getNamespaceStatus(
        (new GetNamespaceStatusRequest())
            ->withNamespaceName("namespace-0001")
    );
    $status = $result->getStatus();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetNamespaceStatusRequest;
import io.gs2.formation.result.GetNamespaceStatusResult;

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

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

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

AsyncResult<Gs2.Gs2Formation.Result.GetNamespaceStatusResult> asyncResult = null;
yield return client.GetNamespaceStatus(
    new Gs2.Gs2Formation.Request.GetNamespaceStatusRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var status = result.Status;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

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

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

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

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

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

result = api_result.result
status = result.status;
client = gs2('formation')

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

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

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

result = api_result.result
status = result.status;

getNamespace

네임스페이스 조회

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

상세

Request

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

Result

타입설명
itemNamespace네임스페이스

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetNamespace(
    &formation.GetNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetNamespaceRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getNamespace(
        (new GetNamespaceRequest())
            ->withNamespaceName("namespace-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetNamespaceRequest;
import io.gs2.formation.result.GetNamespaceResult;

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

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

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

AsyncResult<Gs2.Gs2Formation.Result.GetNamespaceResult> asyncResult = null;
yield return client.GetNamespace(
    new Gs2.Gs2Formation.Request.GetNamespaceRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('formation')

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

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

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

result = api_result.result
item = result.item;

updateNamespace

네임스페이스 갱신

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

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
transactionSettingTransactionSetting트랜잭션 설정
편성 조작 시 트랜잭션 처리 방법을 제어하는 설정입니다.
updateMoldScriptScriptSetting폼 저장 영역의 캐파시티를 업데이트할 때 실행하는 스크립트 설정
Script 트리거 레퍼런스 - updateMold
updateFormScriptScriptSetting폼을 업데이트할 때 실행하는 스크립트 설정
Script 트리거 레퍼런스 - updateForm
updatePropertyFormScriptScriptSetting프로퍼티 폼을 업데이트할 때 실행하는 스크립트 설정
Script 트리거 레퍼런스 - updatePropertyForm
logSettingLogSetting로그 출력 설정
편성 조작의 로그 데이터를 GS2-Log에 출력하기 위한 설정입니다. GS2-Log의 네임스페이스를 지정함으로써 폼 업데이트, 저장 영역 캐파시티 변경, 프로퍼티 폼 변경의 API 요청·응답 로그를 수집할 수 있습니다.

Result

타입설명
itemNamespace갱신한 네임스페이스

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.UpdateNamespace(
    &formation.UpdateNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Description: pointy.String("description1"),
        TransactionSetting: &formation.TransactionSetting{
            EnableAutoRun: pointy.Bool(false),
            QueueNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"),
        },
        UpdateMoldScript: nil,
        UpdateFormScript: nil,
        UpdatePropertyFormScript: nil,
        LogSetting: &formation.LogSetting{
            LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\UpdateNamespaceRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->updateNamespace(
        (new UpdateNamespaceRequest())
            ->withNamespaceName("namespace-0001")
            ->withDescription("description1")
            ->withTransactionSetting((new \Gs2\Formation\Model\TransactionSetting())
                ->withEnableAutoRun(false)
                ->withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0002"))
            ->withUpdateMoldScript(null)
            ->withUpdateFormScript(null)
            ->withUpdatePropertyFormScript(null)
            ->withLogSetting((new \Gs2\Formation\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.UpdateNamespaceRequest;
import io.gs2.formation.result.UpdateNamespaceResult;

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

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

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

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('formation')

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

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

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

result = api_result.result
item = result.item;

deleteNamespace

네임스페이스 삭제

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

상세

Request

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

Result

타입설명
itemNamespace삭제한 네임스페이스

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeleteNamespace(
    &formation.DeleteNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeleteNamespaceRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deleteNamespace(
        (new DeleteNamespaceRequest())
            ->withNamespaceName("namespace-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeleteNamespaceRequest;
import io.gs2.formation.result.DeleteNamespaceResult;

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

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

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

AsyncResult<Gs2.Gs2Formation.Result.DeleteNamespaceResult> asyncResult = null;
yield return client.DeleteNamespace(
    new Gs2.Gs2Formation.Request.DeleteNamespaceRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('formation')

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

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

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

result = api_result.result
item = result.item;

getServiceVersion

마이크로서비스 버전 조회

상세

Request

요청 파라미터: 없음

Result

타입설명
itemstring버전

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetServiceVersion(
    &formation.GetServiceVersionRequest {
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetServiceVersionRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getServiceVersion(
        (new GetServiceVersionRequest())
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetServiceVersionRequest;
import io.gs2.formation.result.GetServiceVersionResult;

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

try {
    GetServiceVersionResult result = client.getServiceVersion(
        new GetServiceVersionRequest()
    );
    String item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.GetServiceVersionResult> asyncResult = null;
yield return client.GetServiceVersion(
    new Gs2.Gs2Formation.Request.GetServiceVersionRequest(),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

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

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

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

api_result = client.get_service_version({
})

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

result = api_result.result
item = result.item;
client = gs2('formation')

api_result_handler = client.get_service_version_async({
})

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

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

result = api_result.result
item = result.item;

dumpUserDataByUserId

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

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

상세

Request

타입활성화 조건필수기본값값 제한설명
userIdstring
~ 128자사용자ID
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

반환값: 없음

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DumpUserDataByUserId(
    &formation.DumpUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DumpUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->dumpUserDataByUserId(
        (new DumpUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DumpUserDataByUserIdRequest;
import io.gs2.formation.result.DumpUserDataByUserIdResult;

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

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

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

AsyncResult<Gs2.Gs2Formation.Result.DumpUserDataByUserIdResult> asyncResult = null;
yield return client.DumpUserDataByUserId(
    new Gs2.Gs2Formation.Request.DumpUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

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

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

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

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

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

result = api_result.result
client = gs2('formation')

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

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

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

result = api_result.result

checkDumpUserDataByUserId

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

상세

Request

타입활성화 조건필수기본값값 제한설명
userIdstring
~ 128자사용자ID
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
urlstring출력 데이터의 URL

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.CheckDumpUserDataByUserId(
    &formation.CheckDumpUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
url := result.Url
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\CheckDumpUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->checkDumpUserDataByUserId(
        (new CheckDumpUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $url = $result->getUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.CheckDumpUserDataByUserIdRequest;
import io.gs2.formation.result.CheckDumpUserDataByUserIdResult;

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

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

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

AsyncResult<Gs2.Gs2Formation.Result.CheckDumpUserDataByUserIdResult> asyncResult = null;
yield return client.CheckDumpUserDataByUserId(
    new Gs2.Gs2Formation.Request.CheckDumpUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var url = result.Url;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

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

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

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

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

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

result = api_result.result
url = result.url;
client = gs2('formation')

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

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

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

result = api_result.result
url = result.url;

cleanUserDataByUserId

사용자 데이터 완전 삭제

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

상세

Request

타입활성화 조건필수기본값값 제한설명
userIdstring
~ 128자사용자ID
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

반환값: 없음

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.CleanUserDataByUserId(
    &formation.CleanUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\CleanUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->cleanUserDataByUserId(
        (new CleanUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.CleanUserDataByUserIdRequest;
import io.gs2.formation.result.CleanUserDataByUserIdResult;

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

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

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

AsyncResult<Gs2.Gs2Formation.Result.CleanUserDataByUserIdResult> asyncResult = null;
yield return client.CleanUserDataByUserId(
    new Gs2.Gs2Formation.Request.CleanUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

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

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

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

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

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

result = api_result.result
client = gs2('formation')

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

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

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

result = api_result.result

checkCleanUserDataByUserId

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

상세

Request

타입활성화 조건필수기본값값 제한설명
userIdstring
~ 128자사용자ID
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

반환값: 없음

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.CheckCleanUserDataByUserId(
    &formation.CheckCleanUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\CheckCleanUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->checkCleanUserDataByUserId(
        (new CheckCleanUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.CheckCleanUserDataByUserIdRequest;
import io.gs2.formation.result.CheckCleanUserDataByUserIdResult;

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

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

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

AsyncResult<Gs2.Gs2Formation.Result.CheckCleanUserDataByUserIdResult> asyncResult = null;
yield return client.CheckCleanUserDataByUserId(
    new Gs2.Gs2Formation.Request.CheckCleanUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

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

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

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

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

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

result = api_result.result
client = gs2('formation')

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

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

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

result = api_result.result

prepareImportUserDataByUserId

지정한 사용자 ID에 연결된 데이터의 임포트 준비

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

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

상세

Request

타입활성화 조건필수기본값값 제한설명
userIdstring
~ 128자사용자ID
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

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

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.PrepareImportUserDataByUserId(
    &formation.PrepareImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
uploadToken := result.UploadToken
uploadUrl := result.UploadUrl
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\PrepareImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->prepareImportUserDataByUserId(
        (new PrepareImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withTimeOffsetToken(null)
    );
    $uploadToken = $result->getUploadToken();
    $uploadUrl = $result->getUploadUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.PrepareImportUserDataByUserIdRequest;
import io.gs2.formation.result.PrepareImportUserDataByUserIdResult;

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

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

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

AsyncResult<Gs2.Gs2Formation.Result.PrepareImportUserDataByUserIdResult> asyncResult = null;
yield return client.PrepareImportUserDataByUserId(
    new Gs2.Gs2Formation.Request.PrepareImportUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var uploadToken = result.UploadToken;
var uploadUrl = result.UploadUrl;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

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

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

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

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

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

result = api_result.result
uploadToken = result.uploadToken;
uploadUrl = result.uploadUrl;
client = gs2('formation')

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

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

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

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

importUserDataByUserId

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

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

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

상세

Request

타입활성화 조건필수기본값값 제한설명
userIdstring
~ 128자사용자ID
uploadTokenstring
~ 1024자업로드 준비 시 수신한 토큰
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

반환값: 없음

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.ImportUserDataByUserId(
    &formation.ImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        UploadToken: pointy.String("upload-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\ImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->importUserDataByUserId(
        (new ImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withUploadToken("upload-0001")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.ImportUserDataByUserIdRequest;
import io.gs2.formation.result.ImportUserDataByUserIdResult;

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

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

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

AsyncResult<Gs2.Gs2Formation.Result.ImportUserDataByUserIdResult> asyncResult = null;
yield return client.ImportUserDataByUserId(
    new Gs2.Gs2Formation.Request.ImportUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithUploadToken("upload-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

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

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

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

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

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

result = api_result.result
client = gs2('formation')

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

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

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

result = api_result.result

checkImportUserDataByUserId

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

상세

Request

타입활성화 조건필수기본값값 제한설명
userIdstring
~ 128자사용자ID
uploadTokenstring
~ 1024자업로드 준비 시 수신한 토큰
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
urlstring출력 로그의 URL

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.CheckImportUserDataByUserId(
    &formation.CheckImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        UploadToken: pointy.String("upload-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
url := result.Url
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\CheckImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->checkImportUserDataByUserId(
        (new CheckImportUserDataByUserIdRequest())
            ->withUserId("user-0001")
            ->withUploadToken("upload-0001")
            ->withTimeOffsetToken(null)
    );
    $url = $result->getUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.CheckImportUserDataByUserIdRequest;
import io.gs2.formation.result.CheckImportUserDataByUserIdResult;

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

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

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

AsyncResult<Gs2.Gs2Formation.Result.CheckImportUserDataByUserIdResult> asyncResult = null;
yield return client.CheckImportUserDataByUserId(
    new Gs2.Gs2Formation.Request.CheckImportUserDataByUserIdRequest()
        .WithUserId("user-0001")
        .WithUploadToken("upload-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var url = result.Url;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

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

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

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

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

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

result = api_result.result
url = result.url;
client = gs2('formation')

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

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

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

result = api_result.result
url = result.url;

describeMolds

폼 저장 영역 목록 조회

요청한 사용자의 폼 저장 영역(몰드)에 대한 페이지네이션 목록을 조회합니다.
각 몰드는 특정 몰드 모델에 대한 사용자의 저장 영역을 나타내며, 현재 용량 정보를 포함합니다.

상세

Request

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

Result

타입설명
itemsList<Mold>폼 저장 영역 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribeMolds(
    &formation.DescribeMoldsRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribeMoldsRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describeMolds(
        (new DescribeMoldsRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribeMoldsRequest;
import io.gs2.formation.result.DescribeMoldsResult;

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

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

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

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

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

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

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

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

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

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('formation')

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

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

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

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

describeMoldsByUserId

사용자 ID를 지정하여 폼 저장 영역 목록 조회

지정된 사용자의 폼 저장 영역(몰드)에 대한 페이지네이션 목록을 조회합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
pageTokenstring~ 1024자데이터 취득을 시작할 위치를 지정하는 토큰
limitint301 ~ 1000취득할 데이터 건수
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemsList<Mold>폼 저장 영역 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribeMoldsByUserId(
    &formation.DescribeMoldsByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribeMoldsByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describeMoldsByUserId(
        (new DescribeMoldsByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribeMoldsByUserIdRequest;
import io.gs2.formation.result.DescribeMoldsByUserIdResult;

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

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

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

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

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

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

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

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

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

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('formation')

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

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

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

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

getMold

폼 저장 영역 조회

저장 영역 모델 이름을 지정하여 요청한 사용자의 특정 폼 저장 영역(몰드)을 조회합니다.
현재 용량과 연관된 몰드 모델 정보를 포함한 몰드를 반환합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
moldModelNamestring
~ 128자폼 저장 영역 모델의 이름
폼 저장 영역 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.

Result

타입설명
itemMold폼 저장 영역
moldModelMoldModel폼 저장 영역

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetMold(
    &formation.GetMoldRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MoldModelName: pointy.String("mold-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
moldModel := result.MoldModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetMoldRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getMold(
        (new GetMoldRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withMoldModelName("mold-0001")
    );
    $item = $result->getItem();
    $moldModel = $result->getMoldModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetMoldRequest;
import io.gs2.formation.result.GetMoldResult;

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

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

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

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
moldModel = result.moldModel;
client = gs2('formation')

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

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

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

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

getMoldByUserId

사용자 ID를 지정하여 폼 저장 영역 조회

저장 영역 모델 이름을 지정하여 지정된 사용자의 특정 폼 저장 영역(몰드)을 조회합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
moldModelNamestring
~ 128자폼 저장 영역 모델의 이름
폼 저장 영역 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemMold폼 저장 영역
moldModelMoldModel폼 저장 영역

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetMoldByUserId(
    &formation.GetMoldByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
moldModel := result.MoldModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetMoldByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getMoldByUserId(
        (new GetMoldByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $moldModel = $result->getMoldModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetMoldByUserIdRequest;
import io.gs2.formation.result.GetMoldByUserIdResult;

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

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

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

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
moldModel = result.moldModel;
client = gs2('formation')

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

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

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

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

setMoldCapacityByUserId

사용자 ID를 지정하여 용량 크기 설정

지정된 사용자의 폼 저장 영역(몰드)의 용량을 지정한 값으로 직접 설정합니다.
갱신 전의 몰드를 ‘old’로, 갱신 후의 몰드와 함께 반환합니다.
용량은 몰드 모델에 정의된 maxCapacity로 상한이 제한됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
moldModelNamestring
~ 128자폼 저장 영역 모델의 이름
폼 저장 영역 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
capacityint
0 ~ 2147483646현재 캐파시티
이 저장 영역에서 이 플레이어가 현재 이용할 수 있는 폼 저장 슬롯 수입니다. 초기값은 저장 영역 모델의 initialMaxCapacity로 설정되며, 캐파시티 증가 조작을 통해 maxCapacity까지 확장할 수 있습니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemMold용량을 갱신한 폼 저장 영역
oldMold용량을 갱신하기 전의 폼 저장 영역
moldModelMoldModel폼 저장 영역

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.SetMoldCapacityByUserId(
    &formation.SetMoldCapacityByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Capacity: pointy.Int32(10),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
old := result.Old
moldModel := result.MoldModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\SetMoldCapacityByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->setMoldCapacityByUserId(
        (new SetMoldCapacityByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withCapacity(10)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $old = $result->getOld();
    $moldModel = $result->getMoldModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.SetMoldCapacityByUserIdRequest;
import io.gs2.formation.result.SetMoldCapacityByUserIdResult;

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

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

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

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
old = result.old;
moldModel = result.moldModel;
client = gs2('formation')

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

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

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

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

addMoldCapacityByUserId

사용자 ID를 지정하여 용량 크기 가산

지정된 사용자의 폼 저장 영역(몰드)의 용량을 가산합니다.
용량은 몰드 모델에 정의된 maxCapacity를 초과할 수 없습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
moldModelNamestring
~ 128자폼 저장 영역 모델의 이름
폼 저장 영역 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
capacityint
0 ~ 2147483646현재 캐파시티
이 저장 영역에서 이 플레이어가 현재 이용할 수 있는 폼 저장 슬롯 수입니다. 초기값은 저장 영역 모델의 initialMaxCapacity로 설정되며, 캐파시티 증가 조작을 통해 maxCapacity까지 확장할 수 있습니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemMold용량을 갱신한 폼 저장 영역
moldModelMoldModel폼 저장 영역

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.AddMoldCapacityByUserId(
    &formation.AddMoldCapacityByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Capacity: pointy.Int32(10),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
moldModel := result.MoldModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\AddMoldCapacityByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->addMoldCapacityByUserId(
        (new AddMoldCapacityByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withCapacity(10)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $moldModel = $result->getMoldModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.AddMoldCapacityByUserIdRequest;
import io.gs2.formation.result.AddMoldCapacityByUserIdResult;

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

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

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

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
moldModel = result.moldModel;
client = gs2('formation')

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

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

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

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

subMoldCapacity

용량 크기 감산

요청한 사용자의 폼 저장 영역(몰드)의 용량을 감산합니다. 용량은 0 미만으로 내려가지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
moldModelNamestring
~ 128자폼 저장 영역 모델의 이름
폼 저장 영역 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
capacityint
0 ~ 2147483646현재 캐파시티
이 저장 영역에서 이 플레이어가 현재 이용할 수 있는 폼 저장 슬롯 수입니다. 초기값은 저장 영역 모델의 initialMaxCapacity로 설정되며, 캐파시티 증가 조작을 통해 maxCapacity까지 확장할 수 있습니다.

Result

타입설명
itemMold용량을 갱신한 폼 저장 영역
moldModelMoldModel폼 저장 영역

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.SubMoldCapacity(
    &formation.SubMoldCapacityRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Capacity: pointy.Int32(10),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
moldModel := result.MoldModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\SubMoldCapacityRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->subMoldCapacity(
        (new SubMoldCapacityRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withMoldModelName("mold-0001")
            ->withCapacity(10)
    );
    $item = $result->getItem();
    $moldModel = $result->getMoldModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.SubMoldCapacityRequest;
import io.gs2.formation.result.SubMoldCapacityResult;

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

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

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

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
moldModel = result.moldModel;
client = gs2('formation')

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

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

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

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

subMoldCapacityByUserId

사용자 ID를 지정하여 용량 크기 감산

지정된 사용자의 폼 저장 영역(몰드)의 용량을 감산합니다. 용량은 0 미만으로 내려가지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
moldModelNamestring
~ 128자폼 저장 영역 모델의 이름
폼 저장 영역 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
capacityint
0 ~ 2147483646현재 캐파시티
이 저장 영역에서 이 플레이어가 현재 이용할 수 있는 폼 저장 슬롯 수입니다. 초기값은 저장 영역 모델의 initialMaxCapacity로 설정되며, 캐파시티 증가 조작을 통해 maxCapacity까지 확장할 수 있습니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemMold용량을 갱신한 폼 저장 영역
moldModelMoldModel폼 저장 영역

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.SubMoldCapacityByUserId(
    &formation.SubMoldCapacityByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Capacity: pointy.Int32(10),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
moldModel := result.MoldModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\SubMoldCapacityByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->subMoldCapacityByUserId(
        (new SubMoldCapacityByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withCapacity(10)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $moldModel = $result->getMoldModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.SubMoldCapacityByUserIdRequest;
import io.gs2.formation.result.SubMoldCapacityByUserIdResult;

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

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

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

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

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

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

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

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

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

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

result = api_result.result
item = result.item;
moldModel = result.moldModel;
client = gs2('formation')

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

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

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

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

deleteMold

폼 저장 영역 삭제

요청한 사용자의 폼 저장 영역(몰드)을 삭제합니다. 저장 영역 내의 모든 폼과 용량 데이터가 삭제됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
moldModelNamestring
~ 128자폼 저장 영역 모델의 이름
폼 저장 영역 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.

Result

타입설명
itemMold폼 저장 영역

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeleteMold(
    &formation.DeleteMoldRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MoldModelName: pointy.String("mold-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeleteMoldRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deleteMold(
        (new DeleteMoldRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withMoldModelName("mold-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeleteMoldRequest;
import io.gs2.formation.result.DeleteMoldResult;

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

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

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

AsyncResult<Gs2.Gs2Formation.Result.DeleteMoldResult> asyncResult = null;
yield return client.DeleteMold(
    new Gs2.Gs2Formation.Request.DeleteMoldRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithMoldModelName("mold-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('formation')

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

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

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

result = api_result.result
item = result.item;

deleteMoldByUserId

사용자 ID를 지정하여 폼 저장 영역 삭제

지정된 사용자의 폼 저장 영역(몰드)을 삭제합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
moldModelNamestring
~ 128자폼 저장 영역 모델의 이름
폼 저장 영역 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemMold폼 저장 영역

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeleteMoldByUserId(
    &formation.DeleteMoldByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeleteMoldByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deleteMoldByUserId(
        (new DeleteMoldByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeleteMoldByUserIdRequest;
import io.gs2.formation.result.DeleteMoldByUserIdResult;

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

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

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

AsyncResult<Gs2.Gs2Formation.Result.DeleteMoldByUserIdResult> asyncResult = null;
yield return client.DeleteMoldByUserId(
    new Gs2.Gs2Formation.Request.DeleteMoldByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithMoldModelName("mold-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

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

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

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

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

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

result = api_result.result
item = result.item;
client = gs2('formation')

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

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

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

result = api_result.result
item = result.item;

describeForms

폼 목록 조회

지정된 몰드(폼 저장 영역) 내, 요청한 사용자의 폼의 페이지네이션 목록을 조회합니다.
각 폼에는 인벤토리, 심플 인벤토리, 딕셔너리의 아이템에 대한 참조를 보유할 수 있는 슬롯 세트가 포함됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
moldModelNamestring
~ 128자폼 저장 영역 모델 이름
accessTokenstring
~ 128자액세스 토큰
pageTokenstring~ 1024자데이터 취득을 시작할 위치를 지정하는 토큰
limitint301 ~ 1000취득할 데이터 건수

Result

타입설명
itemsList<Form>폼 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribeForms(
    &formation.DescribeFormsRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MoldModelName: pointy.String("mold-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribeFormsRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describeForms(
        (new DescribeFormsRequest())
            ->withNamespaceName("namespace-0001")
            ->withMoldModelName("mold-0001")
            ->withAccessToken("accessToken-0001")
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribeFormsRequest;
import io.gs2.formation.result.DescribeFormsResult;

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

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

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

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

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

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

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

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

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

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('formation')

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

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

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

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

describeFormsByUserId

사용자 ID를 지정하여 폼 목록 조회

지정된 몰드 내, 지정된 사용자의 폼의 페이지네이션 목록을 조회합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
moldModelNamestring
~ 128자폼 저장 영역 모델 이름
userIdstring
~ 128자사용자ID
pageTokenstring~ 1024자데이터 취득을 시작할 위치를 지정하는 토큰
limitint301 ~ 1000취득할 데이터 건수
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemsList<Form>폼 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribeFormsByUserId(
    &formation.DescribeFormsByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MoldModelName: pointy.String("mold-0001"),
        UserId: pointy.String("user-0001"),
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribeFormsByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describeFormsByUserId(
        (new DescribeFormsByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withMoldModelName("mold-0001")
            ->withUserId("user-0001")
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribeFormsByUserIdRequest;
import io.gs2.formation.result.DescribeFormsByUserIdResult;

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

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

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

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

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

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

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

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

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

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('formation')

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

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

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

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

getForm

폼 조회

폼 저장 영역 모델 이름과 인덱스를 지정하여, 요청한 사용자의 특정 폼을 조회합니다.
관련된 몰드, 몰드 모델, 폼 모델 정보와 함께 폼을 반환합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
moldModelNamestring
~ 128자폼 저장 영역 모델 이름
indexint
0 ~ 2147483646폼의 인덱스
저장 영역 내에서 이 폼이 차지하는 저장 슬롯을 식별하는 0부터 시작하는 인덱스입니다. 최대 인덱스는 저장 영역의 현재 캐파시티에 의해 제한됩니다. 예를 들어 인덱스 0을 「파티 1」, 인덱스 1을 「파티 2」와 같은 식으로 사용할 수 있습니다.

Result

타입설명
itemForm
moldMold폼 저장 영역
moldModelMoldModel폼 저장 영역 모델
formModelFormModel폼 모델

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetForm(
    &formation.GetFormRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
mold := result.Mold
moldModel := result.MoldModel
formModel := result.FormModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetFormRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getForm(
        (new GetFormRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
    );
    $item = $result->getItem();
    $mold = $result->getMold();
    $moldModel = $result->getMoldModel();
    $formModel = $result->getFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetFormRequest;
import io.gs2.formation.result.GetFormResult;

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

try {
    GetFormResult result = client.getForm(
        new GetFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
    );
    Form item = result.getItem();
    Mold mold = result.getMold();
    MoldModel moldModel = result.getMoldModel();
    FormModel formModel = result.getFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.GetFormResult> asyncResult = null;
yield return client.GetForm(
    new Gs2.Gs2Formation.Request.GetFormRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var mold = result.Mold;
var moldModel = result.MoldModel;
var formModel = result.FormModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.getForm(
        new Gs2Formation.GetFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
    );
    const item = result.getItem();
    const mold = result.getMold();
    const moldModel = result.getMoldModel();
    const formModel = result.getFormModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.get_form(
        formation.GetFormRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
    )
    item = result.item
    mold = result.mold
    mold_model = result.mold_model
    form_model = result.form_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

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

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

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;
client = gs2('formation')

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

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

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

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

getFormByUserId

사용자 ID를 지정하여 폼 조회

폼 저장 영역 모델 이름과 인덱스를 지정하여, 지정된 사용자의 특정 폼을 조회합니다.
관련된 몰드, 몰드 모델, 폼 모델 정보와 함께 폼을 반환합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
moldModelNamestring
~ 128자폼 저장 영역 모델 이름
indexint
0 ~ 2147483646폼의 인덱스
저장 영역 내에서 이 폼이 차지하는 저장 슬롯을 식별하는 0부터 시작하는 인덱스입니다. 최대 인덱스는 저장 영역의 현재 캐파시티에 의해 제한됩니다. 예를 들어 인덱스 0을 「파티 1」, 인덱스 1을 「파티 2」와 같은 식으로 사용할 수 있습니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemForm
moldMold폼 저장 영역
moldModelMoldModel폼 저장 영역 모델
formModelFormModel폼 모델

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetFormByUserId(
    &formation.GetFormByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
mold := result.Mold
moldModel := result.MoldModel
formModel := result.FormModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetFormByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getFormByUserId(
        (new GetFormByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $mold = $result->getMold();
    $moldModel = $result->getMoldModel();
    $formModel = $result->getFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetFormByUserIdRequest;
import io.gs2.formation.result.GetFormByUserIdResult;

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

try {
    GetFormByUserIdResult result = client.getFormByUserId(
        new GetFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withTimeOffsetToken(null)
    );
    Form item = result.getItem();
    Mold mold = result.getMold();
    MoldModel moldModel = result.getMoldModel();
    FormModel formModel = result.getFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.GetFormByUserIdResult> asyncResult = null;
yield return client.GetFormByUserId(
    new Gs2.Gs2Formation.Request.GetFormByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var mold = result.Mold;
var moldModel = result.MoldModel;
var formModel = result.FormModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.getFormByUserId(
        new Gs2Formation.GetFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const mold = result.getMold();
    const moldModel = result.getMoldModel();
    const formModel = result.getFormModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.get_form_by_user_id(
        formation.GetFormByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
            .with_time_offset_token(None)
    )
    item = result.item
    mold = result.mold
    mold_model = result.mold_model
    form_model = result.form_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

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

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

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;
client = gs2('formation')

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

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

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

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

getFormWithSignature

서명된 폼 조회

지정된 암호화 키를 사용하여 생성된 암호 서명과 함께 폼을 조회합니다.
폼 데이터는 JSON으로 직렬화되어 서명되며, 클라이언트가 폼 데이터의 무결성을 검증할 수 있습니다.
서명은 SetFormWithSignature로 폼을 업데이트할 때 슬롯 내용이 변조되지 않았음을 보장하기 위해 사용할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
moldModelNamestring
~ 128자폼 저장 영역 모델 이름
indexint
0 ~ 2147483646폼의 인덱스
저장 영역 내에서 이 폼이 차지하는 저장 슬롯을 식별하는 0부터 시작하는 인덱스입니다. 최대 인덱스는 저장 영역의 현재 캐파시티에 의해 제한됩니다. 예를 들어 인덱스 0을 「파티 1」, 인덱스 1을 「파티 2」와 같은 식으로 사용할 수 있습니다.
keyIdstring“grn:gs2:{region}:{ownerId}:key:default:key:default”~ 1024자암호화 키 GRN

Result

타입설명
itemForm
bodystring서명 대상 값
signaturestring서명
moldMold폼 저장 영역
moldModelMoldModel폼 저장 영역 모델
formModelFormModel폼 모델

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetFormWithSignature(
    &formation.GetFormWithSignatureRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
body := result.Body
signature := result.Signature
mold := result.Mold
moldModel := result.MoldModel
formModel := result.FormModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetFormWithSignatureRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getFormWithSignature(
        (new GetFormWithSignatureRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
            ->withKeyId("key-0001")
    );
    $item = $result->getItem();
    $body = $result->getBody();
    $signature = $result->getSignature();
    $mold = $result->getMold();
    $moldModel = $result->getMoldModel();
    $formModel = $result->getFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetFormWithSignatureRequest;
import io.gs2.formation.result.GetFormWithSignatureResult;

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

try {
    GetFormWithSignatureResult result = client.getFormWithSignature(
        new GetFormWithSignatureRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withKeyId("key-0001")
    );
    Form item = result.getItem();
    String body = result.getBody();
    String signature = result.getSignature();
    Mold mold = result.getMold();
    MoldModel moldModel = result.getMoldModel();
    FormModel formModel = result.getFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.GetFormWithSignatureResult> asyncResult = null;
yield return client.GetFormWithSignature(
    new Gs2.Gs2Formation.Request.GetFormWithSignatureRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0)
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var body = result.Body;
var signature = result.Signature;
var mold = result.Mold;
var moldModel = result.MoldModel;
var formModel = result.FormModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.getFormWithSignature(
        new Gs2Formation.GetFormWithSignatureRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withKeyId("key-0001")
    );
    const item = result.getItem();
    const body = result.getBody();
    const signature = result.getSignature();
    const mold = result.getMold();
    const moldModel = result.getMoldModel();
    const formModel = result.getFormModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.get_form_with_signature(
        formation.GetFormWithSignatureRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
            .with_key_id('key-0001')
    )
    item = result.item
    body = result.body
    signature = result.signature
    mold = result.mold
    mold_model = result.mold_model
    form_model = result.form_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.get_form_with_signature({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
    index=0,
    keyId="key-0001",
})

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

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;
client = gs2('formation')

api_result_handler = client.get_form_with_signature_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
    index=0,
    keyId="key-0001",
})

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

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

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

getFormWithSignatureByUserId

사용자 ID를 지정하여 서명된 폼 조회

지정된 사용자의 폼을 암호 서명과 함께 조회합니다.
서명은 지정된 암호화 키를 사용하여 생성되며, 안전한 검증에 사용할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
moldModelNamestring
~ 128자폼 저장 영역 모델 이름
indexint
0 ~ 2147483646폼의 인덱스
저장 영역 내에서 이 폼이 차지하는 저장 슬롯을 식별하는 0부터 시작하는 인덱스입니다. 최대 인덱스는 저장 영역의 현재 캐파시티에 의해 제한됩니다. 예를 들어 인덱스 0을 「파티 1」, 인덱스 1을 「파티 2」와 같은 식으로 사용할 수 있습니다.
keyIdstring“grn:gs2:{region}:{ownerId}:key:default:key:default”~ 1024자암호화 키 GRN
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemForm
bodystring서명 대상 값
signaturestring서명
moldMold폼 저장 영역
moldModelMoldModel폼 저장 영역 모델
formModelFormModel폼 모델

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetFormWithSignatureByUserId(
    &formation.GetFormWithSignatureByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
        KeyId: pointy.String("key-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
body := result.Body
signature := result.Signature
mold := result.Mold
moldModel := result.MoldModel
formModel := result.FormModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetFormWithSignatureByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getFormWithSignatureByUserId(
        (new GetFormWithSignatureByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
            ->withKeyId("key-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $body = $result->getBody();
    $signature = $result->getSignature();
    $mold = $result->getMold();
    $moldModel = $result->getMoldModel();
    $formModel = $result->getFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetFormWithSignatureByUserIdRequest;
import io.gs2.formation.result.GetFormWithSignatureByUserIdResult;

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

try {
    GetFormWithSignatureByUserIdResult result = client.getFormWithSignatureByUserId(
        new GetFormWithSignatureByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withKeyId("key-0001")
            .withTimeOffsetToken(null)
    );
    Form item = result.getItem();
    String body = result.getBody();
    String signature = result.getSignature();
    Mold mold = result.getMold();
    MoldModel moldModel = result.getMoldModel();
    FormModel formModel = result.getFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.GetFormWithSignatureByUserIdResult> asyncResult = null;
yield return client.GetFormWithSignatureByUserId(
    new Gs2.Gs2Formation.Request.GetFormWithSignatureByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0)
        .WithKeyId("key-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var body = result.Body;
var signature = result.Signature;
var mold = result.Mold;
var moldModel = result.MoldModel;
var formModel = result.FormModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.getFormWithSignatureByUserId(
        new Gs2Formation.GetFormWithSignatureByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withKeyId("key-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const body = result.getBody();
    const signature = result.getSignature();
    const mold = result.getMold();
    const moldModel = result.getMoldModel();
    const formModel = result.getFormModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.get_form_with_signature_by_user_id(
        formation.GetFormWithSignatureByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
            .with_key_id('key-0001')
            .with_time_offset_token(None)
    )
    item = result.item
    body = result.body
    signature = result.signature
    mold = result.mold
    mold_model = result.mold_model
    form_model = result.form_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.get_form_with_signature_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    index=0,
    keyId="key-0001",
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;
client = gs2('formation')

api_result_handler = client.get_form_with_signature_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    index=0,
    keyId="key-0001",
    timeOffsetToken=nil,
})

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

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

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

setForm

폼 설정

요청한 사용자의 폼의 슬롯 값을 업데이트합니다. 슬롯은 폼의 각 위치에 어떤 아이템을 배치할지 정의합니다.
서명 검증이 없는 raw 버전입니다. 변조 방지가 필요한 클라이언트 측 업데이트에는 SetFormWithSignature를 사용하세요.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
moldModelNamestring
~ 128자폼 저장 영역 모델 이름
indexint
0 ~ 2147483646폼의 인덱스
저장 영역 내에서 이 폼이 차지하는 저장 슬롯을 식별하는 0부터 시작하는 인덱스입니다. 최대 인덱스는 저장 영역의 현재 캐파시티에 의해 제한됩니다. 예를 들어 인덱스 0을 「파티 1」, 인덱스 1을 「파티 2」와 같은 식으로 사용할 수 있습니다.
slotsList<Slot>
1 ~ 10 items슬롯 목록

Result

타입설명
itemForm
moldMold폼 저장 영역
moldModelMoldModel폼 저장 영역 모델
formModelFormModel폼 모델

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.SetForm(
    &formation.SetFormRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
        Slots: []formation.Slot{
            formation.Slot{
                Name: pointy.String("slot-0001"),
                PropertyId: pointy.String("property-0001"),
            },
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
mold := result.Mold
moldModel := result.MoldModel
formModel := result.FormModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\SetFormRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->setForm(
        (new SetFormRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
            ->withSlots([
                (new Slot())
                    ->withName("slot-0001")
                    ->withPropertyId("property-0001"),
            ])
    );
    $item = $result->getItem();
    $mold = $result->getMold();
    $moldModel = $result->getMoldModel();
    $formModel = $result->getFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.SetFormRequest;
import io.gs2.formation.result.SetFormResult;

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

try {
    SetFormResult result = client.setForm(
        new SetFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withSlots(Arrays.asList(
                new Slot()
                    .withName("slot-0001")
                    .withPropertyId("property-0001")
            ))
    );
    Form item = result.getItem();
    Mold mold = result.getMold();
    MoldModel moldModel = result.getMoldModel();
    FormModel formModel = result.getFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.SetFormResult> asyncResult = null;
yield return client.SetForm(
    new Gs2.Gs2Formation.Request.SetFormRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0)
        .WithSlots(new Gs2.Gs2Formation.Model.Slot[] {
            new Gs2.Gs2Formation.Model.Slot()
                .WithName("slot-0001")
                .WithPropertyId("property-0001"),
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var mold = result.Mold;
var moldModel = result.MoldModel;
var formModel = result.FormModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.setForm(
        new Gs2Formation.SetFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withSlots([
                new Gs2Formation.model.Slot()
                    .withName("slot-0001")
                    .withPropertyId("property-0001"),
            ])
    );
    const item = result.getItem();
    const mold = result.getMold();
    const moldModel = result.getMoldModel();
    const formModel = result.getFormModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.set_form(
        formation.SetFormRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
            .with_slots([
                formation.Slot()
                    .with_name('slot-0001')
                    .with_property_id('property-0001'),
            ])
    )
    item = result.item
    mold = result.mold
    mold_model = result.mold_model
    form_model = result.form_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.set_form({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
    index=0,
    slots={
        {
            name="slot-0001",
            property_id="property-0001",
        }
    },
})

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

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;
client = gs2('formation')

api_result_handler = client.set_form_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
    index=0,
    slots={
        {
            name="slot-0001",
            property_id="property-0001",
        }
    },
})

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

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

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

setFormByUserId

사용자 ID를 지정하여 폼 설정

지정된 사용자의 폼의 슬롯 값을 업데이트합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
moldModelNamestring
~ 128자폼 저장 영역 모델 이름
indexint
0 ~ 2147483646폼의 인덱스
저장 영역 내에서 이 폼이 차지하는 저장 슬롯을 식별하는 0부터 시작하는 인덱스입니다. 최대 인덱스는 저장 영역의 현재 캐파시티에 의해 제한됩니다. 예를 들어 인덱스 0을 「파티 1」, 인덱스 1을 「파티 2」와 같은 식으로 사용할 수 있습니다.
slotsList<Slot>
1 ~ 10 items슬롯 목록
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemForm
moldMold폼 저장 영역
moldModelMoldModel폼 저장 영역 모델
formModelFormModel폼 모델

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.SetFormByUserId(
    &formation.SetFormByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
        Slots: []formation.Slot{
            formation.Slot{
                Name: pointy.String("slot-0001"),
                PropertyId: pointy.String("grn:1001"),
            },
        },
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
mold := result.Mold
moldModel := result.MoldModel
formModel := result.FormModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\SetFormByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->setFormByUserId(
        (new SetFormByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
            ->withSlots([
                (new \Gs2\Formation\Model\Slot())
                    ->withName("slot-0001")
                    ->withPropertyId("grn:1001"),
            ])
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $mold = $result->getMold();
    $moldModel = $result->getMoldModel();
    $formModel = $result->getFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.SetFormByUserIdRequest;
import io.gs2.formation.result.SetFormByUserIdResult;

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

try {
    SetFormByUserIdResult result = client.setFormByUserId(
        new SetFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withSlots(Arrays.asList(
                new io.gs2.formation.model.Slot()
                    .withName("slot-0001")
                    .withPropertyId("grn:1001")
            ))
            .withTimeOffsetToken(null)
    );
    Form item = result.getItem();
    Mold mold = result.getMold();
    MoldModel moldModel = result.getMoldModel();
    FormModel formModel = result.getFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.SetFormByUserIdResult> asyncResult = null;
yield return client.SetFormByUserId(
    new Gs2.Gs2Formation.Request.SetFormByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0)
        .WithSlots(new Gs2.Gs2Formation.Model.Slot[] {
            new Gs2.Gs2Formation.Model.Slot()
                .WithName("slot-0001")
                .WithPropertyId("grn:1001"),
        })
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var mold = result.Mold;
var moldModel = result.MoldModel;
var formModel = result.FormModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.setFormByUserId(
        new Gs2Formation.SetFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withSlots([
                new Gs2Formation.model.Slot()
                    .withName("slot-0001")
                    .withPropertyId("grn:1001"),
            ])
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const mold = result.getMold();
    const moldModel = result.getMoldModel();
    const formModel = result.getFormModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.set_form_by_user_id(
        formation.SetFormByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
            .with_slots([
                formation.Slot()
                    .with_name('slot-0001')
                    .with_property_id('grn:1001'),
            ])
            .with_time_offset_token(None)
    )
    item = result.item
    mold = result.mold
    mold_model = result.mold_model
    form_model = result.form_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.set_form_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    index=0,
    slots={
        {
            name="slot-0001",
            propertyId="grn:1001",
        }
    },
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;
client = gs2('formation')

api_result_handler = client.set_form_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    index=0,
    slots={
        {
            name="slot-0001",
            propertyId="grn:1001",
        }
    },
    timeOffsetToken=nil,
})

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

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

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

setFormWithSignature

서명된 슬롯을 사용하여 폼 업데이트

변조 방지를 위한 서명 검증과 함께 폼의 슬롯을 업데이트합니다.
각 슬롯에는 암호화 키에 대해 검증되는 바디와 서명이 포함되어야 합니다. 슬롯 콘텐츠의 3가지 프로퍼티 타입을 지원합니다: gs2_inventory(ItemSetId를 추출), gs2_simple_inventory(ItemId를 추출), gs2_dictionary(EntryId를 추출).
검증 후, 검증된 슬롯이 폼에 적용됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
moldModelNamestring
~ 128자폼 저장 영역 모델 이름
indexint
0 ~ 2147483646폼의 인덱스
저장 영역 내에서 이 폼이 차지하는 저장 슬롯을 식별하는 0부터 시작하는 인덱스입니다. 최대 인덱스는 저장 영역의 현재 캐파시티에 의해 제한됩니다. 예를 들어 인덱스 0을 「파티 1」, 인덱스 1을 「파티 2」와 같은 식으로 사용할 수 있습니다.
slotsList<SlotWithSignature>
1 ~ 10 items슬롯 목록
keyIdstring“grn:gs2:{region}:{ownerId}:key:default:key:default”~ 1024자암호화 키 GRN

Result

타입설명
itemForm
moldMold폼 저장 영역
moldModelMoldModel폼 저장 영역 모델
formModelFormModel폼 모델

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.SetFormWithSignature(
    &formation.SetFormWithSignatureRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
        Slots: []formation.SlotWithSignature{
            formation.SlotWithSignature{
                Name: pointy.String("slot-0001"),
                PropertyType: pointy.String("gs2_dictionary"),
                Body: pointy.String("body"),
                Signature: pointy.String("signature"),
            },
        },
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
mold := result.Mold
moldModel := result.MoldModel
formModel := result.FormModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\SetFormWithSignatureRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->setFormWithSignature(
        (new SetFormWithSignatureRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
            ->withSlots([
                (new SlotWithSignature())
                    ->withName("slot-0001")
                    ->withPropertyType("gs2_dictionary")
                    ->withBody("body")
                    ->withSignature("signature"),
            ])
            ->withKeyId("key-0001")
    );
    $item = $result->getItem();
    $mold = $result->getMold();
    $moldModel = $result->getMoldModel();
    $formModel = $result->getFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.SetFormWithSignatureRequest;
import io.gs2.formation.result.SetFormWithSignatureResult;

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

try {
    SetFormWithSignatureResult result = client.setFormWithSignature(
        new SetFormWithSignatureRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withSlots(Arrays.asList(
                new SlotWithSignature()
                    .withName("slot-0001")
                    .withPropertyType("gs2_dictionary")
                    .withBody("body")
                    .withSignature("signature")
            ))
            .withKeyId("key-0001")
    );
    Form item = result.getItem();
    Mold mold = result.getMold();
    MoldModel moldModel = result.getMoldModel();
    FormModel formModel = result.getFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.SetFormWithSignatureResult> asyncResult = null;
yield return client.SetFormWithSignature(
    new Gs2.Gs2Formation.Request.SetFormWithSignatureRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0)
        .WithSlots(new Gs2.Gs2Formation.Model.SlotWithSignature[] {
            new Gs2.Gs2Formation.Model.SlotWithSignature()
                .WithName("slot-0001")
                .WithPropertyType("gs2_dictionary")
                .WithBody("body")
                .WithSignature("signature"),
        })
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var mold = result.Mold;
var moldModel = result.MoldModel;
var formModel = result.FormModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.setFormWithSignature(
        new Gs2Formation.SetFormWithSignatureRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withSlots([
                new Gs2Formation.model.SlotWithSignature()
                    .withName("slot-0001")
                    .withPropertyType("gs2_dictionary")
                    .withBody("body")
                    .withSignature("signature"),
            ])
            .withKeyId("key-0001")
    );
    const item = result.getItem();
    const mold = result.getMold();
    const moldModel = result.getMoldModel();
    const formModel = result.getFormModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.set_form_with_signature(
        formation.SetFormWithSignatureRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
            .with_slots([
                formation.SlotWithSignature()
                    .with_name('slot-0001')
                    .with_property_type('gs2_dictionary')
                    .with_body('body')
                    .with_signature('signature'),
            ])
            .with_key_id('key-0001')
    )
    item = result.item
    mold = result.mold
    mold_model = result.mold_model
    form_model = result.form_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.set_form_with_signature({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
    index=0,
    slots={
        {
            name="slot-0001",
            property_type="gs2_dictionary",
            body="body",
            signature="signature",
        }
    },
    keyId="key-0001",
})

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

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;
client = gs2('formation')

api_result_handler = client.set_form_with_signature_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    moldModelName="mold-0001",
    index=0,
    slots={
        {
            name="slot-0001",
            property_type="gs2_dictionary",
            body="body",
            signature="signature",
        }
    },
    keyId="key-0001",
})

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

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

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

acquireActionsToFormProperties

사용자 ID를 지정하여 폼의 프로퍼티에 획득 액션을 적용

폼의 슬롯 프로퍼티에 획득 액션을 적용하고, 실행할 트랜잭션을 시작합니다.
폼의 슬롯에 아이템이나 리소스를 부여하기 위해 사용되며, 커스터마이즈용 선택적 설정 파라미터를 이용할 수 있습니다.
트랜잭션을 반환합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
moldModelNamestring
~ 128자폼 저장 영역 모델 이름
indexint
0 ~ 2147483646폼의 인덱스
저장 영역 내에서 이 폼이 차지하는 저장 슬롯을 식별하는 0부터 시작하는 인덱스입니다. 최대 인덱스는 저장 영역의 현재 캐파시티에 의해 제한됩니다. 예를 들어 인덱스 0을 「파티 1」, 인덱스 1을 「파티 2」와 같은 식으로 사용할 수 있습니다.
acquireActionAcquireAction
폼의 프로퍼티에 적용할 획득 액션
configList<Config>[]0 ~ 1000 items획득 액션에 적용하는 설정
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemForm
moldMold폼 저장 영역
transactionIdstring발행된 트랜잭션 ID
stampSheetstring스탬프 시트
stampSheetEncryptionKeyIdstring스탬프 시트의 서명 계산에 사용한 암호화 키 GRN
autoRunStampSheetbool?트랜잭션 자동 실행이 활성화되어 있는지 여부
atomicCommitbool?트랜잭션을 원자적으로 커밋할지 여부
transactionstring발행된 트랜잭션
transactionResultTransactionResult트랜잭션 실행 결과

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.AcquireActionsToFormProperties(
    &formation.AcquireActionsToFormPropertiesRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
        AcquireAction: &formation.AcquireAction{
            Action: pointy.String("Gs2Experience:AddExperienceByUserId"),
            Request: pointy.String("{}"),
        },
        Config: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
mold := result.Mold
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
atomicCommit := result.AtomicCommit
transaction := result.Transaction
transactionResult := result.TransactionResult
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\AcquireActionsToFormPropertiesRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->acquireActionsToFormProperties(
        (new AcquireActionsToFormPropertiesRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
            ->withAcquireAction((new AcquireAction())
                ->withAction("Gs2Experience:AddExperienceByUserId")
                ->withRequest("{}")
            )
            ->withConfig(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $mold = $result->getMold();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
    $atomicCommit = $result->getAtomicCommit();
    $transaction = $result->getTransaction();
    $transactionResult = $result->getTransactionResult();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.AcquireActionsToFormPropertiesRequest;
import io.gs2.formation.result.AcquireActionsToFormPropertiesResult;

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

try {
    AcquireActionsToFormPropertiesResult result = client.acquireActionsToFormProperties(
        new AcquireActionsToFormPropertiesRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withAcquireAction(new AcquireAction()
                .withAction("Gs2Experience:AddExperienceByUserId")
                .withRequest("{}")
            )
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    Form item = result.getItem();
    Mold mold = result.getMold();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
    boolean atomicCommit = result.getAtomicCommit();
    String transaction = result.getTransaction();
    TransactionResult transactionResult = result.getTransactionResult();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.AcquireActionsToFormPropertiesResult> asyncResult = null;
yield return client.AcquireActionsToFormProperties(
    new Gs2.Gs2Formation.Request.AcquireActionsToFormPropertiesRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0)
        .WithAcquireAction(new Gs2.Core.Model.AcquireAction()
            .WithAction("Gs2Experience:AddExperienceByUserId")
            .WithRequest("{}")
        )
        .WithConfig(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var mold = result.Mold;
var transactionId = result.TransactionId;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var autoRunStampSheet = result.AutoRunStampSheet;
var atomicCommit = result.AtomicCommit;
var transaction = result.Transaction;
var transactionResult = result.TransactionResult;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.acquireActionsToFormProperties(
        new Gs2Formation.AcquireActionsToFormPropertiesRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withAcquireAction(new Gs2Formation.model.AcquireAction()
                .withAction("Gs2Experience:AddExperienceByUserId")
                .withRequest("{}")
            )
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const mold = result.getMold();
    const transactionId = result.getTransactionId();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const autoRunStampSheet = result.getAutoRunStampSheet();
    const atomicCommit = result.getAtomicCommit();
    const transaction = result.getTransaction();
    const transactionResult = result.getTransactionResult();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.acquire_actions_to_form_properties(
        formation.AcquireActionsToFormPropertiesRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
            .with_acquire_action(formation.AcquireAction()
                .with_action('Gs2Experience:AddExperienceByUserId')
                .with_request('{}')
            )
            .with_config(None)
            .with_time_offset_token(None)
    )
    item = result.item
    mold = result.mold
    transaction_id = result.transaction_id
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    auto_run_stamp_sheet = result.auto_run_stamp_sheet
    atomic_commit = result.atomic_commit
    transaction = result.transaction
    transaction_result = result.transaction_result
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.acquire_actions_to_form_properties({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    index=0,
    acquireAction={
        action="Gs2Experience:AddExperienceByUserId",
        request="{}",
    },
    config=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
mold = result.mold;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;
client = gs2('formation')

api_result_handler = client.acquire_actions_to_form_properties_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    moldModelName="mold-0001",
    index=0,
    acquireAction={
        action="Gs2Experience:AddExperienceByUserId",
        request="{}",
    },
    config=nil,
    timeOffsetToken=nil,
})

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

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

result = api_result.result
item = result.item;
mold = result.mold;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

deleteForm

폼 삭제

지정된 몰드 모델과 인덱스의 요청한 사용자의 폼을 삭제합니다.
폼에 관련된 모든 슬롯 데이터가 삭제됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
moldModelNamestring
~ 128자폼 저장 영역 모델 이름
indexint
0 ~ 2147483646폼의 인덱스
저장 영역 내에서 이 폼이 차지하는 저장 슬롯을 식별하는 0부터 시작하는 인덱스입니다. 최대 인덱스는 저장 영역의 현재 캐파시티에 의해 제한됩니다. 예를 들어 인덱스 0을 「파티 1」, 인덱스 1을 「파티 2」와 같은 식으로 사용할 수 있습니다.

Result

타입설명
itemForm
moldMold폼 저장 영역
moldModelMoldModel폼 저장 영역 모델
formModelFormModel폼 모델

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeleteForm(
    &formation.DeleteFormRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
mold := result.Mold
moldModel := result.MoldModel
formModel := result.FormModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeleteFormRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deleteForm(
        (new DeleteFormRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
    );
    $item = $result->getItem();
    $mold = $result->getMold();
    $moldModel = $result->getMoldModel();
    $formModel = $result->getFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeleteFormRequest;
import io.gs2.formation.result.DeleteFormResult;

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

try {
    DeleteFormResult result = client.deleteForm(
        new DeleteFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
    );
    Form item = result.getItem();
    Mold mold = result.getMold();
    MoldModel moldModel = result.getMoldModel();
    FormModel formModel = result.getFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.DeleteFormResult> asyncResult = null;
yield return client.DeleteForm(
    new Gs2.Gs2Formation.Request.DeleteFormRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var mold = result.Mold;
var moldModel = result.MoldModel;
var formModel = result.FormModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.deleteForm(
        new Gs2Formation.DeleteFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
    );
    const item = result.getItem();
    const mold = result.getMold();
    const moldModel = result.getMoldModel();
    const formModel = result.getFormModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.delete_form(
        formation.DeleteFormRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
    )
    item = result.item
    mold = result.mold
    mold_model = result.mold_model
    form_model = result.form_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

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

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

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;
client = gs2('formation')

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

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

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

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

deleteFormByUserId

사용자 ID를 지정하여 폼 삭제

지정된 몰드 모델과 인덱스의 지정된 사용자의 폼을 삭제합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
moldModelNamestring
~ 128자폼 저장 영역 모델 이름
indexint
0 ~ 2147483646폼의 인덱스
저장 영역 내에서 이 폼이 차지하는 저장 슬롯을 식별하는 0부터 시작하는 인덱스입니다. 최대 인덱스는 저장 영역의 현재 캐파시티에 의해 제한됩니다. 예를 들어 인덱스 0을 「파티 1」, 인덱스 1을 「파티 2」와 같은 식으로 사용할 수 있습니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemForm
moldMold폼 저장 영역
moldModelMoldModel폼 저장 영역 모델
formModelFormModel폼 모델

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeleteFormByUserId(
    &formation.DeleteFormByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Index: pointy.Int32(0),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
mold := result.Mold
moldModel := result.MoldModel
formModel := result.FormModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeleteFormByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deleteFormByUserId(
        (new DeleteFormByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withMoldModelName("mold-0001")
            ->withIndex(0)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $mold = $result->getMold();
    $moldModel = $result->getMoldModel();
    $formModel = $result->getFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeleteFormByUserIdRequest;
import io.gs2.formation.result.DeleteFormByUserIdResult;

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

try {
    DeleteFormByUserIdResult result = client.deleteFormByUserId(
        new DeleteFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withTimeOffsetToken(null)
    );
    Form item = result.getItem();
    Mold mold = result.getMold();
    MoldModel moldModel = result.getMoldModel();
    FormModel formModel = result.getFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.DeleteFormByUserIdResult> asyncResult = null;
yield return client.DeleteFormByUserId(
    new Gs2.Gs2Formation.Request.DeleteFormByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithMoldModelName("mold-0001")
        .WithIndex(0)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var mold = result.Mold;
var moldModel = result.MoldModel;
var formModel = result.FormModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.deleteFormByUserId(
        new Gs2Formation.DeleteFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withMoldModelName("mold-0001")
            .withIndex(0)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const mold = result.getMold();
    const moldModel = result.getMoldModel();
    const formModel = result.getFormModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.delete_form_by_user_id(
        formation.DeleteFormByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_mold_model_name('mold-0001')
            .with_index(0)
            .with_time_offset_token(None)
    )
    item = result.item
    mold = result.mold
    mold_model = result.mold_model
    form_model = result.form_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

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

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

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;
client = gs2('formation')

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

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

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

result = api_result.result
item = result.item;
mold = result.mold;
moldModel = result.moldModel;
formModel = result.formModel;

describePropertyForms

프로퍼티 폼 목록 조회

지정된 프로퍼티 폼 모델에 대한, 요청한 사용자의 프로퍼티 폼 페이지네이션 목록을 조회합니다.
프로퍼티 폼은 폼과 유사하지만, 저장 영역 내 인덱스가 아닌 커스텀 프로퍼티 ID(예: 캐릭터 ID)로 식별됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
propertyFormModelNamestring
~ 128자프로퍼티 폼 모델 이름
pageTokenstring~ 1024자데이터 취득을 시작할 위치를 지정하는 토큰
limitint301 ~ 1000취득할 데이터 건수

Result

타입설명
itemsList<PropertyForm>프로퍼티 폼 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribePropertyForms(
    &formation.DescribePropertyFormsRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribePropertyFormsRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describePropertyForms(
        (new DescribePropertyFormsRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribePropertyFormsRequest;
import io.gs2.formation.result.DescribePropertyFormsResult;

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

try {
    DescribePropertyFormsResult result = client.describePropertyForms(
        new DescribePropertyFormsRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    List<PropertyForm> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.DescribePropertyFormsResult> asyncResult = null;
yield return client.DescribePropertyForms(
    new Gs2.Gs2Formation.Request.DescribePropertyFormsRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.describePropertyForms(
        new Gs2Formation.DescribePropertyFormsRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

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

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

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('formation')

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

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

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

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

describePropertyFormsByUserId

사용자 ID를 지정하여 프로퍼티 폼 목록 조회

지정된 사용자와 프로퍼티 폼 모델의 프로퍼티 폼 페이지네이션 목록을 조회합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
propertyFormModelNamestring
~ 128자프로퍼티 폼 모델 이름
pageTokenstring~ 1024자데이터 취득을 시작할 위치를 지정하는 토큰
limitint301 ~ 1000취득할 데이터 건수
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemsList<PropertyForm>프로퍼티 폼 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribePropertyFormsByUserId(
    &formation.DescribePropertyFormsByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribePropertyFormsByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describePropertyFormsByUserId(
        (new DescribePropertyFormsByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPageToken(null)
            ->withLimit(null)
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribePropertyFormsByUserIdRequest;
import io.gs2.formation.result.DescribePropertyFormsByUserIdResult;

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

try {
    DescribePropertyFormsByUserIdResult result = client.describePropertyFormsByUserId(
        new DescribePropertyFormsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    List<PropertyForm> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.DescribePropertyFormsByUserIdResult> asyncResult = null;
yield return client.DescribePropertyFormsByUserId(
    new Gs2.Gs2Formation.Request.DescribePropertyFormsByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPageToken(null)
        .WithLimit(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.describePropertyFormsByUserId(
        new Gs2Formation.DescribePropertyFormsByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPageToken(null)
            .withLimit(null)
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

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

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

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

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('formation')

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

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

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

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

getPropertyForm

프로퍼티 폼 조회

프로퍼티 폼 모델 이름과 프로퍼티 ID를 지정하여 요청한 사용자의 특정 프로퍼티 폼을 조회합니다.
프로퍼티 ID는 조회 전에 정규화됩니다. 연관된 프로퍼티 폼 모델 정보와 함께 프로퍼티 폼을 반환합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
propertyFormModelNamestring
~ 128자프로퍼티 폼 모델 이름
propertyIdstring
~ 1024자프로퍼티 ID
이 프로퍼티 폼 인스턴스를 고유하게 식별하는 개발자 정의 식별자입니다. 일반적으로 이 폼이 설정하는 소유 리소스(예: GS2-Inventory의 아이템 세트)의 GRN을 설정합니다. 특정 장비에 스킬을 설정하는 등의 용도로 사용됩니다.

Result

타입설명
itemPropertyForm프로퍼티 폼
propertyFormModelPropertyFormModel폼 모델

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetPropertyForm(
    &formation.GetPropertyFormRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
propertyFormModel := result.PropertyFormModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetPropertyFormRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getPropertyForm(
        (new GetPropertyFormRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
    );
    $item = $result->getItem();
    $propertyFormModel = $result->getPropertyFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetPropertyFormRequest;
import io.gs2.formation.result.GetPropertyFormResult;

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

try {
    GetPropertyFormResult result = client.getPropertyForm(
        new GetPropertyFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
    );
    PropertyForm item = result.getItem();
    PropertyFormModel propertyFormModel = result.getPropertyFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.GetPropertyFormResult> asyncResult = null;
yield return client.GetPropertyForm(
    new Gs2.Gs2Formation.Request.GetPropertyFormRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var propertyFormModel = result.PropertyFormModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.getPropertyForm(
        new Gs2Formation.GetPropertyFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
    );
    const item = result.getItem();
    const propertyFormModel = result.getPropertyFormModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.get_property_form(
        formation.GetPropertyFormRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
    )
    item = result.item
    property_form_model = result.property_form_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.get_property_form({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
})

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

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;
client = gs2('formation')

api_result_handler = client.get_property_form_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
})

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

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

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;

getPropertyFormByUserId

사용자 ID를 지정하여 프로퍼티 폼 조회

프로퍼티 폼 모델 이름과 프로퍼티 ID를 지정하여 지정된 사용자의 특정 프로퍼티 폼을 조회합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
propertyFormModelNamestring
~ 128자프로퍼티 폼 모델 이름
propertyIdstring
~ 1024자프로퍼티 ID
이 프로퍼티 폼 인스턴스를 고유하게 식별하는 개발자 정의 식별자입니다. 일반적으로 이 폼이 설정하는 소유 리소스(예: GS2-Inventory의 아이템 세트)의 GRN을 설정합니다. 특정 장비에 스킬을 설정하는 등의 용도로 사용됩니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemPropertyForm프로퍼티 폼
propertyFormModelPropertyFormModel폼 모델

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetPropertyFormByUserId(
    &formation.GetPropertyFormByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
propertyFormModel := result.PropertyFormModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetPropertyFormByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getPropertyFormByUserId(
        (new GetPropertyFormByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $propertyFormModel = $result->getPropertyFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetPropertyFormByUserIdRequest;
import io.gs2.formation.result.GetPropertyFormByUserIdResult;

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

try {
    GetPropertyFormByUserIdResult result = client.getPropertyFormByUserId(
        new GetPropertyFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withTimeOffsetToken(null)
    );
    PropertyForm item = result.getItem();
    PropertyFormModel propertyFormModel = result.getPropertyFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.GetPropertyFormByUserIdResult> asyncResult = null;
yield return client.GetPropertyFormByUserId(
    new Gs2.Gs2Formation.Request.GetPropertyFormByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var propertyFormModel = result.PropertyFormModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.getPropertyFormByUserId(
        new Gs2Formation.GetPropertyFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const propertyFormModel = result.getPropertyFormModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.get_property_form_by_user_id(
        formation.GetPropertyFormByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
            .with_time_offset_token(None)
    )
    item = result.item
    property_form_model = result.property_form_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.get_property_form_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;
client = gs2('formation')

api_result_handler = client.get_property_form_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    timeOffsetToken=nil,
})

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

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

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;

getPropertyFormWithSignature

서명이 포함된 프로퍼티 폼 조회

지정된 암호화 키를 사용하여 생성된 암호화 서명과 함께 프로퍼티 폼을 조회합니다.
서명은 SetPropertyFormWithSignature로 프로퍼티 폼을 갱신할 때, 슬롯 내용이 변조되지 않았음을 보증하기 위해 사용할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
propertyFormModelNamestring
~ 128자프로퍼티 폼 모델 이름
propertyIdstring
~ 1024자프로퍼티 ID
이 프로퍼티 폼 인스턴스를 고유하게 식별하는 개발자 정의 식별자입니다. 일반적으로 이 폼이 설정하는 소유 리소스(예: GS2-Inventory의 아이템 세트)의 GRN을 설정합니다. 특정 장비에 스킬을 설정하는 등의 용도로 사용됩니다.
keyIdstring“grn:gs2:{region}:{ownerId}:key:default:key:default”~ 1024자암호화 키 GRN

Result

타입설명
itemPropertyForm프로퍼티 폼
bodystring서명 대상 값
signaturestring서명
propertyFormModelPropertyFormModel프로퍼티 폼 모델

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetPropertyFormWithSignature(
    &formation.GetPropertyFormWithSignatureRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
body := result.Body
signature := result.Signature
propertyFormModel := result.PropertyFormModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetPropertyFormWithSignatureRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getPropertyFormWithSignature(
        (new GetPropertyFormWithSignatureRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
            ->withKeyId("key-0001")
    );
    $item = $result->getItem();
    $body = $result->getBody();
    $signature = $result->getSignature();
    $propertyFormModel = $result->getPropertyFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetPropertyFormWithSignatureRequest;
import io.gs2.formation.result.GetPropertyFormWithSignatureResult;

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

try {
    GetPropertyFormWithSignatureResult result = client.getPropertyFormWithSignature(
        new GetPropertyFormWithSignatureRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withKeyId("key-0001")
    );
    PropertyForm item = result.getItem();
    String body = result.getBody();
    String signature = result.getSignature();
    PropertyFormModel propertyFormModel = result.getPropertyFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.GetPropertyFormWithSignatureResult> asyncResult = null;
yield return client.GetPropertyFormWithSignature(
    new Gs2.Gs2Formation.Request.GetPropertyFormWithSignatureRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001")
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var body = result.Body;
var signature = result.Signature;
var propertyFormModel = result.PropertyFormModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.getPropertyFormWithSignature(
        new Gs2Formation.GetPropertyFormWithSignatureRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withKeyId("key-0001")
    );
    const item = result.getItem();
    const body = result.getBody();
    const signature = result.getSignature();
    const propertyFormModel = result.getPropertyFormModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.get_property_form_with_signature(
        formation.GetPropertyFormWithSignatureRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
            .with_key_id('key-0001')
    )
    item = result.item
    body = result.body
    signature = result.signature
    property_form_model = result.property_form_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.get_property_form_with_signature({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    keyId="key-0001",
})

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

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;
propertyFormModel = result.propertyFormModel;
client = gs2('formation')

api_result_handler = client.get_property_form_with_signature_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    keyId="key-0001",
})

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

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

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;
propertyFormModel = result.propertyFormModel;

getPropertyFormWithSignatureByUserId

사용자 ID를 지정하여 서명이 포함된 프로퍼티 폼 조회

지정된 사용자의 프로퍼티 폼을 암호화 서명과 함께 조회합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
propertyFormModelNamestring
~ 128자프로퍼티 폼 모델 이름
propertyIdstring
~ 1024자프로퍼티 ID
이 프로퍼티 폼 인스턴스를 고유하게 식별하는 개발자 정의 식별자입니다. 일반적으로 이 폼이 설정하는 소유 리소스(예: GS2-Inventory의 아이템 세트)의 GRN을 설정합니다. 특정 장비에 스킬을 설정하는 등의 용도로 사용됩니다.
keyIdstring“grn:gs2:{region}:{ownerId}:key:default:key:default”~ 1024자암호화 키 GRN
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemPropertyForm프로퍼티 폼
bodystring서명 대상 값
signaturestring서명
propertyFormModelPropertyFormModel프로퍼티 폼 모델

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetPropertyFormWithSignatureByUserId(
    &formation.GetPropertyFormWithSignatureByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
        KeyId: pointy.String("key-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
body := result.Body
signature := result.Signature
propertyFormModel := result.PropertyFormModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetPropertyFormWithSignatureByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getPropertyFormWithSignatureByUserId(
        (new GetPropertyFormWithSignatureByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
            ->withKeyId("key-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $body = $result->getBody();
    $signature = $result->getSignature();
    $propertyFormModel = $result->getPropertyFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetPropertyFormWithSignatureByUserIdRequest;
import io.gs2.formation.result.GetPropertyFormWithSignatureByUserIdResult;

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

try {
    GetPropertyFormWithSignatureByUserIdResult result = client.getPropertyFormWithSignatureByUserId(
        new GetPropertyFormWithSignatureByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withKeyId("key-0001")
            .withTimeOffsetToken(null)
    );
    PropertyForm item = result.getItem();
    String body = result.getBody();
    String signature = result.getSignature();
    PropertyFormModel propertyFormModel = result.getPropertyFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.GetPropertyFormWithSignatureByUserIdResult> asyncResult = null;
yield return client.GetPropertyFormWithSignatureByUserId(
    new Gs2.Gs2Formation.Request.GetPropertyFormWithSignatureByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001")
        .WithKeyId("key-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var body = result.Body;
var signature = result.Signature;
var propertyFormModel = result.PropertyFormModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.getPropertyFormWithSignatureByUserId(
        new Gs2Formation.GetPropertyFormWithSignatureByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withKeyId("key-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const body = result.getBody();
    const signature = result.getSignature();
    const propertyFormModel = result.getPropertyFormModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.get_property_form_with_signature_by_user_id(
        formation.GetPropertyFormWithSignatureByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
            .with_key_id('key-0001')
            .with_time_offset_token(None)
    )
    item = result.item
    body = result.body
    signature = result.signature
    property_form_model = result.property_form_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.get_property_form_with_signature_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    keyId="key-0001",
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;
propertyFormModel = result.propertyFormModel;
client = gs2('formation')

api_result_handler = client.get_property_form_with_signature_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    keyId="key-0001",
    timeOffsetToken=nil,
})

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

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

result = api_result.result
item = result.item;
body = result.body;
signature = result.signature;
propertyFormModel = result.propertyFormModel;

setPropertyForm

프로퍼티 폼 갱신

요청한 사용자의 프로퍼티 폼 슬롯 값을 갱신합니다.
서명 검증이 없는 로우 버전입니다. 변조 방지가 필요한 클라이언트 측 갱신에는 SetPropertyFormWithSignature를 사용하십시오.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
propertyFormModelNamestring
~ 128자프로퍼티 폼 모델 이름
propertyIdstring
~ 1024자프로퍼티 ID
이 프로퍼티 폼 인스턴스를 고유하게 식별하는 개발자 정의 식별자입니다. 일반적으로 이 폼이 설정하는 소유 리소스(예: GS2-Inventory의 아이템 세트)의 GRN을 설정합니다. 특정 장비에 스킬을 설정하는 등의 용도로 사용됩니다.
slotsList<Slot>
1 ~ 10 items슬롯 목록

Result

타입설명
itemPropertyForm프로퍼티 폼
propertyFormModelPropertyFormModel프로퍼티 폼 모델

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.SetPropertyForm(
    &formation.SetPropertyFormRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
        Slots: []formation.Slot{
            formation.Slot{
                Name: pointy.String("slot-0001"),
                PropertyId: pointy.String("property-0001"),
            },
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
propertyFormModel := result.PropertyFormModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\SetPropertyFormRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->setPropertyForm(
        (new SetPropertyFormRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
            ->withSlots([
                (new Slot())
                    ->withName("slot-0001")
                    ->withPropertyId("property-0001"),
            ])
    );
    $item = $result->getItem();
    $propertyFormModel = $result->getPropertyFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.SetPropertyFormRequest;
import io.gs2.formation.result.SetPropertyFormResult;

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

try {
    SetPropertyFormResult result = client.setPropertyForm(
        new SetPropertyFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withSlots(Arrays.asList(
                new Slot()
                    .withName("slot-0001")
                    .withPropertyId("property-0001")
            ))
    );
    PropertyForm item = result.getItem();
    PropertyFormModel propertyFormModel = result.getPropertyFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.SetPropertyFormResult> asyncResult = null;
yield return client.SetPropertyForm(
    new Gs2.Gs2Formation.Request.SetPropertyFormRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001")
        .WithSlots(new Gs2.Gs2Formation.Model.Slot[] {
            new Gs2.Gs2Formation.Model.Slot()
                .WithName("slot-0001")
                .WithPropertyId("property-0001"),
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var propertyFormModel = result.PropertyFormModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.setPropertyForm(
        new Gs2Formation.SetPropertyFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withSlots([
                new Gs2Formation.model.Slot()
                    .withName("slot-0001")
                    .withPropertyId("property-0001"),
            ])
    );
    const item = result.getItem();
    const propertyFormModel = result.getPropertyFormModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.set_property_form(
        formation.SetPropertyFormRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
            .with_slots([
                formation.Slot()
                    .with_name('slot-0001')
                    .with_property_id('property-0001'),
            ])
    )
    item = result.item
    property_form_model = result.property_form_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.set_property_form({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    slots={
        {
            name="slot-0001",
            property_id="property-0001",
        }
    },
})

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

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;
client = gs2('formation')

api_result_handler = client.set_property_form_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    slots={
        {
            name="slot-0001",
            property_id="property-0001",
        }
    },
})

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

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

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;

setPropertyFormByUserId

사용자 ID를 지정하여 프로퍼티 폼 갱신

지정된 사용자의 프로퍼티 폼 슬롯 값을 갱신합니다(서버 사이드 조작).
서명 검증이 없는 로우 버전으로, 호출자를 신뢰할 수 있는 서버 사이드에서의 사용을 상정하고 있습니다.
각 슬롯은 다른 서비스(인벤토리, 심플 인벤토리, 사전)의 프로퍼티에 대한 참조를 보유합니다.
프로퍼티 폼은 저장 영역 내 인덱스가 아닌 커스텀 propertyId(예: 캐릭터 ID)로 식별됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
propertyFormModelNamestring
~ 128자프로퍼티 폼 모델 이름
propertyIdstring
~ 1024자프로퍼티 ID
이 프로퍼티 폼 인스턴스를 고유하게 식별하는 개발자 정의 식별자입니다. 일반적으로 이 폼이 설정하는 소유 리소스(예: GS2-Inventory의 아이템 세트)의 GRN을 설정합니다. 특정 장비에 스킬을 설정하는 등의 용도로 사용됩니다.
slotsList<Slot>
1 ~ 10 items슬롯 목록
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemPropertyForm프로퍼티 폼
propertyFormModelPropertyFormModel프로퍼티 폼 모델

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.SetPropertyFormByUserId(
    &formation.SetPropertyFormByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
        Slots: []formation.Slot{
            formation.Slot{
                Name: pointy.String("slot-0001"),
                PropertyId: pointy.String("grn:1001"),
            },
        },
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
propertyFormModel := result.PropertyFormModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\SetPropertyFormByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->setPropertyFormByUserId(
        (new SetPropertyFormByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
            ->withSlots([
                (new \Gs2\Formation\Model\Slot())
                    ->withName("slot-0001")
                    ->withPropertyId("grn:1001"),
            ])
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $propertyFormModel = $result->getPropertyFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.SetPropertyFormByUserIdRequest;
import io.gs2.formation.result.SetPropertyFormByUserIdResult;

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

try {
    SetPropertyFormByUserIdResult result = client.setPropertyFormByUserId(
        new SetPropertyFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withSlots(Arrays.asList(
                new io.gs2.formation.model.Slot()
                    .withName("slot-0001")
                    .withPropertyId("grn:1001")
            ))
            .withTimeOffsetToken(null)
    );
    PropertyForm item = result.getItem();
    PropertyFormModel propertyFormModel = result.getPropertyFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.SetPropertyFormByUserIdResult> asyncResult = null;
yield return client.SetPropertyFormByUserId(
    new Gs2.Gs2Formation.Request.SetPropertyFormByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001")
        .WithSlots(new Gs2.Gs2Formation.Model.Slot[] {
            new Gs2.Gs2Formation.Model.Slot()
                .WithName("slot-0001")
                .WithPropertyId("grn:1001"),
        })
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var propertyFormModel = result.PropertyFormModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.setPropertyFormByUserId(
        new Gs2Formation.SetPropertyFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withSlots([
                new Gs2Formation.model.Slot()
                    .withName("slot-0001")
                    .withPropertyId("grn:1001"),
            ])
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const propertyFormModel = result.getPropertyFormModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.set_property_form_by_user_id(
        formation.SetPropertyFormByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
            .with_slots([
                formation.Slot()
                    .with_name('slot-0001')
                    .with_property_id('grn:1001'),
            ])
            .with_time_offset_token(None)
    )
    item = result.item
    property_form_model = result.property_form_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.set_property_form_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    slots={
        {
            name="slot-0001",
            propertyId="grn:1001",
        }
    },
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;
client = gs2('formation')

api_result_handler = client.set_property_form_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    slots={
        {
            name="slot-0001",
            propertyId="grn:1001",
        }
    },
    timeOffsetToken=nil,
})

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

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

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;

setPropertyFormWithSignature

서명이 포함된 슬롯을 사용하여 프로퍼티 폼 갱신

암호화 서명 검증에 의한 변조 방지 기능과 함께 프로퍼티 폼의 슬롯 값을 갱신합니다.
각 슬롯에는 본문과 서명의 쌍이 포함됩니다. 서버는 지정된 암호화 키를 사용하여 각 슬롯의 서명을 검증한 후 갱신을 적용합니다.
슬롯의 프로퍼티 ID 접두사에 따라 3가지 프로퍼티 타입을 지원합니다:

  • gs2_inventory: 인벤토리 서비스의 ItemSet을 참조
  • gs2_simple_inventory: 심플 인벤토리 서비스의 Item을 참조
  • gs2_dictionary: 사전 서비스의 Entry를 참조
    클라이언트 측 갱신에는 이 메서드의 사용을 권장합니다. 폼 슬롯에 임의의 값을 설정하는 것을 방지할 수 있습니다.
상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
propertyFormModelNamestring
~ 128자프로퍼티 폼 모델 이름
propertyIdstring
~ 1024자프로퍼티 ID
이 프로퍼티 폼 인스턴스를 고유하게 식별하는 개발자 정의 식별자입니다. 일반적으로 이 폼이 설정하는 소유 리소스(예: GS2-Inventory의 아이템 세트)의 GRN을 설정합니다. 특정 장비에 스킬을 설정하는 등의 용도로 사용됩니다.
slotsList<SlotWithSignature>
1 ~ 10 items슬롯 목록
keyIdstring“grn:gs2:{region}:{ownerId}:key:default:key:default”~ 1024자암호화 키 GRN

Result

타입설명
itemPropertyForm프로퍼티 폼
proeprtyFormModelPropertyFormModel프로퍼티 폼 모델

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.SetPropertyFormWithSignature(
    &formation.SetPropertyFormWithSignatureRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
        Slots: []formation.SlotWithSignature{
            formation.SlotWithSignature{
                Name: pointy.String("slot-0001"),
                PropertyType: pointy.String("gs2_dictionary"),
                Body: pointy.String("body"),
                Signature: pointy.String("signature"),
            },
        },
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
proeprtyFormModel := result.ProeprtyFormModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\SetPropertyFormWithSignatureRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->setPropertyFormWithSignature(
        (new SetPropertyFormWithSignatureRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
            ->withSlots([
                (new SlotWithSignature())
                    ->withName("slot-0001")
                    ->withPropertyType("gs2_dictionary")
                    ->withBody("body")
                    ->withSignature("signature"),
            ])
            ->withKeyId("key-0001")
    );
    $item = $result->getItem();
    $proeprtyFormModel = $result->getProeprtyFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.SetPropertyFormWithSignatureRequest;
import io.gs2.formation.result.SetPropertyFormWithSignatureResult;

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

try {
    SetPropertyFormWithSignatureResult result = client.setPropertyFormWithSignature(
        new SetPropertyFormWithSignatureRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withSlots(Arrays.asList(
                new SlotWithSignature()
                    .withName("slot-0001")
                    .withPropertyType("gs2_dictionary")
                    .withBody("body")
                    .withSignature("signature")
            ))
            .withKeyId("key-0001")
    );
    PropertyForm item = result.getItem();
    PropertyFormModel proeprtyFormModel = result.getProeprtyFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.SetPropertyFormWithSignatureResult> asyncResult = null;
yield return client.SetPropertyFormWithSignature(
    new Gs2.Gs2Formation.Request.SetPropertyFormWithSignatureRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001")
        .WithSlots(new Gs2.Gs2Formation.Model.SlotWithSignature[] {
            new Gs2.Gs2Formation.Model.SlotWithSignature()
                .WithName("slot-0001")
                .WithPropertyType("gs2_dictionary")
                .WithBody("body")
                .WithSignature("signature"),
        })
        .WithKeyId("key-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var proeprtyFormModel = result.ProeprtyFormModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.setPropertyFormWithSignature(
        new Gs2Formation.SetPropertyFormWithSignatureRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withSlots([
                new Gs2Formation.model.SlotWithSignature()
                    .withName("slot-0001")
                    .withPropertyType("gs2_dictionary")
                    .withBody("body")
                    .withSignature("signature"),
            ])
            .withKeyId("key-0001")
    );
    const item = result.getItem();
    const proeprtyFormModel = result.getProeprtyFormModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.set_property_form_with_signature(
        formation.SetPropertyFormWithSignatureRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
            .with_slots([
                formation.SlotWithSignature()
                    .with_name('slot-0001')
                    .with_property_type('gs2_dictionary')
                    .with_body('body')
                    .with_signature('signature'),
            ])
            .with_key_id('key-0001')
    )
    item = result.item
    proeprty_form_model = result.proeprty_form_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.set_property_form_with_signature({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    slots={
        {
            name="slot-0001",
            property_type="gs2_dictionary",
            body="body",
            signature="signature",
        }
    },
    keyId="key-0001",
})

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

result = api_result.result
item = result.item;
proeprtyFormModel = result.proeprtyFormModel;
client = gs2('formation')

api_result_handler = client.set_property_form_with_signature_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    slots={
        {
            name="slot-0001",
            property_type="gs2_dictionary",
            body="body",
            signature="signature",
        }
    },
    keyId="key-0001",
})

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

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

result = api_result.result
item = result.item;
proeprtyFormModel = result.proeprtyFormModel;

acquireActionsToPropertyFormProperties

프로퍼티 폼의 프로퍼티에 획득 액션을 적용

프로퍼티 폼의 프로퍼티에 획득 액션을 적용하고 트랜잭션을 시작합니다.
프로퍼티 폼의 슬롯 값으로 설정되는 아이템이나 리소스를 부여하기 위해 사용됩니다.
획득 액션은 트랜잭션으로 실행되며, 그 결과 아이템이 폼의 슬롯 프로퍼티에 적용됩니다.
획득 액션의 동작을 커스터마이즈하기 위한 설정값을 전달할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
propertyFormModelNamestring
~ 128자프로퍼티 폼 모델 이름
propertyIdstring
~ 1024자프로퍼티 ID
이 프로퍼티 폼 인스턴스를 고유하게 식별하는 개발자 정의 식별자입니다. 일반적으로 이 폼이 설정하는 소유 리소스(예: GS2-Inventory의 아이템 세트)의 GRN을 설정합니다. 특정 장비에 스킬을 설정하는 등의 용도로 사용됩니다.
acquireActionAcquireAction
프로퍼티 폼의 프로퍼티에 적용할 획득 액션
configList<Config>[]0 ~ 1000 items획득 액션에 적용하는 설정
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemPropertyForm프로퍼티 폼
transactionIdstring발행된 트랜잭션 ID
stampSheetstring스탬프 시트
stampSheetEncryptionKeyIdstring스탬프 시트의 서명 계산에 사용한 암호화 키 GRN
autoRunStampSheetbool?트랜잭션 자동 실행이 활성화되어 있는지 여부
atomicCommitbool?트랜잭션을 원자적으로 커밋할지 여부
transactionstring발행된 트랜잭션
transactionResultTransactionResult트랜잭션 실행 결과

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.AcquireActionsToPropertyFormProperties(
    &formation.AcquireActionsToPropertyFormPropertiesRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
        AcquireAction: &formation.AcquireAction{
            Action: pointy.String("Gs2Experience:AddExperienceByUserId"),
            Request: pointy.String("{}"),
        },
        Config: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
transactionId := result.TransactionId
stampSheet := result.StampSheet
stampSheetEncryptionKeyId := result.StampSheetEncryptionKeyId
autoRunStampSheet := result.AutoRunStampSheet
atomicCommit := result.AtomicCommit
transaction := result.Transaction
transactionResult := result.TransactionResult
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\AcquireActionsToPropertyFormPropertiesRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->acquireActionsToPropertyFormProperties(
        (new AcquireActionsToPropertyFormPropertiesRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
            ->withAcquireAction((new AcquireAction())
                ->withAction("Gs2Experience:AddExperienceByUserId")
                ->withRequest("{}")
            )
            ->withConfig(null)
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $transactionId = $result->getTransactionId();
    $stampSheet = $result->getStampSheet();
    $stampSheetEncryptionKeyId = $result->getStampSheetEncryptionKeyId();
    $autoRunStampSheet = $result->getAutoRunStampSheet();
    $atomicCommit = $result->getAtomicCommit();
    $transaction = $result->getTransaction();
    $transactionResult = $result->getTransactionResult();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.AcquireActionsToPropertyFormPropertiesRequest;
import io.gs2.formation.result.AcquireActionsToPropertyFormPropertiesResult;

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

try {
    AcquireActionsToPropertyFormPropertiesResult result = client.acquireActionsToPropertyFormProperties(
        new AcquireActionsToPropertyFormPropertiesRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withAcquireAction(new AcquireAction()
                .withAction("Gs2Experience:AddExperienceByUserId")
                .withRequest("{}")
            )
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    PropertyForm item = result.getItem();
    String transactionId = result.getTransactionId();
    String stampSheet = result.getStampSheet();
    String stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    boolean autoRunStampSheet = result.getAutoRunStampSheet();
    boolean atomicCommit = result.getAtomicCommit();
    String transaction = result.getTransaction();
    TransactionResult transactionResult = result.getTransactionResult();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.AcquireActionsToPropertyFormPropertiesResult> asyncResult = null;
yield return client.AcquireActionsToPropertyFormProperties(
    new Gs2.Gs2Formation.Request.AcquireActionsToPropertyFormPropertiesRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001")
        .WithAcquireAction(new Gs2.Core.Model.AcquireAction()
            .WithAction("Gs2Experience:AddExperienceByUserId")
            .WithRequest("{}")
        )
        .WithConfig(null)
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var transactionId = result.TransactionId;
var stampSheet = result.StampSheet;
var stampSheetEncryptionKeyId = result.StampSheetEncryptionKeyId;
var autoRunStampSheet = result.AutoRunStampSheet;
var atomicCommit = result.AtomicCommit;
var transaction = result.Transaction;
var transactionResult = result.TransactionResult;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.acquireActionsToPropertyFormProperties(
        new Gs2Formation.AcquireActionsToPropertyFormPropertiesRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withAcquireAction(new Gs2Formation.model.AcquireAction()
                .withAction("Gs2Experience:AddExperienceByUserId")
                .withRequest("{}")
            )
            .withConfig(null)
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const transactionId = result.getTransactionId();
    const stampSheet = result.getStampSheet();
    const stampSheetEncryptionKeyId = result.getStampSheetEncryptionKeyId();
    const autoRunStampSheet = result.getAutoRunStampSheet();
    const atomicCommit = result.getAtomicCommit();
    const transaction = result.getTransaction();
    const transactionResult = result.getTransactionResult();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.acquire_actions_to_property_form_properties(
        formation.AcquireActionsToPropertyFormPropertiesRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
            .with_acquire_action(formation.AcquireAction()
                .with_action('Gs2Experience:AddExperienceByUserId')
                .with_request('{}')
            )
            .with_config(None)
            .with_time_offset_token(None)
    )
    item = result.item
    transaction_id = result.transaction_id
    stamp_sheet = result.stamp_sheet
    stamp_sheet_encryption_key_id = result.stamp_sheet_encryption_key_id
    auto_run_stamp_sheet = result.auto_run_stamp_sheet
    atomic_commit = result.atomic_commit
    transaction = result.transaction
    transaction_result = result.transaction_result
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.acquire_actions_to_property_form_properties({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    acquireAction={
        action="Gs2Experience:AddExperienceByUserId",
        request="{}",
    },
    config=nil,
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;
client = gs2('formation')

api_result_handler = client.acquire_actions_to_property_form_properties_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    acquireAction={
        action="Gs2Experience:AddExperienceByUserId",
        request="{}",
    },
    config=nil,
    timeOffsetToken=nil,
})

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

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

result = api_result.result
item = result.item;
transactionId = result.transactionId;
stampSheet = result.stampSheet;
stampSheetEncryptionKeyId = result.stampSheetEncryptionKeyId;
autoRunStampSheet = result.autoRunStampSheet;
atomicCommit = result.atomicCommit;
transaction = result.transaction;
transactionResult = result.transactionResult;

deletePropertyForm

프로퍼티 폼 삭제

요청한 사용자의 지정된 프로퍼티 폼 모델 이름과 propertyId로 식별되는 프로퍼티 폼을 삭제합니다.
삭제되면 프로퍼티 폼에 연결된 모든 슬롯 값이 삭제됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
accessTokenstring
~ 128자액세스 토큰
propertyFormModelNamestring
~ 128자프로퍼티 폼 모델 이름
propertyIdstring
~ 1024자프로퍼티 ID
이 프로퍼티 폼 인스턴스를 고유하게 식별하는 개발자 정의 식별자입니다. 일반적으로 이 폼이 설정하는 소유 리소스(예: GS2-Inventory의 아이템 세트)의 GRN을 설정합니다. 특정 장비에 스킬을 설정하는 등의 용도로 사용됩니다.

Result

타입설명
itemPropertyForm프로퍼티 폼
propertyFormModelPropertyFormModel프로퍼티 폼 모델

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeletePropertyForm(
    &formation.DeletePropertyFormRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
propertyFormModel := result.PropertyFormModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeletePropertyFormRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deletePropertyForm(
        (new DeletePropertyFormRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
    );
    $item = $result->getItem();
    $propertyFormModel = $result->getPropertyFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeletePropertyFormRequest;
import io.gs2.formation.result.DeletePropertyFormResult;

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

try {
    DeletePropertyFormResult result = client.deletePropertyForm(
        new DeletePropertyFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
    );
    PropertyForm item = result.getItem();
    PropertyFormModel propertyFormModel = result.getPropertyFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.DeletePropertyFormResult> asyncResult = null;
yield return client.DeletePropertyForm(
    new Gs2.Gs2Formation.Request.DeletePropertyFormRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var propertyFormModel = result.PropertyFormModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.deletePropertyForm(
        new Gs2Formation.DeletePropertyFormRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
    );
    const item = result.getItem();
    const propertyFormModel = result.getPropertyFormModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.delete_property_form(
        formation.DeletePropertyFormRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
    )
    item = result.item
    property_form_model = result.property_form_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.delete_property_form({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
})

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

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;
client = gs2('formation')

api_result_handler = client.delete_property_form_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
})

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

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

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;

deletePropertyFormByUserId

사용자 ID를 지정하여 프로퍼티 폼 삭제

지정된 사용자의 지정된 프로퍼티 폼 모델 이름과 propertyId로 식별되는 프로퍼티 폼을 삭제합니다(서버 사이드 작업).
삭제되면 프로퍼티 폼에 연결된 모든 슬롯 값이 삭제됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
userIdstring
~ 128자사용자ID
propertyFormModelNamestring
~ 128자프로퍼티 폼 모델 이름
propertyIdstring
~ 1024자프로퍼티 ID
이 프로퍼티 폼 인스턴스를 고유하게 식별하는 개발자 정의 식별자입니다. 일반적으로 이 폼이 설정하는 소유 리소스(예: GS2-Inventory의 아이템 세트)의 GRN을 설정합니다. 특정 장비에 스킬을 설정하는 등의 용도로 사용됩니다.
timeOffsetTokenstring~ 1024자타임 오프셋 토큰

Result

타입설명
itemPropertyForm프로퍼티 폼
propertyFormModelPropertyFormModel프로퍼티 폼 모델

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeletePropertyFormByUserId(
    &formation.DeletePropertyFormByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        PropertyId: pointy.String("property-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
propertyFormModel := result.PropertyFormModel
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeletePropertyFormByUserIdRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deletePropertyFormByUserId(
        (new DeletePropertyFormByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withPropertyFormModelName("form-0001")
            ->withPropertyId("property-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $propertyFormModel = $result->getPropertyFormModel();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeletePropertyFormByUserIdRequest;
import io.gs2.formation.result.DeletePropertyFormByUserIdResult;

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

try {
    DeletePropertyFormByUserIdResult result = client.deletePropertyFormByUserId(
        new DeletePropertyFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withTimeOffsetToken(null)
    );
    PropertyForm item = result.getItem();
    PropertyFormModel propertyFormModel = result.getPropertyFormModel();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.DeletePropertyFormByUserIdResult> asyncResult = null;
yield return client.DeletePropertyFormByUserId(
    new Gs2.Gs2Formation.Request.DeletePropertyFormByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithPropertyFormModelName("form-0001")
        .WithPropertyId("property-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
var propertyFormModel = result.PropertyFormModel;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.deletePropertyFormByUserId(
        new Gs2Formation.DeletePropertyFormByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withPropertyFormModelName("form-0001")
            .withPropertyId("property-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const propertyFormModel = result.getPropertyFormModel();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.delete_property_form_by_user_id(
        formation.DeletePropertyFormByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_property_form_model_name('form-0001')
            .with_property_id('property-0001')
            .with_time_offset_token(None)
    )
    item = result.item
    property_form_model = result.property_form_model
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.delete_property_form_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;
client = gs2('formation')

api_result_handler = client.delete_property_form_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    propertyFormModelName="form-0001",
    propertyId="property-0001",
    timeOffsetToken=nil,
})

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

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

result = api_result.result
item = result.item;
propertyFormModel = result.propertyFormModel;

getFormModel

폼 모델 조회

지정된 폼 저장 영역 모델에 연결되어 있으며 현재 활성화(공개)된 폼 모델을 조회합니다.
폼 모델은 저장 영역 내 폼이 사용하는 슬롯 구조(사용 가능한 슬롯과 그 설정)를 정의합니다.
편집 가능한 폼 모델 마스터와 달리, 실제로 사용되고 있는 공개된 모델입니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
moldModelNamestring
~ 128자폼 저장 영역 모델의 이름
폼 저장 영역 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.

Result

타입설명
itemFormModel

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetFormModel(
    &formation.GetFormModelRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MoldModelName: pointy.String("mold-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetFormModelRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getFormModel(
        (new GetFormModelRequest())
            ->withNamespaceName("namespace-0001")
            ->withMoldModelName("mold-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetFormModelRequest;
import io.gs2.formation.result.GetFormModelResult;

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

try {
    GetFormModelResult result = client.getFormModel(
        new GetFormModelRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
    );
    FormModel item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.GetFormModelResult> asyncResult = null;
yield return client.GetFormModel(
    new Gs2.Gs2Formation.Request.GetFormModelRequest()
        .WithNamespaceName("namespace-0001")
        .WithMoldModelName("mold-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.getFormModel(
        new Gs2Formation.GetFormModelRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.get_form_model(
        formation.GetFormModelRequest()
            .with_namespace_name('namespace-0001')
            .with_mold_model_name('mold-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

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

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

result = api_result.result
item = result.item;
client = gs2('formation')

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

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

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

result = api_result.result
item = result.item;

describeMoldModels

폼 저장 영역 모델 목록 조회

지정된 네임스페이스에서 현재 활성화(공개)되어 있는 모든 폼 저장 영역 모델(몰드 모델)을 조회합니다.
각 모델은 사용할 폼 모델, 초기 최대 용량, 절대 최대 용량을 정의합니다.

상세

Request

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

Result

타입설명
itemsList<MoldModel>폼 저장 영역 목록

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribeMoldModels(
    &formation.DescribeMoldModelsRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribeMoldModelsRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describeMoldModels(
        (new DescribeMoldModelsRequest())
            ->withNamespaceName("namespace-0001")
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribeMoldModelsRequest;
import io.gs2.formation.result.DescribeMoldModelsResult;

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

try {
    DescribeMoldModelsResult result = client.describeMoldModels(
        new DescribeMoldModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    List<MoldModel> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.DescribeMoldModelsResult> asyncResult = null;
yield return client.DescribeMoldModels(
    new Gs2.Gs2Formation.Request.DescribeMoldModelsRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.describeMoldModels(
        new Gs2Formation.DescribeMoldModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.describe_mold_models(
        formation.DescribeMoldModelsRequest()
            .with_namespace_name('namespace-0001')
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

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

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

result = api_result.result
items = result.items;
client = gs2('formation')

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

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

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

result = api_result.result
items = result.items;

getMoldModel

폼 저장 영역 모델 조회

이름을 지정하여 특정한 현재 활성화(공개) 상태인 폼 저장 영역 모델(몰드 모델)을 조회합니다.
연관된 폼 모델 이름, 초기 최대 용량, 절대 최대 용량을 포함한 모델의 구성을 반환합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
moldModelNamestring
~ 128자폼 저장 영역 모델의 이름
폼 저장 영역 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.

Result

타입설명
itemMoldModel폼 저장 영역

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetMoldModel(
    &formation.GetMoldModelRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MoldModelName: pointy.String("mold-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetMoldModelRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getMoldModel(
        (new GetMoldModelRequest())
            ->withNamespaceName("namespace-0001")
            ->withMoldModelName("mold-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetMoldModelRequest;
import io.gs2.formation.result.GetMoldModelResult;

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

try {
    GetMoldModelResult result = client.getMoldModel(
        new GetMoldModelRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
    );
    MoldModel item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.GetMoldModelResult> asyncResult = null;
yield return client.GetMoldModel(
    new Gs2.Gs2Formation.Request.GetMoldModelRequest()
        .WithNamespaceName("namespace-0001")
        .WithMoldModelName("mold-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.getMoldModel(
        new Gs2Formation.GetMoldModelRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.get_mold_model(
        formation.GetMoldModelRequest()
            .with_namespace_name('namespace-0001')
            .with_mold_model_name('mold-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

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

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

result = api_result.result
item = result.item;
client = gs2('formation')

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

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

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

result = api_result.result
item = result.item;

describePropertyFormModels

프로퍼티 폼 모델 목록 조회

지정된 네임스페이스에서 현재 활성화(공개)되어 있는 모든 프로퍼티 폼 모델을 조회합니다.
프로퍼티 폼 모델은 저장 영역 내 인덱스가 아닌 커스텀 프로퍼티 ID로 식별되는 프로퍼티 폼의 슬롯 구조를 정의합니다.

상세

Request

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

Result

타입설명
itemsList<PropertyFormModel>프로퍼티 폼 목록

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribePropertyFormModels(
    &formation.DescribePropertyFormModelsRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribePropertyFormModelsRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describePropertyFormModels(
        (new DescribePropertyFormModelsRequest())
            ->withNamespaceName("namespace-0001")
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribePropertyFormModelsRequest;
import io.gs2.formation.result.DescribePropertyFormModelsResult;

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

try {
    DescribePropertyFormModelsResult result = client.describePropertyFormModels(
        new DescribePropertyFormModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    List<PropertyFormModel> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.DescribePropertyFormModelsResult> asyncResult = null;
yield return client.DescribePropertyFormModels(
    new Gs2.Gs2Formation.Request.DescribePropertyFormModelsRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.describePropertyFormModels(
        new Gs2Formation.DescribePropertyFormModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.describe_property_form_models(
        formation.DescribePropertyFormModelsRequest()
            .with_namespace_name('namespace-0001')
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

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

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

result = api_result.result
items = result.items;
client = gs2('formation')

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

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

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

result = api_result.result
items = result.items;

getPropertyFormModel

프로퍼티 폼 모델 조회

이름을 지정하여 특정한 현재 활성화(공개) 상태인 프로퍼티 폼 모델을 조회합니다.
이 타입의 프로퍼티 폼이 사용하는 슬롯 구조 정의를 반환합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
propertyFormModelNamestring
~ 128자프로퍼티 폼 모델 이름
프로퍼티 폼 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.

Result

타입설명
itemPropertyFormModel프로퍼티 폼

구현 예제

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

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

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

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetPropertyFormModel(
    &formation.GetPropertyFormModelRequest {
        NamespaceName: pointy.String("namespace-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetPropertyFormModelRequest;

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

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getPropertyFormModel(
        (new GetPropertyFormModelRequest())
            ->withNamespaceName("namespace-0001")
            ->withPropertyFormModelName("form-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetPropertyFormModelRequest;
import io.gs2.formation.result.GetPropertyFormModelResult;

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

try {
    GetPropertyFormModelResult result = client.getPropertyFormModel(
        new GetPropertyFormModelRequest()
            .withNamespaceName("namespace-0001")
            .withPropertyFormModelName("form-0001")
    );
    PropertyFormModel item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

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

AsyncResult<Gs2.Gs2Formation.Result.GetPropertyFormModelResult> asyncResult = null;
yield return client.GetPropertyFormModel(
    new Gs2.Gs2Formation.Request.GetPropertyFormModelRequest()
        .WithNamespaceName("namespace-0001")
        .WithPropertyFormModelName("form-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

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

try {
    const result = await client.getPropertyFormModel(
        new Gs2Formation.GetPropertyFormModelRequest()
            .withNamespaceName("namespace-0001")
            .withPropertyFormModelName("form-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

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

try:
    result = client.get_property_form_model(
        formation.GetPropertyFormModelRequest()
            .with_namespace_name('namespace-0001')
            .with_property_form_model_name('form-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.get_property_form_model({
    namespaceName="namespace-0001",
    propertyFormModelName="form-0001",
})

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

result = api_result.result
item = result.item;
client = gs2('formation')

api_result_handler = client.get_property_form_model_async({
    namespaceName="namespace-0001",
    propertyFormModelName="form-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

exportMaster

폼 모델 마스터를 활성화 가능한 마스터 데이터 형식으로 내보내기

현재 폼 모델 마스터, 폼 저장 영역 마스터(몰드 모델 마스터), 프로퍼티 폼 모델 마스터를 활성화에 사용할 수 있는 형식으로 내보냅니다.
내보낸 데이터는 현재 마스터 구성의 백업이나 다른 네임스페이스로의 임포트에 사용할 수 있습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.

Result

타입설명
itemCurrentFormMaster활성화 가능한 폼 모델의 마스터 데이터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.ExportMaster(
    &formation.ExportMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\ExportMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->exportMaster(
        (new ExportMasterRequest())
            ->withNamespaceName("namespace-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.ExportMasterRequest;
import io.gs2.formation.result.ExportMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    ExportMasterResult result = client.exportMaster(
        new ExportMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    CurrentFormMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.ExportMasterResult> asyncResult = null;
yield return client.ExportMaster(
    new Gs2.Gs2Formation.Request.ExportMasterRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.exportMaster(
        new Gs2Formation.ExportMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.export_master(
        formation.ExportMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.export_master({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('formation')

api_result_handler = client.export_master_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

getCurrentFormMaster

현재 활성화된 폼 모델 마스터 데이터 조회

지정된 네임스페이스에서 현재 활성화(공개)되어 있는 폼 모델, 폼 저장 영역 모델, 프로퍼티 폼 모델의 마스터 데이터를 조회합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.

Result

타입설명
itemCurrentFormMaster현재 활성화된 폼 모델의 마스터 데이터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetCurrentFormMaster(
    &formation.GetCurrentFormMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetCurrentFormMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getCurrentFormMaster(
        (new GetCurrentFormMasterRequest())
            ->withNamespaceName("namespace-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetCurrentFormMasterRequest;
import io.gs2.formation.result.GetCurrentFormMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetCurrentFormMasterResult result = client.getCurrentFormMaster(
        new GetCurrentFormMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    CurrentFormMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetCurrentFormMasterResult> asyncResult = null;
yield return client.GetCurrentFormMaster(
    new Gs2.Gs2Formation.Request.GetCurrentFormMasterRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getCurrentFormMaster(
        new Gs2Formation.GetCurrentFormMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_current_form_master(
        formation.GetCurrentFormMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.get_current_form_master({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('formation')

api_result_handler = client.get_current_form_master_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

preUpdateCurrentFormMaster

현재 활성화된 폼 모델 마스터 데이터 업데이트(3단계 버전)

1MB를 초과하는 마스터 데이터를 업로드하는 경우, 3단계로 업데이트를 수행합니다.

  1. 이 API를 실행하여 업로드용 토큰과 URL을 취득합니다.
  2. 취득한 URL에 마스터 데이터를 업로드합니다.
  3. UpdateCurrentFormMaster에 업로드로 취득한 토큰을 전달하여 실행하고, 마스터 데이터를 반영합니다.
상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.

Result

타입설명
uploadTokenstring업로드 후 결과를 반영할 때 사용하는 토큰
uploadUrlstring업로드 처리 실행에 사용하는 URL

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.PreUpdateCurrentFormMaster(
    &formation.PreUpdateCurrentFormMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
uploadToken := result.UploadToken
uploadUrl := result.UploadUrl
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\PreUpdateCurrentFormMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->preUpdateCurrentFormMaster(
        (new PreUpdateCurrentFormMasterRequest())
            ->withNamespaceName("namespace-0001")
    );
    $uploadToken = $result->getUploadToken();
    $uploadUrl = $result->getUploadUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.PreUpdateCurrentFormMasterRequest;
import io.gs2.formation.result.PreUpdateCurrentFormMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    PreUpdateCurrentFormMasterResult result = client.preUpdateCurrentFormMaster(
        new PreUpdateCurrentFormMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    String uploadToken = result.getUploadToken();
    String uploadUrl = result.getUploadUrl();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.PreUpdateCurrentFormMasterResult> asyncResult = null;
yield return client.PreUpdateCurrentFormMaster(
    new Gs2.Gs2Formation.Request.PreUpdateCurrentFormMasterRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var uploadToken = result.UploadToken;
var uploadUrl = result.UploadUrl;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.preUpdateCurrentFormMaster(
        new Gs2Formation.PreUpdateCurrentFormMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    const uploadToken = result.getUploadToken();
    const uploadUrl = result.getUploadUrl();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.pre_update_current_form_master(
        formation.PreUpdateCurrentFormMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    upload_token = result.upload_token
    upload_url = result.upload_url
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.pre_update_current_form_master({
    namespaceName="namespace-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
uploadToken = result.uploadToken;
uploadUrl = result.uploadUrl;
client = gs2('formation')

api_result_handler = client.pre_update_current_form_master_async({
    namespaceName="namespace-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
uploadToken = result.uploadToken;
uploadUrl = result.uploadUrl;

updateCurrentFormMaster

현재 활성화된 폼 모델 마스터 데이터 업데이트

지정된 네임스페이스의 폼 모델, 폼 저장 영역 모델, 프로퍼티 폼 모델의 마스터 데이터를 업데이트하고 활성화(공개)합니다.
2가지 모드를 지원합니다: 인라인 마스터 데이터용 ‘direct’ 모드와, 사전에 업로드된 마스터 데이터용 ‘preUpload’ 모드입니다.
1MB를 초과하는 마스터 데이터의 경우, 3단계 업데이트 플로우(PreUpdate -> 업로드 -> Update(preUpload 모드))를 사용하세요.
업로드된 마스터 데이터는 적용 전에 검증됩니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
mode문자열 열거형
enum {
  “direct”,
  “preUpload”
}
“direct”업데이트 모드
정의설명
direct마스터 데이터를 직접 업데이트
preUpload마스터 데이터를 업로드한 후 업데이트
settingsstring{mode} == “direct”
✓※
~ 5242880 바이트 (5MB)마스터 데이터
※ mode이(가) “direct” 이면 필수
uploadTokenstring{mode} == “preUpload”
✓※
~ 1024자사전 업로드로 획득한 토큰
업로드한 마스터 데이터를 적용하기 위해 사용됩니다.
※ mode이(가) “preUpload” 이면 필수

Result

타입설명
itemCurrentFormMaster업데이트된 현재 활성화된 폼 모델의 마스터 데이터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentFormMaster(
    &formation.UpdateCurrentFormMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Mode: pointy.String("direct"),
        Settings: pointy.String("{\n  \"version\": \"2019-09-09\",\n  \"moldModels\": [\n    {\n      \"name\": \"party\",\n      \"metadata\": \"PARTY\",\n      \"formModel\": {\n        \"name\": \"party\",\n        \"metadata\": \"PARTY\",\n        \"slots\": [\n          {\n            \"name\": \"tank\",\n            \"metadata\": \"TANK\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"healer\",\n            \"metadata\": \"HEALER\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_1\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_2\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 10,\n      \"maxCapacity\": 20\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"formModel\": {\n        \"name\": \"equipment\",\n        \"metadata\": \"EQUIPMENT\",\n        \"slots\": [\n          {\n            \"name\": \"head\",\n            \"metadata\": \"HEAD\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"body\",\n            \"metadata\": \"BODY\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"leg\",\n            \"metadata\": \"LEG\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 20,\n      \"maxCapacity\": 30\n    }\n  ]\n}"),
        UploadToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\UpdateCurrentFormMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->updateCurrentFormMaster(
        (new UpdateCurrentFormMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMode("direct")
            ->withSettings("{\n  \"version\": \"2019-09-09\",\n  \"moldModels\": [\n    {\n      \"name\": \"party\",\n      \"metadata\": \"PARTY\",\n      \"formModel\": {\n        \"name\": \"party\",\n        \"metadata\": \"PARTY\",\n        \"slots\": [\n          {\n            \"name\": \"tank\",\n            \"metadata\": \"TANK\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"healer\",\n            \"metadata\": \"HEALER\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_1\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_2\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 10,\n      \"maxCapacity\": 20\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"formModel\": {\n        \"name\": \"equipment\",\n        \"metadata\": \"EQUIPMENT\",\n        \"slots\": [\n          {\n            \"name\": \"head\",\n            \"metadata\": \"HEAD\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"body\",\n            \"metadata\": \"BODY\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"leg\",\n            \"metadata\": \"LEG\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 20,\n      \"maxCapacity\": 30\n    }\n  ]\n}")
            ->withUploadToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.UpdateCurrentFormMasterRequest;
import io.gs2.formation.result.UpdateCurrentFormMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    UpdateCurrentFormMasterResult result = client.updateCurrentFormMaster(
        new UpdateCurrentFormMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMode("direct")
            .withSettings("{\n  \"version\": \"2019-09-09\",\n  \"moldModels\": [\n    {\n      \"name\": \"party\",\n      \"metadata\": \"PARTY\",\n      \"formModel\": {\n        \"name\": \"party\",\n        \"metadata\": \"PARTY\",\n        \"slots\": [\n          {\n            \"name\": \"tank\",\n            \"metadata\": \"TANK\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"healer\",\n            \"metadata\": \"HEALER\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_1\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_2\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 10,\n      \"maxCapacity\": 20\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"formModel\": {\n        \"name\": \"equipment\",\n        \"metadata\": \"EQUIPMENT\",\n        \"slots\": [\n          {\n            \"name\": \"head\",\n            \"metadata\": \"HEAD\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"body\",\n            \"metadata\": \"BODY\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"leg\",\n            \"metadata\": \"LEG\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 20,\n      \"maxCapacity\": 30\n    }\n  ]\n}")
            .withUploadToken(null)
    );
    CurrentFormMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.UpdateCurrentFormMasterResult> asyncResult = null;
yield return client.UpdateCurrentFormMaster(
    new Gs2.Gs2Formation.Request.UpdateCurrentFormMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMode("direct")
        .WithSettings("{\n  \"version\": \"2019-09-09\",\n  \"moldModels\": [\n    {\n      \"name\": \"party\",\n      \"metadata\": \"PARTY\",\n      \"formModel\": {\n        \"name\": \"party\",\n        \"metadata\": \"PARTY\",\n        \"slots\": [\n          {\n            \"name\": \"tank\",\n            \"metadata\": \"TANK\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"healer\",\n            \"metadata\": \"HEALER\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_1\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_2\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 10,\n      \"maxCapacity\": 20\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"formModel\": {\n        \"name\": \"equipment\",\n        \"metadata\": \"EQUIPMENT\",\n        \"slots\": [\n          {\n            \"name\": \"head\",\n            \"metadata\": \"HEAD\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"body\",\n            \"metadata\": \"BODY\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"leg\",\n            \"metadata\": \"LEG\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 20,\n      \"maxCapacity\": 30\n    }\n  ]\n}")
        .WithUploadToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.updateCurrentFormMaster(
        new Gs2Formation.UpdateCurrentFormMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMode("direct")
            .withSettings("{\n  \"version\": \"2019-09-09\",\n  \"moldModels\": [\n    {\n      \"name\": \"party\",\n      \"metadata\": \"PARTY\",\n      \"formModel\": {\n        \"name\": \"party\",\n        \"metadata\": \"PARTY\",\n        \"slots\": [\n          {\n            \"name\": \"tank\",\n            \"metadata\": \"TANK\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"healer\",\n            \"metadata\": \"HEALER\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_1\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_2\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 10,\n      \"maxCapacity\": 20\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"formModel\": {\n        \"name\": \"equipment\",\n        \"metadata\": \"EQUIPMENT\",\n        \"slots\": [\n          {\n            \"name\": \"head\",\n            \"metadata\": \"HEAD\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"body\",\n            \"metadata\": \"BODY\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"leg\",\n            \"metadata\": \"LEG\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 20,\n      \"maxCapacity\": 30\n    }\n  ]\n}")
            .withUploadToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.update_current_form_master(
        formation.UpdateCurrentFormMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mode('direct')
            .with_settings('{\n  "version": "2019-09-09",\n  "moldModels": [\n    {\n      "name": "party",\n      "metadata": "PARTY",\n      "formModel": {\n        "name": "party",\n        "metadata": "PARTY",\n        "slots": [\n          {\n            "name": "tank",\n            "metadata": "TANK",\n            "propertyRegex": "grn:.*"\n          },\n          {\n            "name": "healer",\n            "metadata": "HEALER",\n            "propertyRegex": "grn:.*"\n          },\n          {\n            "name": "dps_1",\n            "metadata": "DPS",\n            "propertyRegex": "grn:.*"\n          },\n          {\n            "name": "dps_2",\n            "metadata": "DPS",\n            "propertyRegex": "grn:.*"\n          }\n        ]\n      },\n      "initialMaxCapacity": 10,\n      "maxCapacity": 20\n    },\n    {\n      "name": "equipment",\n      "metadata": "EQUIPMENT",\n      "formModel": {\n        "name": "equipment",\n        "metadata": "EQUIPMENT",\n        "slots": [\n          {\n            "name": "head",\n            "metadata": "HEAD",\n            "propertyRegex": "grn:.*"\n          },\n          {\n            "name": "body",\n            "metadata": "BODY",\n            "propertyRegex": "grn:.*"\n          },\n          {\n            "name": "leg",\n            "metadata": "LEG",\n            "propertyRegex": "grn:.*"\n          }\n        ]\n      },\n      "initialMaxCapacity": 20,\n      "maxCapacity": 30\n    }\n  ]\n}')
            .with_upload_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.update_current_form_master({
    namespaceName="namespace-0001",
    mode="direct",
    settings="{\n  \"version\": \"2019-09-09\",\n  \"moldModels\": [\n    {\n      \"name\": \"party\",\n      \"metadata\": \"PARTY\",\n      \"formModel\": {\n        \"name\": \"party\",\n        \"metadata\": \"PARTY\",\n        \"slots\": [\n          {\n            \"name\": \"tank\",\n            \"metadata\": \"TANK\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"healer\",\n            \"metadata\": \"HEALER\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_1\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_2\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 10,\n      \"maxCapacity\": 20\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"formModel\": {\n        \"name\": \"equipment\",\n        \"metadata\": \"EQUIPMENT\",\n        \"slots\": [\n          {\n            \"name\": \"head\",\n            \"metadata\": \"HEAD\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"body\",\n            \"metadata\": \"BODY\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"leg\",\n            \"metadata\": \"LEG\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 20,\n      \"maxCapacity\": 30\n    }\n  ]\n}",
    uploadToken=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('formation')

api_result_handler = client.update_current_form_master_async({
    namespaceName="namespace-0001",
    mode="direct",
    settings="{\n  \"version\": \"2019-09-09\",\n  \"moldModels\": [\n    {\n      \"name\": \"party\",\n      \"metadata\": \"PARTY\",\n      \"formModel\": {\n        \"name\": \"party\",\n        \"metadata\": \"PARTY\",\n        \"slots\": [\n          {\n            \"name\": \"tank\",\n            \"metadata\": \"TANK\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"healer\",\n            \"metadata\": \"HEALER\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_1\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"dps_2\",\n            \"metadata\": \"DPS\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 10,\n      \"maxCapacity\": 20\n    },\n    {\n      \"name\": \"equipment\",\n      \"metadata\": \"EQUIPMENT\",\n      \"formModel\": {\n        \"name\": \"equipment\",\n        \"metadata\": \"EQUIPMENT\",\n        \"slots\": [\n          {\n            \"name\": \"head\",\n            \"metadata\": \"HEAD\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"body\",\n            \"metadata\": \"BODY\",\n            \"propertyRegex\": \"grn:.*\"\n          },\n          {\n            \"name\": \"leg\",\n            \"metadata\": \"LEG\",\n            \"propertyRegex\": \"grn:.*\"\n          }\n        ]\n      },\n      \"initialMaxCapacity\": 20,\n      \"maxCapacity\": 30\n    }\n  ]\n}",
    uploadToken=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

updateCurrentFormMasterFromGitHub

현재 활성화된 폼 모델 마스터 데이터를 GitHub에서 업데이트

GitHub 저장소에서 직접 마스터 데이터를 취득하여 업데이트·활성화(공개)합니다.
체크아웃 설정에는 사용할 저장소, 브랜치/태그, 파일 경로를 지정합니다.
마스터 데이터를 버전 관리로 관리하고 직접 배포하는 경우에 유용합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
checkoutSettingGitHubCheckoutSetting
GitHub에서 마스터 데이터를 체크아웃하는 설정

Result

타입설명
itemCurrentFormMaster업데이트된 현재 활성화된 폼 모델의 마스터 데이터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentFormMasterFromGitHub(
    &formation.UpdateCurrentFormMasterFromGitHubRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CheckoutSetting: &formation.GitHubCheckoutSetting{
            ApiKeyId: pointy.String("apiKeyId-0001"),
            RepositoryName: pointy.String("gs2io/master-data"),
            SourcePath: pointy.String("path/to/file.json"),
            ReferenceType: pointy.String("branch"),
            BranchName: pointy.String("develop"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\UpdateCurrentFormMasterFromGitHubRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->updateCurrentFormMasterFromGitHub(
        (new UpdateCurrentFormMasterFromGitHubRequest())
            ->withNamespaceName("namespace-0001")
            ->withCheckoutSetting((new GitHubCheckoutSetting())
                ->withApiKeyId("apiKeyId-0001")
                ->withRepositoryName("gs2io/master-data")
                ->withSourcePath("path/to/file.json")
                ->withReferenceType("branch")
                ->withBranchName("develop")
            )
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.UpdateCurrentFormMasterFromGitHubRequest;
import io.gs2.formation.result.UpdateCurrentFormMasterFromGitHubResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    UpdateCurrentFormMasterFromGitHubResult result = client.updateCurrentFormMasterFromGitHub(
        new UpdateCurrentFormMasterFromGitHubRequest()
            .withNamespaceName("namespace-0001")
            .withCheckoutSetting(new GitHubCheckoutSetting()
                .withApiKeyId("apiKeyId-0001")
                .withRepositoryName("gs2io/master-data")
                .withSourcePath("path/to/file.json")
                .withReferenceType("branch")
                .withBranchName("develop")
            )
    );
    CurrentFormMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.UpdateCurrentFormMasterFromGitHubResult> asyncResult = null;
yield return client.UpdateCurrentFormMasterFromGitHub(
    new Gs2.Gs2Formation.Request.UpdateCurrentFormMasterFromGitHubRequest()
        .WithNamespaceName("namespace-0001")
        .WithCheckoutSetting(new Gs2.Gs2Formation.Model.GitHubCheckoutSetting()
            .WithApiKeyId("apiKeyId-0001")
            .WithRepositoryName("gs2io/master-data")
            .WithSourcePath("path/to/file.json")
            .WithReferenceType("branch")
            .WithBranchName("develop")
        ),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.updateCurrentFormMasterFromGitHub(
        new Gs2Formation.UpdateCurrentFormMasterFromGitHubRequest()
            .withNamespaceName("namespace-0001")
            .withCheckoutSetting(new Gs2Formation.model.GitHubCheckoutSetting()
                .withApiKeyId("apiKeyId-0001")
                .withRepositoryName("gs2io/master-data")
                .withSourcePath("path/to/file.json")
                .withReferenceType("branch")
                .withBranchName("develop")
            )
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.update_current_form_master_from_git_hub(
        formation.UpdateCurrentFormMasterFromGitHubRequest()
            .with_namespace_name('namespace-0001')
            .with_checkout_setting(formation.GitHubCheckoutSetting()
                .with_api_key_id('apiKeyId-0001')
                .with_repository_name('gs2io/master-data')
                .with_source_path('path/to/file.json')
                .with_reference_type('branch')
                .with_branch_name('develop')
            )
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.update_current_form_master_from_git_hub({
    namespaceName="namespace-0001",
    checkoutSetting={
        api_key_id="apiKeyId-0001",
        repository_name="gs2io/master-data",
        source_path="path/to/file.json",
        reference_type="branch",
        branch_name="develop",
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('formation')

api_result_handler = client.update_current_form_master_from_git_hub_async({
    namespaceName="namespace-0001",
    checkoutSetting={
        api_key_id="apiKeyId-0001",
        repository_name="gs2io/master-data",
        source_path="path/to/file.json",
        reference_type="branch",
        branch_name="develop",
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

describeFormModelMasters

폼 모델 마스터 목록 조회

이름 접두사 필터링이 가능한, 편집 가능한 폼 모델 마스터의 페이지네이션 목록을 조회합니다.
폼 모델 마스터는 폼의 슬롯 구조를 정의합니다. 마스터에 대한 변경 사항은 CurrentFormMaster API에서 마스터 데이터를 활성화할 때까지 반영되지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
namePrefixstring~ 64자폼 모델 이름 필터 접두사
pageTokenstring~ 1024자데이터 취득을 시작할 위치를 지정하는 토큰
limitint301 ~ 1000취득할 데이터 건수

Result

타입설명
itemsList<FormModelMaster>폼 모델 마스터 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribeFormModelMasters(
    &formation.DescribeFormModelMastersRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribeFormModelMastersRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describeFormModelMasters(
        (new DescribeFormModelMastersRequest())
            ->withNamespaceName("namespace-0001")
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribeFormModelMastersRequest;
import io.gs2.formation.result.DescribeFormModelMastersResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DescribeFormModelMastersResult result = client.describeFormModelMasters(
        new DescribeFormModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<FormModelMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DescribeFormModelMastersResult> asyncResult = null;
yield return client.DescribeFormModelMasters(
    new Gs2.Gs2Formation.Request.DescribeFormModelMastersRequest()
        .WithNamespaceName("namespace-0001")
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.describeFormModelMasters(
        new Gs2Formation.DescribeFormModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.describe_form_model_masters(
        formation.DescribeFormModelMastersRequest()
            .with_namespace_name('namespace-0001')
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.describe_form_model_masters({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('formation')

api_result_handler = client.describe_form_model_masters_async({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

createFormModelMaster

폼 모델 마스터 신규 생성

이름과 슬롯 정의를 가진 새로운 편집 가능한 폼 모델 마스터 정의를 생성합니다.
각 슬롯은 아이템(인벤토리, 심플 인벤토리, 사전에서)을 배치할 수 있는 폼 내의 이름이 지정된 위치를 정의합니다.
변경 사항은 CurrentFormMaster API에서 마스터 데이터를 활성화할 때까지 반영되지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
namestring
~ 128자폼 모델명
폼 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
metadatastring~ 2048자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
slotsList<SlotModel>
1 ~ 10 items슬롯 모델 리스트
이 폼을 구성하는 슬롯 정의의 순서가 있는 리스트입니다. 각 슬롯은 할당 가능한 포지션을 나타내며, 슬롯명은 폼 내에서 고유해야 합니다. 장비에서는 “weapon”, “armor”, “accessory"와 같은 슬롯, 파티에서는 “position_1”, “position_2"와 같은 슬롯을 생각할 수 있습니다.

Result

타입설명
itemFormModelMaster생성한 폼 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.CreateFormModelMaster(
    &formation.CreateFormModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("form-0001"),
        Description: nil,
        Metadata: nil,
        Slots: []formation.SlotModel{
            formation.SlotModel{
                Name: pointy.String("slot-0001"),
                PropertyRegex: pointy.String(".*"),
            },
            formation.SlotModel{
                Name: pointy.String("slot-0002"),
                PropertyRegex: pointy.String(".*"),
                Metadata: pointy.String("METADATA_0002"),
            },
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\CreateFormModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->createFormModelMaster(
        (new CreateFormModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("form-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withSlots([
                (new \Gs2\Formation\Model\SlotModel())
                    ->withName("slot-0001")
                    ->withPropertyRegex(".*"),
                (new \Gs2\Formation\Model\SlotModel())
                    ->withName("slot-0002")
                    ->withPropertyRegex(".*")
                    ->withMetadata("METADATA_0002"),
            ])
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.CreateFormModelMasterRequest;
import io.gs2.formation.result.CreateFormModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    CreateFormModelMasterResult result = client.createFormModelMaster(
        new CreateFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("form-0001")
            .withDescription(null)
            .withMetadata(null)
            .withSlots(Arrays.asList(
                new io.gs2.formation.model.SlotModel()
                    .withName("slot-0001")
                    .withPropertyRegex(".*"),
                new io.gs2.formation.model.SlotModel()
                    .withName("slot-0002")
                    .withPropertyRegex(".*")
                    .withMetadata("METADATA_0002")
            ))
    );
    FormModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.CreateFormModelMasterResult> asyncResult = null;
yield return client.CreateFormModelMaster(
    new Gs2.Gs2Formation.Request.CreateFormModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("form-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithSlots(new Gs2.Gs2Formation.Model.SlotModel[] {
            new Gs2.Gs2Formation.Model.SlotModel()
                .WithName("slot-0001")
                .WithPropertyRegex(".*"),
            new Gs2.Gs2Formation.Model.SlotModel()
                .WithName("slot-0002")
                .WithPropertyRegex(".*")
                .WithMetadata("METADATA_0002"),
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.createFormModelMaster(
        new Gs2Formation.CreateFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("form-0001")
            .withDescription(null)
            .withMetadata(null)
            .withSlots([
                new Gs2Formation.model.SlotModel()
                    .withName("slot-0001")
                    .withPropertyRegex(".*"),
                new Gs2Formation.model.SlotModel()
                    .withName("slot-0002")
                    .withPropertyRegex(".*")
                    .withMetadata("METADATA_0002"),
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.create_form_model_master(
        formation.CreateFormModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_name('form-0001')
            .with_description(None)
            .with_metadata(None)
            .with_slots([
                formation.SlotModel()
                    .with_name('slot-0001')
                    .with_property_regex('.*'),
                formation.SlotModel()
                    .with_name('slot-0002')
                    .with_property_regex('.*')
                    .with_metadata('METADATA_0002'),
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.create_form_model_master({
    namespaceName="namespace-0001",
    name="form-0001",
    description=nil,
    metadata=nil,
    slots={
        {
            name="slot-0001",
            propertyRegex=".*",
        },
        {
            name="slot-0002",
            propertyRegex=".*",
            metadata="METADATA_0002",
        }
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('formation')

api_result_handler = client.create_form_model_master_async({
    namespaceName="namespace-0001",
    name="form-0001",
    description=nil,
    metadata=nil,
    slots={
        {
            name="slot-0001",
            propertyRegex=".*",
        },
        {
            name="slot-0002",
            propertyRegex=".*",
            metadata="METADATA_0002",
        }
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

getFormModelMaster

폼 모델 마스터 조회

이름을 지정하여 특정한 편집 가능한 폼 모델 마스터의 상세 정보를 조회합니다.
활성화 전의 마스터 정의를 열람·편집하는 데 사용합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
formModelNamestring
~ 128자폼 모델명
폼 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.

Result

타입설명
itemFormModelMaster폼 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetFormModelMaster(
    &formation.GetFormModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        FormModelName: pointy.String("form-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetFormModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getFormModelMaster(
        (new GetFormModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withFormModelName("form-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetFormModelMasterRequest;
import io.gs2.formation.result.GetFormModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetFormModelMasterResult result = client.getFormModelMaster(
        new GetFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withFormModelName("form-0001")
    );
    FormModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetFormModelMasterResult> asyncResult = null;
yield return client.GetFormModelMaster(
    new Gs2.Gs2Formation.Request.GetFormModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithFormModelName("form-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getFormModelMaster(
        new Gs2Formation.GetFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withFormModelName("form-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_form_model_master(
        formation.GetFormModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_form_model_name('form-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.get_form_model_master({
    namespaceName="namespace-0001",
    formModelName="form-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('formation')

api_result_handler = client.get_form_model_master_async({
    namespaceName="namespace-0001",
    formModelName="form-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

updateFormModelMaster

폼 모델 마스터 갱신

기존 폼 모델 마스터의 설명, 메타데이터, 슬롯 정의를 갱신합니다.
폼 모델 이름은 생성 후 변경할 수 없습니다.
변경 사항은 CurrentFormMaster API에서 마스터 데이터를 다시 활성화할 때까지 반영되지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
formModelNamestring
~ 128자폼 모델명
폼 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
metadatastring~ 2048자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
slotsList<SlotModel>
1 ~ 10 items슬롯 모델 리스트
이 폼을 구성하는 슬롯 정의의 순서가 있는 리스트입니다. 각 슬롯은 할당 가능한 포지션을 나타내며, 슬롯명은 폼 내에서 고유해야 합니다. 장비에서는 “weapon”, “armor”, “accessory"와 같은 슬롯, 파티에서는 “position_1”, “position_2"와 같은 슬롯을 생각할 수 있습니다.

Result

타입설명
itemFormModelMaster갱신한 폼 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.UpdateFormModelMaster(
    &formation.UpdateFormModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        FormModelName: pointy.String("form-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("FORM_0001"),
        Slots: []formation.SlotModel{
            formation.SlotModel{
                Name: pointy.String("slot-1101"),
            },
            formation.SlotModel{
                Name: pointy.String("slot-1102"),
                Metadata: pointy.String("METADATA_1102"),
            },
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\UpdateFormModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->updateFormModelMaster(
        (new UpdateFormModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withFormModelName("form-0001")
            ->withDescription("description1")
            ->withMetadata("FORM_0001")
            ->withSlots([
                (new \Gs2\Formation\Model\SlotModel())
                    ->withName("slot-1101"),
                (new \Gs2\Formation\Model\SlotModel())
                    ->withName("slot-1102")
                    ->withMetadata("METADATA_1102"),
            ])
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.UpdateFormModelMasterRequest;
import io.gs2.formation.result.UpdateFormModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    UpdateFormModelMasterResult result = client.updateFormModelMaster(
        new UpdateFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withFormModelName("form-0001")
            .withDescription("description1")
            .withMetadata("FORM_0001")
            .withSlots(Arrays.asList(
                new io.gs2.formation.model.SlotModel()
                    .withName("slot-1101"),
                new io.gs2.formation.model.SlotModel()
                    .withName("slot-1102")
                    .withMetadata("METADATA_1102")
            ))
    );
    FormModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.UpdateFormModelMasterResult> asyncResult = null;
yield return client.UpdateFormModelMaster(
    new Gs2.Gs2Formation.Request.UpdateFormModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithFormModelName("form-0001")
        .WithDescription("description1")
        .WithMetadata("FORM_0001")
        .WithSlots(new Gs2.Gs2Formation.Model.SlotModel[] {
            new Gs2.Gs2Formation.Model.SlotModel()
                .WithName("slot-1101"),
            new Gs2.Gs2Formation.Model.SlotModel()
                .WithName("slot-1102")
                .WithMetadata("METADATA_1102"),
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.updateFormModelMaster(
        new Gs2Formation.UpdateFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withFormModelName("form-0001")
            .withDescription("description1")
            .withMetadata("FORM_0001")
            .withSlots([
                new Gs2Formation.model.SlotModel()
                    .withName("slot-1101"),
                new Gs2Formation.model.SlotModel()
                    .withName("slot-1102")
                    .withMetadata("METADATA_1102"),
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.update_form_model_master(
        formation.UpdateFormModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_form_model_name('form-0001')
            .with_description('description1')
            .with_metadata('FORM_0001')
            .with_slots([
                formation.SlotModel()
                    .with_name('slot-1101'),
                formation.SlotModel()
                    .with_name('slot-1102')
                    .with_metadata('METADATA_1102'),
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.update_form_model_master({
    namespaceName="namespace-0001",
    formModelName="form-0001",
    description="description1",
    metadata="FORM_0001",
    slots={
        {
            name="slot-1101",
        },
        {
            name="slot-1102",
            metadata="METADATA_1102",
        }
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('formation')

api_result_handler = client.update_form_model_master_async({
    namespaceName="namespace-0001",
    formModelName="form-0001",
    description="description1",
    metadata="FORM_0001",
    slots={
        {
            name="slot-1101",
        },
        {
            name="slot-1102",
            metadata="METADATA_1102",
        }
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

deleteFormModelMaster

폼 모델 마스터 삭제

편집 가능한 폼 모델 마스터 정의를 삭제합니다.
마스터 데이터만 영향을 받으며, 현재 활성화(공개)되어 있는 모델은 마스터 데이터가 다시 활성화될 때까지 영향을 받지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
formModelNamestring
~ 128자폼 모델명
폼 모델 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.

Result

타입설명
itemFormModelMaster삭제한 폼 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeleteFormModelMaster(
    &formation.DeleteFormModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        FormModelName: pointy.String("form-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeleteFormModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deleteFormModelMaster(
        (new DeleteFormModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withFormModelName("form-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeleteFormModelMasterRequest;
import io.gs2.formation.result.DeleteFormModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DeleteFormModelMasterResult result = client.deleteFormModelMaster(
        new DeleteFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withFormModelName("form-0001")
    );
    FormModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DeleteFormModelMasterResult> asyncResult = null;
yield return client.DeleteFormModelMaster(
    new Gs2.Gs2Formation.Request.DeleteFormModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithFormModelName("form-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.deleteFormModelMaster(
        new Gs2Formation.DeleteFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withFormModelName("form-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.delete_form_model_master(
        formation.DeleteFormModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_form_model_name('form-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.delete_form_model_master({
    namespaceName="namespace-0001",
    formModelName="form-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('formation')

api_result_handler = client.delete_form_model_master_async({
    namespaceName="namespace-0001",
    formModelName="form-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

describeMoldModelMasters

폼 저장 영역 마스터 목록 조회

이름 접두사 필터링이 가능한, 편집 가능한 폼 저장 영역 마스터(몰드 모델 마스터)의 페이지네이션 목록을 조회합니다.
마스터에 대한 변경 사항은 CurrentFormMaster API에서 마스터 데이터를 활성화할 때까지 반영되지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
namePrefixstring~ 64자폼 저장 영역 이름 필터 접두사
pageTokenstring~ 1024자데이터 취득을 시작할 위치를 지정하는 토큰
limitint301 ~ 1000취득할 데이터 건수

Result

타입설명
itemsList<MoldModelMaster>폼 저장 영역 마스터 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribeMoldModelMasters(
    &formation.DescribeMoldModelMastersRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribeMoldModelMastersRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describeMoldModelMasters(
        (new DescribeMoldModelMastersRequest())
            ->withNamespaceName("namespace-0001")
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribeMoldModelMastersRequest;
import io.gs2.formation.result.DescribeMoldModelMastersResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DescribeMoldModelMastersResult result = client.describeMoldModelMasters(
        new DescribeMoldModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<MoldModelMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DescribeMoldModelMastersResult> asyncResult = null;
yield return client.DescribeMoldModelMasters(
    new Gs2.Gs2Formation.Request.DescribeMoldModelMastersRequest()
        .WithNamespaceName("namespace-0001")
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.describeMoldModelMasters(
        new Gs2Formation.DescribeMoldModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.describe_mold_model_masters(
        formation.DescribeMoldModelMastersRequest()
            .with_namespace_name('namespace-0001')
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.describe_mold_model_masters({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('formation')

api_result_handler = client.describe_mold_model_masters_async({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

createMoldModelMaster

폼 저장 영역 마스터 신규 생성

새로운 편집 가능한 폼 저장 영역 마스터(몰드 모델 마스터) 정의를 생성합니다.
사용할 폼 모델(formModelName), 사용자가 저장 영역에 처음 접근할 때 할당되는 초기 최대 용량(initialMaxCapacity), 용량 가산으로 도달 가능한 절대 최대 용량(maxCapacity)을 정의합니다.
변경 사항은 CurrentFormMaster API에서 마스터 데이터를 활성화할 때까지 반영되지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
namestring
~ 128자폼 저장 영역 모델 이름
폼 저장 영역 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
metadatastring~ 2048자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
formModelNamestring
~ 128자폼 모델 이름
initialMaxCapacityint
1 ~ 2147483646폼을 저장할 수 있는 초기 캐파시티
이 저장 영역에서 각 플레이어가 이용할 수 있는 기본 폼 저장 슬롯 수입니다. 예를 들어 3으로 설정하면 플레이어는 초기 상태에서 최대 3개의 서로 다른 편성(예: 「불 속성 파티」「물 속성 파티」「바람 속성 파티」)을 저장할 수 있습니다. 플레이어별로 maxCapacity까지 확장할 수 있습니다.
maxCapacityint
1 ~ 2147483646폼을 저장할 수 있는 최대 캐파시티
이 저장 영역에서 플레이어별 폼 저장 슬롯 수의 절대적인 상한입니다. 캐파시티 확장 조작을 수행하더라도 캐파시티는 이 값을 초과할 수 없습니다. initialMaxCapacity 이상의 값이어야 합니다.

Result

타입설명
itemMoldModelMaster생성한 폼 저장 영역 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.CreateMoldModelMaster(
    &formation.CreateMoldModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("mold-0001"),
        Description: nil,
        Metadata: nil,
        FormModelName: pointy.String("formModel-0001"),
        InitialMaxCapacity: pointy.Int32(5),
        MaxCapacity: pointy.Int32(10),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\CreateMoldModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->createMoldModelMaster(
        (new CreateMoldModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("mold-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withFormModelName("formModel-0001")
            ->withInitialMaxCapacity(5)
            ->withMaxCapacity(10)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.CreateMoldModelMasterRequest;
import io.gs2.formation.result.CreateMoldModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    CreateMoldModelMasterResult result = client.createMoldModelMaster(
        new CreateMoldModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("mold-0001")
            .withDescription(null)
            .withMetadata(null)
            .withFormModelName("formModel-0001")
            .withInitialMaxCapacity(5)
            .withMaxCapacity(10)
    );
    MoldModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.CreateMoldModelMasterResult> asyncResult = null;
yield return client.CreateMoldModelMaster(
    new Gs2.Gs2Formation.Request.CreateMoldModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("mold-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithFormModelName("formModel-0001")
        .WithInitialMaxCapacity(5)
        .WithMaxCapacity(10),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.createMoldModelMaster(
        new Gs2Formation.CreateMoldModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("mold-0001")
            .withDescription(null)
            .withMetadata(null)
            .withFormModelName("formModel-0001")
            .withInitialMaxCapacity(5)
            .withMaxCapacity(10)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.create_mold_model_master(
        formation.CreateMoldModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_name('mold-0001')
            .with_description(None)
            .with_metadata(None)
            .with_form_model_name('formModel-0001')
            .with_initial_max_capacity(5)
            .with_max_capacity(10)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.create_mold_model_master({
    namespaceName="namespace-0001",
    name="mold-0001",
    description=nil,
    metadata=nil,
    formModelName="formModel-0001",
    initialMaxCapacity=5,
    maxCapacity=10,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('formation')

api_result_handler = client.create_mold_model_master_async({
    namespaceName="namespace-0001",
    name="mold-0001",
    description=nil,
    metadata=nil,
    formModelName="formModel-0001",
    initialMaxCapacity=5,
    maxCapacity=10,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

getMoldModelMaster

폼 저장 영역 마스터 조회

이름을 지정하여 특정한 편집 가능한 폼 저장 영역 마스터의 상세 정보를 조회합니다.
활성화 전의 마스터 정의를 열람·편집하는 데 사용합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
moldModelNamestring
~ 128자폼 저장 영역 모델 이름
폼 저장 영역 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.

Result

타입설명
itemMoldModelMaster폼 저장 영역 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetMoldModelMaster(
    &formation.GetMoldModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MoldModelName: pointy.String("mold-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetMoldModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getMoldModelMaster(
        (new GetMoldModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMoldModelName("mold-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetMoldModelMasterRequest;
import io.gs2.formation.result.GetMoldModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetMoldModelMasterResult result = client.getMoldModelMaster(
        new GetMoldModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
    );
    MoldModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetMoldModelMasterResult> asyncResult = null;
yield return client.GetMoldModelMaster(
    new Gs2.Gs2Formation.Request.GetMoldModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMoldModelName("mold-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getMoldModelMaster(
        new Gs2Formation.GetMoldModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_mold_model_master(
        formation.GetMoldModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mold_model_name('mold-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.get_mold_model_master({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('formation')

api_result_handler = client.get_mold_model_master_async({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

updateMoldModelMaster

폼 저장 영역 마스터 갱신

기존 폼 저장 영역 마스터의 설명, 메타데이터, 폼 모델 참조, 초기 최대 용량, 최대 용량을 갱신합니다.
저장 영역 모델 이름은 생성 후 변경할 수 없습니다.
변경 사항은 CurrentFormMaster API에서 마스터 데이터를 다시 활성화할 때까지 반영되지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
moldModelNamestring
~ 128자폼 저장 영역 모델 이름
폼 저장 영역 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
metadatastring~ 2048자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
formModelNamestring
~ 128자폼 모델 이름
initialMaxCapacityint
1 ~ 2147483646폼을 저장할 수 있는 초기 캐파시티
이 저장 영역에서 각 플레이어가 이용할 수 있는 기본 폼 저장 슬롯 수입니다. 예를 들어 3으로 설정하면 플레이어는 초기 상태에서 최대 3개의 서로 다른 편성(예: 「불 속성 파티」「물 속성 파티」「바람 속성 파티」)을 저장할 수 있습니다. 플레이어별로 maxCapacity까지 확장할 수 있습니다.
maxCapacityint
1 ~ 2147483646폼을 저장할 수 있는 최대 캐파시티
이 저장 영역에서 플레이어별 폼 저장 슬롯 수의 절대적인 상한입니다. 캐파시티 확장 조작을 수행하더라도 캐파시티는 이 값을 초과할 수 없습니다. initialMaxCapacity 이상의 값이어야 합니다.

Result

타입설명
itemMoldModelMaster갱신한 폼 저장 영역 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.UpdateMoldModelMaster(
    &formation.UpdateMoldModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MoldModelName: pointy.String("mold-0001"),
        Description: nil,
        Metadata: nil,
        FormModelName: pointy.String("formModel-0001"),
        InitialMaxCapacity: pointy.Int32(5),
        MaxCapacity: pointy.Int32(15),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\UpdateMoldModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->updateMoldModelMaster(
        (new UpdateMoldModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMoldModelName("mold-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withFormModelName("formModel-0001")
            ->withInitialMaxCapacity(5)
            ->withMaxCapacity(15)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.UpdateMoldModelMasterRequest;
import io.gs2.formation.result.UpdateMoldModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    UpdateMoldModelMasterResult result = client.updateMoldModelMaster(
        new UpdateMoldModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
            .withDescription(null)
            .withMetadata(null)
            .withFormModelName("formModel-0001")
            .withInitialMaxCapacity(5)
            .withMaxCapacity(15)
    );
    MoldModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.UpdateMoldModelMasterResult> asyncResult = null;
yield return client.UpdateMoldModelMaster(
    new Gs2.Gs2Formation.Request.UpdateMoldModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMoldModelName("mold-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithFormModelName("formModel-0001")
        .WithInitialMaxCapacity(5)
        .WithMaxCapacity(15),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.updateMoldModelMaster(
        new Gs2Formation.UpdateMoldModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
            .withDescription(null)
            .withMetadata(null)
            .withFormModelName("formModel-0001")
            .withInitialMaxCapacity(5)
            .withMaxCapacity(15)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.update_mold_model_master(
        formation.UpdateMoldModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mold_model_name('mold-0001')
            .with_description(None)
            .with_metadata(None)
            .with_form_model_name('formModel-0001')
            .with_initial_max_capacity(5)
            .with_max_capacity(15)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.update_mold_model_master({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
    description=nil,
    metadata=nil,
    formModelName="formModel-0001",
    initialMaxCapacity=5,
    maxCapacity=15,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('formation')

api_result_handler = client.update_mold_model_master_async({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
    description=nil,
    metadata=nil,
    formModelName="formModel-0001",
    initialMaxCapacity=5,
    maxCapacity=15,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

deleteMoldModelMaster

폼 저장 영역 마스터 삭제

편집 가능한 폼 저장 영역 마스터 정의를 삭제합니다.
마스터 데이터만 영향을 받으며, 현재 활성화(공개)되어 있는 모델은 마스터 데이터가 다시 활성화될 때까지 영향을 받지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
moldModelNamestring
~ 128자폼 저장 영역 모델 이름
폼 저장 영역 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.

Result

타입설명
itemMoldModelMaster삭제한 폼 저장 영역 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeleteMoldModelMaster(
    &formation.DeleteMoldModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        MoldModelName: pointy.String("mold-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeleteMoldModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deleteMoldModelMaster(
        (new DeleteMoldModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMoldModelName("mold-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeleteMoldModelMasterRequest;
import io.gs2.formation.result.DeleteMoldModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DeleteMoldModelMasterResult result = client.deleteMoldModelMaster(
        new DeleteMoldModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
    );
    MoldModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DeleteMoldModelMasterResult> asyncResult = null;
yield return client.DeleteMoldModelMaster(
    new Gs2.Gs2Formation.Request.DeleteMoldModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMoldModelName("mold-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.deleteMoldModelMaster(
        new Gs2Formation.DeleteMoldModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMoldModelName("mold-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.delete_mold_model_master(
        formation.DeleteMoldModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mold_model_name('mold-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.delete_mold_model_master({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('formation')

api_result_handler = client.delete_mold_model_master_async({
    namespaceName="namespace-0001",
    moldModelName="mold-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

describePropertyFormModelMasters

프로퍼티 폼 모델 마스터 목록 조회

이름 접두사 필터링이 가능한, 편집 가능한 프로퍼티 폼 모델 마스터의 페이지네이션 목록을 조회합니다.
프로퍼티 폼 모델 마스터는 프로퍼티 폼의 슬롯 구조를 정의합니다. 마스터에 대한 변경 사항은 CurrentFormMaster API로 마스터 데이터를 활성화할 때까지 반영되지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
namePrefixstring~ 64자프로퍼티 폼 모델 이름 필터 접두사
pageTokenstring~ 1024자데이터 취득을 시작할 위치를 지정하는 토큰
limitint301 ~ 1000취득할 데이터 건수

Result

타입설명
itemsList<PropertyFormModelMaster>폼 모델 마스터 목록
nextPageTokenstring목록의 나머지를 취득하기 위한 페이지 토큰

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DescribePropertyFormModelMasters(
    &formation.DescribePropertyFormModelMastersRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DescribePropertyFormModelMastersRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->describePropertyFormModelMasters(
        (new DescribePropertyFormModelMastersRequest())
            ->withNamespaceName("namespace-0001")
            ->withNamePrefix(null)
            ->withPageToken(null)
            ->withLimit(null)
    );
    $items = $result->getItems();
    $nextPageToken = $result->getNextPageToken();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DescribePropertyFormModelMastersRequest;
import io.gs2.formation.result.DescribePropertyFormModelMastersResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DescribePropertyFormModelMastersResult result = client.describePropertyFormModelMasters(
        new DescribePropertyFormModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<PropertyFormModelMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DescribePropertyFormModelMastersResult> asyncResult = null;
yield return client.DescribePropertyFormModelMasters(
    new Gs2.Gs2Formation.Request.DescribePropertyFormModelMastersRequest()
        .WithNamespaceName("namespace-0001")
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.describePropertyFormModelMasters(
        new Gs2Formation.DescribePropertyFormModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.describe_property_form_model_masters(
        formation.DescribePropertyFormModelMastersRequest()
            .with_namespace_name('namespace-0001')
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.describe_property_form_model_masters({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;
client = gs2('formation')

api_result_handler = client.describe_property_form_model_masters_async({
    namespaceName="namespace-0001",
    namePrefix=nil,
    pageToken=nil,
    limit=nil,
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
items = result.items;
nextPageToken = result.nextPageToken;

createPropertyFormModelMaster

프로퍼티 폼 모델 마스터 신규 작성

이름과 슬롯 정의를 가진 새로운 편집 가능한 프로퍼티 폼 모델 마스터 정의를 생성합니다.
프로퍼티 폼 모델은 폼 모델과 유사하지만, 폼 저장 영역 내 인덱스가 아닌 커스텀 프로퍼티 ID로 식별되는 프로퍼티 폼에 사용됩니다.
변경 사항은 CurrentFormMaster API로 마스터 데이터를 활성화할 때까지 반영되지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
namestring
~ 128자프로퍼티 폼 모델 이름
프로퍼티 폼 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
metadatastring~ 2048자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
slotsList<SlotModel>
1 ~ 10 items슬롯 모델 목록
이 프로퍼티 폼의 슬롯 정의를 순서대로 나열한 목록입니다. 캐파시티에 의해 폼 수가 제한되는 Mold/Form과 달리, 프로퍼티 폼은 프로퍼티 ID로 식별되며 보유하는 리소스마다 존재할 수 있습니다. 슬롯 이름은 폼 내에서 고유해야 합니다.

Result

타입설명
itemPropertyFormModelMaster생성한 폼 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.CreatePropertyFormModelMaster(
    &formation.CreatePropertyFormModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("form-0001"),
        Description: nil,
        Metadata: nil,
        Slots: []formation.SlotModel{
            formation.SlotModel{
                Name: pointy.String("slot-0001"),
                PropertyRegex: pointy.String(".*"),
            },
            formation.SlotModel{
                Name: pointy.String("slot-0002"),
                PropertyRegex: pointy.String(".*"),
                Metadata: pointy.String("METADATA_0002"),
            },
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\CreatePropertyFormModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->createPropertyFormModelMaster(
        (new CreatePropertyFormModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("form-0001")
            ->withDescription(null)
            ->withMetadata(null)
            ->withSlots([
                (new \Gs2\Formation\Model\SlotModel())
                    ->withName("slot-0001")
                    ->withPropertyRegex(".*"),
                (new \Gs2\Formation\Model\SlotModel())
                    ->withName("slot-0002")
                    ->withPropertyRegex(".*")
                    ->withMetadata("METADATA_0002"),
            ])
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.CreatePropertyFormModelMasterRequest;
import io.gs2.formation.result.CreatePropertyFormModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    CreatePropertyFormModelMasterResult result = client.createPropertyFormModelMaster(
        new CreatePropertyFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("form-0001")
            .withDescription(null)
            .withMetadata(null)
            .withSlots(Arrays.asList(
                new io.gs2.formation.model.SlotModel()
                    .withName("slot-0001")
                    .withPropertyRegex(".*"),
                new io.gs2.formation.model.SlotModel()
                    .withName("slot-0002")
                    .withPropertyRegex(".*")
                    .withMetadata("METADATA_0002")
            ))
    );
    PropertyFormModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.CreatePropertyFormModelMasterResult> asyncResult = null;
yield return client.CreatePropertyFormModelMaster(
    new Gs2.Gs2Formation.Request.CreatePropertyFormModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("form-0001")
        .WithDescription(null)
        .WithMetadata(null)
        .WithSlots(new Gs2.Gs2Formation.Model.SlotModel[] {
            new Gs2.Gs2Formation.Model.SlotModel()
                .WithName("slot-0001")
                .WithPropertyRegex(".*"),
            new Gs2.Gs2Formation.Model.SlotModel()
                .WithName("slot-0002")
                .WithPropertyRegex(".*")
                .WithMetadata("METADATA_0002"),
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.createPropertyFormModelMaster(
        new Gs2Formation.CreatePropertyFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("form-0001")
            .withDescription(null)
            .withMetadata(null)
            .withSlots([
                new Gs2Formation.model.SlotModel()
                    .withName("slot-0001")
                    .withPropertyRegex(".*"),
                new Gs2Formation.model.SlotModel()
                    .withName("slot-0002")
                    .withPropertyRegex(".*")
                    .withMetadata("METADATA_0002"),
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.create_property_form_model_master(
        formation.CreatePropertyFormModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_name('form-0001')
            .with_description(None)
            .with_metadata(None)
            .with_slots([
                formation.SlotModel()
                    .with_name('slot-0001')
                    .with_property_regex('.*'),
                formation.SlotModel()
                    .with_name('slot-0002')
                    .with_property_regex('.*')
                    .with_metadata('METADATA_0002'),
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.create_property_form_model_master({
    namespaceName="namespace-0001",
    name="form-0001",
    description=nil,
    metadata=nil,
    slots={
        {
            name="slot-0001",
            propertyRegex=".*",
        },
        {
            name="slot-0002",
            propertyRegex=".*",
            metadata="METADATA_0002",
        }
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('formation')

api_result_handler = client.create_property_form_model_master_async({
    namespaceName="namespace-0001",
    name="form-0001",
    description=nil,
    metadata=nil,
    slots={
        {
            name="slot-0001",
            propertyRegex=".*",
        },
        {
            name="slot-0002",
            propertyRegex=".*",
            metadata="METADATA_0002",
        }
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

getPropertyFormModelMaster

프로퍼티 폼 모델 마스터 조회

이름을 지정하여 특정 편집 가능한 프로퍼티 폼 모델 마스터의 상세 정보를 조회합니다.
활성화 전 마스터 정의의 열람·편집에 사용합니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
propertyFormModelNamestring
~ 128자프로퍼티 폼 모델 이름
프로퍼티 폼 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.

Result

타입설명
itemPropertyFormModelMaster폼 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.GetPropertyFormModelMaster(
    &formation.GetPropertyFormModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\GetPropertyFormModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->getPropertyFormModelMaster(
        (new GetPropertyFormModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withPropertyFormModelName("form-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.GetPropertyFormModelMasterRequest;
import io.gs2.formation.result.GetPropertyFormModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    GetPropertyFormModelMasterResult result = client.getPropertyFormModelMaster(
        new GetPropertyFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withPropertyFormModelName("form-0001")
    );
    PropertyFormModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.GetPropertyFormModelMasterResult> asyncResult = null;
yield return client.GetPropertyFormModelMaster(
    new Gs2.Gs2Formation.Request.GetPropertyFormModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithPropertyFormModelName("form-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.getPropertyFormModelMaster(
        new Gs2Formation.GetPropertyFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withPropertyFormModelName("form-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.get_property_form_model_master(
        formation.GetPropertyFormModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_property_form_model_name('form-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.get_property_form_model_master({
    namespaceName="namespace-0001",
    propertyFormModelName="form-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('formation')

api_result_handler = client.get_property_form_model_master_async({
    namespaceName="namespace-0001",
    propertyFormModelName="form-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

updatePropertyFormModelMaster

프로퍼티 폼 모델 마스터 업데이트

기존 프로퍼티 폼 모델 마스터의 설명, 메타데이터, 슬롯 정의를 업데이트합니다.
프로퍼티 폼 모델 이름은 생성 후 변경할 수 없습니다.
변경 사항은 CurrentFormMaster API로 마스터 데이터를 다시 활성화할 때까지 반영되지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
propertyFormModelNamestring
~ 128자프로퍼티 폼 모델 이름
프로퍼티 폼 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.
descriptionstring~ 1024자설명문
metadatastring~ 2048자메타데이터
메타데이터에는 임의의 값을 설정할 수 있습니다.
이 값들은 GS2의 동작에는 영향을 주지 않으므로, 게임 내에서 사용하는 정보를 저장하는 용도로 사용할 수 있습니다.
slotsList<SlotModel>
1 ~ 10 items슬롯 모델 목록
이 프로퍼티 폼의 슬롯 정의를 순서대로 나열한 목록입니다. 캐파시티에 의해 폼 수가 제한되는 Mold/Form과 달리, 프로퍼티 폼은 프로퍼티 ID로 식별되며 보유하는 리소스마다 존재할 수 있습니다. 슬롯 이름은 폼 내에서 고유해야 합니다.

Result

타입설명
itemPropertyFormModelMaster갱신한 폼 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.UpdatePropertyFormModelMaster(
    &formation.UpdatePropertyFormModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
        Description: pointy.String("description1"),
        Metadata: pointy.String("FORM_0001"),
        Slots: []formation.SlotModel{
            formation.SlotModel{
                Name: pointy.String("slot-1101"),
            },
            formation.SlotModel{
                Name: pointy.String("slot-1102"),
                Metadata: pointy.String("METADATA_1102"),
            },
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\UpdatePropertyFormModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->updatePropertyFormModelMaster(
        (new UpdatePropertyFormModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withPropertyFormModelName("form-0001")
            ->withDescription("description1")
            ->withMetadata("FORM_0001")
            ->withSlots([
                (new \Gs2\Formation\Model\SlotModel())
                    ->withName("slot-1101"),
                (new \Gs2\Formation\Model\SlotModel())
                    ->withName("slot-1102")
                    ->withMetadata("METADATA_1102"),
            ])
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.UpdatePropertyFormModelMasterRequest;
import io.gs2.formation.result.UpdatePropertyFormModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    UpdatePropertyFormModelMasterResult result = client.updatePropertyFormModelMaster(
        new UpdatePropertyFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withPropertyFormModelName("form-0001")
            .withDescription("description1")
            .withMetadata("FORM_0001")
            .withSlots(Arrays.asList(
                new io.gs2.formation.model.SlotModel()
                    .withName("slot-1101"),
                new io.gs2.formation.model.SlotModel()
                    .withName("slot-1102")
                    .withMetadata("METADATA_1102")
            ))
    );
    PropertyFormModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.UpdatePropertyFormModelMasterResult> asyncResult = null;
yield return client.UpdatePropertyFormModelMaster(
    new Gs2.Gs2Formation.Request.UpdatePropertyFormModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithPropertyFormModelName("form-0001")
        .WithDescription("description1")
        .WithMetadata("FORM_0001")
        .WithSlots(new Gs2.Gs2Formation.Model.SlotModel[] {
            new Gs2.Gs2Formation.Model.SlotModel()
                .WithName("slot-1101"),
            new Gs2.Gs2Formation.Model.SlotModel()
                .WithName("slot-1102")
                .WithMetadata("METADATA_1102"),
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.updatePropertyFormModelMaster(
        new Gs2Formation.UpdatePropertyFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withPropertyFormModelName("form-0001")
            .withDescription("description1")
            .withMetadata("FORM_0001")
            .withSlots([
                new Gs2Formation.model.SlotModel()
                    .withName("slot-1101"),
                new Gs2Formation.model.SlotModel()
                    .withName("slot-1102")
                    .withMetadata("METADATA_1102"),
            ])
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.update_property_form_model_master(
        formation.UpdatePropertyFormModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_property_form_model_name('form-0001')
            .with_description('description1')
            .with_metadata('FORM_0001')
            .with_slots([
                formation.SlotModel()
                    .with_name('slot-1101'),
                formation.SlotModel()
                    .with_name('slot-1102')
                    .with_metadata('METADATA_1102'),
            ])
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.update_property_form_model_master({
    namespaceName="namespace-0001",
    propertyFormModelName="form-0001",
    description="description1",
    metadata="FORM_0001",
    slots={
        {
            name="slot-1101",
        },
        {
            name="slot-1102",
            metadata="METADATA_1102",
        }
    },
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('formation')

api_result_handler = client.update_property_form_model_master_async({
    namespaceName="namespace-0001",
    propertyFormModelName="form-0001",
    description="description1",
    metadata="FORM_0001",
    slots={
        {
            name="slot-1101",
        },
        {
            name="slot-1102",
            metadata="METADATA_1102",
        }
    },
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;

deletePropertyFormModelMaster

프로퍼티 폼 모델 마스터 삭제

편집 가능한 프로퍼티 폼 모델 마스터 정의를 삭제합니다.
마스터 데이터만 영향을 받으며, 현재 활성화(공개)되어 있는 모델은 마스터 데이터가 다시 활성화될 때까지 영향을 받지 않습니다.

상세

Request

타입활성화 조건필수기본값값 제한설명
namespaceNamestring
~ 128자네임스페이스 이름
네임스페이스 고유의 이름입니다. 영숫자 및 -(하이픈) _(언더스코어) .(마침표)로 지정합니다.
propertyFormModelNamestring
~ 128자프로퍼티 폼 모델 이름
프로퍼티 폼 모델 고유의 이름입니다. 영숫자 및 -(하이픈), _(언더스코어), .(마침표)로 지정합니다.

Result

타입설명
itemPropertyFormModelMaster삭제한 폼 모델 마스터

구현 예제

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/formation"
import "github.com/openlyinc/pointy"

session := core.Gs2RestSession{
    Credential: &core.BasicGs2Credential{
        ClientId: "your client id",
        ClientSecret: "your client secret",
    },
    Region: core.ApNortheast1,
}

if err := session.Connect(); err != nil {
    panic("error occurred")
}

client := formation.Gs2FormationRestClient{
    Session: &session,
}
result, err := client.DeletePropertyFormModelMaster(
    &formation.DeletePropertyFormModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        PropertyFormModelName: pointy.String("form-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Formation\Gs2FormationRestClient;
use Gs2\Formation\Request\DeletePropertyFormModelMasterRequest;

$session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region::AP_NORTHEAST_1
);

$session->open();

$client = new Gs2FormationRestClient(
    $session
);

try {
    $result = $client->deletePropertyFormModelMaster(
        (new DeletePropertyFormModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withPropertyFormModelName("form-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}
import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.formation.rest.Gs2FormationRestClient;
import io.gs2.formation.request.DeletePropertyFormModelMasterRequest;
import io.gs2.formation.result.DeletePropertyFormModelMasterResult;

Gs2RestSession session = new Gs2RestSession(
    Region.AP_NORTHEAST_1,
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    )
);
session.connect();
Gs2FormationRestClient client = new Gs2FormationRestClient(session);

try {
    DeletePropertyFormModelMasterResult result = client.deletePropertyFormModelMaster(
        new DeletePropertyFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withPropertyFormModelName("form-0001")
    );
    PropertyFormModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}
using Gs2.Core;
using Gs2.Core.Model;
using Gs2.Core.Net;
using Gs2.Core.Exception;

var session = new Gs2RestSession(
    new BasicGs2Credential(
        "your client id",
        "your client secret"
    ),
    Region.ApNortheast1
);
yield return session.OpenAsync(r => { });
var client = new Gs2FormationRestClient(session);

AsyncResult<Gs2.Gs2Formation.Result.DeletePropertyFormModelMasterResult> asyncResult = null;
yield return client.DeletePropertyFormModelMaster(
    new Gs2.Gs2Formation.Request.DeletePropertyFormModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithPropertyFormModelName("form-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;
import Gs2Core from '@/gs2/core';
import * as Gs2Formation from '@/gs2/formation';

const session = new Gs2Core.Gs2RestSession(
    "ap-northeast-1",
    new Gs2Core.BasicGs2Credential(
        'your client id',
        'your client secret'
    )
);
await session.connect();
const client = new Gs2Formation.Gs2FormationRestClient(session);

try {
    const result = await client.deletePropertyFormModelMaster(
        new Gs2Formation.DeletePropertyFormModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withPropertyFormModelName("form-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}
from gs2 import core
from gs2 import formation

session = core.Gs2RestSession(
    core.BasicGs2Credential(
        'your client id',
        'your client secret'
    ),
    "ap-northeast-1",
)
session.connect()
client = formation.Gs2FormationRestClient(session)

try:
    result = client.delete_property_form_model_master(
        formation.DeletePropertyFormModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_property_form_model_name('form-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)
client = gs2('formation')

api_result = client.delete_property_form_model_master({
    namespaceName="namespace-0001",
    propertyFormModelName="form-0001",
})

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;
client = gs2('formation')

api_result_handler = client.delete_property_form_model_master_async({
    namespaceName="namespace-0001",
    propertyFormModelName="form-0001",
})

api_result = api_result_handler()  -- Call the handler to get the result

if(api_result.isError) then
    -- When error occurs
    fail(api_result['statusCode'], api_result['errorMessage'])
end

result = api_result.result
item = result.item;