GS2-Showcase Deploy/CDK Reference

The template format used when creating stacks with GS2-Deploy, and implementation examples of template output in various languages using CDK

Entities

Resources targeted by the Deploy operation

Namespace

Namespace

A Namespace allows multiple independent instances of the same service within a single project by separating data spaces and usage contexts. Each GS2 service is managed on a per-namespace basis. Even when using the same service, if the namespace differs, the data is treated as a completely independent data space.

Therefore, you must create a namespace before you can start using each service.

Request

Resource creation and update requests

TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
descriptionstring~ 1024 charsDescription
transactionSettingTransactionSetting
Transaction Setting
Configuration for controlling how transactions are processed when executing showcase operations.
buyScriptScriptSettingScript to run when attempting to execute a purchase
Script Trigger Reference - buy
logSettingLogSettingLog Output Setting
Specifies the GS2-Log namespace for outputting API request/response logs related to showcase browsing and product purchases.

GetAttr

Resource creation results that can be retrieved using the !GetAttr tag

TypeDescription
ItemNamespaceNamespace created

Implementation Example

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

Transaction Setting

Transaction Setting controls how transactions are executed, including their consistency, asynchronous processing, and conflict avoidance mechanisms. Combining features like AutoRun, AtomicCommit, asynchronous execution using GS2-Distributor, batch application of script results, and asynchronous Acquire Actions via GS2-JobQueue enables robust transaction management tailored to game logic.

TypeConditionRequiredDefaultValue LimitsDescription
enableAutoRunboolfalseWhether to automatically execute issued transactions on the server side
enableAtomicCommitbool{enableAutoRun} == truefalseWhether to commit the execution of transactions atomically
* Applicable only if enableAutoRun is true
transactionUseDistributorbool{enableAtomicCommit} == truefalseWhether to execute transactions asynchronously
* Applicable only if enableAtomicCommit is true
commitScriptResultInUseDistributorbool{transactionUseDistributor} == truefalseWhether to execute the commit processing of the script result asynchronously
* Applicable only if transactionUseDistributor is true
acquireActionUseJobQueuebool{enableAtomicCommit} == truefalseWhether to use GS2-JobQueue to execute the acquire action
* Applicable only if enableAtomicCommit is true
distributorNamespaceIdstring“grn:gs2:{region}:{ownerId}:distributor:default”~ 1024 charsGS2-Distributor Namespace GRN used to execute transactions
queueNamespaceIdstring“grn:gs2:{region}:{ownerId}:queue:default”~ 1024 charsGS2-JobQueue Namespace GRN used to execute transactions

ScriptSetting

Script Setting

In GS2, you can associate custom scripts with microservice events and execute them. This model holds the settings for triggering script execution.

There are two main ways to execute a script: synchronous execution and asynchronous execution. Synchronous execution blocks processing until the script has finished executing. Instead, you can use the script’s execution results to halt API execution or control the API’s response content.

In contrast, asynchronous execution does not block processing until the script has finished executing. However, because the script result cannot be used to stop the API execution or modify the API response, asynchronous execution does not affect the API response flow and is generally recommended.

There are two types of asynchronous execution methods: GS2-Script and Amazon EventBridge. By using Amazon EventBridge, you can write processing in languages other than Lua.

TypeConditionRequiredDefaultValue LimitsDescription
triggerScriptIdstring~ 1024 charsGS2-Script script GRN executed synchronously when the API is executed
Must be specified in GRN format starting with “grn:gs2:”.
doneTriggerTargetTypeString Enum
enum {
  “none”,
  “gs2_script”,
  “aws”
}
“none”How to execute asynchronous scripts
Specifies the type of script to use for asynchronous execution.
You can choose from “Do not use asynchronous execution (none)”, “Use GS2-Script (gs2_script)”, and “Use Amazon EventBridge (aws)”.
DefinitionDescription
“none”None
“gs2_script”GS2-Script
“aws”Amazon EventBridge
doneTriggerScriptIdstring{doneTriggerTargetType} == “gs2_script”~ 1024 charsGS2-Script script GRN for asynchronous execution
Must be specified in GRN format starting with “grn:gs2:”.
* Applicable only if doneTriggerTargetType is “gs2_script”
doneTriggerQueueNamespaceIdstring{doneTriggerTargetType} == “gs2_script”~ 1024 charsGS2-JobQueue namespace GRN to execute asynchronous execution scripts
If you want to execute asynchronous execution scripts via GS2-JobQueue instead of executing them directly, specify the GS2-JobQueue namespace GRN.
There are not many cases where GS2-JobQueue is required, so you generally do not need to specify it unless you have a specific reason.
* Applicable only if doneTriggerTargetType is “gs2_script”

