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

# GS2-Dictionary SDK API リファレンス

各種プログラミング言語向け GS2-Dictionary SDK の モデルの仕様 と API のリファレンス



## モデル

### Namespace

ネームスペース<br>

ネームスペースは、一つのプロジェクト内で同じサービスを異なる用途で複数利用するためのエンティティです。<br>
GS2 の各サービスはネームスペース単位で管理されます。ネームスペースが異なれば、同じサービスでも完全に独立したデータ空間として扱われます。<br>

そのため、各サービスの利用を開始するにあたってネームスペースを作成する必要があります。



|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceId | string |  | ※ |  |  ~ 1024文字 | ネームスペースGRN<br>※ サーバーが自動で設定 |
| name | string |  | ✓ |  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| description | string |  |  |  |  ~ 1024文字 | 説明文 |
| transactionSetting | [TransactionSetting](#transactionsetting) |  |  |  |  | トランザクション設定<br>図鑑エントリー登録処理時の分散トランザクションの実行方法を制御する設定です。自動実行、アトミックコミット、非同期処理などのオプションをサポートします。 |
| entryScript | [ScriptSetting](#scriptsetting) |  |  |  |  | エントリー登録時に実行するスクリプトの設定<br>Script トリガーリファレンス - [`entry`](../script/#entry) |
| duplicateEntryScript | string |  |  |  |  ~ 1024文字 | 登録済みのエントリーを再度登録しようとしたときに実行するスクリプトGRN<br>Script トリガーリファレンス - [`duplicateEntry`](../script/#duplicateentry) |
| logSetting | [LogSetting](#logsetting) |  |  |  |  | ログの出力設定<br>図鑑操作のログデータを GS2-Log に出力するための設定です。GS2-Log のネームスペースを指定することで、エントリー登録・お気に入り操作など図鑑関連の API リクエスト・レスポンスログを収集できます。 |
| createdAt | long |  | ※ | 現在時刻 |  | 作成日時<br>UNIX 時間・ミリ秒<br>※ サーバーが自動で設定 |
| updatedAt | long |  | ※ | 現在時刻 |  | 最終更新日時<br>UNIX 時間・ミリ秒<br>※ サーバーが自動で設定 |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | リビジョン |

**関連するメソッド:**
describeNamespaces - ネームスペースの一覧を取得
createNamespace - ネームスペースを新規作成
getNamespace - ネームスペースを取得
updateNamespace - ネームスペースを更新
deleteNamespace - ネームスペースを削除




---

### TransactionSetting

トランザクション設定<br>

トランザクション設定は、トランザクションの実行方法・整合性・非同期処理・競合回避の仕組みを制御する設定です。<br>
自動実行（AutoRun）、アトミック実行（AtomicCommit）、GS2-Distributor を利用した非同期実行、スクリプト結果の一括適用、GS2-JobQueue による入手アクションの非同期化などを組み合わせ、ゲームロジックに応じた堅牢なトランザクション管理を可能にします。



|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| enableAutoRun | bool |  |  | false |  | 発行したトランザクションをサーバーサイドで自動的に実行するか |
| enableAtomicCommit | bool | {enableAutoRun} == true |  | false |  | トランザクションの実行をアトミックにコミットするか<br>※ enableAutoRun が true であれば 有効 |
| transactionUseDistributor | bool | {enableAtomicCommit} == true |  | false |  | トランザクションを非同期処理で実行する<br>※ enableAtomicCommit が true であれば 有効 |
| commitScriptResultInUseDistributor | bool | {transactionUseDistributor} == true |  | false |  | スクリプトの結果コミット処理を非同期処理で実行するか<br>※ transactionUseDistributor が true であれば 有効 |
| acquireActionUseJobQueue | bool | {enableAtomicCommit} == true |  | false |  | 入手アクションを実行する際に GS2-JobQueue を使用するか<br>※ enableAtomicCommit が true であれば 有効 |
| distributorNamespaceId | string |  |  | "grn:gs2:{region}:{ownerId}:distributor:default" |  ~ 1024文字 | トランザクションの実行に使用する GS2-Distributor ネームスペースGRN |
| queueNamespaceId | string |  |  | "grn:gs2:{region}:{ownerId}:queue:default" |  ~ 1024文字 | トランザクションの実行に使用する GS2-JobQueue のネームスペースGRN |

**関連するメソッド:**
createNamespace - ネームスペースを新規作成
updateNamespace - ネームスペースを更新


**関連するモデル:**
Namespace - ネームスペース




---

### ScriptSetting

スクリプト設定<br>

GS2 ではマイクロサービスのイベントに関連づけて、カスタムスクリプトを実行することができます。<br>
このモデルは、スクリプトの実行をトリガーするための設定を保持します。<br>

スクリプトの実行方式は大きく2種類あり、それは「同期実行」と「非同期実行」です。<br>
同期実行は、スクリプトの実行が完了するまで処理がブロックされます。<br>
代わりに、スクリプトの実行結果を使って API の実行を止めたり、API のレスポンス内容を制御することができます。<br>

一方、非同期実行ではスクリプトの完了を待つために処理がブロックされることはありません。<br>
ただし、スクリプトの実行結果を利用して API の実行を停止したり、API の応答内容を変更することはできません。<br>
非同期実行は API の応答フローに影響を与えないため、原則として非同期実行を推奨します。<br>

非同期実行には実行方式が2種類あり、GS2-Script と Amazon EventBridge があります。<br>
Amazon EventBridge を使用することで、Lua 以外の言語で処理を記述することができます。



|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| triggerScriptId | string |  |  |  |  ~ 1024文字 | API 実行時に同期的に実行される GS2-Script のスクリプトGRN<br>「grn:gs2:」ではじまる GRN 形式のIDで指定する必要があります。 |
| doneTriggerTargetType | 文字列列挙型<br>enum {<br>&nbsp;&nbsp;"none",<br>&nbsp;&nbsp;"gs2_script",<br>&nbsp;&nbsp;"aws"<br>}<br> |  |  | "none" |  | 非同期スクリプトの実行方法<br>非同期実行で使用するスクリプトの種類を指定します。<br>「非同期実行のスクリプトを使用しない(none)」「GS2-Scriptを使用する(gs2_script)」「Amazon EventBridgeを使用する(aws)」が選択できます。"none": なし / "gs2_script": GS2-Script / "aws": Amazon EventBridge /  |
| doneTriggerScriptId | string | {doneTriggerTargetType} == "gs2_script" |  |  |  ~ 1024文字 | 非同期実行する GS2-Script スクリプトGRN<br>「grn:gs2:」ではじまる GRN 形式のIDで指定する必要があります。<br>※ doneTriggerTargetType が "gs2_script" であれば 有効 |
| doneTriggerQueueNamespaceId | string | {doneTriggerTargetType} == "gs2_script" |  |  |  ~ 1024文字 | 非同期実行スクリプトを実行する GS2-JobQueue ネームスペースGRN<br>非同期実行スクリプトを直接実行するのではなく、GS2-JobQueue を経由する場合は GS2-JobQueue のネームスペースGRN を指定します。<br>GS2-JobQueue を利用する理由は多くはありませんので、特に理由がなければ指定する必要はありません。<br>※ doneTriggerTargetType が "gs2_script" であれば 有効 |

**関連するメソッド:**
createNamespace - ネームスペースを新規作成
updateNamespace - ネームスペースを更新


**関連するモデル:**
Namespace - ネームスペース




---

### LogSetting

ログの出力設定<br>

ログデータの出力設定を管理します。この型は、ログデータを書き出すために使用されるログネームスペースの識別子（Namespace ID）を保持します。<br>
ログネームスペースIDは、ログデータを集約し、保存する対象の GS2-Log のネームスペースを指定します。<br>
この設定を通じて、このネームスペース以下のAPIリクエスト・レスポンスログデータが対象の GS2-Log へ出力されるようになります。<br>
GS2-Log にはリアルタイムでログが提供され、システムの監視や分析、デバッグなどに利用できます。



|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| loggingNamespaceId | string |  | ✓ |  |  ~ 1024文字 | ログを出力する GS2-Log のネームスペースGRN<br>「grn:gs2:」ではじまる GRN 形式のIDで指定する必要があります。 |

**関連するメソッド:**
createNamespace - ネームスペースを新規作成
updateNamespace - ネームスペースを更新


**関連するモデル:**
Namespace - ネームスペース




---

### GitHubCheckoutSetting

GitHubからマスターデータをチェックアウトする設定



|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| apiKeyId | string |  | ✓ |  |  ~ 1024文字 | GitHub APIキーのGRN |
| repositoryName | string |  | ✓ |  |  ~ 1024文字 | リポジトリ名 |
| sourcePath | string |  | ✓ |  |  ~ 1024文字 | マスターデータ（JSON）ファイルのパス |
| referenceType | 文字列列挙型<br>enum {<br>&nbsp;&nbsp;"commit_hash",<br>&nbsp;&nbsp;"branch",<br>&nbsp;&nbsp;"tag"<br>}<br> |  | ✓ |  |  | コードの取得元"commit_hash": コミットハッシュ / "branch": ブランチ / "tag": タグ /  |
| commitHash | string | {referenceType} == "commit_hash" | ✓※ |  |  ~ 1024文字 | コミットハッシュ<br>※ referenceType が "commit_hash" であれば 必須 |
| branchName | string | {referenceType} == "branch" | ✓※ |  |  ~ 1024文字 | ブランチ名<br>※ referenceType が "branch" であれば 必須 |
| tagName | string | {referenceType} == "tag" | ✓※ |  |  ~ 1024文字 | タグ名<br>※ referenceType が "tag" であれば 必須 |

**関連するメソッド:**
updateCurrentEntryMasterFromGitHub - 現在アクティブなエントリーモデルのマスターデータをGitHubから更新




---

### Entry

ゲームプレイヤーが入手したエントリー<br>

ゲームプレイヤーが収集した図鑑エントリーの1件を表します。各エントリーは EntryModel に対応し、入手日時を記録します。所持状態は「存在する（収集済み）/ 存在しない」の2値で管理され、数量の概念はありません。



|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| entryId | string |  | ※ |  |  ~ 1024文字 | エントリーGRN<br>※ サーバーが自動で設定 |
| userId | string |  |  |  |  ~ 128文字 | ユーザーID |
| name | string |  | ✓ |  |  ~ 128文字 | エントリーモデル名<br>エントリーモデル固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| acquiredAt | long |  | ※ | 現在時刻 |  | 入手日時<br>このエントリーがゲームプレイヤーによって初めて収集された日時です。登録時に現在時刻が自動的に設定され、その後変更することはできません。 |

**関連するメソッド:**
describeEntries - エントリーの一覧を取得
describeEntriesByUserId - ユーザーIDを指定してエントリーの一覧を取得
addEntriesByUserId - ユーザーIDを指定してエントリーを登録
getEntry - エントリーを取得
getEntryByUserId - ユーザーIDを指定してエントリーを取得
getEntryWithSignature - 署名付きでエントリーを取得
getEntryWithSignatureByUserId - ユーザーIDを指定して署名付きでエントリーを取得
deleteEntries - エントリーを削除
deleteEntriesByUserId - ユーザーIDを指定してエントリーを削除




---

### Like

お気に入りに登録したエントリー<br>

ゲームプレイヤーがお気に入り（いいね）に登録した図鑑エントリーを表します。プレイヤーが図鑑内の特定のエントリーをブックマークしてすぐにアクセスできるようにします。各お気に入りは EntryModel を名前で参照し、ユーザーごとに一意です。同じエントリーを重複してお気に入りに登録することはできません。



|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| likeId | string |  | ※ |  |  ~ 1024文字 | お気に入りエントリーGRN<br>※ サーバーが自動で設定 |
| userId | string |  |  |  |  ~ 128文字 | ユーザーID |
| name | string |  | ✓ |  |  ~ 128文字 | エントリーモデル名<br>エントリーモデル固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |

**関連するメソッド:**
describeLikes - お気に入りエントリーの一覧を取得
describeLikesByUserId - ユーザーIDを指定してお気に入りエントリーの一覧を取得
addLikes - お気に入りエントリーを追加
addLikesByUserId - ユーザーIDを指定してお気に入りエントリーを追加
getLike - お気に入りエントリーを取得
getLikeByUserId - ユーザーIDを指定してお気に入りエントリーを取得
deleteLikes - お気に入りエントリーを削除
deleteLikesByUserId - ユーザーIDを指定してお気に入りエントリーを削除




---

### EntryModel

エントリーモデル<br>

エントリーモデルは、GS2-Dictionary において図鑑に記録可能な対象を定義するマスターデータです。<br>
各エントリーモデルは、モンスターやアイテム、アバターパーツなど、図鑑に記録されるエンティティの種類を表します。<br>

エントリーの所持状態は「記録済み / 未記録」の2値で管理され、同一エントリーモデルに対して数量やスタックの概念はありません。



|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| entryModelId | string |  | ※ |  |  ~ 1024文字 | エントリーモデルGRN<br>※ サーバーが自動で設定 |
| name | string |  | ✓ |  |  ~ 128文字 | エントリーモデル名 |
| metadata | string |  |  |  |  ~ 2048文字 | メタデータ<br>メタデータには任意の値を設定できます。<br>これらの値は GS2 の動作には影響しないため、ゲーム内で利用する情報の保存先として使用できます。 |

**関連するメソッド:**
describeEntryModels - エントリーモデルの一覧を取得
getEntryModel - エントリーモデルを取得




---

### Config

コンフィグ設定<br>

分散トランザクション実行時にトランザクション変数に適用されるキーと値のペアです。実行時にトランザクションパラメータ内のプレースホルダー値を動的に置換できます。



|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| key | string |  | ✓ |  |  ~ 64文字 | 名前<br>トランザクションパラメータ内のプレースホルダーキーとして使用される変数名です。トランザクションテンプレートで定義されたプレースホルダーと一致する必要があります。 |
| value | string |  |  |  |  ~ 51200文字 | 値<br>トランザクション実行時にプレースホルダーキーに代入する値です。トランザクションパラメータ内の対応するプレースホルダーがこの値に置換されます。 |



---

### CurrentEntryMaster

現在アクティブなエントリーモデルのマスターデータ<br>

現在ネームスペース内で有効な、エントリーモデルの定義を記述したマスターデータです。<br>
GS2ではマスターデータの管理にJSON形式のファイルを使用します。<br>
ファイルをアップロードすることで、実際にサーバーに設定を反映することができます。<br>

JSONファイルを作成する方法として、マネージメントコンソール内にマスターデータエディタを提供しています。<br>
また、よりゲームの運営に相応しいツールを作成し、適切なフォーマットのJSONファイルを書き出すことでもサービスを利用可能です。
{{% alert title="Note" color="info" %}}
JSONファイルの形式については [GS2-Dictionary マスターデータリファレンス](api_reference/dictionary/master_data/) をご参照ください。
{{% /alert %}}



|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceId | string |  | ※ |  |  ~ 1024文字 | ネームスペースGRN<br>※ サーバーが自動で設定 |
| settings | string |  | ✓ |  |  ~ 5242880 バイト (5MB) | マスターデータ |

**関連するメソッド:**
exportMaster - エントリーモデルマスターを有効化可能なマスターデータ形式でエクスポート
getCurrentEntryMaster - 現在アクティブなエントリーモデルのマスターデータを取得
updateCurrentEntryMaster - 現在アクティブなエントリーモデルのマスターデータを更新
updateCurrentEntryMasterFromGitHub - 現在アクティブなエントリーモデルのマスターデータをGitHubから更新




---

### EntryModelMaster

エントリーモデルマスター<br>

エントリーモデルマスターは、ゲーム内で使用されるエントリーモデルの編集・管理用データで、マネージメントコンソールのマスターデータエディタで一時的に保持されます。<br>
インポート・更新処理を行うことで、実際にゲームから参照される配信モデルとして反映されます。<br>

エントリーモデルは、GS2-Dictionary において図鑑に記録可能な対象を定義するマスターデータです。<br>
各エントリーモデルは、モンスターやアイテム、アバターパーツなど、図鑑に記録されるエンティティの種類を表します。<br>

エントリーの所持状態は「記録済み / 未記録」の2値で管理され、同一エントリーモデルに対して数量やスタックの概念はありません。



|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| entryModelId | string |  | ※ |  |  ~ 1024文字 | エントリーモデルマスターGRN<br>※ サーバーが自動で設定 |
| name | string |  | ✓ |  |  ~ 128文字 | エントリーモデル名<br>エントリーモデル固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| description | string |  |  |  |  ~ 1024文字 | 説明文 |
| metadata | string |  |  |  |  ~ 2048文字 | メタデータ<br>メタデータには任意の値を設定できます。<br>これらの値は GS2 の動作には影響しないため、ゲーム内で利用する情報の保存先として使用できます。 |
| createdAt | long |  | ※ | 現在時刻 |  | 作成日時<br>UNIX 時間・ミリ秒<br>※ サーバーが自動で設定 |
| updatedAt | long |  | ※ | 現在時刻 |  | 最終更新日時<br>UNIX 時間・ミリ秒<br>※ サーバーが自動で設定 |
| revision | long |  |  | 0 | 0 ~ 9223372036854775805 | リビジョン |

**関連するメソッド:**
describeEntryModelMasters - エントリーモデルマスターの一覧を取得
createEntryModelMaster - エントリーモデルマスターを新規作成
getEntryModelMaster - エントリーモデルマスターを取得
updateEntryModelMaster - エントリーモデルマスターを更新
deleteEntryModelMaster - エントリーモデルマスターを削除




---
## メソッド

### describeNamespaces

ネームスペースの一覧を取得<br>

プロジェクト内において、サービス単位で作成されたネームスペースの一覧を取得します。<br>
オプションのページトークンを使用して、リストの特定の位置からデータの取得を開始できます。<br>
また、取得するネームスペースの数を制限することも可能です。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namePrefix | string |  | |  |  ~ 64文字 | ネームスペース名のフィルター接頭辞 |
| pageToken | string |  | |  |  ~ 1024文字 | データの取得を開始する位置を指定するトークン |
| limit | int |  | | 30 | 1 ~ 1000 | データの取得件数 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| items | [List&lt;Namespace&gt;](#namespace) | ネームスペースのリスト |
| nextPageToken | string | リストの続きを取得するためのページトークン |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.DescribeNamespaces(
    &dictionary.DescribeNamespacesRequest {
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\DescribeNamespacesRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

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

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

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

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

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


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

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

```

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

client = gs2('dictionary')

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

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

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

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

```




---

### createNamespace

ネームスペースを新規作成<br>

ネームスペースの名前、説明、および各種設定を含む詳細情報を指定する必要があります。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| name | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| description | string |  | |  |  ~ 1024文字 | 説明文 |
| transactionSetting | [TransactionSetting](#transactionsetting) |  | |  |  | トランザクション設定<br>図鑑エントリー登録処理時の分散トランザクションの実行方法を制御する設定です。自動実行、アトミックコミット、非同期処理などのオプションをサポートします。 |
| entryScript | [ScriptSetting](#scriptsetting) |  | |  |  | エントリー登録時に実行するスクリプトの設定<br>Script トリガーリファレンス - [`entry`](../script/#entry) |
| duplicateEntryScript | string |  | |  |  ~ 1024文字 | 登録済みのエントリーを再度登録しようとしたときに実行するスクリプトGRN<br>Script トリガーリファレンス - [`duplicateEntry`](../script/#duplicateentry) |
| logSetting | [LogSetting](#logsetting) |  | |  |  | ログの出力設定<br>図鑑操作のログデータを GS2-Log に出力するための設定です。GS2-Log のネームスペースを指定することで、エントリー登録・お気に入り操作など図鑑関連の API リクエスト・レスポンスログを収集できます。 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [Namespace](#namespace) | 作成したネームスペース |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.CreateNamespace(
    &dictionary.CreateNamespaceRequest {
        Name: pointy.String("namespace-0001"),
        Description: nil,
        TransactionSetting: nil,
        EntryScript: nil,
        DuplicateEntryScript: nil,
        LogSetting: &dictionary.LogSetting{
            LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\CreateNamespaceRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->createNamespace(
        (new CreateNamespaceRequest())
            ->withName("namespace-0001")
            ->withDescription(null)
            ->withTransactionSetting(null)
            ->withEntryScript(null)
            ->withDuplicateEntryScript(null)
            ->withLogSetting((new \Gs2\Dictionary\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

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

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

try {
    CreateNamespaceResult result = client.createNamespace(
        new CreateNamespaceRequest()
            .withName("namespace-0001")
            .withDescription(null)
            .withTransactionSetting(null)
            .withEntryScript(null)
            .withDuplicateEntryScript(null)
            .withLogSetting(new io.gs2.dictionary.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.createNamespace(
        new Gs2Dictionary.CreateNamespaceRequest()
            .withName("namespace-0001")
            .withDescription(null)
            .withTransactionSetting(null)
            .withEntryScript(null)
            .withDuplicateEntryScript(null)
            .withLogSetting(new Gs2Dictionary.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.create_namespace(
        dictionary.CreateNamespaceRequest()
            .with_name('namespace-0001')
            .with_description(None)
            .with_transaction_setting(None)
            .with_entry_script(None)
            .with_duplicate_entry_script(None)
            .with_log_setting(
                dictionary.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.create_namespace({
    name="namespace-0001",
    description=nil,
    transactionSetting=nil,
    entryScript=nil,
    duplicateEntryScript=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001",
    },
})

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

result = api_result.result
item = result.item;

```

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

client = gs2('dictionary')

api_result_handler = client.create_namespace_async({
    name="namespace-0001",
    description=nil,
    transactionSetting=nil,
    entryScript=nil,
    duplicateEntryScript=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001",
    },
})

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

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

result = api_result.result
item = result.item;

```




---

### getNamespaceStatus

ネームスペースの状態を取得<br>

指定されたネームスペースの現在の状態を取得します。<br>
これには、ネームスペースがアクティブか、保留中か、またはその他の状態にあるかが含まれます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| status | string |  |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.GetNamespaceStatus(
    &dictionary.GetNamespaceStatusRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
status := result.Status

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\GetNamespaceStatusRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

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

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

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

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

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


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

result = api_result.result
status = result.status;

```

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

client = gs2('dictionary')

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

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

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

result = api_result.result
status = result.status;

```




---

### getNamespace

ネームスペースを取得<br>

指定されたネームスペースの詳細情報を取得します。<br>
これには、ネームスペースの名前、説明、およびその他の設定情報が含まれます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [Namespace](#namespace) | ネームスペース |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.GetNamespace(
    &dictionary.GetNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\GetNamespaceRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

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

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

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

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

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


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

result = api_result.result
item = result.item;

```

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

client = gs2('dictionary')

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

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

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

result = api_result.result
item = result.item;

```




---

### updateNamespace

ネームスペースを更新<br>

指定されたネームスペースの設定を更新します。<br>
ネームスペースの説明や、特定の設定を変更することができます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| description | string |  | |  |  ~ 1024文字 | 説明文 |
| transactionSetting | [TransactionSetting](#transactionsetting) |  | |  |  | トランザクション設定<br>図鑑エントリー登録処理時の分散トランザクションの実行方法を制御する設定です。自動実行、アトミックコミット、非同期処理などのオプションをサポートします。 |
| entryScript | [ScriptSetting](#scriptsetting) |  | |  |  | エントリー登録時に実行するスクリプトの設定<br>Script トリガーリファレンス - [`entry`](../script/#entry) |
| duplicateEntryScript | string |  | |  |  ~ 1024文字 | 登録済みのエントリーを再度登録しようとしたときに実行するスクリプトGRN<br>Script トリガーリファレンス - [`duplicateEntry`](../script/#duplicateentry) |
| logSetting | [LogSetting](#logsetting) |  | |  |  | ログの出力設定<br>図鑑操作のログデータを GS2-Log に出力するための設定です。GS2-Log のネームスペースを指定することで、エントリー登録・お気に入り操作など図鑑関連の API リクエスト・レスポンスログを収集できます。 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [Namespace](#namespace) | 更新したネームスペース |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.UpdateNamespace(
    &dictionary.UpdateNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Description: pointy.String("description1"),
        TransactionSetting: nil,
        EntryScript: nil,
        DuplicateEntryScript: nil,
        LogSetting: &dictionary.LogSetting{
            LoggingNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\UpdateNamespaceRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->updateNamespace(
        (new UpdateNamespaceRequest())
            ->withNamespaceName("namespace-0001")
            ->withDescription("description1")
            ->withTransactionSetting(null)
            ->withEntryScript(null)
            ->withDuplicateEntryScript(null)
            ->withLogSetting((new \Gs2\Dictionary\Model\LogSetting())
                ->withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

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

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

try {
    UpdateNamespaceResult result = client.updateNamespace(
        new UpdateNamespaceRequest()
            .withNamespaceName("namespace-0001")
            .withDescription("description1")
            .withTransactionSetting(null)
            .withEntryScript(null)
            .withDuplicateEntryScript(null)
            .withLogSetting(new io.gs2.dictionary.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    Namespace item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.updateNamespace(
        new Gs2Dictionary.UpdateNamespaceRequest()
            .withNamespaceName("namespace-0001")
            .withDescription("description1")
            .withTransactionSetting(null)
            .withEntryScript(null)
            .withDuplicateEntryScript(null)
            .withLogSetting(new Gs2Dictionary.model.LogSetting()
                .withLoggingNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"))
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.update_namespace(
        dictionary.UpdateNamespaceRequest()
            .with_namespace_name('namespace-0001')
            .with_description('description1')
            .with_transaction_setting(None)
            .with_entry_script(None)
            .with_duplicate_entry_script(None)
            .with_log_setting(
                dictionary.LogSetting()
                    .with_logging_namespace_id('grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001'))
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.update_namespace({
    namespaceName="namespace-0001",
    description="description1",
    transactionSetting=nil,
    entryScript=nil,
    duplicateEntryScript=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001",
    },
})

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

result = api_result.result
item = result.item;

```

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

client = gs2('dictionary')

api_result_handler = client.update_namespace_async({
    namespaceName="namespace-0001",
    description="description1",
    transactionSetting=nil,
    entryScript=nil,
    duplicateEntryScript=nil,
    logSetting={
        loggingNamespaceId="grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001",
    },
})

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

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

result = api_result.result
item = result.item;

```




---

### deleteNamespace

ネームスペースを削除<br>

指定されたネームスペースを削除します。<br>
この操作は不可逆であり、削除されたネームスペースに関連するすべてのデータは回復不能になります。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [Namespace](#namespace) | 削除したネームスペース |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.DeleteNamespace(
    &dictionary.DeleteNamespaceRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\DeleteNamespaceRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

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

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

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

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

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


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

result = api_result.result
item = result.item;

```

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

client = gs2('dictionary')

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

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

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

result = api_result.result
item = result.item;

```




---

### getServiceVersion

マイクロサービスのバージョンを取得



#### Request

リクエストパラメータ: なし

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | string | バージョン |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.GetServiceVersion(
    &dictionary.GetServiceVersionRequest {
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\GetServiceVersionRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

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

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

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

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

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


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.get_service_version({
})

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

result = api_result.result
item = result.item;

```

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

client = gs2('dictionary')

api_result_handler = client.get_service_version_async({
})

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

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

result = api_result.result
item = result.item;

```




---

### dumpUserDataByUserId

指定したユーザーIDに紐づくデータのダンプを取得<br>

個人情報保護の法的要件を満たすために使用したり、データのバックアップや移行に使用できます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.DumpUserDataByUserId(
    &dictionary.DumpUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\DumpUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

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

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

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

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

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


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

result = api_result.result

```

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

client = gs2('dictionary')

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

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

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

result = api_result.result

```




---

### checkDumpUserDataByUserId

指定したユーザーIDに紐づくデータのダンプが完了しているか確認



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| url | string | 出力データのURL |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.CheckDumpUserDataByUserId(
    &dictionary.CheckDumpUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
url := result.Url

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\CheckDumpUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

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

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

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

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

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


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

result = api_result.result
url = result.url;

```

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

client = gs2('dictionary')

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

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

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

result = api_result.result
url = result.url;

```




---

### cleanUserDataByUserId

ユーザーデータの完全削除<br>

指定されたユーザーIDに紐づくデータのクリーニングを実行します。<br>
これにより、特定のユーザーデータをプロジェクトから安全に削除できます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.CleanUserDataByUserId(
    &dictionary.CleanUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\CleanUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

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

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

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

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

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


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

result = api_result.result

```

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

client = gs2('dictionary')

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

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

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

result = api_result.result

```




---

### checkCleanUserDataByUserId

指定したユーザーIDのユーザーデータの完全削除が完了しているか確認



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.CheckCleanUserDataByUserId(
    &dictionary.CheckCleanUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\CheckCleanUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

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

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

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

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

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


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

result = api_result.result

```

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

client = gs2('dictionary')

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

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

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

result = api_result.result

```




---

### prepareImportUserDataByUserId

指定したユーザーIDに紐づくデータのインポートを準備<br>

インポートに使用できるデータは GS2 によってエクスポートして取得したデータに限定され、古いデータはインポートに失敗する可能性があります。<br>
エクスポートしたユーザーIDと異なるユーザーIDでインポートすることができますが、ユーザーデータのペイロード内にユーザーIDが含まれる場合はその限りではありません。<br>

このAPIの戻り値で応答されたURLにエクスポートした zip ファイルをアップロードし、importUserDataByUserId を呼び出すことで実際のインポート処理を開始できます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| uploadToken | string | アップロード後に結果を反映する際に使用するトークン |
| uploadUrl | string | ユーザーデータアップロード処理の実行に使用するURL |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.PrepareImportUserDataByUserId(
    &dictionary.PrepareImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
uploadToken := result.UploadToken
uploadUrl := result.UploadUrl

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\PrepareImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

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

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

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

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

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


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

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

```

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

client = gs2('dictionary')

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

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

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

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

```




---

### importUserDataByUserId

指定したユーザーIDに紐づくデータのインポートを実行<br>

インポートに使用できるデータは GS2 によってエクスポートして取得したデータに限定され、古いデータはインポートに失敗する可能性があります。<br>
エクスポートしたユーザーIDと異なるユーザーIDでインポートすることができますが、ユーザーデータのペイロード内にユーザーIDが含まれる場合はその限りではありません。<br>

このAPIを呼び出す前に prepareImportUserDataByUserId を呼び出して、アップロード準備を完了させる必要があります。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| uploadToken | string |  | ✓|  |  ~ 1024文字 | アップロード準備で受け取ったトークン |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.ImportUserDataByUserId(
    &dictionary.ImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        UploadToken: pointy.String("upload-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\ImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

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

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

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

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

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


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

result = api_result.result

```

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

client = gs2('dictionary')

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

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

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

result = api_result.result

```




---

### checkImportUserDataByUserId

指定したユーザーIDに紐づくデータのインポートが完了しているか確認



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| uploadToken | string |  | ✓|  |  ~ 1024文字 | アップロード準備で受け取ったトークン |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| url | string | 出力ログのURL |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.CheckImportUserDataByUserId(
    &dictionary.CheckImportUserDataByUserIdRequest {
        UserId: pointy.String("user-0001"),
        UploadToken: pointy.String("upload-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
url := result.Url

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\CheckImportUserDataByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

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

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

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

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

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


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

result = api_result.result
url = result.url;

```

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

client = gs2('dictionary')

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;

```




---

### describeEntries

エントリーの一覧を取得<br>

現在ログインしているユーザーが収集したエントリーのページネーション付きリストを取得します。<br>
各エントリーは、ユーザーがアンロックまたは取得した図鑑アイテムを表します。<br>
ページトークンと取得件数の制限を使用して、結果をインクリメンタルに取得できます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| accessToken | string |  | ✓|  |  ~ 128文字 | アクセストークン |
| pageToken | string |  | |  |  ~ 1024文字 | データの取得を開始する位置を指定するトークン |
| limit | int |  | | 30 | 1 ~ 10000 | データの取得件数 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| items | [List&lt;Entry&gt;](#entry) | エントリーのリスト |
| nextPageToken | string | リストの続きを取得するためのページトークン |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.DescribeEntries(
    &dictionary.DescribeEntriesRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\DescribeEntriesRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.DescribeEntriesRequest;
import io.gs2.dictionary.result.DescribeEntriesResult;

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

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

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

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


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

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

```

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

client = gs2('dictionary')

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

```




---

### describeEntriesByUserId

ユーザーIDを指定してエントリーの一覧を取得<br>

指定されたユーザーが収集したエントリーのページネーション付きリストを取得します。<br>
各エントリーは、ユーザーがアンロックまたは取得した図鑑アイテムを表します。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| pageToken | string |  | |  |  ~ 1024文字 | データの取得を開始する位置を指定するトークン |
| limit | int |  | | 30 | 1 ~ 10000 | データの取得件数 |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| items | [List&lt;Entry&gt;](#entry) | エントリーのリスト |
| nextPageToken | string | リストの続きを取得するためのページトークン |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.DescribeEntriesByUserId(
    &dictionary.DescribeEntriesByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\DescribeEntriesByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.DescribeEntriesByUserIdRequest;
import io.gs2.dictionary.result.DescribeEntriesByUserIdResult;

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

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

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

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


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

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

```

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

client = gs2('dictionary')

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

```




---

### addEntriesByUserId

ユーザーIDを指定してエントリーを登録<br>

指定されたユーザーの図鑑に1つ以上のエントリーを登録します。<br>
バッチ操作として複数のエントリーモデル名を一度に指定できます。<br>
既に登録済みのエントリーはエラーにならず、スキップされます。<br>
返されるリストには、新たに追加されたエントリーのみが含まれます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| entryModelNames | List&lt;string&gt; |  | | [] | 0 ~ 100 items | エントリーモデル名のリスト |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| items | [List&lt;Entry&gt;](#entry) | 登録したエントリーのリスト |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.AddEntriesByUserId(
    &dictionary.AddEntriesByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        EntryModelNames: []*string{
            pointy.String("entry-0001"),
            pointy.String("entry-0002"),
            pointy.String("entry-0003"),
        },
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\AddEntriesByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->addEntriesByUserId(
        (new AddEntriesByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withEntryModelNames([
                "entry-0001",
                "entry-0002",
                "entry-0003",
            ])
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.AddEntriesByUserIdRequest;
import io.gs2.dictionary.result.AddEntriesByUserIdResult;

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

try {
    AddEntriesByUserIdResult result = client.addEntriesByUserId(
        new AddEntriesByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withEntryModelNames(Arrays.asList(
                "entry-0001",
                "entry-0002",
                "entry-0003"
            ))
            .withTimeOffsetToken(null)
    );
    List<Entry> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.AddEntriesByUserIdResult> asyncResult = null;
yield return client.AddEntriesByUserId(
    new Gs2.Gs2Dictionary.Request.AddEntriesByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithEntryModelNames(new string[] {
            "entry-0001",
            "entry-0002",
            "entry-0003",
        })
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.addEntriesByUserId(
        new Gs2Dictionary.AddEntriesByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withEntryModelNames([
                "entry-0001",
                "entry-0002",
                "entry-0003",
            ])
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.add_entries_by_user_id(
        dictionary.AddEntriesByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_entry_model_names([
                'entry-0001',
                'entry-0002',
                'entry-0003',
            ])
            .with_time_offset_token(None)
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.add_entries_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    entryModelNames={
        "entry-0001",
        "entry-0002",
        "entry-0003"
    },
    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;

```

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

client = gs2('dictionary')

api_result_handler = client.add_entries_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    entryModelNames={
        "entry-0001",
        "entry-0002",
        "entry-0003"
    },
    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;

```




---

### getEntry

エントリーを取得<br>

現在ログインしているユーザーが、エントリーモデル名で指定された特定のエントリーを収集済みかどうかを取得します。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| accessToken | string |  | ✓|  |  ~ 128文字 | アクセストークン |
| entryModelName | string |  | ✓|  |  ~ 128文字 | エントリーモデル名<br>エントリーモデル固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [Entry](#entry) | エントリー |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.GetEntry(
    &dictionary.GetEntryRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        EntryModelName: pointy.String("entry-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\GetEntryRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->getEntry(
        (new GetEntryRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withEntryModelName("entry-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.GetEntryRequest;
import io.gs2.dictionary.result.GetEntryResult;

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

try {
    GetEntryResult result = client.getEntry(
        new GetEntryRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withEntryModelName("entry-0001")
    );
    Entry item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.GetEntryResult> asyncResult = null;
yield return client.GetEntry(
    new Gs2.Gs2Dictionary.Request.GetEntryRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithEntryModelName("entry-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.getEntry(
        new Gs2Dictionary.GetEntryRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withEntryModelName("entry-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.get_entry(
        dictionary.GetEntryRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_entry_model_name('entry-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.get_entry({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    entryModelName="entry-0001",
})

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

result = api_result.result
item = result.item;

```

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

client = gs2('dictionary')

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

```




---

### getEntryByUserId

ユーザーIDを指定してエントリーを取得<br>

指定されたユーザーが、エントリーモデル名で指定された特定のエントリーを収集済みかどうかを取得します。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| entryModelName | string |  | ✓|  |  ~ 128文字 | エントリーモデル名<br>エントリーモデル固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [Entry](#entry) | エントリー |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.GetEntryByUserId(
    &dictionary.GetEntryByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        EntryModelName: pointy.String("entry-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\GetEntryByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->getEntryByUserId(
        (new GetEntryByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withEntryModelName("entry-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.GetEntryByUserIdRequest;
import io.gs2.dictionary.result.GetEntryByUserIdResult;

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

try {
    GetEntryByUserIdResult result = client.getEntryByUserId(
        new GetEntryByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withEntryModelName("entry-0001")
            .withTimeOffsetToken(null)
    );
    Entry item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.GetEntryByUserIdResult> asyncResult = null;
yield return client.GetEntryByUserId(
    new Gs2.Gs2Dictionary.Request.GetEntryByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithEntryModelName("entry-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.getEntryByUserId(
        new Gs2Dictionary.GetEntryByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withEntryModelName("entry-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.get_entry_by_user_id(
        dictionary.GetEntryByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_entry_model_name('entry-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.get_entry_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    entryModelName="entry-0001",
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

```

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

client = gs2('dictionary')

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

```




---

### getEntryWithSignature

署名付きでエントリーを取得<br>

現在ログインしているユーザーのエントリーを暗号署名付きで取得します。<br>
エントリーデータは JSON にシリアライズされ、指定された暗号鍵を使用して署名されます。<br>
レスポンスにはエントリーアイテム、シリアライズされたボディ、署名文字列が含まれ、外部システムでの改ざん検証に使用できます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| accessToken | string |  | ✓|  |  ~ 128文字 | アクセストークン |
| entryModelName | string |  | ✓|  |  ~ 128文字 | エントリーモデル名<br>エントリーモデル固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| keyId | string |  | | "grn:gs2:{region}:{ownerId}:key:default:key:default" |  ~ 1024文字 | 暗号鍵GRN |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [Entry](#entry) | エントリー |
| body | string | 署名対象のエントリー情報 |
| signature | string | 署名 |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.GetEntryWithSignature(
    &dictionary.GetEntryWithSignatureRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        EntryModelName: pointy.String("entry-0001"),
        KeyId: pointy.String("key-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
body := result.Body
signature := result.Signature

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\GetEntryWithSignatureRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->getEntryWithSignature(
        (new GetEntryWithSignatureRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withEntryModelName("entry-0001")
            ->withKeyId("key-0001")
    );
    $item = $result->getItem();
    $body = $result->getBody();
    $signature = $result->getSignature();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.GetEntryWithSignatureRequest;
import io.gs2.dictionary.result.GetEntryWithSignatureResult;

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

try {
    GetEntryWithSignatureResult result = client.getEntryWithSignature(
        new GetEntryWithSignatureRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withEntryModelName("entry-0001")
            .withKeyId("key-0001")
    );
    Entry item = result.getItem();
    String body = result.getBody();
    String signature = result.getSignature();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.GetEntryWithSignatureResult> asyncResult = null;
yield return client.GetEntryWithSignature(
    new Gs2.Gs2Dictionary.Request.GetEntryWithSignatureRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithEntryModelName("entry-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;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.getEntryWithSignature(
        new Gs2Dictionary.GetEntryWithSignatureRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withEntryModelName("entry-0001")
            .withKeyId("key-0001")
    );
    const item = result.getItem();
    const body = result.getBody();
    const signature = result.getSignature();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.get_entry_with_signature(
        dictionary.GetEntryWithSignatureRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_entry_model_name('entry-0001')
            .with_key_id('key-0001')
    )
    item = result.item
    body = result.body
    signature = result.signature
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

```

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

client = gs2('dictionary')

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

```




---

### getEntryWithSignatureByUserId

ユーザーIDを指定して署名付きでエントリーを取得<br>

指定されたユーザーのエントリーを暗号署名付きで取得します。<br>
エントリーデータは JSON にシリアライズされ、指定された暗号鍵を使用して署名されます。<br>
レスポンスにはエントリーアイテム、シリアライズされたボディ、署名文字列が含まれ、外部システムでの改ざん検証に使用できます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| entryModelName | string |  | ✓|  |  ~ 128文字 | エントリーモデル名<br>エントリーモデル固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| keyId | string |  | | "grn:gs2:{region}:{ownerId}:key:default:key:default" |  ~ 1024文字 | 暗号鍵GRN |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [Entry](#entry) | エントリー |
| body | string | 署名対象のエントリー情報 |
| signature | string | 署名 |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.GetEntryWithSignatureByUserId(
    &dictionary.GetEntryWithSignatureByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        EntryModelName: pointy.String("entry-0001"),
        KeyId: pointy.String("key-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item
body := result.Body
signature := result.Signature

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\GetEntryWithSignatureByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->getEntryWithSignatureByUserId(
        (new GetEntryWithSignatureByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withEntryModelName("entry-0001")
            ->withKeyId("key-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
    $body = $result->getBody();
    $signature = $result->getSignature();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.GetEntryWithSignatureByUserIdRequest;
import io.gs2.dictionary.result.GetEntryWithSignatureByUserIdResult;

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

try {
    GetEntryWithSignatureByUserIdResult result = client.getEntryWithSignatureByUserId(
        new GetEntryWithSignatureByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withEntryModelName("entry-0001")
            .withKeyId("key-0001")
            .withTimeOffsetToken(null)
    );
    Entry item = result.getItem();
    String body = result.getBody();
    String signature = result.getSignature();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.GetEntryWithSignatureByUserIdResult> asyncResult = null;
yield return client.GetEntryWithSignatureByUserId(
    new Gs2.Gs2Dictionary.Request.GetEntryWithSignatureByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithEntryModelName("entry-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;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.getEntryWithSignatureByUserId(
        new Gs2Dictionary.GetEntryWithSignatureByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withEntryModelName("entry-0001")
            .withKeyId("key-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
    const body = result.getBody();
    const signature = result.getSignature();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.get_entry_with_signature_by_user_id(
        dictionary.GetEntryWithSignatureByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_entry_model_name('entry-0001')
            .with_key_id('key-0001')
            .with_time_offset_token(None)
    )
    item = result.item
    body = result.body
    signature = result.signature
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

```

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

client = gs2('dictionary')

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

```




---

### resetByUserId

エントリーをリセット<br>

指定されたユーザーが収集したすべてのエントリーを削除し、図鑑を空の状態にリセットします。<br>
収集済みのすべてのエントリーが一括でクリアされます。<br>
この操作は元に戻せません。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.ResetByUserId(
    &dictionary.ResetByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\ResetByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.ResetByUserIdRequest;
import io.gs2.dictionary.result.ResetByUserIdResult;

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

try {
    ResetByUserIdResult result = client.resetByUserId(
        new ResetByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.ResetByUserIdResult> asyncResult = null;
yield return client.ResetByUserId(
    new Gs2.Gs2Dictionary.Request.ResetByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.resetByUserId(
        new Gs2Dictionary.ResetByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.reset_by_user_id(
        dictionary.ResetByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

result = api_result.result

```

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

client = gs2('dictionary')

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

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

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

result = api_result.result

```




---

### verifyEntry

エントリーを検証<br>

現在ログインしているユーザーが特定のエントリーを収集済みか未収集かを検証します。<br>
検証タイプで条件を指定します：'have' はユーザーがエントリーを保有していることを確認し、'havent' は保有していないことを確認します。<br>
検証に失敗した場合、エラーが返されます。前提条件の実装（例：特定のエントリーを持っていないとクエストに挑戦できない）に便利です。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| accessToken | string |  | ✓|  |  ~ 128文字 | アクセストークン |
| entryModelName | string |  | ✓|  |  ~ 128文字 | エントリーモデル名<br>エントリーモデル固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| verifyType | 文字列列挙型<br>enum {<br>&nbsp;&nbsp;"havent",<br>&nbsp;&nbsp;"have"<br>}<br> |  | ✓|  |  | 検証の種類"havent": 指定したエントリーを保有していないこと / "have": 指定したエントリーを保有していること /  |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.VerifyEntry(
    &dictionary.VerifyEntryRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        EntryModelName: pointy.String("entry-0001"),
        VerifyType: pointy.String("havent"),
    }
)
if err != nil {
    panic("error occurred")
}

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\VerifyEntryRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->verifyEntry(
        (new VerifyEntryRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withEntryModelName("entry-0001")
            ->withVerifyType("havent")
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.VerifyEntryRequest;
import io.gs2.dictionary.result.VerifyEntryResult;

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

try {
    VerifyEntryResult result = client.verifyEntry(
        new VerifyEntryRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withEntryModelName("entry-0001")
            .withVerifyType("havent")
    );
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.VerifyEntryResult> asyncResult = null;
yield return client.VerifyEntry(
    new Gs2.Gs2Dictionary.Request.VerifyEntryRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithEntryModelName("entry-0001")
        .WithVerifyType("havent"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.verifyEntry(
        new Gs2Dictionary.VerifyEntryRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withEntryModelName("entry-0001")
            .withVerifyType("havent")
    );
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.verify_entry(
        dictionary.VerifyEntryRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_entry_model_name('entry-0001')
            .with_verify_type('havent')
    )
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.verify_entry({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    entryModelName="entry-0001",
    verifyType="havent",
})

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

result = api_result.result

```

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

client = gs2('dictionary')

api_result_handler = client.verify_entry_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    entryModelName="entry-0001",
    verifyType="havent",
})

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

```




---

### verifyEntryByUserId

ユーザーIDを指定してエントリーを検証<br>

指定されたユーザーが特定のエントリーを収集済みか未収集かを検証します。<br>
検証タイプで条件を指定します：'have' はユーザーがエントリーを保有していることを確認し、'havent' は保有していないことを確認します。<br>
検証に失敗した場合、エラーが返されます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| entryModelName | string |  | ✓|  |  ~ 128文字 | エントリーモデル名<br>エントリーモデル固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| verifyType | 文字列列挙型<br>enum {<br>&nbsp;&nbsp;"havent",<br>&nbsp;&nbsp;"have"<br>}<br> |  | ✓|  |  | 検証の種類"havent": 指定したエントリーを保有していないこと / "have": 指定したエントリーを保有していること /  |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.VerifyEntryByUserId(
    &dictionary.VerifyEntryByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        EntryModelName: pointy.String("entry-0001"),
        VerifyType: pointy.String("havent"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\VerifyEntryByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->verifyEntryByUserId(
        (new VerifyEntryByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withEntryModelName("entry-0001")
            ->withVerifyType("havent")
            ->withTimeOffsetToken(null)
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.VerifyEntryByUserIdRequest;
import io.gs2.dictionary.result.VerifyEntryByUserIdResult;

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

try {
    VerifyEntryByUserIdResult result = client.verifyEntryByUserId(
        new VerifyEntryByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withEntryModelName("entry-0001")
            .withVerifyType("havent")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.VerifyEntryByUserIdResult> asyncResult = null;
yield return client.VerifyEntryByUserId(
    new Gs2.Gs2Dictionary.Request.VerifyEntryByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithEntryModelName("entry-0001")
        .WithVerifyType("havent")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.verifyEntryByUserId(
        new Gs2Dictionary.VerifyEntryByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withEntryModelName("entry-0001")
            .withVerifyType("havent")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.verify_entry_by_user_id(
        dictionary.VerifyEntryByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_entry_model_name('entry-0001')
            .with_verify_type('havent')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.verify_entry_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    entryModelName="entry-0001",
    verifyType="havent",
    timeOffsetToken=nil,
})

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

result = api_result.result

```

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

client = gs2('dictionary')

api_result_handler = client.verify_entry_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    entryModelName="entry-0001",
    verifyType="havent",
    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

```




---

### deleteEntries

エントリーを削除<br>

エントリーモデル名のリストを指定して、現在ログインしているユーザーの図鑑から特定のエントリーを削除します。<br>
バッチ操作として複数のエントリーを一度に削除できます。<br>
返されるリストには、実際に削除されたエントリーが含まれます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| accessToken | string |  | ✓|  |  ~ 128文字 | アクセストークン |
| entryModelNames | List&lt;string&gt; |  | | [] | 0 ~ 100 items | エントリーモデル名のリスト |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| items | [List&lt;Entry&gt;](#entry) | 削除したエントリーのリスト |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.DeleteEntries(
    &dictionary.DeleteEntriesRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        EntryModelNames: []*string{
            pointy.String("entry-0001"),
            pointy.String("entry-0002"),
            pointy.String("entry-0003"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\DeleteEntriesRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->deleteEntries(
        (new DeleteEntriesRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withEntryModelNames([
                "entry-0001",
                "entry-0002",
                "entry-0003",
            ])
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.DeleteEntriesRequest;
import io.gs2.dictionary.result.DeleteEntriesResult;

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

try {
    DeleteEntriesResult result = client.deleteEntries(
        new DeleteEntriesRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withEntryModelNames(Arrays.asList(
                "entry-0001",
                "entry-0002",
                "entry-0003"
            ))
    );
    List<Entry> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.DeleteEntriesResult> asyncResult = null;
yield return client.DeleteEntries(
    new Gs2.Gs2Dictionary.Request.DeleteEntriesRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithEntryModelNames(new string[] {
            "entry-0001",
            "entry-0002",
            "entry-0003",
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.deleteEntries(
        new Gs2Dictionary.DeleteEntriesRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withEntryModelNames([
                "entry-0001",
                "entry-0002",
                "entry-0003",
            ])
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.delete_entries(
        dictionary.DeleteEntriesRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_entry_model_names([
                'entry-0001',
                'entry-0002',
                'entry-0003',
            ])
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.delete_entries({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    entryModelNames={
        "entry-0001",
        "entry-0002",
        "entry-0003"
    },
})

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

result = api_result.result
items = result.items;

```

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

client = gs2('dictionary')

api_result_handler = client.delete_entries_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    entryModelNames={
        "entry-0001",
        "entry-0002",
        "entry-0003"
    },
})

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;

```




---

### deleteEntriesByUserId

ユーザーIDを指定してエントリーを削除<br>

エントリーモデル名のリストを指定して、指定されたユーザーの図鑑から特定のエントリーを削除します。<br>
バッチ操作として複数のエントリーを一度に削除できます。<br>
返されるリストには、実際に削除されたエントリーが含まれます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| entryModelNames | List&lt;string&gt; |  | | [] | 0 ~ 100 items | エントリーモデル名のリスト |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| items | [List&lt;Entry&gt;](#entry) | 削除したエントリーのリスト |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.DeleteEntriesByUserId(
    &dictionary.DeleteEntriesByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        EntryModelNames: []*string{
            pointy.String("entry-0001"),
            pointy.String("entry-0002"),
            pointy.String("entry-0003"),
        },
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\DeleteEntriesByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->deleteEntriesByUserId(
        (new DeleteEntriesByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withEntryModelNames([
                "entry-0001",
                "entry-0002",
                "entry-0003",
            ])
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.DeleteEntriesByUserIdRequest;
import io.gs2.dictionary.result.DeleteEntriesByUserIdResult;

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

try {
    DeleteEntriesByUserIdResult result = client.deleteEntriesByUserId(
        new DeleteEntriesByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withEntryModelNames(Arrays.asList(
                "entry-0001",
                "entry-0002",
                "entry-0003"
            ))
            .withTimeOffsetToken(null)
    );
    List<Entry> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.DeleteEntriesByUserIdResult> asyncResult = null;
yield return client.DeleteEntriesByUserId(
    new Gs2.Gs2Dictionary.Request.DeleteEntriesByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithEntryModelNames(new string[] {
            "entry-0001",
            "entry-0002",
            "entry-0003",
        })
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.deleteEntriesByUserId(
        new Gs2Dictionary.DeleteEntriesByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withEntryModelNames([
                "entry-0001",
                "entry-0002",
                "entry-0003",
            ])
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.delete_entries_by_user_id(
        dictionary.DeleteEntriesByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_entry_model_names([
                'entry-0001',
                'entry-0002',
                'entry-0003',
            ])
            .with_time_offset_token(None)
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.delete_entries_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    entryModelNames={
        "entry-0001",
        "entry-0002",
        "entry-0003"
    },
    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;

```

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

client = gs2('dictionary')

api_result_handler = client.delete_entries_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    entryModelNames={
        "entry-0001",
        "entry-0002",
        "entry-0003"
    },
    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;

```




---

### describeLikes

お気に入りエントリーの一覧を取得<br>

現在ログインしているユーザーがお気に入り登録したエントリーのページネーション付きリストを取得します。<br>
お気に入りはエントリーの収集とは別に管理され、特定の図鑑アイテムに対するユーザーの好みを表します。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| accessToken | string |  | ✓|  |  ~ 128文字 | アクセストークン |
| pageToken | string |  | |  |  ~ 1024文字 | データの取得を開始する位置を指定するトークン |
| limit | int |  | | 30 | 1 ~ 1000 | データの取得件数 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| items | [List&lt;Like&gt;](#like) | お気に入りエントリーのリスト |
| nextPageToken | string | リストの続きを取得するためのページトークン |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.DescribeLikes(
    &dictionary.DescribeLikesRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\DescribeLikesRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.DescribeLikesRequest;
import io.gs2.dictionary.result.DescribeLikesResult;

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

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

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

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


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

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

```

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

client = gs2('dictionary')

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

```




---

### describeLikesByUserId

ユーザーIDを指定してお気に入りエントリーの一覧を取得<br>

指定されたユーザーがお気に入り登録したエントリーのページネーション付きリストを取得します。<br>
お気に入りはエントリーの収集とは別に管理され、特定の図鑑アイテムに対するユーザーの好みを表します。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| pageToken | string |  | |  |  ~ 1024文字 | データの取得を開始する位置を指定するトークン |
| limit | int |  | | 30 | 1 ~ 1000 | データの取得件数 |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| items | [List&lt;Like&gt;](#like) | お気に入りエントリーのリスト |
| nextPageToken | string | リストの続きを取得するためのページトークン |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.DescribeLikesByUserId(
    &dictionary.DescribeLikesByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        PageToken: nil,
        Limit: nil,
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\DescribeLikesByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.DescribeLikesByUserIdRequest;
import io.gs2.dictionary.result.DescribeLikesByUserIdResult;

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

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

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

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


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

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

```

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

client = gs2('dictionary')

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

```




---

### addLikes

お気に入りエントリーを追加<br>

現在ログインしているユーザーのお気に入りとして1つ以上のエントリーを登録します。<br>
バッチ操作として複数のエントリーモデル名を一度に指定できます。<br>
既にお気に入り登録済みのエントリーはエラーにならず、スキップされます。<br>
返されるリストには、新たに追加されたお気に入りのみが含まれます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| accessToken | string |  | ✓|  |  ~ 128文字 | アクセストークン |
| entryModelNames | List&lt;string&gt; |  | | [] | 0 ~ 100 items | エントリーモデル名のリスト |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| items | [List&lt;Like&gt;](#like) | 登録したお気に入りエントリーのリスト |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.AddLikes(
    &dictionary.AddLikesRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        EntryModelNames: []*string{
            pointy.String("entry-0001"),
            pointy.String("entry-0002"),
            pointy.String("entry-0003"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\AddLikesRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->addLikes(
        (new AddLikesRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withEntryModelNames([
                "entry-0001",
                "entry-0002",
                "entry-0003",
            ])
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.AddLikesRequest;
import io.gs2.dictionary.result.AddLikesResult;

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

try {
    AddLikesResult result = client.addLikes(
        new AddLikesRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withEntryModelNames(Arrays.asList(
                "entry-0001",
                "entry-0002",
                "entry-0003"
            ))
    );
    List<Like> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.AddLikesResult> asyncResult = null;
yield return client.AddLikes(
    new Gs2.Gs2Dictionary.Request.AddLikesRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithEntryModelNames(new string[] {
            "entry-0001",
            "entry-0002",
            "entry-0003",
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.addLikes(
        new Gs2Dictionary.AddLikesRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withEntryModelNames([
                "entry-0001",
                "entry-0002",
                "entry-0003",
            ])
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.add_likes(
        dictionary.AddLikesRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_entry_model_names([
                'entry-0001',
                'entry-0002',
                'entry-0003',
            ])
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.add_likes({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    entryModelNames={
        "entry-0001",
        "entry-0002",
        "entry-0003"
    },
})

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

result = api_result.result
items = result.items;

```

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

client = gs2('dictionary')

api_result_handler = client.add_likes_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    entryModelNames={
        "entry-0001",
        "entry-0002",
        "entry-0003"
    },
})

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;

```




---

### addLikesByUserId

ユーザーIDを指定してお気に入りエントリーを追加<br>

指定されたユーザーのお気に入りとして1つ以上のエントリーを登録します。<br>
バッチ操作として複数のエントリーモデル名を一度に指定できます。<br>
既にお気に入り登録済みのエントリーはエラーにならず、スキップされます。<br>
返されるリストには、新たに追加されたお気に入りのみが含まれます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| entryModelNames | List&lt;string&gt; |  | | [] | 0 ~ 100 items | エントリーモデル名のリスト |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| items | [List&lt;Like&gt;](#like) | 登録したお気に入りエントリーのリスト |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.AddLikesByUserId(
    &dictionary.AddLikesByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        EntryModelNames: []*string{
            pointy.String("entry-0001"),
            pointy.String("entry-0002"),
            pointy.String("entry-0003"),
        },
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\AddLikesByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->addLikesByUserId(
        (new AddLikesByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withEntryModelNames([
                "entry-0001",
                "entry-0002",
                "entry-0003",
            ])
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.AddLikesByUserIdRequest;
import io.gs2.dictionary.result.AddLikesByUserIdResult;

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

try {
    AddLikesByUserIdResult result = client.addLikesByUserId(
        new AddLikesByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withEntryModelNames(Arrays.asList(
                "entry-0001",
                "entry-0002",
                "entry-0003"
            ))
            .withTimeOffsetToken(null)
    );
    List<Like> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.AddLikesByUserIdResult> asyncResult = null;
yield return client.AddLikesByUserId(
    new Gs2.Gs2Dictionary.Request.AddLikesByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithEntryModelNames(new string[] {
            "entry-0001",
            "entry-0002",
            "entry-0003",
        })
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.addLikesByUserId(
        new Gs2Dictionary.AddLikesByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withEntryModelNames([
                "entry-0001",
                "entry-0002",
                "entry-0003",
            ])
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.add_likes_by_user_id(
        dictionary.AddLikesByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_entry_model_names([
                'entry-0001',
                'entry-0002',
                'entry-0003',
            ])
            .with_time_offset_token(None)
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.add_likes_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    entryModelNames={
        "entry-0001",
        "entry-0002",
        "entry-0003"
    },
    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;

```

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

client = gs2('dictionary')

api_result_handler = client.add_likes_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    entryModelNames={
        "entry-0001",
        "entry-0002",
        "entry-0003"
    },
    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;

```




---

### getLike

お気に入りエントリーを取得<br>

現在ログインしているユーザーが、エントリーモデル名で指定された特定のエントリーをお気に入り登録しているかどうかを取得します。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| accessToken | string |  | ✓|  |  ~ 128文字 | アクセストークン |
| entryModelName | string |  | ✓|  |  ~ 128文字 | エントリーモデル名<br>エントリーモデル固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [Like](#like) | お気に入りエントリー |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.GetLike(
    &dictionary.GetLikeRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        EntryModelName: pointy.String("entry-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\GetLikeRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->getLike(
        (new GetLikeRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withEntryModelName("entry-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.GetLikeRequest;
import io.gs2.dictionary.result.GetLikeResult;

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

try {
    GetLikeResult result = client.getLike(
        new GetLikeRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withEntryModelName("entry-0001")
    );
    Like item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.GetLikeResult> asyncResult = null;
yield return client.GetLike(
    new Gs2.Gs2Dictionary.Request.GetLikeRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithEntryModelName("entry-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.getLike(
        new Gs2Dictionary.GetLikeRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withEntryModelName("entry-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.get_like(
        dictionary.GetLikeRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_entry_model_name('entry-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.get_like({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    entryModelName="entry-0001",
})

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

result = api_result.result
item = result.item;

```

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

client = gs2('dictionary')

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

```




---

### getLikeByUserId

ユーザーIDを指定してお気に入りエントリーを取得<br>

指定されたユーザーが、エントリーモデル名で指定された特定のエントリーをお気に入り登録しているかどうかを取得します。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| entryModelName | string |  | ✓|  |  ~ 128文字 | エントリーモデル名<br>エントリーモデル固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [Like](#like) | お気に入りエントリー |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.GetLikeByUserId(
    &dictionary.GetLikeByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        EntryModelName: pointy.String("entry-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\GetLikeByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->getLikeByUserId(
        (new GetLikeByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withEntryModelName("entry-0001")
            ->withTimeOffsetToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.GetLikeByUserIdRequest;
import io.gs2.dictionary.result.GetLikeByUserIdResult;

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

try {
    GetLikeByUserIdResult result = client.getLikeByUserId(
        new GetLikeByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withEntryModelName("entry-0001")
            .withTimeOffsetToken(null)
    );
    Like item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.GetLikeByUserIdResult> asyncResult = null;
yield return client.GetLikeByUserId(
    new Gs2.Gs2Dictionary.Request.GetLikeByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithEntryModelName("entry-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.getLikeByUserId(
        new Gs2Dictionary.GetLikeByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withEntryModelName("entry-0001")
            .withTimeOffsetToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.get_like_by_user_id(
        dictionary.GetLikeByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_entry_model_name('entry-0001')
            .with_time_offset_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.get_like_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    entryModelName="entry-0001",
    timeOffsetToken=nil,
})

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

result = api_result.result
item = result.item;

```

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

client = gs2('dictionary')

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

```




---

### resetLikes

お気に入りエントリーをリセット<br>

現在ログインしているユーザーのすべてのお気に入りを削除し、お気に入りを空の状態にリセットします。<br>
すべてのお気に入りエントリーが一括でクリアされます。<br>
この操作は元に戻せません。エントリーの収集状態には影響しません。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| accessToken | string |  | ✓|  |  ~ 128文字 | アクセストークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.ResetLikes(
    &dictionary.ResetLikesRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
    }
)
if err != nil {
    panic("error occurred")
}

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\ResetLikesRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->resetLikes(
        (new ResetLikesRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
    );
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.ResetLikesRequest;
import io.gs2.dictionary.result.ResetLikesResult;

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

try {
    ResetLikesResult result = client.resetLikes(
        new ResetLikesRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
    );
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.ResetLikesResult> asyncResult = null;
yield return client.ResetLikes(
    new Gs2.Gs2Dictionary.Request.ResetLikesRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.resetLikes(
        new Gs2Dictionary.ResetLikesRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
    );
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.reset_likes(
        dictionary.ResetLikesRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
    )
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

result = api_result.result

```

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

client = gs2('dictionary')

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

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

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

result = api_result.result

```




---

### resetLikesByUserId

ユーザーIDを指定してお気に入りエントリーをリセット<br>

指定されたユーザーのすべてのお気に入りを削除し、お気に入りを空の状態にリセットします。<br>
すべてのお気に入りエントリーが一括でクリアされます。<br>
この操作は元に戻せません。エントリーの収集状態には影響しません。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.ResetLikesByUserId(
    &dictionary.ResetLikesByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\ResetLikesByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.ResetLikesByUserIdRequest;
import io.gs2.dictionary.result.ResetLikesByUserIdResult;

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

try {
    ResetLikesByUserIdResult result = client.resetLikesByUserId(
        new ResetLikesByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.ResetLikesByUserIdResult> asyncResult = null;
yield return client.ResetLikesByUserId(
    new Gs2.Gs2Dictionary.Request.ResetLikesByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.resetLikesByUserId(
        new Gs2Dictionary.ResetLikesByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withTimeOffsetToken(null)
    );
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.reset_likes_by_user_id(
        dictionary.ResetLikesByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_time_offset_token(None)
    )
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

result = api_result.result

```

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

client = gs2('dictionary')

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

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

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

result = api_result.result

```




---

### deleteLikes

お気に入りエントリーを削除<br>

エントリーモデル名のリストを指定して、現在ログインしているユーザーの特定のお気に入りを削除します。<br>
バッチ操作として複数のお気に入りを一度に削除できます。<br>
返されるリストには、実際に削除されたお気に入りが含まれます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| accessToken | string |  | ✓|  |  ~ 128文字 | アクセストークン |
| entryModelNames | List&lt;string&gt; |  | | [] | 0 ~ 100 items | エントリーモデル名のリスト |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| items | [List&lt;Like&gt;](#like) | 削除したお気に入りエントリーのリスト |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.DeleteLikes(
    &dictionary.DeleteLikesRequest {
        NamespaceName: pointy.String("namespace-0001"),
        AccessToken: pointy.String("accessToken-0001"),
        EntryModelNames: []*string{
            pointy.String("entry-0001"),
            pointy.String("entry-0002"),
            pointy.String("entry-0003"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\DeleteLikesRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->deleteLikes(
        (new DeleteLikesRequest())
            ->withNamespaceName("namespace-0001")
            ->withAccessToken("accessToken-0001")
            ->withEntryModelNames([
                "entry-0001",
                "entry-0002",
                "entry-0003",
            ])
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.DeleteLikesRequest;
import io.gs2.dictionary.result.DeleteLikesResult;

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

try {
    DeleteLikesResult result = client.deleteLikes(
        new DeleteLikesRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withEntryModelNames(Arrays.asList(
                "entry-0001",
                "entry-0002",
                "entry-0003"
            ))
    );
    List<Like> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.DeleteLikesResult> asyncResult = null;
yield return client.DeleteLikes(
    new Gs2.Gs2Dictionary.Request.DeleteLikesRequest()
        .WithNamespaceName("namespace-0001")
        .WithAccessToken("accessToken-0001")
        .WithEntryModelNames(new string[] {
            "entry-0001",
            "entry-0002",
            "entry-0003",
        }),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.deleteLikes(
        new Gs2Dictionary.DeleteLikesRequest()
            .withNamespaceName("namespace-0001")
            .withAccessToken("accessToken-0001")
            .withEntryModelNames([
                "entry-0001",
                "entry-0002",
                "entry-0003",
            ])
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.delete_likes(
        dictionary.DeleteLikesRequest()
            .with_namespace_name('namespace-0001')
            .with_access_token('accessToken-0001')
            .with_entry_model_names([
                'entry-0001',
                'entry-0002',
                'entry-0003',
            ])
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.delete_likes({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    entryModelNames={
        "entry-0001",
        "entry-0002",
        "entry-0003"
    },
})

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

result = api_result.result
items = result.items;

```

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

client = gs2('dictionary')

api_result_handler = client.delete_likes_async({
    namespaceName="namespace-0001",
    accessToken="accessToken-0001",
    entryModelNames={
        "entry-0001",
        "entry-0002",
        "entry-0003"
    },
})

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;

```




---

### deleteLikesByUserId

ユーザーIDを指定してお気に入りエントリーを削除<br>

エントリーモデル名のリストを指定して、指定されたユーザーの特定のお気に入りを削除します。<br>
バッチ操作として複数のお気に入りを一度に削除できます。<br>
返されるリストには、実際に削除されたお気に入りが含まれます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| userId | string |  | ✓|  |  ~ 128文字 | ユーザーID |
| entryModelNames | List&lt;string&gt; |  | | [] | 0 ~ 100 items | エントリーモデル名のリスト |
| timeOffsetToken | string |  | |  |  ~ 1024文字 | タイムオフセットトークン |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| items | [List&lt;Like&gt;](#like) | 削除したお気に入りエントリーのリスト |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.DeleteLikesByUserId(
    &dictionary.DeleteLikesByUserIdRequest {
        NamespaceName: pointy.String("namespace-0001"),
        UserId: pointy.String("user-0001"),
        EntryModelNames: []*string{
            pointy.String("entry-0001"),
            pointy.String("entry-0002"),
            pointy.String("entry-0003"),
        },
        TimeOffsetToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\DeleteLikesByUserIdRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->deleteLikesByUserId(
        (new DeleteLikesByUserIdRequest())
            ->withNamespaceName("namespace-0001")
            ->withUserId("user-0001")
            ->withEntryModelNames([
                "entry-0001",
                "entry-0002",
                "entry-0003",
            ])
            ->withTimeOffsetToken(null)
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.DeleteLikesByUserIdRequest;
import io.gs2.dictionary.result.DeleteLikesByUserIdResult;

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

try {
    DeleteLikesByUserIdResult result = client.deleteLikesByUserId(
        new DeleteLikesByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withEntryModelNames(Arrays.asList(
                "entry-0001",
                "entry-0002",
                "entry-0003"
            ))
            .withTimeOffsetToken(null)
    );
    List<Like> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.DeleteLikesByUserIdResult> asyncResult = null;
yield return client.DeleteLikesByUserId(
    new Gs2.Gs2Dictionary.Request.DeleteLikesByUserIdRequest()
        .WithNamespaceName("namespace-0001")
        .WithUserId("user-0001")
        .WithEntryModelNames(new string[] {
            "entry-0001",
            "entry-0002",
            "entry-0003",
        })
        .WithTimeOffsetToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.deleteLikesByUserId(
        new Gs2Dictionary.DeleteLikesByUserIdRequest()
            .withNamespaceName("namespace-0001")
            .withUserId("user-0001")
            .withEntryModelNames([
                "entry-0001",
                "entry-0002",
                "entry-0003",
            ])
            .withTimeOffsetToken(null)
    );
    const items = result.getItems();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.delete_likes_by_user_id(
        dictionary.DeleteLikesByUserIdRequest()
            .with_namespace_name('namespace-0001')
            .with_user_id('user-0001')
            .with_entry_model_names([
                'entry-0001',
                'entry-0002',
                'entry-0003',
            ])
            .with_time_offset_token(None)
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.delete_likes_by_user_id({
    namespaceName="namespace-0001",
    userId="user-0001",
    entryModelNames={
        "entry-0001",
        "entry-0002",
        "entry-0003"
    },
    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;

```

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

client = gs2('dictionary')

api_result_handler = client.delete_likes_by_user_id_async({
    namespaceName="namespace-0001",
    userId="user-0001",
    entryModelNames={
        "entry-0001",
        "entry-0002",
        "entry-0003"
    },
    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;

```




---

### describeEntryModels

エントリーモデルの一覧を取得<br>

指定されたネームスペースで現在有効化（公開）されているすべてのエントリーモデルを取得します。<br>
エントリーモデルは、ユーザーが収集可能な図鑑アイテムの種類を定義します。<br>
現在のマスターデータを通じて有効化されたモデルのみが返され、編集可能なマスターデータは含まれません。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| items | [List&lt;EntryModel&gt;](#entrymodel) | エントリーモデルのリスト |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.DescribeEntryModels(
    &dictionary.DescribeEntryModelsRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\DescribeEntryModelsRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->describeEntryModels(
        (new DescribeEntryModelsRequest())
            ->withNamespaceName("namespace-0001")
    );
    $items = $result->getItems();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.DescribeEntryModelsRequest;
import io.gs2.dictionary.result.DescribeEntryModelsResult;

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

try {
    DescribeEntryModelsResult result = client.describeEntryModels(
        new DescribeEntryModelsRequest()
            .withNamespaceName("namespace-0001")
    );
    List<EntryModel> items = result.getItems();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.DescribeEntryModelsResult> asyncResult = null;
yield return client.DescribeEntryModels(
    new Gs2.Gs2Dictionary.Request.DescribeEntryModelsRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.describe_entry_models(
        dictionary.DescribeEntryModelsRequest()
            .with_namespace_name('namespace-0001')
    )
    items = result.items
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

result = api_result.result
items = result.items;

```

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

client = gs2('dictionary')

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

```




---

### getEntryModel

エントリーモデルを取得<br>

名前を指定して、特定の有効なエントリーモデルの詳細情報を取得します。<br>
返される情報には、モデルの名前、メタデータ、説明が含まれます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| entryName | string |  | ✓|  |  ~ 128文字 | エントリーモデル名 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [EntryModel](#entrymodel) | エントリーモデル |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.GetEntryModel(
    &dictionary.GetEntryModelRequest {
        NamespaceName: pointy.String("namespace-0001"),
        EntryName: pointy.String("entry-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\GetEntryModelRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.GetEntryModelRequest;
import io.gs2.dictionary.result.GetEntryModelResult;

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

try {
    GetEntryModelResult result = client.getEntryModel(
        new GetEntryModelRequest()
            .withNamespaceName("namespace-0001")
            .withEntryName("entry-0001")
    );
    EntryModel item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.GetEntryModelResult> asyncResult = null;
yield return client.GetEntryModel(
    new Gs2.Gs2Dictionary.Request.GetEntryModelRequest()
        .WithNamespaceName("namespace-0001")
        .WithEntryName("entry-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.getEntryModel(
        new Gs2Dictionary.GetEntryModelRequest()
            .withNamespaceName("namespace-0001")
            .withEntryName("entry-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.get_entry_model(
        dictionary.GetEntryModelRequest()
            .with_namespace_name('namespace-0001')
            .with_entry_name('entry-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.get_entry_model({
    namespaceName="namespace-0001",
    entryName="entry-0001",
})

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

result = api_result.result
item = result.item;

```

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

client = gs2('dictionary')

api_result_handler = client.get_entry_model_async({
    namespaceName="namespace-0001",
    entryName="entry-0001",
})

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

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

result = api_result.result
item = result.item;

```




---

### exportMaster

エントリーモデルマスターを有効化可能なマスターデータ形式でエクスポート<br>

現在のエントリーモデルマスターデータを有効化に使用できる形式でエクスポートします。<br>
エクスポートされたデータは、現在のマスター構成のバックアップや別のネームスペースへのインポートに使用できます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [CurrentEntryMaster](#currententrymaster) | 有効化可能なエントリーモデルのマスターデータ |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.ExportMaster(
    &dictionary.ExportMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\ExportMasterRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.ExportMasterRequest;
import io.gs2.dictionary.result.ExportMasterResult;

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

try {
    ExportMasterResult result = client.exportMaster(
        new ExportMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    CurrentEntryMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

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


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

result = api_result.result
item = result.item;

```

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

client = gs2('dictionary')

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;

```




---

### getCurrentEntryMaster

現在アクティブなエントリーモデルのマスターデータを取得<br>

指定されたネームスペースで現在有効化（公開）されているエントリーモデルのマスターデータを取得します。<br>
これは編集可能なマスターデータとは異なり、実際に本番で使用されている構成を表します。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [CurrentEntryMaster](#currententrymaster) | 現在アクティブなエントリーモデルのマスターデータ |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.GetCurrentEntryMaster(
    &dictionary.GetCurrentEntryMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\GetCurrentEntryMasterRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.GetCurrentEntryMasterRequest;
import io.gs2.dictionary.result.GetCurrentEntryMasterResult;

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

try {
    GetCurrentEntryMasterResult result = client.getCurrentEntryMaster(
        new GetCurrentEntryMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    CurrentEntryMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

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

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

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

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.get_current_entry_master(
        dictionary.GetCurrentEntryMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

result = api_result.result
item = result.item;

```

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

client = gs2('dictionary')

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

```




---

### preUpdateCurrentEntryMaster

現在アクティブなエントリーモデルのマスターデータを更新（3フェーズ版）<br>

1MBを超えるマスターデータをアップロードする場合は、3フェーズで更新を行います。<br>
1. このAPIを実行し、アップロード用のトークンとURLを取得します。<br>
2. 取得したURLに対して、マスターデータをアップロードします。<br>
3. UpdateCurrentEntryMaster にアップロードで取得したトークンを渡して実行し、マスターデータを反映します。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| uploadToken | string | アップロード後に結果を反映する際に使用するトークン |
| uploadUrl | string | アップロード処理の実行に使用するURL |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.PreUpdateCurrentEntryMaster(
    &dictionary.PreUpdateCurrentEntryMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
uploadToken := result.UploadToken
uploadUrl := result.UploadUrl

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\PreUpdateCurrentEntryMasterRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->preUpdateCurrentEntryMaster(
        (new PreUpdateCurrentEntryMasterRequest())
            ->withNamespaceName("namespace-0001")
    );
    $uploadToken = $result->getUploadToken();
    $uploadUrl = $result->getUploadUrl();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.PreUpdateCurrentEntryMasterRequest;
import io.gs2.dictionary.result.PreUpdateCurrentEntryMasterResult;

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

try {
    PreUpdateCurrentEntryMasterResult result = client.preUpdateCurrentEntryMaster(
        new PreUpdateCurrentEntryMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    String uploadToken = result.getUploadToken();
    String uploadUrl = result.getUploadUrl();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.PreUpdateCurrentEntryMasterResult> asyncResult = null;
yield return client.PreUpdateCurrentEntryMaster(
    new Gs2.Gs2Dictionary.Request.PreUpdateCurrentEntryMasterRequest()
        .WithNamespaceName("namespace-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var uploadToken = result.UploadToken;
var uploadUrl = result.UploadUrl;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.preUpdateCurrentEntryMaster(
        new Gs2Dictionary.PreUpdateCurrentEntryMasterRequest()
            .withNamespaceName("namespace-0001")
    );
    const uploadToken = result.getUploadToken();
    const uploadUrl = result.getUploadUrl();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.pre_update_current_entry_master(
        dictionary.PreUpdateCurrentEntryMasterRequest()
            .with_namespace_name('namespace-0001')
    )
    upload_token = result.upload_token
    upload_url = result.upload_url
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

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

```

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

client = gs2('dictionary')

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

```




---

### updateCurrentEntryMaster

現在アクティブなエントリーモデルのマスターデータを更新<br>

指定されたネームスペースのエントリーモデルのマスターデータを更新し有効化（公開）します。<br>
2つのモードをサポートしています：インラインのマスターデータ用の 'direct' モードと、事前にアップロードされたマスターデータ用の 'preUpload' モードです。<br>
1MBを超えるマスターデータの場合は、3フェーズの更新フロー（PreUpdate -> アップロード -> Update（preUpload モード））を使用してください。<br>
アップロードされたマスターデータは適用前に検証されます。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| mode | 文字列列挙型<br>enum {<br>&nbsp;&nbsp;"direct",<br>&nbsp;&nbsp;"preUpload"<br>}<br> |  | | "direct" |  | 更新モード"direct": マスターデータを直接更新 / "preUpload": マスターデータをアップロードしてから更新 /  |
| settings | string | {mode} == "direct" | ✓※|  |  ~ 5242880 バイト (5MB) | マスターデータ<br>※ mode が "direct" であれば必須 |
| uploadToken | string | {mode} == "preUpload" | ✓※|  |  ~ 1024文字 | 事前アップロードで取得したトークン<br>アップロードしたマスターデータを適用するために使用されます。<br>※ mode が "preUpload" であれば必須 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [CurrentEntryMaster](#currententrymaster) | 更新された現在アクティブなエントリーモデルのマスターデータ |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentEntryMaster(
    &dictionary.UpdateCurrentEntryMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Mode: pointy.String("direct"),
        Settings: pointy.String("{\n  \"version\": \"2020-04-30\",\n  \"entryModels\": [\n    {\n      \"name\": \"monster-0001\",\n      \"metadata\": \"MONSTER-0001\"\n    },\n    {\n      \"name\": \"monster-0002\",\n      \"metadata\": \"MONSTER-0002\"\n    }\n  ]\n}"),
        UploadToken: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\UpdateCurrentEntryMasterRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->updateCurrentEntryMaster(
        (new UpdateCurrentEntryMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withMode("direct")
            ->withSettings("{\n  \"version\": \"2020-04-30\",\n  \"entryModels\": [\n    {\n      \"name\": \"monster-0001\",\n      \"metadata\": \"MONSTER-0001\"\n    },\n    {\n      \"name\": \"monster-0002\",\n      \"metadata\": \"MONSTER-0002\"\n    }\n  ]\n}")
            ->withUploadToken(null)
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.UpdateCurrentEntryMasterRequest;
import io.gs2.dictionary.result.UpdateCurrentEntryMasterResult;

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

try {
    UpdateCurrentEntryMasterResult result = client.updateCurrentEntryMaster(
        new UpdateCurrentEntryMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMode("direct")
            .withSettings("{\n  \"version\": \"2020-04-30\",\n  \"entryModels\": [\n    {\n      \"name\": \"monster-0001\",\n      \"metadata\": \"MONSTER-0001\"\n    },\n    {\n      \"name\": \"monster-0002\",\n      \"metadata\": \"MONSTER-0002\"\n    }\n  ]\n}")
            .withUploadToken(null)
    );
    CurrentEntryMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.UpdateCurrentEntryMasterResult> asyncResult = null;
yield return client.UpdateCurrentEntryMaster(
    new Gs2.Gs2Dictionary.Request.UpdateCurrentEntryMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithMode("direct")
        .WithSettings("{\n  \"version\": \"2020-04-30\",\n  \"entryModels\": [\n    {\n      \"name\": \"monster-0001\",\n      \"metadata\": \"MONSTER-0001\"\n    },\n    {\n      \"name\": \"monster-0002\",\n      \"metadata\": \"MONSTER-0002\"\n    }\n  ]\n}")
        .WithUploadToken(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.updateCurrentEntryMaster(
        new Gs2Dictionary.UpdateCurrentEntryMasterRequest()
            .withNamespaceName("namespace-0001")
            .withMode("direct")
            .withSettings("{\n  \"version\": \"2020-04-30\",\n  \"entryModels\": [\n    {\n      \"name\": \"monster-0001\",\n      \"metadata\": \"MONSTER-0001\"\n    },\n    {\n      \"name\": \"monster-0002\",\n      \"metadata\": \"MONSTER-0002\"\n    }\n  ]\n}")
            .withUploadToken(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.update_current_entry_master(
        dictionary.UpdateCurrentEntryMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_mode('direct')
            .with_settings('{\n  "version": "2020-04-30",\n  "entryModels": [\n    {\n      "name": "monster-0001",\n      "metadata": "MONSTER-0001"\n    },\n    {\n      "name": "monster-0002",\n      "metadata": "MONSTER-0002"\n    }\n  ]\n}')
            .with_upload_token(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.update_current_entry_master({
    namespaceName="namespace-0001",
    mode="direct",
    settings="{\n  \"version\": \"2020-04-30\",\n  \"entryModels\": [\n    {\n      \"name\": \"monster-0001\",\n      \"metadata\": \"MONSTER-0001\"\n    },\n    {\n      \"name\": \"monster-0002\",\n      \"metadata\": \"MONSTER-0002\"\n    }\n  ]\n}",
    uploadToken=nil,
})

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

result = api_result.result
item = result.item;

```

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

client = gs2('dictionary')

api_result_handler = client.update_current_entry_master_async({
    namespaceName="namespace-0001",
    mode="direct",
    settings="{\n  \"version\": \"2020-04-30\",\n  \"entryModels\": [\n    {\n      \"name\": \"monster-0001\",\n      \"metadata\": \"MONSTER-0001\"\n    },\n    {\n      \"name\": \"monster-0002\",\n      \"metadata\": \"MONSTER-0002\"\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;

```




---

### updateCurrentEntryMasterFromGitHub

現在アクティブなエントリーモデルのマスターデータをGitHubから更新<br>

GitHub リポジトリから直接マスターデータを取得して更新・有効化（公開）します。<br>
チェックアウト設定には、使用するリポジトリ、ブランチ/タグ、ファイルパスを指定します。<br>
マスターデータをバージョン管理で管理し、直接デプロイする場合に便利です。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| checkoutSetting | [GitHubCheckoutSetting](#githubcheckoutsetting) |  | ✓|  |  | GitHubからマスターデータをチェックアウトする設定 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [CurrentEntryMaster](#currententrymaster) | 更新された現在アクティブなエントリーモデルのマスターデータ |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.UpdateCurrentEntryMasterFromGitHub(
    &dictionary.UpdateCurrentEntryMasterFromGitHubRequest {
        NamespaceName: pointy.String("namespace-0001"),
        CheckoutSetting: &dictionary.GitHubCheckoutSetting{
            ApiKeyId: pointy.String("apiKeyId-0001"),
            RepositoryName: pointy.String("gs2io/master-data"),
            SourcePath: pointy.String("path/to/file.json"),
            ReferenceType: pointy.String("branch"),
            BranchName: pointy.String("develop"),
        },
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\UpdateCurrentEntryMasterFromGitHubRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->updateCurrentEntryMasterFromGitHub(
        (new UpdateCurrentEntryMasterFromGitHubRequest())
            ->withNamespaceName("namespace-0001")
            ->withCheckoutSetting((new GitHubCheckoutSetting())
                ->withApiKeyId("apiKeyId-0001")
                ->withRepositoryName("gs2io/master-data")
                ->withSourcePath("path/to/file.json")
                ->withReferenceType("branch")
                ->withBranchName("develop")
            )
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.UpdateCurrentEntryMasterFromGitHubRequest;
import io.gs2.dictionary.result.UpdateCurrentEntryMasterFromGitHubResult;

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

try {
    UpdateCurrentEntryMasterFromGitHubResult result = client.updateCurrentEntryMasterFromGitHub(
        new UpdateCurrentEntryMasterFromGitHubRequest()
            .withNamespaceName("namespace-0001")
            .withCheckoutSetting(new GitHubCheckoutSetting()
                .withApiKeyId("apiKeyId-0001")
                .withRepositoryName("gs2io/master-data")
                .withSourcePath("path/to/file.json")
                .withReferenceType("branch")
                .withBranchName("develop")
            )
    );
    CurrentEntryMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.UpdateCurrentEntryMasterFromGitHubResult> asyncResult = null;
yield return client.UpdateCurrentEntryMasterFromGitHub(
    new Gs2.Gs2Dictionary.Request.UpdateCurrentEntryMasterFromGitHubRequest()
        .WithNamespaceName("namespace-0001")
        .WithCheckoutSetting(new Gs2.Gs2Dictionary.Model.GitHubCheckoutSetting()
            .WithApiKeyId("apiKeyId-0001")
            .WithRepositoryName("gs2io/master-data")
            .WithSourcePath("path/to/file.json")
            .WithReferenceType("branch")
            .WithBranchName("develop")
        ),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.updateCurrentEntryMasterFromGitHub(
        new Gs2Dictionary.UpdateCurrentEntryMasterFromGitHubRequest()
            .withNamespaceName("namespace-0001")
            .withCheckoutSetting(new Gs2Dictionary.model.GitHubCheckoutSetting()
                .withApiKeyId("apiKeyId-0001")
                .withRepositoryName("gs2io/master-data")
                .withSourcePath("path/to/file.json")
                .withReferenceType("branch")
                .withBranchName("develop")
            )
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.update_current_entry_master_from_git_hub(
        dictionary.UpdateCurrentEntryMasterFromGitHubRequest()
            .with_namespace_name('namespace-0001')
            .with_checkout_setting(dictionary.GitHubCheckoutSetting()
                .with_api_key_id('apiKeyId-0001')
                .with_repository_name('gs2io/master-data')
                .with_source_path('path/to/file.json')
                .with_reference_type('branch')
                .with_branch_name('develop')
            )
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.update_current_entry_master_from_git_hub({
    namespaceName="namespace-0001",
    checkoutSetting={
        api_key_id="apiKeyId-0001",
        repository_name="gs2io/master-data",
        source_path="path/to/file.json",
        reference_type="branch",
        branch_name="develop",
    },
})

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

result = api_result.result
item = result.item;

```

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

client = gs2('dictionary')

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

```




---

### describeEntryModelMasters

エントリーモデルマスターの一覧を取得<br>

名前の接頭辞フィルタリングが可能な、編集可能なエントリーモデルマスターのページネーション付きリストを取得します。<br>
エントリーモデルマスターは図鑑アイテム種別の編集可能な定義です。マスターへの変更は、CurrentEntryMaster API でマスターデータを有効化するまで反映されません。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| namePrefix | string |  | |  |  ~ 64文字 | エントリーモデル名のフィルター接頭辞 |
| pageToken | string |  | |  |  ~ 1024文字 | データの取得を開始する位置を指定するトークン |
| limit | int |  | | 30 | 1 ~ 1000 | データの取得件数 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| items | [List&lt;EntryModelMaster&gt;](#entrymodelmaster) | エントリーモデルマスターのリスト |
| nextPageToken | string | リストの続きを取得するためのページトークン |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.DescribeEntryModelMasters(
    &dictionary.DescribeEntryModelMastersRequest {
        NamespaceName: pointy.String("namespace-0001"),
        NamePrefix: nil,
        PageToken: nil,
        Limit: nil,
    }
)
if err != nil {
    panic("error occurred")
}
items := result.Items
nextPageToken := result.NextPageToken

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\DescribeEntryModelMastersRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.DescribeEntryModelMastersRequest;
import io.gs2.dictionary.result.DescribeEntryModelMastersResult;

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

try {
    DescribeEntryModelMastersResult result = client.describeEntryModelMasters(
        new DescribeEntryModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    List<EntryModelMaster> items = result.getItems();
    String nextPageToken = result.getNextPageToken();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.DescribeEntryModelMastersResult> asyncResult = null;
yield return client.DescribeEntryModelMasters(
    new Gs2.Gs2Dictionary.Request.DescribeEntryModelMastersRequest()
        .WithNamespaceName("namespace-0001")
        .WithNamePrefix(null)
        .WithPageToken(null)
        .WithLimit(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var items = result.Items;
var nextPageToken = result.NextPageToken;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.describeEntryModelMasters(
        new Gs2Dictionary.DescribeEntryModelMastersRequest()
            .withNamespaceName("namespace-0001")
            .withNamePrefix(null)
            .withPageToken(null)
            .withLimit(null)
    );
    const items = result.getItems();
    const nextPageToken = result.getNextPageToken();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.describe_entry_model_masters(
        dictionary.DescribeEntryModelMastersRequest()
            .with_namespace_name('namespace-0001')
            .with_name_prefix(None)
            .with_page_token(None)
            .with_limit(None)
    )
    items = result.items
    next_page_token = result.next_page_token
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

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

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

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

```

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

client = gs2('dictionary')

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

```




---

### createEntryModelMaster

エントリーモデルマスターを新規作成<br>

名前、説明、メタデータを指定して、新しい編集可能なエントリーモデルマスター定義を作成します。<br>
作成されたマスターは、ユーザーが収集可能な図鑑アイテム種別を定義します。<br>
変更は CurrentEntryMaster API でマスターデータを有効化するまで反映されません。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| name | string |  | ✓|  |  ~ 128文字 | エントリーモデル名<br>エントリーモデル固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| description | string |  | |  |  ~ 1024文字 | 説明文 |
| metadata | string |  | |  |  ~ 2048文字 | メタデータ<br>メタデータには任意の値を設定できます。<br>これらの値は GS2 の動作には影響しないため、ゲーム内で利用する情報の保存先として使用できます。 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [EntryModelMaster](#entrymodelmaster) | 作成したエントリーモデルマスター |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.CreateEntryModelMaster(
    &dictionary.CreateEntryModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        Name: pointy.String("monster-0001"),
        Description: nil,
        Metadata: pointy.String("MONSTER-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\CreateEntryModelMasterRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->createEntryModelMaster(
        (new CreateEntryModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withName("monster-0001")
            ->withDescription(null)
            ->withMetadata("MONSTER-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.CreateEntryModelMasterRequest;
import io.gs2.dictionary.result.CreateEntryModelMasterResult;

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

try {
    CreateEntryModelMasterResult result = client.createEntryModelMaster(
        new CreateEntryModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("monster-0001")
            .withDescription(null)
            .withMetadata("MONSTER-0001")
    );
    EntryModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.CreateEntryModelMasterResult> asyncResult = null;
yield return client.CreateEntryModelMaster(
    new Gs2.Gs2Dictionary.Request.CreateEntryModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithName("monster-0001")
        .WithDescription(null)
        .WithMetadata("MONSTER-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.createEntryModelMaster(
        new Gs2Dictionary.CreateEntryModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withName("monster-0001")
            .withDescription(null)
            .withMetadata("MONSTER-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.create_entry_model_master(
        dictionary.CreateEntryModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_name('monster-0001')
            .with_description(None)
            .with_metadata('MONSTER-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.create_entry_model_master({
    namespaceName="namespace-0001",
    name="monster-0001",
    description=nil,
    metadata="MONSTER-0001",
})

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

result = api_result.result
item = result.item;

```

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

client = gs2('dictionary')

api_result_handler = client.create_entry_model_master_async({
    namespaceName="namespace-0001",
    name="monster-0001",
    description=nil,
    metadata="MONSTER-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;

```




---

### getEntryModelMaster

エントリーモデルマスターを取得<br>

名前を指定して、特定の編集可能なエントリーモデルマスターの詳細情報を取得します。<br>
有効化前のマスター定義の閲覧・編集に使用します。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| entryName | string |  | ✓|  |  ~ 128文字 | エントリーモデル名<br>エントリーモデル固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [EntryModelMaster](#entrymodelmaster) | エントリーモデルマスター |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.GetEntryModelMaster(
    &dictionary.GetEntryModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        EntryName: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\GetEntryModelMasterRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.GetEntryModelMasterRequest;
import io.gs2.dictionary.result.GetEntryModelMasterResult;

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

try {
    GetEntryModelMasterResult result = client.getEntryModelMaster(
        new GetEntryModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withEntryName(null)
    );
    EntryModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.GetEntryModelMasterResult> asyncResult = null;
yield return client.GetEntryModelMaster(
    new Gs2.Gs2Dictionary.Request.GetEntryModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithEntryName(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.getEntryModelMaster(
        new Gs2Dictionary.GetEntryModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withEntryName(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.get_entry_model_master(
        dictionary.GetEntryModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_entry_name(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.get_entry_model_master({
    namespaceName="namespace-0001",
    entryName=nil,
})

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

result = api_result.result
item = result.item;

```

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

client = gs2('dictionary')

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

```




---

### updateEntryModelMaster

エントリーモデルマスターを更新<br>

既存のエントリーモデルマスターの説明とメタデータを更新します。<br>
エントリーモデル名は作成後に変更できません。<br>
変更は CurrentEntryMaster API でマスターデータを再度有効化するまで反映されません。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| entryName | string |  | ✓|  |  ~ 128文字 | エントリーモデル名<br>エントリーモデル固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| description | string |  | |  |  ~ 1024文字 | 説明文 |
| metadata | string |  | |  |  ~ 2048文字 | メタデータ<br>メタデータには任意の値を設定できます。<br>これらの値は GS2 の動作には影響しないため、ゲーム内で利用する情報の保存先として使用できます。 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [EntryModelMaster](#entrymodelmaster) | 更新したエントリーモデルマスター |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.UpdateEntryModelMaster(
    &dictionary.UpdateEntryModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        EntryName: nil,
        Description: pointy.String("description1"),
        Metadata: pointy.String("MONSTER-0001"),
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\UpdateEntryModelMasterRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

try {
    $result = $client->updateEntryModelMaster(
        (new UpdateEntryModelMasterRequest())
            ->withNamespaceName("namespace-0001")
            ->withEntryName(null)
            ->withDescription("description1")
            ->withMetadata("MONSTER-0001")
    );
    $item = $result->getItem();
} catch (Gs2Exception $e) {
    exit("error occurred")
}

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.UpdateEntryModelMasterRequest;
import io.gs2.dictionary.result.UpdateEntryModelMasterResult;

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

try {
    UpdateEntryModelMasterResult result = client.updateEntryModelMaster(
        new UpdateEntryModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withEntryName(null)
            .withDescription("description1")
            .withMetadata("MONSTER-0001")
    );
    EntryModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.UpdateEntryModelMasterResult> asyncResult = null;
yield return client.UpdateEntryModelMaster(
    new Gs2.Gs2Dictionary.Request.UpdateEntryModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithEntryName(null)
        .WithDescription("description1")
        .WithMetadata("MONSTER-0001"),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.updateEntryModelMaster(
        new Gs2Dictionary.UpdateEntryModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withEntryName(null)
            .withDescription("description1")
            .withMetadata("MONSTER-0001")
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.update_entry_model_master(
        dictionary.UpdateEntryModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_entry_name(None)
            .with_description('description1')
            .with_metadata('MONSTER-0001')
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.update_entry_model_master({
    namespaceName="namespace-0001",
    entryName=nil,
    description="description1",
    metadata="MONSTER-0001",
})

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

result = api_result.result
item = result.item;

```

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

client = gs2('dictionary')

api_result_handler = client.update_entry_model_master_async({
    namespaceName="namespace-0001",
    entryName=nil,
    description="description1",
    metadata="MONSTER-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;

```




---

### deleteEntryModelMaster

エントリーモデルマスターを削除<br>

編集可能なエントリーモデルマスター定義を削除します。<br>
マスターデータのみが影響を受け、現在有効化（公開）されているモデルはマスターデータが再度有効化されるまで影響を受けません。<br>
削除されたモデルに関連する既存のユーザーエントリーは自動的には削除されません。



#### Request

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| entryName | string |  | ✓|  |  ~ 128文字 | エントリーモデル名<br>エントリーモデル固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |

#### Result

|  | 型 | 説明 |
| --- | --- | --- |
| item | [EntryModelMaster](#entrymodelmaster) | 削除したエントリーモデルマスター |

#### 実装例




**Go**
```go

import "github.com/gs2io/gs2-golang-sdk/core"
import "github.com/gs2io/gs2-golang-sdk/dictionary"
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 := dictionary.Gs2DictionaryRestClient{
    Session: &session,
}
result, err := client.DeleteEntryModelMaster(
    &dictionary.DeleteEntryModelMasterRequest {
        NamespaceName: pointy.String("namespace-0001"),
        EntryName: nil,
    }
)
if err != nil {
    panic("error occurred")
}
item := result.Item

```

**PHP**
```php

use Gs2\Core\Model\BasicGs2Credential;
use Gs2\Core\Model\Region;
use Gs2\Core\Net\Gs2RestSession;
use Gs2\Core\Exception\Gs2Exception;
use Gs2\Dictionary\Gs2DictionaryRestClient;
use Gs2\Dictionary\Request\DeleteEntryModelMasterRequest;

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

$session->open();

$client = new Gs2DictionaryRestClient(
    $session
);

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

```

**Java**
```java

import io.gs2.core.model.Region;
import io.gs2.core.model.BasicGs2Credential;
import io.gs2.core.rest.Gs2RestSession;
import io.gs2.core.exception.Gs2Exception;
import io.gs2.dictionary.rest.Gs2DictionaryRestClient;
import io.gs2.dictionary.request.DeleteEntryModelMasterRequest;
import io.gs2.dictionary.result.DeleteEntryModelMasterResult;

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

try {
    DeleteEntryModelMasterResult result = client.deleteEntryModelMaster(
        new DeleteEntryModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withEntryName(null)
    );
    EntryModelMaster item = result.getItem();
} catch (Gs2Exception e) {
    System.exit(1);
}

```

**C#**
```csharp

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

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

AsyncResult<Gs2.Gs2Dictionary.Result.DeleteEntryModelMasterResult> asyncResult = null;
yield return client.DeleteEntryModelMaster(
    new Gs2.Gs2Dictionary.Request.DeleteEntryModelMasterRequest()
        .WithNamespaceName("namespace-0001")
        .WithEntryName(null),
    r => asyncResult = r
);
if (asyncResult.Error != null) {
    throw asyncResult.Error;
}
var result = asyncResult.Result;
var item = result.Item;

```

**TypeScript**
```typescript

import Gs2Core from '@/gs2/core';
import * as Gs2Dictionary from '@/gs2/dictionary';

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

try {
    const result = await client.deleteEntryModelMaster(
        new Gs2Dictionary.DeleteEntryModelMasterRequest()
            .withNamespaceName("namespace-0001")
            .withEntryName(null)
    );
    const item = result.getItem();
} catch (e) {
    process.exit(1);
}

```

**Python**
```python

from gs2 import core
from gs2 import dictionary

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

try:
    result = client.delete_entry_model_master(
        dictionary.DeleteEntryModelMasterRequest()
            .with_namespace_name('namespace-0001')
            .with_entry_name(None)
    )
    item = result.item
except core.Gs2Exception as e:
    exit(1)


```

**GS2-Script**
```lua

client = gs2('dictionary')

api_result = client.delete_entry_model_master({
    namespaceName="namespace-0001",
    entryName=nil,
})

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

result = api_result.result
item = result.item;

```

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

client = gs2('dictionary')

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

```




---



