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

# GS2-Showcase Deploy/CDK リファレンス

GS2-Deployのスタックを作成する際に使用するテンプレートのフォーマットと、CDKによる各種言語のテンプレート出力の実装例




## エンティティ

Deploy処理で操作の対象となるリソース

### Namespace

ネームスペース<br>

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

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

#### Request

リソースの生成・更新リクエスト

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| name | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| description | string |  | |  |  ~ 1024文字 | 説明文 |
| transactionSetting | [TransactionSetting](#transactionsetting) |  | ✓|  |  | トランザクション設定<br>陳列棚操作時のトランザクションの処理方法を制御する設定です。 |
| buyScript | [ScriptSetting](#scriptsetting) |  | |  |  | 購入を実行しようとしたときに実行するスクリプトの設定<br>Script トリガーリファレンス - [`buy`](../script/#buy) |
| logSetting | [LogSetting](#logsetting) |  | |  |  | ログの出力設定<br>陳列棚の閲覧や商品購入に関する API リクエスト・レスポンスログを出力する GS2-Log のネームスペースを指定します。 |

#### GetAttr

[!GetAttr](/articles/tech/deploy/#getattr)タグで取得可能なリソースの生成結果

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

#### 実装例




**GS2-Deploy(YAML)**
```yaml

Type: GS2::Showcase::Namespace
Properties:
  Name: namespace-0001
  Description: null
  TransactionSetting: 
    EnableAutoRun: true
    QueueNamespaceId: grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001
  BuyScript: null
  LogSetting: 
    LoggingNamespaceId: grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001

```

**Go**
```go

import (
    "github.com/gs2io/gs2-golang-cdk/core"
    "github.com/gs2io/gs2-golang-cdk/showcase"
    "github.com/openlyinc/pointy"
)


SampleStack := core.NewStack()
showcase.NewNamespace(
    &SampleStack,
    "namespace-0001",
    showcase.NamespaceOptions{
        TransactionSetting: core.NewTransactionSetting(
            core.TransactionSettingOptions{
                QueueNamespaceId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"),
            },
        ),
        LogSetting: &core.LogSetting{
            LoggingNamespaceId: "grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001",
        },
    },
)

println(SampleStack.Yaml())  // Generate Template

```

**PHP**
```php

class SampleStack extends \Gs2Cdk\Core\Model\Stack
{
    function __construct() {
        parent::__construct();
        new \Gs2Cdk\Showcase\Model\Namespace_(
            stack: $this,
            name: "namespace-0001",
            options: new \Gs2Cdk\Showcase\Model\Options\NamespaceOptions(
                transactionSetting: new \Gs2Cdk\Core\Model\TransactionSetting(
                    new \Gs2Cdk\Core\Model\TransactionSettingOptions(
                        queueNamespaceId: "grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"
                    )
                ),
                logSetting: new \Gs2Cdk\Core\Model\LogSetting(
                    loggingNamespaceId: "grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"
                )
            )
        );
    }
}

print((new SampleStack())->yaml());  // Generate Template

```

**Java**
```java

class SampleStack extends io.gs2.cdk.core.model.Stack
{
    public SampleStack() {
        super();
        new io.gs2.cdk.showcase.model.Namespace(
                this,
                "namespace-0001",
                new io.gs2.cdk.showcase.model.options.NamespaceOptions()
                        .withTransactionSetting(new io.gs2.cdk.core.model.TransactionSetting(
                            new io.gs2.cdk.core.model.options.TransactionSettingOptions()
                                .withQueueNamespaceId("grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001")
                        ))
                        .withLogSetting(new io.gs2.cdk.core.model.LogSetting(
                            "grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"
                        ))
        );
    }
}

System.out.println(new SampleStack().yaml());  // Generate Template

```

**C#**
```csharp

public class SampleStack : Gs2Cdk.Core.Model.Stack
{
    public SampleStack() {
        new Gs2Cdk.Gs2Showcase.Model.Namespace(
            stack: this,
            name: "namespace-0001",
            options: new Gs2Cdk.Gs2Showcase.Model.Options.NamespaceOptions
            {
                transactionSetting = new Gs2Cdk.Core.Model.TransactionSetting(
                    options: new Gs2Cdk.Core.Model.TransactionSettingOptions
                    {
                        queueNamespaceId = "grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"
                    }
                ),
                logSetting = new Gs2Cdk.Core.Model.LogSetting(
                    loggingNamespaceId: "grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"
                )
            }
        );
    }
}

Debug.Log(new SampleStack().Yaml());  // Generate Template

```

**TypeScript**
```typescript

import core from "@/gs2cdk/core";
import showcase from "@/gs2cdk/showcase";

class SampleStack extends core.Stack
{
    public constructor() {
        super();
        new showcase.model.Namespace(
            this,
            "namespace-0001",
            {
                transactionSetting: new core.TransactionSetting(
                    {
                        queueNamespaceId: "grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001"
                    }
                ),
                logSetting: new core.LogSetting(
                    "grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001"
                )
            }
        );
    }
}

console.log(new SampleStack().yaml());  // Generate Template

```

**Python**
```python

from gs2_cdk import Stack, core, showcase

class SampleStack(Stack):

    def __init__(self):
        super().__init__()
        showcase.Namespace(
            stack=self,
            name='namespace-0001',
            options=showcase.NamespaceOptions(
                transaction_setting=core.TransactionSetting(
                    options=core.TransactionSettingOptions(
                        queue_namespace_id='grn:gs2:ap-northeast-1:YourOwnerId:queue:queue-0001',
                    )
                ),
                log_setting=core.LogSetting(
                    logging_namespace_id='grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001',
                ),
            ),
        )

print(SampleStack().yaml())  # Generate Template

```


#### 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 |

#### 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>"none",<br>"gs2_script",<br>"aws"<br>}<br> |  |  | "none" |  | 非同期スクリプトの実行方法<br>非同期実行で使用するスクリプトの種類を指定します。<br>「非同期実行のスクリプトを使用しない(none)」「GS2-Scriptを使用する(gs2_script)」「Amazon EventBridgeを使用する(aws)」が選択できます。"none": なし / "gs2_script": GS2-Script / "aws": Amazon EventBridge /  |
| doneTriggerScriptId | string | {doneTriggerTargetType} == "gs2_script" |  |  |  ~ 1024文字 | 非同期実行する GS2-Script スクリプトGRN<br>「grn:gs2:」ではじまる GRN 形式のIDで指定する必要があります。<br>※ doneTriggerTargetType が "gs2_script" であれば 有効 |
| doneTriggerQueueNamespaceId | string | {doneTriggerTargetType} == "gs2_script" |  |  |  ~ 1024文字 | 非同期実行スクリプトを実行する GS2-JobQueue ネームスペースGRN<br>非同期実行スクリプトを直接実行するのではなく、GS2-JobQueue を経由する場合は GS2-JobQueue のネームスペースGRN を指定します。<br>GS2-JobQueue を利用する理由は多くはありませんので、特に理由がなければ指定する必要はありません。<br>※ doneTriggerTargetType が "gs2_script" であれば 有効 |

#### LogSetting

ログの出力設定<br>

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

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

---

### CurrentShowcaseMaster

現在アクティブな陳列棚モデルのマスターデータ<br>

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

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

#### Request

リソースの生成・更新リクエスト

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128文字 | ネームスペース名<br>ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| mode | 文字列列挙型<br>enum {<br>"direct",<br>"preUpload"<br>}<br> |  | | "direct" |  | 更新モード"direct": マスターデータを直接更新 / "preUpload": マスターデータをアップロードしてから更新 /  |
| settings | string | {mode} == "direct" | ✓※|  |  ~ 5242880 バイト (5MB) | マスターデータ<br>※ mode が "direct" であれば必須 |
| uploadToken | string | {mode} == "preUpload" | ✓※|  |  ~ 1024文字 | 事前アップロードで取得したトークン<br>アップロードしたマスターデータを適用するために使用されます。<br>※ mode が "preUpload" であれば必須 |

#### GetAttr

[!GetAttr](/articles/tech/deploy/#getattr)タグで取得可能なリソースの生成結果

| | 型 | 説明 |
| --- | --- | --- |
| Item | [CurrentShowcaseMaster](../sdk#currentshowcasemaster) | 更新された現在アクティブな陳列棚のマスターデータ

#### 実装例




**GS2-Deploy(YAML)**
```yaml

Type: GS2::Showcase::CurrentShowcaseMaster
Properties:
  NamespaceName: namespace-0001
  Mode: direct
  Settings: {
    "version": "2019-04-04",
    "showcases": [
      {
        "name": "gem",
        "displayItems": [
          {
            "type": "salesItem",
              "salesItem": {
              "name": "gem_3000",
              "metadata": "GEM_3000",
              "consumeActions": [
                {
                  "action": "Gs2Money:RecordReceipt",
                  "request": {
                    "namespaceName": "namespace-0001",
                    "contentsId": "contentsId-0001",
                    "receipt": "#{receipt}",
                    "userId": "#{userId}"
                  }
                }
              ],
              "acquireActions": [
                {
                  "action": "Gs2Money:DepositByUserId",
                  "request": {
                    "namespaceName": "namespace-0001",
                    "slot": 0,
                    "price": 100,
                    "count": 1,
                    "userId": "#{userId}"
                  }
                }
              ]
              }
          },
          {
            "type": "salesItemGroup",
            "salesPeriodEventId": "grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001",
              "salesItemGroup": {
              "name": "step_gem",
              "metadata": "STEP_GEM",
              "salesItems": [
                {
                  "name": "step1_gem_1000",
                  "metadata": "STEP1_GEM_1000",
                  "consumeActions": [
                    {
                      "action": "Gs2Money:RecordReceipt",
                      "request": {
                        "namespaceName": "namespace-0001",
                        "contentsId": "contentsId-0001",
                        "receipt": "#{receipt}",
                        "userId": "#{userId}"
                      }
                    },
                    {
                      "action": "Gs2Limit:CountUpByUserId",
                      "request": {
                        "namespaceName": "namespace-0001",
                        "limitName": "limit-0001",
                        "counterName": "counter-0001",
                        "countUpValue": 1,
                        "maxValue": 100,
                        "userId": "#{userId}"
                      }
                    }
                  ],
                  "acquireActions": [
                    {
                      "action": "Gs2Money:DepositByUserId",
                      "request": {
                        "namespaceName": "namespace-0001",
                        "slot": 0,
                        "price": 100,
                        "count": 1,
                        "userId": "#{userId}"
                      }
                    }
                  ]
                },
                {
                  "name": "step2_gem_2000",
                  "metadata": "STEP1_GEM_2000",
                  "consumeActions": [
                    {
                      "action": "Gs2Money:RecordReceipt",
                      "request": {
                        "namespaceName": "namespace-0001",
                        "contentsId": "contentsId-0001",
                        "receipt": "#{receipt}",
                        "userId": "#{userId}"
                      }
                    },
                    {
                      "action": "Gs2Limit:CountUpByUserId",
                      "request": {
                        "namespaceName": "namespace-0001",
                        "limitName": "limit-0001",
                        "counterName": "counter-0001",
                        "countUpValue": 1,
                        "maxValue": 100,
                        "userId": "#{userId}"
                      }
                    }
                  ],
                  "acquireActions": [
                    {
                      "action": "Gs2Money:DepositByUserId",
                      "request": {
                        "namespaceName": "namespace-0001",
                        "slot": 0,
                        "price": 100,
                        "count": 1,
                        "userId": "#{userId}"
                      }
                    }
                  ]
                }
              ]
              }
          }
        ],
        "metadata": "GEM"
      },
      {
        "name": "gacha",
        "displayItems": [
          {
            "type": "salesItem",
              "salesItem": {
              "name": "single",
              "metadata": "SINGLE",
              "consumeActions": [
                {
                  "action": "Gs2Money:WithdrawByUserId",
                  "request": {
                    "namespaceName": "namespace-0001",
                    "slot": 0,
                    "count": 1,
                    "paidOnly": false,
                    "userId": "#{userId}"
                  }
                }
              ],
              "acquireActions": [
                {
                  "action": "Gs2Inventory:AcquireItemSetByUserId",
                  "request": {
                    "namespaceName": "namespace-0001",
                    "inventoryName": "inventory-0001",
                    "itemName": "item-0001",
                    "acquireCount": 1,
                    "expiresAt": 0,
                    "createNewItemSet": false,
                    "itemSetName": "",
                    "userId": "#{userId}"
                  }
                }
              ]
              }
          },
          {
            "type": "salesItem",
              "salesItem": {
              "name": "10times",
              "metadata": "10TIMES",
              "consumeActions": [
                {
                  "action": "Gs2Money:WithdrawByUserId",
                  "request": {
                    "namespaceName": "namespace-0001",
                    "slot": 0,
                    "count": 1,
                    "paidOnly": false,
                    "userId": "#{userId}"
                  }
                }
              ],
              "acquireActions": [
                {
                  "action": "Gs2Inventory:AcquireItemSetByUserId",
                  "request": {
                    "namespaceName": "namespace-0001",
                    "inventoryName": "inventory-0001",
                    "itemName": "item-0001",
                    "acquireCount": 1,
                    "expiresAt": 0,
                    "createNewItemSet": false,
                    "itemSetName": "",
                    "userId": "#{userId}"
                  }
                },
                {
                  "action": "Gs2Inventory:AcquireItemSetByUserId",
                  "request": {
                    "namespaceName": "namespace-0001",
                    "inventoryName": "inventory-0001",
                    "itemName": "item-0001",
                    "acquireCount": 1,
                    "expiresAt": 0,
                    "createNewItemSet": false,
                    "itemSetName": "",
                    "userId": "#{userId}"
                  }
                },
                {
                  "action": "Gs2Inventory:AcquireItemSetByUserId",
                  "request": {
                    "namespaceName": "namespace-0001",
                    "inventoryName": "inventory-0001",
                    "itemName": "item-0001",
                    "acquireCount": 1,
                    "expiresAt": 0,
                    "createNewItemSet": false,
                    "itemSetName": "",
                    "userId": "#{userId}"
                  }
                },
                {
                  "action": "Gs2Inventory:AcquireItemSetByUserId",
                  "request": {
                    "namespaceName": "namespace-0001",
                    "inventoryName": "inventory-0001",
                    "itemName": "item-0001",
                    "acquireCount": 1,
                    "expiresAt": 0,
                    "createNewItemSet": false,
                    "itemSetName": "",
                    "userId": "#{userId}"
                  }
                },
                {
                  "action": "Gs2Inventory:AcquireItemSetByUserId",
                  "request": {
                    "namespaceName": "namespace-0001",
                    "inventoryName": "inventory-0001",
                    "itemName": "item-0001",
                    "acquireCount": 1,
                    "expiresAt": 0,
                    "createNewItemSet": false,
                    "itemSetName": "",
                    "userId": "#{userId}"
                  }
                }
              ]
              }
          }
        ],
        "metadata": "GACHA"
      }
    ],
    "randomShowcases": []
    
  }
  UploadToken: null

```

**Go**
```go

import (
    "github.com/gs2io/gs2-golang-cdk/core"
    "github.com/gs2io/gs2-golang-cdk/showcase"
    "github.com/gs2io/gs2-golang-cdk/money"
    "github.com/gs2io/gs2-golang-cdk/limit"
    "github.com/gs2io/gs2-golang-cdk/inventory"
    "github.com/openlyinc/pointy"
)


SampleStack := core.NewStack()
showcase.NewNamespace(
    &SampleStack,
    "namespace-0001",
    showcase.NamespaceOptions{},
).MasterData(
    []showcase.Showcase{
        showcase.NewShowcase(
            "gem",
            []showcase.DisplayItem{
                showcase.NewDisplayItem(
                    "",
                    showcase.DisplayItemTypeSalesItem,
                    showcase.DisplayItemOptions{
                        SalesItem: &showcase.SalesItem{
                            Name: "gem_3000",
                            AcquireActions: []core.AcquireAction{
                                money.DepositByUserId(
                                    "namespace-0001",
                                    0,
                                    100,
                                    1,
                                ),
                            },
                            Metadata: pointy.String("GEM_3000"),
                            ConsumeActions: []core.ConsumeAction{
                                money.RecordReceipt(
                                    "namespace-0001",
                                    "contentsId-0001",
                                    "#{receipt}",
                                ),
                            },
                        },
                    },
                ),
                showcase.NewDisplayItem(
                    "",
                    showcase.DisplayItemTypeSalesItemGroup,
                    showcase.DisplayItemOptions{
                        SalesItemGroup: &showcase.SalesItemGroup{
                            Name: "step_gem",
                            SalesItems: []showcase.SalesItem{
                                showcase.NewSalesItem(
                                    "step1_gem_1000",
                                    []core.AcquireAction{
                                        money.DepositByUserId(
                                            "namespace-0001",
                                            0,
                                            100,
                                            1,
                                        ),
                                    },
                                    showcase.SalesItemOptions{
                                        Metadata: pointy.String("STEP1_GEM_1000"),
                                        ConsumeActions: []core.ConsumeAction{
                                            money.RecordReceipt(
                                                "namespace-0001",
                                                "contentsId-0001",
                                                "#{receipt}",
                                            ),
                                            limit.CountUpByUserId(
                                                "namespace-0001",
                                                "limit-0001",
                                                "counter-0001",
                                                pointy.Int32(1),
                                                pointy.Int32(100),
                                            ),
                                        },
                                    },
                                ),
                                showcase.NewSalesItem(
                                    "step2_gem_2000",
                                    []core.AcquireAction{
                                        money.DepositByUserId(
                                            "namespace-0001",
                                            0,
                                            100,
                                            1,
                                        ),
                                    },
                                    showcase.SalesItemOptions{
                                        Metadata: pointy.String("STEP1_GEM_2000"),
                                        ConsumeActions: []core.ConsumeAction{
                                            money.RecordReceipt(
                                                "namespace-0001",
                                                "contentsId-0001",
                                                "#{receipt}",
                                            ),
                                            limit.CountUpByUserId(
                                                "namespace-0001",
                                                "limit-0001",
                                                "counter-0001",
                                                pointy.Int32(1),
                                                pointy.Int32(100),
                                            ),
                                        },
                                    },
                                ),
                            },
                            Metadata: pointy.String("STEP_GEM"),
                        },
                        SalesPeriodEventId: pointy.String("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001"),
                    },
                ),
            },
            showcase.ShowcaseOptions{
                Metadata: pointy.String("GEM"),
            },
        ),
        showcase.NewShowcase(
            "gacha",
            []showcase.DisplayItem{
                showcase.NewDisplayItem(
                    "",
                    showcase.DisplayItemTypeSalesItem,
                    showcase.DisplayItemOptions{
                        SalesItem: &showcase.SalesItem{
                            Name: "single",
                            AcquireActions: []core.AcquireAction{
                                inventory.AcquireItemSetByUserId(
                                    "namespace-0001",
                                    "inventory-0001",
                                    "item-0001",
                                    1,
                                    pointy.Int64(0),
                                    pointy.Bool(false),
                                    pointy.String(""),
                                ),
                            },
                            Metadata: pointy.String("SINGLE"),
                            ConsumeActions: []core.ConsumeAction{
                                money.WithdrawByUserId(
                                    "namespace-0001",
                                    0,
                                    1,
                                    pointy.Bool(false),
                                ),
                            },
                        },
                    },
                ),
                showcase.NewDisplayItem(
                    "",
                    showcase.DisplayItemTypeSalesItem,
                    showcase.DisplayItemOptions{
                        SalesItem: &showcase.SalesItem{
                            Name: "10times",
                            AcquireActions: []core.AcquireAction{
                                inventory.AcquireItemSetByUserId(
                                    "namespace-0001",
                                    "inventory-0001",
                                    "item-0001",
                                    1,
                                    pointy.Int64(0),
                                    pointy.Bool(false),
                                    pointy.String(""),
                                ),
                                inventory.AcquireItemSetByUserId(
                                    "namespace-0001",
                                    "inventory-0001",
                                    "item-0001",
                                    1,
                                    pointy.Int64(0),
                                    pointy.Bool(false),
                                    pointy.String(""),
                                ),
                                inventory.AcquireItemSetByUserId(
                                    "namespace-0001",
                                    "inventory-0001",
                                    "item-0001",
                                    1,
                                    pointy.Int64(0),
                                    pointy.Bool(false),
                                    pointy.String(""),
                                ),
                                inventory.AcquireItemSetByUserId(
                                    "namespace-0001",
                                    "inventory-0001",
                                    "item-0001",
                                    1,
                                    pointy.Int64(0),
                                    pointy.Bool(false),
                                    pointy.String(""),
                                ),
                                inventory.AcquireItemSetByUserId(
                                    "namespace-0001",
                                    "inventory-0001",
                                    "item-0001",
                                    1,
                                    pointy.Int64(0),
                                    pointy.Bool(false),
                                    pointy.String(""),
                                ),
                            },
                            Metadata: pointy.String("10TIMES"),
                            ConsumeActions: []core.ConsumeAction{
                                money.WithdrawByUserId(
                                    "namespace-0001",
                                    0,
                                    1,
                                    pointy.Bool(false),
                                ),
                            },
                        },
                    },
                ),
            },
            showcase.ShowcaseOptions{
                Metadata: pointy.String("GACHA"),
            },
        ),
    },
    []showcase.RandomShowcase{
    },
)

println(SampleStack.Yaml())  // Generate Template

```

**PHP**
```php

class SampleStack extends \Gs2Cdk\Core\Model\Stack
{
    function __construct() {
        parent::__construct();
        (new \Gs2Cdk\Showcase\Model\Namespace_(
            stack: $this,
            name: "namespace-0001"
        ))->masterData(
            [
                new \Gs2Cdk\Showcase\Model\Showcase(
                    name:"gem",
                    displayItems:[
                        new \Gs2Cdk\Showcase\Model\DisplayItem(
                            displayItemId: "",
                            type: \Gs2Cdk\Showcase\Model\Enums\DisplayItemType::SALES_ITEM,
                            options: new \Gs2Cdk\Showcase\Model\Options\DisplayItemOptions(
                                salesItem: new \Gs2Cdk\Showcase\Model\SalesItem(
                                    name: "gem_3000",
                                    acquireActions: [
                                        new \Gs2Cdk\Money\StampSheet\DepositByUserId(
                                            namespaceName: "namespace-0001",
                                            slot: 0,
                                            price: 100,
                                            count: 1,
                                            userId: "#{userId}"
                                        ),
                                    ],
                                    options: new \Gs2Cdk\Showcase\Model\Options\SalesItemOptions(
                                        metadata: "GEM_3000",
                                        consumeActions: [
                                            new \Gs2Cdk\Money\StampSheet\RecordReceipt(
                                                namespaceName: "namespace-0001",
                                                contentsId: "contentsId-0001",
                                                receipt: "#{receipt}",
                                                userId: "#{userId}"
                                            ),
                                        ],
                                    ),
                                ),
                            ),
                        ),
                        new \Gs2Cdk\Showcase\Model\DisplayItem(
                            displayItemId: "",
                            type: \Gs2Cdk\Showcase\Model\Enums\DisplayItemType::SALES_ITEM_GROUP,
                            options: new \Gs2Cdk\Showcase\Model\Options\DisplayItemOptions(
                                salesItemGroup: new \Gs2Cdk\Showcase\Model\SalesItemGroup(
                                    name: "step_gem",
                                    salesItems: [
                                        new \Gs2Cdk\Showcase\Model\SalesItem(
                                            name: "step1_gem_1000",
                                            acquireActions: [
                                                new \Gs2Cdk\Money\StampSheet\DepositByUserId(
                                                    namespaceName: "namespace-0001",
                                                    slot: 0,
                                                    price: 100,
                                                    count: 1,
                                                    userId: "#{userId}"
                                                ),
                                            ],
                                            options: new \Gs2Cdk\Showcase\Model\Options\SalesItemOptions(
                                                metadata: "STEP1_GEM_1000",
                                                consumeActions: [
                                                    new \Gs2Cdk\Money\StampSheet\RecordReceipt(
                                                        namespaceName: "namespace-0001",
                                                        contentsId: "contentsId-0001",
                                                        receipt: "#{receipt}",
                                                        userId: "#{userId}"
                                                    ),
                                                    new \Gs2Cdk\Limit\StampSheet\CountUpByUserId(
                                                        namespaceName: "namespace-0001",
                                                        limitName: "limit-0001",
                                                        counterName: "counter-0001",
                                                        countUpValue: 1,
                                                        maxValue: 100,
                                                        userId: "#{userId}"
                                                    ),
                                                ],
                                            ),
                                        ),
                                        new \Gs2Cdk\Showcase\Model\SalesItem(
                                            name: "step2_gem_2000",
                                            acquireActions: [
                                                new \Gs2Cdk\Money\StampSheet\DepositByUserId(
                                                    namespaceName: "namespace-0001",
                                                    slot: 0,
                                                    price: 100,
                                                    count: 1,
                                                    userId: "#{userId}"
                                                ),
                                            ],
                                            options: new \Gs2Cdk\Showcase\Model\Options\SalesItemOptions(
                                                metadata: "STEP1_GEM_2000",
                                                consumeActions: [
                                                    new \Gs2Cdk\Money\StampSheet\RecordReceipt(
                                                        namespaceName: "namespace-0001",
                                                        contentsId: "contentsId-0001",
                                                        receipt: "#{receipt}",
                                                        userId: "#{userId}"
                                                    ),
                                                    new \Gs2Cdk\Limit\StampSheet\CountUpByUserId(
                                                        namespaceName: "namespace-0001",
                                                        limitName: "limit-0001",
                                                        counterName: "counter-0001",
                                                        countUpValue: 1,
                                                        maxValue: 100,
                                                        userId: "#{userId}"
                                                    ),
                                                ],
                                            ),
                                        ),
                                    ],
                                    options: new \Gs2Cdk\Showcase\Model\Options\SalesItemGroupOptions(
                                        metadata: "STEP_GEM",
                                    ),
                                ),
                                salesPeriodEventId: "grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001",
                            ),
                        ),
                    ],
                    options: new \Gs2Cdk\Showcase\Model\Options\ShowcaseOptions(
                        metadata:"GEM"
                    )
                ),
                new \Gs2Cdk\Showcase\Model\Showcase(
                    name:"gacha",
                    displayItems:[
                        new \Gs2Cdk\Showcase\Model\DisplayItem(
                            displayItemId: "",
                            type: \Gs2Cdk\Showcase\Model\Enums\DisplayItemType::SALES_ITEM,
                            options: new \Gs2Cdk\Showcase\Model\Options\DisplayItemOptions(
                                salesItem: new \Gs2Cdk\Showcase\Model\SalesItem(
                                    name: "single",
                                    acquireActions: [
                                        new \Gs2Cdk\Inventory\StampSheet\AcquireItemSetByUserId(
                                            namespaceName: "namespace-0001",
                                            inventoryName: "inventory-0001",
                                            itemName: "item-0001",
                                            acquireCount: 1,
                                            expiresAt: 0,
                                            createNewItemSet: false,
                                            itemSetName: "",
                                            userId: "#{userId}"
                                        ),
                                    ],
                                    options: new \Gs2Cdk\Showcase\Model\Options\SalesItemOptions(
                                        metadata: "SINGLE",
                                        consumeActions: [
                                            new \Gs2Cdk\Money\StampSheet\WithdrawByUserId(
                                                namespaceName: "namespace-0001",
                                                slot: 0,
                                                count: 1,
                                                paidOnly: false,
                                                userId: "#{userId}"
                                            ),
                                        ],
                                    ),
                                ),
                            ),
                        ),
                        new \Gs2Cdk\Showcase\Model\DisplayItem(
                            displayItemId: "",
                            type: \Gs2Cdk\Showcase\Model\Enums\DisplayItemType::SALES_ITEM,
                            options: new \Gs2Cdk\Showcase\Model\Options\DisplayItemOptions(
                                salesItem: new \Gs2Cdk\Showcase\Model\SalesItem(
                                    name: "10times",
                                    acquireActions: [
                                        new \Gs2Cdk\Inventory\StampSheet\AcquireItemSetByUserId(
                                            namespaceName: "namespace-0001",
                                            inventoryName: "inventory-0001",
                                            itemName: "item-0001",
                                            acquireCount: 1,
                                            expiresAt: 0,
                                            createNewItemSet: false,
                                            itemSetName: "",
                                            userId: "#{userId}"
                                        ),
                                        new \Gs2Cdk\Inventory\StampSheet\AcquireItemSetByUserId(
                                            namespaceName: "namespace-0001",
                                            inventoryName: "inventory-0001",
                                            itemName: "item-0001",
                                            acquireCount: 1,
                                            expiresAt: 0,
                                            createNewItemSet: false,
                                            itemSetName: "",
                                            userId: "#{userId}"
                                        ),
                                        new \Gs2Cdk\Inventory\StampSheet\AcquireItemSetByUserId(
                                            namespaceName: "namespace-0001",
                                            inventoryName: "inventory-0001",
                                            itemName: "item-0001",
                                            acquireCount: 1,
                                            expiresAt: 0,
                                            createNewItemSet: false,
                                            itemSetName: "",
                                            userId: "#{userId}"
                                        ),
                                        new \Gs2Cdk\Inventory\StampSheet\AcquireItemSetByUserId(
                                            namespaceName: "namespace-0001",
                                            inventoryName: "inventory-0001",
                                            itemName: "item-0001",
                                            acquireCount: 1,
                                            expiresAt: 0,
                                            createNewItemSet: false,
                                            itemSetName: "",
                                            userId: "#{userId}"
                                        ),
                                        new \Gs2Cdk\Inventory\StampSheet\AcquireItemSetByUserId(
                                            namespaceName: "namespace-0001",
                                            inventoryName: "inventory-0001",
                                            itemName: "item-0001",
                                            acquireCount: 1,
                                            expiresAt: 0,
                                            createNewItemSet: false,
                                            itemSetName: "",
                                            userId: "#{userId}"
                                        ),
                                    ],
                                    options: new \Gs2Cdk\Showcase\Model\Options\SalesItemOptions(
                                        metadata: "10TIMES",
                                        consumeActions: [
                                            new \Gs2Cdk\Money\StampSheet\WithdrawByUserId(
                                                namespaceName: "namespace-0001",
                                                slot: 0,
                                                count: 1,
                                                paidOnly: false,
                                                userId: "#{userId}"
                                            ),
                                        ],
                                    ),
                                ),
                            ),
                        ),
                    ],
                    options: new \Gs2Cdk\Showcase\Model\Options\ShowcaseOptions(
                        metadata:"GACHA"
                    )
                )
            ],
            [
            ]
        );
    }
}

print((new SampleStack())->yaml());  // Generate Template

```

**Java**
```java

class SampleStack extends io.gs2.cdk.core.model.Stack
{
    public SampleStack() {
        super();
        new io.gs2.cdk.showcase.model.Namespace(
            this,
            "namespace-0001"
        ).masterData(
            Arrays.asList(
                new io.gs2.cdk.showcase.model.Showcase(
                    "gem",
                    Arrays.asList(
                        new io.gs2.cdk.showcase.model.DisplayItem(
                            "",
                            io.gs2.cdk.showcase.model.enums.DisplayItemType.SALES_ITEM,
                            new io.gs2.cdk.showcase.model.options.DisplayItemOptions()
                                .withSalesItem(new io.gs2.cdk.showcase.model.SalesItem(
                                    "gem_3000",
                                    Arrays.asList(
                                        new io.gs2.cdk.money.stampSheet.DepositByUserId(
                                            "namespace-0001",
                                            0,
                                            100f,
                                            1,
                                            "#{userId}"
                                        )
                                    ),
                                    new io.gs2.cdk.showcase.model.options.SalesItemOptions()
                                        .withMetadata("GEM_3000")
                                        .withConsumeActions(Arrays.asList(
                                            new io.gs2.cdk.money.stampSheet.RecordReceipt(
                                                "namespace-0001",
                                                "contentsId-0001",
                                                "#{receipt}",
                                                "#{userId}"
                                            )
                                        ))
                                ))
                        ),
                        new io.gs2.cdk.showcase.model.DisplayItem(
                            "",
                            io.gs2.cdk.showcase.model.enums.DisplayItemType.SALES_ITEM_GROUP,
                            new io.gs2.cdk.showcase.model.options.DisplayItemOptions()
                                .withSalesItemGroup(new io.gs2.cdk.showcase.model.SalesItemGroup(
                                    "step_gem",
                                    Arrays.asList(
                                        new io.gs2.cdk.showcase.model.SalesItem(
                                            "step1_gem_1000",
                                            Arrays.asList(
                                                new io.gs2.cdk.money.stampSheet.DepositByUserId(
                                                    "namespace-0001",
                                                    0,
                                                    100f,
                                                    1,
                                                    "#{userId}"
                                                )
                                            ),
                                            new io.gs2.cdk.showcase.model.options.SalesItemOptions()
                                                .withMetadata("STEP1_GEM_1000")
                                                .withConsumeActions(Arrays.asList(
                                                    new io.gs2.cdk.money.stampSheet.RecordReceipt(
                                                        "namespace-0001",
                                                        "contentsId-0001",
                                                        "#{receipt}",
                                                        "#{userId}"
                                                    ),
                                                    new io.gs2.cdk.limit.stampSheet.CountUpByUserId(
                                                        "namespace-0001",
                                                        "limit-0001",
                                                        "counter-0001",
                                                        1,
                                                        100,
                                                        "#{userId}"
                                                    )
                                                ))
                                        ),
                                        new io.gs2.cdk.showcase.model.SalesItem(
                                            "step2_gem_2000",
                                            Arrays.asList(
                                                new io.gs2.cdk.money.stampSheet.DepositByUserId(
                                                    "namespace-0001",
                                                    0,
                                                    100f,
                                                    1,
                                                    "#{userId}"
                                                )
                                            ),
                                            new io.gs2.cdk.showcase.model.options.SalesItemOptions()
                                                .withMetadata("STEP1_GEM_2000")
                                                .withConsumeActions(Arrays.asList(
                                                    new io.gs2.cdk.money.stampSheet.RecordReceipt(
                                                        "namespace-0001",
                                                        "contentsId-0001",
                                                        "#{receipt}",
                                                        "#{userId}"
                                                    ),
                                                    new io.gs2.cdk.limit.stampSheet.CountUpByUserId(
                                                        "namespace-0001",
                                                        "limit-0001",
                                                        "counter-0001",
                                                        1,
                                                        100,
                                                        "#{userId}"
                                                    )
                                                ))
                                        )
                                    ),
                                    new io.gs2.cdk.showcase.model.options.SalesItemGroupOptions()
                                        .withMetadata("STEP_GEM")
                                ))
                                .withSalesPeriodEventId("grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001")
                        )
                    ),
                    new io.gs2.cdk.showcase.model.options.ShowcaseOptions()
                        .withMetadata("GEM")
                ),
                new io.gs2.cdk.showcase.model.Showcase(
                    "gacha",
                    Arrays.asList(
                        new io.gs2.cdk.showcase.model.DisplayItem(
                            "",
                            io.gs2.cdk.showcase.model.enums.DisplayItemType.SALES_ITEM,
                            new io.gs2.cdk.showcase.model.options.DisplayItemOptions()
                                .withSalesItem(new io.gs2.cdk.showcase.model.SalesItem(
                                    "single",
                                    Arrays.asList(
                                        new io.gs2.cdk.inventory.stampSheet.AcquireItemSetByUserId(
                                            "namespace-0001",
                                            "inventory-0001",
                                            "item-0001",
                                            1L,
                                            0L,
                                            false,
                                            "",
                                            "#{userId}"
                                        )
                                    ),
                                    new io.gs2.cdk.showcase.model.options.SalesItemOptions()
                                        .withMetadata("SINGLE")
                                        .withConsumeActions(Arrays.asList(
                                            new io.gs2.cdk.money.stampSheet.WithdrawByUserId(
                                                "namespace-0001",
                                                0,
                                                1,
                                                false,
                                                "#{userId}"
                                            )
                                        ))
                                ))
                        ),
                        new io.gs2.cdk.showcase.model.DisplayItem(
                            "",
                            io.gs2.cdk.showcase.model.enums.DisplayItemType.SALES_ITEM,
                            new io.gs2.cdk.showcase.model.options.DisplayItemOptions()
                                .withSalesItem(new io.gs2.cdk.showcase.model.SalesItem(
                                    "10times",
                                    Arrays.asList(
                                        new io.gs2.cdk.inventory.stampSheet.AcquireItemSetByUserId(
                                            "namespace-0001",
                                            "inventory-0001",
                                            "item-0001",
                                            1L,
                                            0L,
                                            false,
                                            "",
                                            "#{userId}"
                                        ),
                                        new io.gs2.cdk.inventory.stampSheet.AcquireItemSetByUserId(
                                            "namespace-0001",
                                            "inventory-0001",
                                            "item-0001",
                                            1L,
                                            0L,
                                            false,
                                            "",
                                            "#{userId}"
                                        ),
                                        new io.gs2.cdk.inventory.stampSheet.AcquireItemSetByUserId(
                                            "namespace-0001",
                                            "inventory-0001",
                                            "item-0001",
                                            1L,
                                            0L,
                                            false,
                                            "",
                                            "#{userId}"
                                        ),
                                        new io.gs2.cdk.inventory.stampSheet.AcquireItemSetByUserId(
                                            "namespace-0001",
                                            "inventory-0001",
                                            "item-0001",
                                            1L,
                                            0L,
                                            false,
                                            "",
                                            "#{userId}"
                                        ),
                                        new io.gs2.cdk.inventory.stampSheet.AcquireItemSetByUserId(
                                            "namespace-0001",
                                            "inventory-0001",
                                            "item-0001",
                                            1L,
                                            0L,
                                            false,
                                            "",
                                            "#{userId}"
                                        )
                                    ),
                                    new io.gs2.cdk.showcase.model.options.SalesItemOptions()
                                        .withMetadata("10TIMES")
                                        .withConsumeActions(Arrays.asList(
                                            new io.gs2.cdk.money.stampSheet.WithdrawByUserId(
                                                "namespace-0001",
                                                0,
                                                1,
                                                false,
                                                "#{userId}"
                                            )
                                        ))
                                ))
                        )
                    ),
                    new io.gs2.cdk.showcase.model.options.ShowcaseOptions()
                        .withMetadata("GACHA")
                )
            ),
            Arrays.asList(
            )
        );
    }
}

System.out.println(new SampleStack().yaml());  // Generate Template

```

**C#**
```csharp

public class SampleStack : Gs2Cdk.Core.Model.Stack
{
    public SampleStack() {
        new Gs2Cdk.Gs2Showcase.Model.Namespace(
            stack: this,
            name: "namespace-0001"
        ).MasterData(
            new Gs2Cdk.Gs2Showcase.Model.Showcase[] {
                new Gs2Cdk.Gs2Showcase.Model.Showcase(
                    name: "gem",
                    displayItems: new Gs2Cdk.Gs2Showcase.Model.DisplayItem[]
                    {
                        new Gs2Cdk.Gs2Showcase.Model.DisplayItem(
                            displayItemId: "",
                            type: Gs2Cdk.Gs2Showcase.Model.Enums.DisplayItemType.SalesItem,
                            options: new Gs2Cdk.Gs2Showcase.Model.Options.DisplayItemOptions
                            {
                                salesItem = new Gs2Cdk.Gs2Showcase.Model.SalesItem(
                                    name: "gem_3000",
                                    acquireActions: new Gs2Cdk.Core.Model.AcquireAction[]
                                    {
                                        new Gs2Cdk.Gs2Money.StampSheet.DepositByUserId(
                                            namespaceName: "namespace-0001",
                                            slot: 0,
                                            price: 100,
                                            count: 1,
                                            userId: "#{userId}"
                                        )
                                    },
                                    options: new Gs2Cdk.Gs2Showcase.Model.Options.SalesItemOptions
                                    {
                                        metadata = "GEM_3000",
                                        consumeActions = new Gs2Cdk.Core.Model.ConsumeAction[]
                                        {
                                            new Gs2Cdk.Gs2Money.StampSheet.RecordReceipt(
                                                namespaceName: "namespace-0001",
                                                contentsId: "contentsId-0001",
                                                receipt: "#{receipt}",
                                                userId: "#{userId}"
                                            )
                                        }
                                    }
                                )
                            }
                        ),
                        new Gs2Cdk.Gs2Showcase.Model.DisplayItem(
                            displayItemId: "",
                            type: Gs2Cdk.Gs2Showcase.Model.Enums.DisplayItemType.SalesItemGroup,
                            options: new Gs2Cdk.Gs2Showcase.Model.Options.DisplayItemOptions
                            {
                                salesItemGroup = new Gs2Cdk.Gs2Showcase.Model.SalesItemGroup(
                                    name: "step_gem",
                                    salesItems: new Gs2Cdk.Gs2Showcase.Model.SalesItem[]
                                    {
                                        new Gs2Cdk.Gs2Showcase.Model.SalesItem(
                                            name: "step1_gem_1000",
                                            acquireActions: new Gs2Cdk.Core.Model.AcquireAction[]
                                            {
                                                new Gs2Cdk.Gs2Money.StampSheet.DepositByUserId(
                                                    namespaceName: "namespace-0001",
                                                    slot: 0,
                                                    price: 100,
                                                    count: 1,
                                                    userId: "#{userId}"
                                                )
                                            },
                                            options: new Gs2Cdk.Gs2Showcase.Model.Options.SalesItemOptions
                                            {
                                                metadata = "STEP1_GEM_1000",
                                                consumeActions = new Gs2Cdk.Core.Model.ConsumeAction[]
                                                {
                                                    new Gs2Cdk.Gs2Money.StampSheet.RecordReceipt(
                                                        namespaceName: "namespace-0001",
                                                        contentsId: "contentsId-0001",
                                                        receipt: "#{receipt}",
                                                        userId: "#{userId}"
                                                    ),
                                                    new Gs2Cdk.Gs2Limit.StampSheet.CountUpByUserId(
                                                        namespaceName: "namespace-0001",
                                                        limitName: "limit-0001",
                                                        counterName: "counter-0001",
                                                        countUpValue: 1,
                                                        maxValue: 100,
                                                        userId: "#{userId}"
                                                    )
                                                }
                                            }
                                        ),
                                        new Gs2Cdk.Gs2Showcase.Model.SalesItem(
                                            name: "step2_gem_2000",
                                            acquireActions: new Gs2Cdk.Core.Model.AcquireAction[]
                                            {
                                                new Gs2Cdk.Gs2Money.StampSheet.DepositByUserId(
                                                    namespaceName: "namespace-0001",
                                                    slot: 0,
                                                    price: 100,
                                                    count: 1,
                                                    userId: "#{userId}"
                                                )
                                            },
                                            options: new Gs2Cdk.Gs2Showcase.Model.Options.SalesItemOptions
                                            {
                                                metadata = "STEP1_GEM_2000",
                                                consumeActions = new Gs2Cdk.Core.Model.ConsumeAction[]
                                                {
                                                    new Gs2Cdk.Gs2Money.StampSheet.RecordReceipt(
                                                        namespaceName: "namespace-0001",
                                                        contentsId: "contentsId-0001",
                                                        receipt: "#{receipt}",
                                                        userId: "#{userId}"
                                                    ),
                                                    new Gs2Cdk.Gs2Limit.StampSheet.CountUpByUserId(
                                                        namespaceName: "namespace-0001",
                                                        limitName: "limit-0001",
                                                        counterName: "counter-0001",
                                                        countUpValue: 1,
                                                        maxValue: 100,
                                                        userId: "#{userId}"
                                                    )
                                                }
                                            }
                                        )
                                    },
                                    options: new Gs2Cdk.Gs2Showcase.Model.Options.SalesItemGroupOptions
                                    {
                                        metadata = "STEP_GEM"
                                    }
                                ),
                                salesPeriodEventId = "grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001"
                            }
                        )
                    },
                    options: new Gs2Cdk.Gs2Showcase.Model.Options.ShowcaseOptions
                    {
                        metadata = "GEM"
                    }
                ),
                new Gs2Cdk.Gs2Showcase.Model.Showcase(
                    name: "gacha",
                    displayItems: new Gs2Cdk.Gs2Showcase.Model.DisplayItem[]
                    {
                        new Gs2Cdk.Gs2Showcase.Model.DisplayItem(
                            displayItemId: "",
                            type: Gs2Cdk.Gs2Showcase.Model.Enums.DisplayItemType.SalesItem,
                            options: new Gs2Cdk.Gs2Showcase.Model.Options.DisplayItemOptions
                            {
                                salesItem = new Gs2Cdk.Gs2Showcase.Model.SalesItem(
                                    name: "single",
                                    acquireActions: new Gs2Cdk.Core.Model.AcquireAction[]
                                    {
                                        new Gs2Cdk.Gs2Inventory.StampSheet.AcquireItemSetByUserId(
                                            namespaceName: "namespace-0001",
                                            inventoryName: "inventory-0001",
                                            itemName: "item-0001",
                                            acquireCount: 1,
                                            expiresAt: 0,
                                            createNewItemSet: false,
                                            itemSetName: "",
                                            userId: "#{userId}"
                                        )
                                    },
                                    options: new Gs2Cdk.Gs2Showcase.Model.Options.SalesItemOptions
                                    {
                                        metadata = "SINGLE",
                                        consumeActions = new Gs2Cdk.Core.Model.ConsumeAction[]
                                        {
                                            new Gs2Cdk.Gs2Money.StampSheet.WithdrawByUserId(
                                                namespaceName: "namespace-0001",
                                                slot: 0,
                                                count: 1,
                                                paidOnly: false,
                                                userId: "#{userId}"
                                            )
                                        }
                                    }
                                )
                            }
                        ),
                        new Gs2Cdk.Gs2Showcase.Model.DisplayItem(
                            displayItemId: "",
                            type: Gs2Cdk.Gs2Showcase.Model.Enums.DisplayItemType.SalesItem,
                            options: new Gs2Cdk.Gs2Showcase.Model.Options.DisplayItemOptions
                            {
                                salesItem = new Gs2Cdk.Gs2Showcase.Model.SalesItem(
                                    name: "10times",
                                    acquireActions: new Gs2Cdk.Core.Model.AcquireAction[]
                                    {
                                        new Gs2Cdk.Gs2Inventory.StampSheet.AcquireItemSetByUserId(
                                            namespaceName: "namespace-0001",
                                            inventoryName: "inventory-0001",
                                            itemName: "item-0001",
                                            acquireCount: 1,
                                            expiresAt: 0,
                                            createNewItemSet: false,
                                            itemSetName: "",
                                            userId: "#{userId}"
                                        ),
                                        new Gs2Cdk.Gs2Inventory.StampSheet.AcquireItemSetByUserId(
                                            namespaceName: "namespace-0001",
                                            inventoryName: "inventory-0001",
                                            itemName: "item-0001",
                                            acquireCount: 1,
                                            expiresAt: 0,
                                            createNewItemSet: false,
                                            itemSetName: "",
                                            userId: "#{userId}"
                                        ),
                                        new Gs2Cdk.Gs2Inventory.StampSheet.AcquireItemSetByUserId(
                                            namespaceName: "namespace-0001",
                                            inventoryName: "inventory-0001",
                                            itemName: "item-0001",
                                            acquireCount: 1,
                                            expiresAt: 0,
                                            createNewItemSet: false,
                                            itemSetName: "",
                                            userId: "#{userId}"
                                        ),
                                        new Gs2Cdk.Gs2Inventory.StampSheet.AcquireItemSetByUserId(
                                            namespaceName: "namespace-0001",
                                            inventoryName: "inventory-0001",
                                            itemName: "item-0001",
                                            acquireCount: 1,
                                            expiresAt: 0,
                                            createNewItemSet: false,
                                            itemSetName: "",
                                            userId: "#{userId}"
                                        ),
                                        new Gs2Cdk.Gs2Inventory.StampSheet.AcquireItemSetByUserId(
                                            namespaceName: "namespace-0001",
                                            inventoryName: "inventory-0001",
                                            itemName: "item-0001",
                                            acquireCount: 1,
                                            expiresAt: 0,
                                            createNewItemSet: false,
                                            itemSetName: "",
                                            userId: "#{userId}"
                                        ),
                                    },
                                    options: new Gs2Cdk.Gs2Showcase.Model.Options.SalesItemOptions
                                    {
                                        metadata = "10TIMES",
                                        consumeActions = new Gs2Cdk.Core.Model.ConsumeAction[]
                                        {
                                            new Gs2Cdk.Gs2Money.StampSheet.WithdrawByUserId(
                                                namespaceName: "namespace-0001",
                                                slot: 0,
                                                count: 1,
                                                paidOnly: false,
                                                userId: "#{userId}"
                                            )
                                        }
                                    }
                                )
                            }
                        )
                    },
                    options: new Gs2Cdk.Gs2Showcase.Model.Options.ShowcaseOptions
                    {
                        metadata = "GACHA"
                    }
                )
            },
            new Gs2Cdk.Gs2Showcase.Model.RandomShowcase[] {
            }
        );
    }
}

Debug.Log(new SampleStack().Yaml());  // Generate Template

```

**TypeScript**
```typescript

import core from "@/gs2cdk/core";
import showcase from "@/gs2cdk/showcase";
import money from "@/gs2cdk/money";
import limit from "@/gs2cdk/limit";
import inventory from "@/gs2cdk/inventory";

class SampleStack extends core.Stack
{
    public constructor() {
        super();
        new showcase.model.Namespace(
            this,
            "namespace-0001",
        ).masterData(
            [
                new showcase.model.Showcase(
                    "gem",
                    [
                        new showcase.model.DisplayItem(
                            "",
                            showcase.model.DisplayItemType.SALES_ITEM,
                            {
                                salesItem: new showcase.model.SalesItem(
                                    "gem_3000",
                                    [
                                        new money.stampSheet.DepositByUserId(
                                            "namespace-0001",
                                            0,
                                            100,
                                            1,
                                            null,
                                            "#{userId}"
                                        ),
                                    ],
                                    {
                                        metadata: "GEM_3000",
                                        consumeActions: [
                                            new money.stampSheet.RecordReceipt(
                                                "namespace-0001",
                                                "contentsId-0001",
                                                "#{receipt}",
                                                null,
                                                "#{userId}"
                                            ),
                                        ]
                                    }
                                )
                            }
                        ),
                        new showcase.model.DisplayItem(
                            "",
                            showcase.model.DisplayItemType.SALES_ITEM_GROUP,
                            {
                                salesItemGroup: new showcase.model.SalesItemGroup(
                                    "step_gem",
                                    [
                                        new showcase.model.SalesItem(
                                            "step1_gem_1000",
                                            [
                                                new money.stampSheet.DepositByUserId(
                                                    "namespace-0001",
                                                    0,
                                                    100,
                                                    1,
                                                    null,
                                                    "#{userId}"
                                                ),
                                            ],
                                            {
                                                metadata: "STEP1_GEM_1000",
                                                consumeActions: [
                                                    new money.stampSheet.RecordReceipt(
                                                        "namespace-0001",
                                                        "contentsId-0001",
                                                        "#{receipt}",
                                                        null,
                                                        "#{userId}"
                                                    ),
                                                    new limit.stampSheet.CountUpByUserId(
                                                        "namespace-0001",
                                                        "limit-0001",
                                                        "counter-0001",
                                                        1,
                                                        100,
                                                        null,
                                                        "#{userId}"
                                                    ),
                                                ]
                                            }
                                        ),
                                        new showcase.model.SalesItem(
                                            "step2_gem_2000",
                                            [
                                                new money.stampSheet.DepositByUserId(
                                                    "namespace-0001",
                                                    0,
                                                    100,
                                                    1,
                                                    null,
                                                    "#{userId}"
                                                ),
                                            ],
                                            {
                                                metadata: "STEP1_GEM_2000",
                                                consumeActions: [
                                                    new money.stampSheet.RecordReceipt(
                                                        "namespace-0001",
                                                        "contentsId-0001",
                                                        "#{receipt}",
                                                        null,
                                                        "#{userId}"
                                                    ),
                                                    new limit.stampSheet.CountUpByUserId(
                                                        "namespace-0001",
                                                        "limit-0001",
                                                        "counter-0001",
                                                        1,
                                                        100,
                                                        null,
                                                        "#{userId}"
                                                    ),
                                                ]
                                            }
                                        ),
                                    ],
                                    {
                                        metadata: "STEP_GEM"
                                    }
                                ),
                                salesPeriodEventId: "grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001"
                            }
                        ),
                    ],
                    {
                        metadata: "GEM"
                    }
                ),
                new showcase.model.Showcase(
                    "gacha",
                    [
                        new showcase.model.DisplayItem(
                            "",
                            showcase.model.DisplayItemType.SALES_ITEM,
                            {
                                salesItem: new showcase.model.SalesItem(
                                    "single",
                                    [
                                        new inventory.stampSheet.AcquireItemSetByUserId(
                                            "namespace-0001",
                                            "inventory-0001",
                                            "item-0001",
                                            1,
                                            0,
                                            false,
                                            "",
                                            null,
                                            "#{userId}"
                                        ),
                                    ],
                                    {
                                        metadata: "SINGLE",
                                        consumeActions: [
                                            new money.stampSheet.WithdrawByUserId(
                                                "namespace-0001",
                                                0,
                                                1,
                                                false,
                                                null,
                                                "#{userId}"
                                            ),
                                        ]
                                    }
                                )
                            }
                        ),
                        new showcase.model.DisplayItem(
                            "",
                            showcase.model.DisplayItemType.SALES_ITEM,
                            {
                                salesItem: new showcase.model.SalesItem(
                                    "10times",
                                    [
                                        new inventory.stampSheet.AcquireItemSetByUserId(
                                            "namespace-0001",
                                            "inventory-0001",
                                            "item-0001",
                                            1,
                                            0,
                                            false,
                                            "",
                                            null,
                                            "#{userId}"
                                        ),
                                        new inventory.stampSheet.AcquireItemSetByUserId(
                                            "namespace-0001",
                                            "inventory-0001",
                                            "item-0001",
                                            1,
                                            0,
                                            false,
                                            "",
                                            null,
                                            "#{userId}"
                                        ),
                                        new inventory.stampSheet.AcquireItemSetByUserId(
                                            "namespace-0001",
                                            "inventory-0001",
                                            "item-0001",
                                            1,
                                            0,
                                            false,
                                            "",
                                            null,
                                            "#{userId}"
                                        ),
                                        new inventory.stampSheet.AcquireItemSetByUserId(
                                            "namespace-0001",
                                            "inventory-0001",
                                            "item-0001",
                                            1,
                                            0,
                                            false,
                                            "",
                                            null,
                                            "#{userId}"
                                        ),
                                        new inventory.stampSheet.AcquireItemSetByUserId(
                                            "namespace-0001",
                                            "inventory-0001",
                                            "item-0001",
                                            1,
                                            0,
                                            false,
                                            "",
                                            null,
                                            "#{userId}"
                                        ),
                                    ],
                                    {
                                        metadata: "10TIMES",
                                        consumeActions: [
                                            new money.stampSheet.WithdrawByUserId(
                                                "namespace-0001",
                                                0,
                                                1,
                                                false,
                                                null,
                                                "#{userId}"
                                            ),
                                        ]
                                    }
                                )
                            }
                        ),
                    ],
                    {
                        metadata: "GACHA"
                    }
                )
            ],
            [
            ]
        );
    }
}

console.log(new SampleStack().yaml());  // Generate Template

```

**Python**
```python

from gs2_cdk import Stack, core, showcase, money

class SampleStack(Stack):

    def __init__(self):
        super().__init__()
        showcase.Namespace(
            stack=self,
            name="namespace-0001",
        ).master_data(
            showcases=[
                showcase.Showcase(
                    name='gem',
                    display_items=[
                        showcase.DisplayItem(
                            display_item_id= "",
                            type=showcase.DisplayItemType.SALES_ITEM,
                            options=showcase.DisplayItemOptions(
                                sales_item=showcase.SalesItem(
                                    name='gem_3000',
                                    acquire_actions=[
                                        money.DepositByUserId(
                                            namespace_name='namespace-0001',
                                            slot=0,
                                            price=100,
                                            count=1,
                                            user_id='#{userId}'
                                        ),
                                    ],
                                    options=showcase.SalesItemOptions(
                                        metadata='GEM_3000',
                                        consume_actions=[
                                            money.RecordReceipt(
                                                namespace_name='namespace-0001',
                                                contents_id='contentsId-0001',
                                                receipt='#{receipt}',
                                                user_id='#{userId}'
                                            ),
                                        ],
                                    ),
                                ),
                            ),
                        ),
                        showcase.DisplayItem(
                            display_item_id= "",
                            type=showcase.DisplayItemType.SALES_ITEM_GROUP,
                            options=showcase.DisplayItemOptions(
                                sales_item_group=showcase.SalesItemGroup(
                                    name='step_gem',
                                    sales_items=[
                                        showcase.SalesItem(
                                            name='step1_gem_1000',
                                            acquire_actions=[
                                                money.DepositByUserId(
                                                    namespace_name='namespace-0001',
                                                    slot=0,
                                                    price=100,
                                                    count=1,
                                                    user_id='#{userId}'
                                                ),
                                            ],
                                            options=showcase.SalesItemOptions(
                                                metadata='STEP1_GEM_1000',
                                                consume_actions=[
                                                    money.RecordReceipt(
                                                        namespace_name='namespace-0001',
                                                        contents_id='contentsId-0001',
                                                        receipt='#{receipt}',
                                                        user_id='#{userId}'
                                                    ),
                                                    limit.CountUpByUserId(
                                                        namespace_name='namespace-0001',
                                                        limit_name='limit-0001',
                                                        counter_name='counter-0001',
                                                        count_up_value=1,
                                                        max_value=100,
                                                        user_id='#{userId}'
                                                    ),
                                                ],
                                            ),
                                        ),
                                        showcase.SalesItem(
                                            name='step2_gem_2000',
                                            acquire_actions=[
                                                money.DepositByUserId(
                                                    namespace_name='namespace-0001',
                                                    slot=0,
                                                    price=100,
                                                    count=1,
                                                    user_id='#{userId}'
                                                ),
                                            ],
                                            options=showcase.SalesItemOptions(
                                                metadata='STEP1_GEM_2000',
                                                consume_actions=[
                                                    money.RecordReceipt(
                                                        namespace_name='namespace-0001',
                                                        contents_id='contentsId-0001',
                                                        receipt='#{receipt}',
                                                        user_id='#{userId}'
                                                    ),
                                                    limit.CountUpByUserId(
                                                        namespace_name='namespace-0001',
                                                        limit_name='limit-0001',
                                                        counter_name='counter-0001',
                                                        count_up_value=1,
                                                        max_value=100,
                                                        user_id='#{userId}'
                                                    ),
                                                ],
                                            ),
                                        ),
                                    ],
                                    options=showcase.SalesItemGroupOptions(
                                        metadata='STEP_GEM',
                                    ),
                                ),
                                sales_period_event_id='grn:gs2:ap-northeast-1:YourOwnerId:schedule:schedule-0001:event:event-0001',
                            ),
                        ),
                    ],
                    options=showcase.ShowcaseOptions(
                        metadata = 'GEM'
                    ),
                ),
                showcase.Showcase(
                    name='gacha',
                    display_items=[
                        showcase.DisplayItem(
                            display_item_id= "",
                            type=showcase.DisplayItemType.SALES_ITEM,
                            options=showcase.DisplayItemOptions(
                                sales_item=showcase.SalesItem(
                                    name='single',
                                    acquire_actions=[
                                        inventory.AcquireItemSetByUserId(
                                            namespace_name='namespace-0001',
                                            inventory_name='inventory-0001',
                                            item_name='item-0001',
                                            acquire_count=1,
                                            expires_at=0,
                                            create_new_item_set=False,
                                            item_set_name="",
                                            user_id='#{userId}'
                                        ),
                                    ],
                                    options=showcase.SalesItemOptions(
                                        metadata='SINGLE',
                                        consume_actions=[
                                            money.WithdrawByUserId(
                                                namespace_name='namespace-0001',
                                                slot=0,
                                                count=1,
                                                paid_only=False,
                                                user_id='#{userId}'
                                            ),
                                        ],
                                    ),
                                ),
                            ),
                        ),
                        showcase.DisplayItem(
                            display_item_id= "",
                            type=showcase.DisplayItemType.SALES_ITEM,
                            options=showcase.DisplayItemOptions(
                                sales_item=showcase.SalesItem(
                                    name='10times',
                                    acquire_actions=[
                                        inventory.AcquireItemSetByUserId(
                                            namespace_name='namespace-0001',
                                            inventory_name='inventory-0001',
                                            item_name='item-0001',
                                            acquire_count=1,
                                            expires_at=0,
                                            create_new_item_set=False,
                                            item_set_name="",
                                            user_id='#{userId}'
                                        ),
                                        inventory.AcquireItemSetByUserId(
                                            namespace_name='namespace-0001',
                                            inventory_name='inventory-0001',
                                            item_name='item-0001',
                                            acquire_count=1,
                                            expires_at=0,
                                            create_new_item_set=False,
                                            item_set_name="",
                                            user_id='#{userId}'
                                        ),
                                        inventory.AcquireItemSetByUserId(
                                            namespace_name='namespace-0001',
                                            inventory_name='inventory-0001',
                                            item_name='item-0001',
                                            acquire_count=1,
                                            expires_at=0,
                                            create_new_item_set=False,
                                            item_set_name="",
                                            user_id='#{userId}'
                                        ),
                                        inventory.AcquireItemSetByUserId(
                                            namespace_name='namespace-0001',
                                            inventory_name='inventory-0001',
                                            item_name='item-0001',
                                            acquire_count=1,
                                            expires_at=0,
                                            create_new_item_set=False,
                                            item_set_name="",
                                            user_id='#{userId}'
                                        ),
                                        inventory.AcquireItemSetByUserId(
                                            namespace_name='namespace-0001',
                                            inventory_name='inventory-0001',
                                            item_name='item-0001',
                                            acquire_count=1,
                                            expires_at=0,
                                            create_new_item_set=False,
                                            item_set_name="",
                                            user_id='#{userId}'
                                        ),
                                    ],
                                    options=showcase.SalesItemOptions(
                                        metadata='10TIMES',
                                        consume_actions=[
                                            money.WithdrawByUserId(
                                                namespace_name='namespace-0001',
                                                slot=0,
                                                count=1,
                                                paid_only=False,
                                                user_id='#{userId}'
                                            ),
                                        ],
                                    ),
                                ),
                            ),
                        ),
                    ],
                    options=showcase.ShowcaseOptions(
                        metadata = 'GACHA'
                    ),
                ),
            ],
            random_showcases=[
            ],
        )

print(SampleStack().yaml())  # Generate Template

```


#### Showcase

陳列棚<br>

`陳列棚`には陳列する商品を定義できます。<br>
また、`陳列棚`の商品の販売期間を設定することができます。

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| showcaseId | string |  | ※ |  |  ~ 1024文字 | 陳列棚GRN<br>※ サーバーが自動で設定 |
| name | string |  | ✓ |  |  ~ 128文字 | 陳列棚名<br>陳列棚固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| metadata | string |  |  |  |  ~ 2048文字 | メタデータ<br>メタデータには任意の値を設定できます。<br>これらの値は GS2 の動作には影響しないため、ゲーム内で利用する情報の保存先として使用できます。 |
| salesPeriodEventId | string |  |  |  |  ~ 1024文字 | 陳列棚の販売期間を設定した GS2-Schedule のイベントGRN<br>この陳列棚全体の販売期間を制御します。指定した場合、関連する GS2-Schedule のイベント期間中のみ陳列棚が利用可能になります。イベントが有効でない場合、陳列棚は空で返されます。 |
| displayItems | [List&lt;DisplayItem&gt;](#displayitem) |  |  | [] | 1 ~ 1000 items | 陳列する商品リスト<br>この陳列棚に陳列される商品のリストです。各陳列商品は単一の商品または商品グループのいずれかです。販売期間イベントが終了または無効な商品は、陳列棚の取得時に自動的にフィルタリングされます。 |

#### DisplayItem

陳列する商品<br>

陳列棚に表示される商品です。単一の商品または商品グループのいずれかを参照できます。各陳列商品には、陳列棚全体の販売期間とは独立して GS2-Schedule イベントによる個別の販売期間を設定できます。

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| displayItemId | string |  | ✓ | UUID |  ~ 128文字 | 陳列商品ID<br>陳列商品の一意な名前を保持します。<br>省略するとシステムによって UUID（Universally Unique Identifier）フォーマットで自動的に割り当てられます。 |
| type | 文字列列挙型<br>enum {<br>"salesItem",<br>"salesItemGroup"<br>}<br> |  | ✓ |  |  | 種類<br>表示する商品の種類です。「salesItem」は固定の対価と報酬を持つ単一商品です。「salesItemGroup」は複数の商品を順番に評価する商品グループで、ステップアップ価格や初回限定割引などに使用されます。"salesItem": 商品 / "salesItemGroup": 商品グループ /  |
| salesItem | [SalesItem](#salesitem) | {type} == "salesItem" | ✓※ |  |  | 商品<br>※ type が "salesItem" であれば 必須 |
| salesItemGroup | [SalesItemGroup](#salesitemgroup) | {type} == "salesItemGroup" | ✓※ |  |  | 商品グループ<br>※ type が "salesItemGroup" であれば 必須 |
| salesPeriodEventId | string |  |  |  |  ~ 1024文字 | この陳列商品の販売期間を設定した GS2-Schedule のイベントGRN<br>この個別の陳列商品の販売期間を制御します。指定した場合、関連する GS2-Schedule のイベント期間中のみ陳列棚に表示されます。陳列棚全体の販売期間とは独立して動作します。 |

#### SalesItem

商品<br>

商品を購入するために必要となる対価と、商品を購入したときに得られる報酬を設定します。

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| name | string |  | ✓ |  |  ~ 128文字 | 商品名<br>商品固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| metadata | string |  |  |  |  ~ 2048文字 | メタデータ<br>メタデータには任意の値を設定できます。<br>これらの値は GS2 の動作には影響しないため、ゲーム内で利用する情報の保存先として使用できます。 |
| verifyActions | [List&lt;VerifyAction&gt;](#verifyaction) |  |  | [] | 0 ~ 10 items | 検証アクションリスト<br>購入前に実行される前提条件チェックです。すべての検証アクションが成功した後に消費・入手アクションが処理されます。購入資格の条件チェックに使用できます。 |
| consumeActions | [List&lt;ConsumeAction&gt;](#consumeaction) |  |  | [] | 0 ~ 10 items | 消費アクションリスト<br>購入対価としてリソースを消費するアクションです。商品グループの購入回数制御のために GS2-Limit の CountUp アクションを含めることができます。 |
| acquireActions | [List&lt;AcquireAction&gt;](#acquireaction) |  |  | [] | 1 ~ 100 items | 入手アクションリスト<br>購入報酬としてリソースを付与するアクションです。すべての消費アクションが正常に完了した後に実行されます。 |

#### SalesItemGroup

商品グループ<br>

商品グループは陳列棚に陳列するためのエンティティです。<br>
商品グループには複数の商品を所属させることができ、所属している商品の先頭から順番に購入可能かを判定し、一番最初に購入可能だと判定された商品が実際に陳列されます。<br>
初回のみ割引する商品や、ステップアップガチャのように購入回数によって商品の内容が変化する仕組みに使用できます。

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| name | string |  | ✓ |  |  ~ 128文字 | 商品グループ名<br>商品グループ固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| metadata | string |  |  |  |  ~ 2048文字 | メタデータ<br>メタデータには任意の値を設定できます。<br>これらの値は GS2 の動作には影響しないため、ゲーム内で利用する情報の保存先として使用できます。 |
| salesItems | [List&lt;SalesItem&gt;](#salesitem) |  |  | [] | 2 ~ 10 items | 商品グループに含める商品<br>このグループ内の商品の順序付きリストです。GS2-Limit カウンターを使って先頭から順に購入可能かを判定し、最初に購入可能と判定された商品が表示されます。いずれも該当しない場合、リストの最後の商品がフォールバックとして使用されます。 |

#### RandomShowcase

ランダム陳列棚<br>

ランダム陳列棚は、指定した周期で入れ替わるランダムに選別された商品が陳列される陳列棚のモデルです。<br>

選別される商品は、商品プールに登録された商品から指定数量が、商品ごとに設定された重みに基づいてランダムに選択されます。<br>
ランダム陳列棚には GS2-Schedule のイベントを関連づけることで、販売期間を設定することができます。

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| randomShowcaseId | string |  | ※ |  |  ~ 1024文字 | ランダム陳列棚GRN<br>※ サーバーが自動で設定 |
| name | string |  | ✓ |  |  ~ 128文字 | ランダム陳列棚名<br>ランダム陳列棚固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。 |
| metadata | string |  |  |  |  ~ 2048文字 | メタデータ<br>メタデータには任意の値を設定できます。<br>これらの値は GS2 の動作には影響しないため、ゲーム内で利用する情報の保存先として使用できます。 |
| maximumNumberOfChoice | int |  | ✓ |  | 1 ~ 100 | 選出される商品の最大数<br>各ローテーション期間に商品プールからランダムに抽選される商品の数です。重み付きランダム選択で重複なく抽選されるため、1回のローテーションで同じ商品が2回表示されることはありません。 |
| displayItems | [List&lt;RandomDisplayItemModel&gt;](#randomdisplayitemmodel) |  |  | [] | 1 ~ 100 items | 選出対象の陳列商品リスト<br>商品がランダムに抽選される候補アイテムのプールです。各アイテムには選択確率を決定する重みと、ローテーション全体で表示可能な回数を制限する在庫数があります。 |
| baseTimestamp | long |  | ✓ |  |  | 陳列する商品を再抽選の基準時間<br>ローテーション境界の計算に使用される基準タイムスタンプです。この基準時間から一定間隔（resetIntervalHours）ごとに商品の再抽選が行われます。過去の時刻を指定する必要があります。 |
| resetIntervalHours | int |  | ✓ |  | 1 ~ 168 | 陳列する商品を再抽選する間隔（時）<br>各商品ローテーション間の時間数です。baseTimestamp を基準として間隔が経過すると、新しい乱数シードで陳列商品が再抽選されます。1〜168時間（1週間）の範囲で設定できます。 |
| salesPeriodEventId | string |  |  |  |  ~ 1024文字 | 陳列棚の販売期間を設定した GS2-Schedule のイベントGRN<br>このランダム陳列棚全体の販売期間を制御します。指定した場合、関連する GS2-Schedule のイベント期間中のみ陳列棚が利用可能になります。 |

#### RandomDisplayItemModel

ランダム陳列棚に陳列可能な商品<br>

`weight` に商品を選別する確率を設定できます。

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| name | string |  | ✓ | UUID |  ~ 128文字 | ランダム陳列商品ID<br>ランダム陳列商品の一意な名前を保持します。<br>省略するとシステムによって UUID（Universally Unique Identifier）フォーマットで自動的に割り当てられます。 |
| metadata | string |  |  |  |  ~ 2048文字 | メタデータ<br>メタデータには任意の値を設定できます。<br>これらの値は GS2 の動作には影響しないため、ゲーム内で利用する情報の保存先として使用できます。 |
| verifyActions | [List&lt;VerifyAction&gt;](#verifyaction) |  |  | [] | 0 ~ 10 items | 検証アクションリスト<br>このランダム陳列商品を購入する前に実行される前提条件チェックです。すべての検証アクションが成功した後に消費・入手アクションが処理されます。 |
| consumeActions | [List&lt;ConsumeAction&gt;](#consumeaction) |  |  | [] | 0 ~ 10 items | 消費アクションリスト<br>このランダム陳列商品の購入対価としてリソースを消費するアクションです。トランザクションの消費アクションとして実行されます。 |
| acquireActions | [List&lt;AcquireAction&gt;](#acquireaction) |  |  | [] | 1 ~ 100 items | 入手アクションリスト<br>このランダム陳列商品の購入報酬としてリソースを付与するアクションです。トランザクションの入手アクションとして実行されます。 |
| stock | int |  | ✓ |  | 1 ~ 2147483646 | 在庫数<br>すべてのローテーションを通じてこの商品が抽選される最大回数です。在庫がゼロになると、以降の抽選から除外されます。ローテーション抽選時に商品が選択されると在庫が消費されます。 |
| weight | int |  | ✓ |  | 1 ~ 2147483646 | 排出重み<br>ランダム選択におけるこの商品の相対的な確率の重みです。重みが大きいほど抽選される確率が高くなります。実際の選択確率は、この商品の重みを対象となるすべての商品の重みの合計で割った値として計算されます。 |

#### ConsumeAction

消費アクション

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| action | 文字列列挙型<br>enum {<br>}<br> |  | ✓ |  |  | 消費アクションで実行するアクションの種類 |
| request | string |  | ✓ |  |  ~ 524288文字 | アクション実行時に使用されるリクエストのJSON文字列 |

#### VerifyAction

検証アクション

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| action | 文字列列挙型<br>enum {<br>}<br> |  | ✓ |  |  | 検証アクションで実行するアクションの種類 |
| request | string |  | ✓ |  |  ~ 524288文字 | アクション実行時に使用されるリクエストのJSON文字列 |

#### AcquireAction

入手アクション

|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| action | 文字列列挙型<br>enum {<br>}<br> |  | ✓ |  |  | 入手アクションで実行するアクションの種類 |
| request | string |  | ✓ |  |  ~ 524288文字 | アクション実行時に使用されるリクエストのJSON文字列 |

---