LogSetting

Log Output Setting

Log Output Setting defines how log data is exported. This type holds the GS2-Log namespace identifier (Namespace ID) used to export log data. Specify the GS2-Log namespace where log data is collected and stored in the GRN format for the Log Namespace ID (loggingNamespaceId). Configuring this setting ensures that log data for API requests and responses occurring within the specified namespace is output to the target GS2-Log namespace. GS2-Log provides real-time logs that can be used for system monitoring, analysis, debugging, and other operational purposes.

TypeConditionRequiredDefaultValue LimitsDescription
loggingNamespaceIdstring
~ 1024 charsGS2-Log namespace GRN to output logs
Must be specified in GRN format starting with “grn:gs2:”.

CurrentShowcaseMaster

Currently active Showcase Model master data

This master data describes the definitions of Showcase Models currently active within the namespace. GS2 uses JSON format files for managing master data. By uploading these files, the master data settings are updated on the server.

To create JSON files, GS2 provides a master data editor within the management console. Additionally, you can create tools better suited for game operations and export JSON files in the appropriate format.

Request

Resource creation and update requests

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
modeString Enum
enum {
  “direct”,
  “preUpload”
}
“direct”Update mode
DefinitionDescription
“direct”Directly update master data
“preUpload”Upload master data and then update
settingsstring{mode} == “direct”
✓*
~ 5242880 charsMaster Data
* Required if mode is “direct”
uploadTokenstring{mode} == “preUpload”
✓*
~ 1024 charsToken obtained by pre-upload
Used to apply the uploaded master data.
* Required if mode is “preUpload”

GetAttr

Resource creation results that can be retrieved using the !GetAttr tag

TypeDescription
ItemCurrentShowcaseMasterUpdated master data of the currently active Showcase

Implementation Example

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

Showcase

Showcase can be used to define products for display. Additionally, the sales period for products on Showcase can be set.

TypeConditionRequiredDefaultValue LimitsDescription
showcaseIdstring
*
~ 1024 charsShowcase GRN
* Set automatically by the server
namestring
~ 128 charsShowcase name
Showcase-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadatastring~ 2048 charsMetadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
salesPeriodEventIdstring~ 1024 charsGS2-Schedule event GRN with sales periods for Showcase
Controls the overall sales period of this showcase. When specified, the entire showcase is only available during the associated GS2-Schedule event period. If the event is not active, the showcase returns empty.
displayItemsList<DisplayItem>[]1 ~ 1000 itemsList of Display Items
The list of items displayed on this showcase. Each display item can be either a single sales item or a sales item group. Items with an expired or inactive sales period event are automatically filtered out when the showcase is retrieved.

DisplayItem

Displayed Item

An item displayed on a showcase. Can reference either a single sales item or a sales item group. Each display item can have its own sales period controlled by a GS2-Schedule event, independently of the showcase-level sales period.

TypeConditionRequiredDefaultValue LimitsDescription
displayItemIdstring
UUID~ 128 charsDisplayed Item ID
Maintains a unique name for displayed products.
If omitted, the system automatically assigns a name in UUID (Universally Unique Identifier) format.
typeString Enum
enum {
  “salesItem”,
  “salesItemGroup”
}
Type
The type of item displayed. A “salesItem” is a single product with fixed price and rewards. A “salesItemGroup” contains multiple sales items evaluated in order, used for step-up pricing or limited purchase discounts.
DefinitionDescription
“salesItem”Sales Item
“salesItemGroup”Sales Item Group
salesItemSalesItem{type} == “salesItem”
✓*
Sales Item
* Required if type is “salesItem”
salesItemGroupSalesItemGroup{type} == “salesItemGroup”
✓*
Sales Item Group
* Required if type is “salesItemGroup”
salesPeriodEventIdstring~ 1024 charsGS2-Schedule event GRN with sales periods for this display item
Controls the sales period of this individual display item. When specified, the item is only shown on the showcase during the associated GS2-Schedule event period. This is independent of the showcase-level sales period.

SalesItem

Product

Set the price required to purchase the product and the reward earned for the purchase of the product.

TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 128 charsSales Item name
Sales Item-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadatastring~ 2048 charsMetadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
verifyActionsList<VerifyAction>[]0 ~ 10 itemsList of Verify Actions
Precondition checks executed before the purchase. All verify actions must pass before consume and acquire actions are processed. Can be used to check purchase eligibility conditions.
consumeActionsList<ConsumeAction>[]0 ~ 10 itemsList of Consume Actions
Actions that consume resources as the purchase price. Can include GS2-Limit CountUp actions to control purchase limits for sales item groups.
acquireActionsList<AcquireAction>[]1 ~ 100 itemsList of Acquire Actions
Actions that grant resources as purchase rewards. Executed after all consume actions complete successfully.

SalesItemGroup

Product Group

A product group is an entity for display on a showcase. Multiple products can belong to a Product Group. Products are evaluated in order, and the first product determined to be available for purchase is displayed on the Showcase. This can be used for products that are discounted only for the first time, or for a system in which the contents of products change depending on the number of times they are purchased, such as a step-up gacha.

TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 128 charsSales Item Group name
Sales Item Group-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadatastring~ 2048 charsMetadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
salesItemsList<SalesItem>[]2 ~ 10 itemsProducts to be included in the product group
Ordered list of sales items in this group. The system evaluates each item from first to last using GS2-Limit counters to determine purchase availability. The first purchasable item is displayed; if none qualify, the last item in the list is used as a fallback.

RandomShowcase

Random Showcase

Random Showcase is a display model featuring randomly selected products that rotate at specified intervals.

The products to be selected are randomly selected from the registered products in the product pool according to the specified quantity and the weight set for each product. By associating an event of GS2-Schedule with the random display shelf, you can set the sales period.

TypeConditionRequiredDefaultValue LimitsDescription
randomShowcaseIdstring
*
~ 1024 charsRandom Showcase Model GRN
* Set automatically by the server
namestring
~ 128 charsRandom Showcase name
Random Showcase-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadatastring~ 2048 charsMetadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
maximumNumberOfChoiceint
1 ~ 100Maximum number of products to be selected
The number of products randomly drawn from the display item pool each rotation period. Items are drawn without replacement using weighted random selection, so the same item will not appear twice in one rotation.
displayItemsList<RandomDisplayItemModel>[]1 ~ 100 itemsList of Display Items subject to selection
The pool of candidate items from which products are randomly drawn. Each item has a weight that determines its relative selection probability and a stock count that limits how many times it can appear across rotations.
baseTimestamplong
Base time for re-drawing the products on display
The reference timestamp used to calculate rotation boundaries. Product re-draws occur at regular intervals (resetIntervalHours) starting from this base time. Must be set to a past timestamp.
resetIntervalHoursint
1 ~ 168Interval (hours) between re-drawing the products on display
The number of hours between each product rotation. When the interval elapses (relative to baseTimestamp), the displayed products are re-drawn with a new random seed. Can be set from 1 to 168 hours (1 week).
salesPeriodEventIdstring~ 1024 charsGS2-Schedule event GRN with sales periods for display shelves
Controls the overall sales period of this random showcase. When specified, the showcase is only available during the associated GS2-Schedule event period.

RandomDisplayItemModel

Items that can be displayed in a Random Showcase

You can set the probability of selecting items for the display shelf.

TypeConditionRequiredDefaultValue LimitsDescription
namestring
UUID~ 128 charsRandom Displayed Item ID
Maintains a unique name for randomly displayed products.
If omitted, the system automatically assigns a name in UUID (Universally Unique Identifier) format.
metadatastring~ 2048 charsMetadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
verifyActionsList<VerifyAction>[]0 ~ 10 itemsList of Verify Actions
Precondition checks executed before purchasing this random display item. All verify actions must pass before consume and acquire actions are processed.
consumeActionsList<ConsumeAction>[]0 ~ 10 itemsList of Consume Actions
Actions that consume resources as the purchase price for this random display item. Executed as consume actions in the transaction.
acquireActionsList<AcquireAction>[]1 ~ 100 itemsList of Acquire Actions
Actions that grant resources as purchase rewards for this random display item. Executed as acquire actions in the transaction.
stockint
1 ~ 2147483646Stock
The maximum number of times this item can be drawn across all rotations. Once stock reaches zero, the item is excluded from future draws. Stock is consumed when the item is selected during a rotation draw.
weightint
1 ~ 2147483646Draw Weight
The relative probability weight for this item in the random selection. Higher weights increase the chance of being drawn. The actual selection probability is calculated as this item’s weight divided by the sum of all eligible items’ weights.

ConsumeAction

Consume Action

TypeConditionRequiredDefaultValue LimitsDescription
actionString Enum
enum {
"Gs2AdReward:ConsumePointByUserId",
"Gs2Dictionary:DeleteEntriesByUserId",
"Gs2Enhance:DeleteProgressByUserId",
"Gs2Exchange:DeleteAwaitByUserId",
"Gs2Experience:SubExperienceByUserId",
"Gs2Experience:SubRankCapByUserId",
"Gs2Formation:SubMoldCapacityByUserId",
"Gs2Grade:SubGradeByUserId",
"Gs2Guild:DecreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:DecreaseMaximumIdleMinutesByUserId",
"Gs2Inbox:OpenMessageByUserId",
"Gs2Inbox:DeleteMessageByUserId",
"Gs2Inventory:ConsumeItemSetByUserId",
"Gs2Inventory:ConsumeSimpleItemsByUserId",
"Gs2Inventory:ConsumeBigItemByUserId",
"Gs2JobQueue:DeleteJobByUserId",
"Gs2Limit:CountUpByUserId",
"Gs2LoginReward:MarkReceivedByUserId",
"Gs2Mission:ReceiveByUserId",
"Gs2Mission:BatchReceiveByUserId",
"Gs2Mission:DecreaseCounterByUserId",
"Gs2Mission:ResetCounterByUserId",
"Gs2Money:WithdrawByUserId",
"Gs2Money:RecordReceipt",
"Gs2Money2:WithdrawByUserId",
"Gs2Money2:VerifyReceiptByUserId",
"Gs2Quest:DeleteProgressByUserId",
"Gs2Ranking2:CreateGlobalRankingReceivedRewardByUserId",
"Gs2Ranking2:CreateClusterRankingReceivedRewardByUserId",
"Gs2Schedule:DeleteTriggerByUserId",
"Gs2SerialKey:UseByUserId",
"Gs2Showcase:IncrementPurchaseCountByUserId",
"Gs2SkillTree:MarkRestrainByUserId",
"Gs2Stamina:DecreaseMaxValueByUserId",
"Gs2Stamina:ConsumeStaminaByUserId",
}
Type of action to be executed in the Consume Action
requeststring
~ 524288 charsJSON string of the request used when executing the action

VerifyAction

Verify Action

TypeConditionRequiredDefaultValue LimitsDescription
actionString Enum
enum {
"Gs2Dictionary:VerifyEntryByUserId",
"Gs2Distributor:IfExpressionByUserId",
"Gs2Distributor:AndExpressionByUserId",
"Gs2Distributor:OrExpressionByUserId",
"Gs2Enchant:VerifyRarityParameterStatusByUserId",
"Gs2Experience:VerifyRankByUserId",
"Gs2Experience:VerifyRankCapByUserId",
"Gs2Grade:VerifyGradeByUserId",
"Gs2Grade:VerifyGradeUpMaterialByUserId",
"Gs2Guild:VerifyCurrentMaximumMemberCountByGuildName",
"Gs2Guild:VerifyIncludeMemberByUserId",
"Gs2Inventory:VerifyInventoryCurrentMaxCapacityByUserId",
"Gs2Inventory:VerifyItemSetByUserId",
"Gs2Inventory:VerifyReferenceOfByUserId",
"Gs2Inventory:VerifySimpleItemByUserId",
"Gs2Inventory:VerifyBigItemByUserId",
"Gs2Limit:VerifyCounterByUserId",
"Gs2Matchmaking:VerifyIncludeParticipantByUserId",
"Gs2Mission:VerifyCompleteByUserId",
"Gs2Mission:VerifyCounterValueByUserId",
"Gs2Ranking2:VerifyGlobalRankingScoreByUserId",
"Gs2Ranking2:VerifyClusterRankingScoreByUserId",
"Gs2Ranking2:VerifySubscribeRankingScoreByUserId",
"Gs2Schedule:VerifyTriggerByUserId",
"Gs2Schedule:VerifyEventByUserId",
"Gs2SerialKey:VerifyCodeByUserId",
"Gs2Stamina:VerifyStaminaValueByUserId",
"Gs2Stamina:VerifyStaminaMaxValueByUserId",
"Gs2Stamina:VerifyStaminaRecoverIntervalMinutesByUserId",
"Gs2Stamina:VerifyStaminaRecoverValueByUserId",
"Gs2Stamina:VerifyStaminaOverflowValueByUserId",
}
Type of action to be executed in the Verify Action
requeststring
~ 524288 charsJSON string of the request used when executing the action

AcquireAction

Acquire Action

TypeConditionRequiredDefaultValue LimitsDescription
actionString Enum
enum {
"Gs2AdReward:AcquirePointByUserId",
"Gs2Dictionary:AddEntriesByUserId",
"Gs2Enchant:ReDrawBalanceParameterStatusByUserId",
"Gs2Enchant:SetBalanceParameterStatusByUserId",
"Gs2Enchant:ReDrawRarityParameterStatusByUserId",
"Gs2Enchant:AddRarityParameterStatusByUserId",
"Gs2Enchant:SetRarityParameterStatusByUserId",
"Gs2Enhance:DirectEnhanceByUserId",
"Gs2Enhance:UnleashByUserId",
"Gs2Enhance:CreateProgressByUserId",
"Gs2Exchange:ExchangeByUserId",
"Gs2Exchange:IncrementalExchangeByUserId",
"Gs2Exchange:CreateAwaitByUserId",
"Gs2Exchange:AcquireForceByUserId",
"Gs2Exchange:SkipByUserId",
"Gs2Experience:AddExperienceByUserId",
"Gs2Experience:SetExperienceByUserId",
"Gs2Experience:AddRankCapByUserId",
"Gs2Experience:SetRankCapByUserId",
"Gs2Experience:MultiplyAcquireActionsByUserId",
"Gs2Formation:AddMoldCapacityByUserId",
"Gs2Formation:SetMoldCapacityByUserId",
"Gs2Formation:AcquireActionsToFormProperties",
"Gs2Formation:SetFormByUserId",
"Gs2Formation:AcquireActionsToPropertyFormProperties",
"Gs2Friend:UpdateProfileByUserId",
"Gs2Grade:AddGradeByUserId",
"Gs2Grade:ApplyRankCapByUserId",
"Gs2Grade:MultiplyAcquireActionsByUserId",
"Gs2Guild:IncreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Guild:SetMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:IncreaseMaximumIdleMinutesByUserId",
"Gs2Idle:SetMaximumIdleMinutesByUserId",
"Gs2Idle:ReceiveByUserId",
"Gs2Inbox:SendMessageByUserId",
"Gs2Inventory:AddCapacityByUserId",
"Gs2Inventory:SetCapacityByUserId",
"Gs2Inventory:AcquireItemSetByUserId",
"Gs2Inventory:AcquireItemSetWithGradeByUserId",
"Gs2Inventory:AddReferenceOfByUserId",
"Gs2Inventory:DeleteReferenceOfByUserId",
"Gs2Inventory:AcquireSimpleItemsByUserId",
"Gs2Inventory:SetSimpleItemsByUserId",
"Gs2Inventory:AcquireBigItemByUserId",
"Gs2Inventory:SetBigItemByUserId",
"Gs2JobQueue:PushByUserId",
"Gs2Limit:CountDownByUserId",
"Gs2Limit:DeleteCounterByUserId",
"Gs2LoginReward:DeleteReceiveStatusByUserId",
"Gs2LoginReward:UnmarkReceivedByUserId",
"Gs2Lottery:DrawByUserId",
"Gs2Lottery:ResetBoxByUserId",
"Gs2Mission:RevertReceiveByUserId",
"Gs2Mission:IncreaseCounterByUserId",
"Gs2Mission:SetCounterByUserId",
"Gs2Money:DepositByUserId",
"Gs2Money:RevertRecordReceipt",
"Gs2Money2:DepositByUserId",
"Gs2Quest:CreateProgressByUserId",
"Gs2Schedule:TriggerByUserId",
"Gs2Schedule:ExtendTriggerByUserId",
"Gs2Script:InvokeScript",
"Gs2SerialKey:RevertUseByUserId",
"Gs2SerialKey:IssueOnce",
"Gs2Showcase:DecrementPurchaseCountByUserId",
"Gs2Showcase:ForceReDrawByUserId",
"Gs2SkillTree:MarkReleaseByUserId",
"Gs2Stamina:RecoverStaminaByUserId",
"Gs2Stamina:RaiseMaxValueByUserId",
"Gs2Stamina:SetMaxValueByUserId",
"Gs2Stamina:SetRecoverIntervalByUserId",
"Gs2Stamina:SetRecoverValueByUserId",
"Gs2StateMachine:StartStateMachineByUserId",
}
Type of action to be executed in the Acquire Action
requeststring
~ 524288 charsJSON string of the request used when executing the action