GS2-Stamina GS2-Deploy/CDK リファレンス

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

エンティティ

Namespace

ネームスペース

ネームスペースは一つのプロジェクトで同じサービスを異なる用途で複数利用できるようにするための仕組みです。
GS2 のサービスは基本的にネームスペースというレイヤーがあり、ネームスペースが異なれば同じサービスでもまったく別のデータ空間として取り扱われます。

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

必須デフォルト値の制限説明
namestring~ 128文字ネームスペース名
descriptionstring~ 1024文字説明文
overflowTriggerScriptstring~ 1024文字回復処理時にあふれたスタミナに対して処理をする GS2-Script
logSettingLogSettingログの出力設定

GetAttr

説明
ItemNamespace作成したネームスペース

実装例

Type: GS2::Stamina::Namespace
Properties:
  Name: namespace-0001
  Description: null
  OverflowTriggerScript: grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script
  LogSetting: 
    LoggingNamespaceId: grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001
import "github.com/gs2io/gs2-golang-cdk/core"
import "github.com/gs2io/gs2-golang-cdk/stamina"
import "github.com/openlyinc/pointy"

SampleStack := core.NewStack()
stamina.NewNamespace(
    &SampleStack,
    "namespace-0001",
    stamina.NamespaceOptions{
        OverflowTriggerScript: "grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script",
        LogSetting: stamina.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\Stamina\Model\Namespace_(
            stack: $this,
            name: "namespace-0001",
            options: new \Gs2Cdk\Stamina\Model\Options\NamespaceOptions(
                overflowTriggerScript: "grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script",
                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.stamina.model.Namespace(
                this,
                "namespace-0001",
                new io.gs2.cdk.stamina.model.options.NamespaceOptions()
                        .withoverflowTriggerScript = "grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script"
                        .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.Gs2Stamina.Model.Namespace(
            stack: this,
            name: "namespace-0001",
            options: new Gs2Cdk.Gs2Stamina.Model.Options.NamespaceOptions
            {
                overflowTriggerScript = "grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script",
                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 stamina from "@/gs2cdk/stamina";

class SampleStack extends core.Stack
{
    public constructor() {
        super();
        new stamina.model.Namespace(
            this,
            "namespace-0001",
            {
                overflowTriggerScript: "grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script",
                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, stamina

class SampleStack(Stack):

    def __init__(self):
        super().__init__()
        stamina.Namespace(
            stack=self,
            name='namespace-0001',
            options=stamina.NamespaceOptions(
                overflow_trigger_script='grn:gs2:ap-northeast-1:YourOwnerId:script:namespace-0001:script:script',
                log_setting=core.LogSetting(
                    logging_namespace_id='grn:gs2:ap-northeast-1:YourOwnerId:log:namespace-0001',
                ),
            ),
        )

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

CurrentStaminaMaster

現在有効なマスターデータ

GS2ではマスターデータの管理にJSON形式のファイルを使用します。
ファイルをアップロードすることで、実際にサーバーに設定を反映することができます。

JSONファイルを作成する方法として、マネージメントコンソール上でのマスターデータエディタを提供していますが
よりゲームの運営に相応しいツールを作成し、適切なフォーマットのJSONファイルを書き出すことでもサービスを利用可能です。

必須デフォルト値の制限説明
namespaceNamestring~ 128文字ネームスペース名
settingsstring~ 5242880文字マスターデータ

GetAttr

説明
ItemCurrentStaminaMaster更新した現在有効なスタミナマスター

実装例

Type: GS2::Stamina::CurrentStaminaMaster
Properties:
  NamespaceName: namespace-0001
  Settings: {
    "version": "2019-02-14",
    "staminaModels": [
      {
        "name": "quest",
        "recoverIntervalMinutes": 15,
        "recoverValue": 1,
        "initialCapacity": 50,
        "isOverflow": true,
        "metadata": "QUEST",
        "maxCapacity": 999,
        "maxStaminaTable":
          {
            "name": "playerLevel",
            "metadata": "PLAYER_LEVEL",
            "experienceModelId": "playerLevel",
            "values": [
              51,
              52,
              53,
              54,
              55,
              56,
              57,
              58,
              59,
              60,
              61,
              62,
              63,
              64,
              65,
              66,
              67,
              68,
              69,
              70,
              71,
              72,
              73,
              74,
              75,
              76,
              77,
              78,
              79,
              80,
              81,
              82,
              83,
              84,
              85,
              86,
              87,
              88,
              89,
              90,
              91,
              92,
              93,
              94,
              95,
              96,
              97,
              98,
              99,
              100,
              101,
              102,
              103,
              104,
              105,
              106,
              107,
              108,
              109,
              110,
              111,
              112,
              113,
              114,
              115,
              116,
              117,
              118,
              119,
              120,
              121,
              122,
              123,
              124,
              125,
              126,
              127,
              128,
              129
            ]
          },
        "recoverIntervalTable":
          {
            "name": "staminaRecoverInterval",
            "metadata": "STAMINA_RECOVER_INTERVAL",
            "experienceModelId": "playerLevel",
            "values": [
              41,
              42,
              43,
              44,
              45,
              46,
              47,
              48,
              49,
              50,
              51,
              52,
              53,
              54,
              55,
              56,
              57,
              58,
              59,
              60,
              61,
              62,
              63,
              64,
              65,
              66,
              67,
              68,
              69,
              70,
              71,
              72,
              73,
              74,
              75,
              76,
              77,
              78,
              79,
              80,
              81,
              82,
              83,
              84,
              85,
              86,
              87,
              88,
              89,
              90,
              91,
              92,
              93,
              94,
              95,
              96,
              97,
              98,
              99,
              100,
              101,
              102,
              103,
              104,
              105,
              106,
              107,
              108,
              109,
              110,
              111,
              112,
              113,
              114,
              115,
              116,
              117,
              118,
              119
            ]
          },
        "recoverValueTable":
          {
            "name": "staminaRecoverValue",
            "metadata": "STAMINA_RECOVER_VALUE",
            "experienceModelId": "playerLevel",
            "values": [
              31,
              32,
              33,
              34,
              35,
              36,
              37,
              38,
              39,
              40,
              41,
              42,
              43,
              44,
              45,
              46,
              47,
              48,
              49,
              50,
              51,
              52,
              53,
              54,
              55,
              56,
              57,
              58,
              59,
              60,
              61,
              62,
              63,
              64,
              65,
              66,
              67,
              68,
              69,
              70,
              71,
              72,
              73,
              74,
              75,
              76,
              77,
              78,
              79,
              80,
              81,
              82,
              83,
              84,
              85,
              86,
              87,
              88,
              89,
              90,
              91,
              92,
              93,
              94,
              95,
              96,
              97,
              98,
              99,
              100,
              101,
              102,
              103,
              104,
              105,
              106,
              107,
              108,
              109
            ]
          }
      },
      {
        "name": "raidBattle",
        "recoverIntervalMinutes": 60,
        "recoverValue": 1,
        "initialCapacity": 10,
        "metadata": "RAID_BATTLE"
      },
      {
        "name": "special",
        "recoverIntervalMinutes": 30,
        "recoverValue": 3,
        "initialCapacity": 100,
        "isOverflow": true,
        "metadata": "SPECIAL",
        "maxCapacity": 999,
        "maxStaminaTable":
          {
            "name": "special",
            "metadata": "SPECIAL",
            "experienceModelId": "special",
            "values": [
              102,
              104,
              106,
              108,
              110,
              112,
              114,
              116,
              118,
              120,
              122,
              124,
              126,
              128,
              130,
              132,
              134,
              136,
              138,
              140,
              142,
              144,
              146,
              148,
              150,
              152,
              154,
              156,
              158,
              160,
              162,
              164,
              166,
              168,
              170,
              172,
              174,
              176,
              178,
              180,
              182,
              184,
              186,
              188,
              190,
              192,
              194,
              196,
              198,
              200,
              202,
              204,
              206,
              208,
              210,
              212,
              214,
              216,
              218,
              220,
              222,
              224,
              226,
              228,
              230,
              232,
              234,
              236,
              238,
              240,
              242,
              244,
              246,
              248,
              250,
              252,
              254,
              256,
              258
            ]
          }
      }
    ]
  }
import "github.com/gs2io/gs2-golang-cdk/core"
import "github.com/gs2io/gs2-golang-cdk/stamina"
import "github.com/openlyinc/pointy"

SampleStack := core.NewStack()
        stamina.NewNamespace(
            &SampleStack,
            # 省略
        ).MasterData(
            stamina_models=[
                stamina.StaminaModel(
                    name="quest",
                    recover_interval_minutes=15,
                    recover_value=1,
                    initial_capacity=50,
                    is_overflow=pointy.Bool(true),
                    options=stamina.StaminaModelOptions(
                        metadata="QUEST",
                        max_capacity=999,
                        max_stamina_table=stamina.MaxStaminaTable{
                            Name: "playerLevel",
                            Metadata: "PLAYER_LEVEL",
                            ExperienceModelId: "playerLevel",
                            Values: []Stamina.Integer{    
                                Stamina.Integer{
                                51
                                Stamina.Integer{
                                52
                                Stamina.Integer{
                                53
                                Stamina.Integer{
                                54
                                Stamina.Integer{
                                55
                                Stamina.Integer{
                                56
                                Stamina.Integer{
                                57
                                Stamina.Integer{
                                58
                                Stamina.Integer{
                                59
                                Stamina.Integer{
                                60
                                Stamina.Integer{
                                61
                                Stamina.Integer{
                                62
                                Stamina.Integer{
                                63
                                Stamina.Integer{
                                64
                                Stamina.Integer{
                                65
                                Stamina.Integer{
                                66
                                Stamina.Integer{
                                67
                                Stamina.Integer{
                                68
                                Stamina.Integer{
                                69
                                Stamina.Integer{
                                70
                                Stamina.Integer{
                                71
                                Stamina.Integer{
                                72
                                Stamina.Integer{
                                73
                                Stamina.Integer{
                                74
                                Stamina.Integer{
                                75
                                Stamina.Integer{
                                76
                                Stamina.Integer{
                                77
                                Stamina.Integer{
                                78
                                Stamina.Integer{
                                79
                                Stamina.Integer{
                                80
                                Stamina.Integer{
                                81
                                Stamina.Integer{
                                82
                                Stamina.Integer{
                                83
                                Stamina.Integer{
                                84
                                Stamina.Integer{
                                85
                                Stamina.Integer{
                                86
                                Stamina.Integer{
                                87
                                Stamina.Integer{
                                88
                                Stamina.Integer{
                                89
                                Stamina.Integer{
                                90
                                Stamina.Integer{
                                91
                                Stamina.Integer{
                                92
                                Stamina.Integer{
                                93
                                Stamina.Integer{
                                94
                                Stamina.Integer{
                                95
                                Stamina.Integer{
                                96
                                Stamina.Integer{
                                97
                                Stamina.Integer{
                                98
                                Stamina.Integer{
                                99
                                Stamina.Integer{
                                100
                                Stamina.Integer{
                                101
                                Stamina.Integer{
                                102
                                Stamina.Integer{
                                103
                                Stamina.Integer{
                                104
                                Stamina.Integer{
                                105
                                Stamina.Integer{
                                106
                                Stamina.Integer{
                                107
                                Stamina.Integer{
                                108
                                Stamina.Integer{
                                109
                                Stamina.Integer{
                                110
                                Stamina.Integer{
                                111
                                Stamina.Integer{
                                112
                                Stamina.Integer{
                                113
                                Stamina.Integer{
                                114
                                Stamina.Integer{
                                115
                                Stamina.Integer{
                                116
                                Stamina.Integer{
                                117
                                Stamina.Integer{
                                118
                                Stamina.Integer{
                                119
                                Stamina.Integer{
                                120
                                Stamina.Integer{
                                121
                                Stamina.Integer{
                                122
                                Stamina.Integer{
                                123
                                Stamina.Integer{
                                124
                                Stamina.Integer{
                                125
                                Stamina.Integer{
                                126
                                Stamina.Integer{
                                127
                                Stamina.Integer{
                                128
                                Stamina.Integer{
                                129
                            },
                        },
                        recover_interval_table=stamina.RecoverIntervalTable{
                            Name: "staminaRecoverInterval",
                            Metadata: "STAMINA_RECOVER_INTERVAL",
                            ExperienceModelId: "playerLevel",
                            Values: []Stamina.Integer{    
                                Stamina.Integer{
                                41
                                Stamina.Integer{
                                42
                                Stamina.Integer{
                                43
                                Stamina.Integer{
                                44
                                Stamina.Integer{
                                45
                                Stamina.Integer{
                                46
                                Stamina.Integer{
                                47
                                Stamina.Integer{
                                48
                                Stamina.Integer{
                                49
                                Stamina.Integer{
                                50
                                Stamina.Integer{
                                51
                                Stamina.Integer{
                                52
                                Stamina.Integer{
                                53
                                Stamina.Integer{
                                54
                                Stamina.Integer{
                                55
                                Stamina.Integer{
                                56
                                Stamina.Integer{
                                57
                                Stamina.Integer{
                                58
                                Stamina.Integer{
                                59
                                Stamina.Integer{
                                60
                                Stamina.Integer{
                                61
                                Stamina.Integer{
                                62
                                Stamina.Integer{
                                63
                                Stamina.Integer{
                                64
                                Stamina.Integer{
                                65
                                Stamina.Integer{
                                66
                                Stamina.Integer{
                                67
                                Stamina.Integer{
                                68
                                Stamina.Integer{
                                69
                                Stamina.Integer{
                                70
                                Stamina.Integer{
                                71
                                Stamina.Integer{
                                72
                                Stamina.Integer{
                                73
                                Stamina.Integer{
                                74
                                Stamina.Integer{
                                75
                                Stamina.Integer{
                                76
                                Stamina.Integer{
                                77
                                Stamina.Integer{
                                78
                                Stamina.Integer{
                                79
                                Stamina.Integer{
                                80
                                Stamina.Integer{
                                81
                                Stamina.Integer{
                                82
                                Stamina.Integer{
                                83
                                Stamina.Integer{
                                84
                                Stamina.Integer{
                                85
                                Stamina.Integer{
                                86
                                Stamina.Integer{
                                87
                                Stamina.Integer{
                                88
                                Stamina.Integer{
                                89
                                Stamina.Integer{
                                90
                                Stamina.Integer{
                                91
                                Stamina.Integer{
                                92
                                Stamina.Integer{
                                93
                                Stamina.Integer{
                                94
                                Stamina.Integer{
                                95
                                Stamina.Integer{
                                96
                                Stamina.Integer{
                                97
                                Stamina.Integer{
                                98
                                Stamina.Integer{
                                99
                                Stamina.Integer{
                                100
                                Stamina.Integer{
                                101
                                Stamina.Integer{
                                102
                                Stamina.Integer{
                                103
                                Stamina.Integer{
                                104
                                Stamina.Integer{
                                105
                                Stamina.Integer{
                                106
                                Stamina.Integer{
                                107
                                Stamina.Integer{
                                108
                                Stamina.Integer{
                                109
                                Stamina.Integer{
                                110
                                Stamina.Integer{
                                111
                                Stamina.Integer{
                                112
                                Stamina.Integer{
                                113
                                Stamina.Integer{
                                114
                                Stamina.Integer{
                                115
                                Stamina.Integer{
                                116
                                Stamina.Integer{
                                117
                                Stamina.Integer{
                                118
                                Stamina.Integer{
                                119
                            },
                        },
                        recover_value_table=stamina.RecoverValueTable{
                            Name: "staminaRecoverValue",
                            Metadata: "STAMINA_RECOVER_VALUE",
                            ExperienceModelId: "playerLevel",
                            Values: []Stamina.Integer{    
                                Stamina.Integer{
                                31
                                Stamina.Integer{
                                32
                                Stamina.Integer{
                                33
                                Stamina.Integer{
                                34
                                Stamina.Integer{
                                35
                                Stamina.Integer{
                                36
                                Stamina.Integer{
                                37
                                Stamina.Integer{
                                38
                                Stamina.Integer{
                                39
                                Stamina.Integer{
                                40
                                Stamina.Integer{
                                41
                                Stamina.Integer{
                                42
                                Stamina.Integer{
                                43
                                Stamina.Integer{
                                44
                                Stamina.Integer{
                                45
                                Stamina.Integer{
                                46
                                Stamina.Integer{
                                47
                                Stamina.Integer{
                                48
                                Stamina.Integer{
                                49
                                Stamina.Integer{
                                50
                                Stamina.Integer{
                                51
                                Stamina.Integer{
                                52
                                Stamina.Integer{
                                53
                                Stamina.Integer{
                                54
                                Stamina.Integer{
                                55
                                Stamina.Integer{
                                56
                                Stamina.Integer{
                                57
                                Stamina.Integer{
                                58
                                Stamina.Integer{
                                59
                                Stamina.Integer{
                                60
                                Stamina.Integer{
                                61
                                Stamina.Integer{
                                62
                                Stamina.Integer{
                                63
                                Stamina.Integer{
                                64
                                Stamina.Integer{
                                65
                                Stamina.Integer{
                                66
                                Stamina.Integer{
                                67
                                Stamina.Integer{
                                68
                                Stamina.Integer{
                                69
                                Stamina.Integer{
                                70
                                Stamina.Integer{
                                71
                                Stamina.Integer{
                                72
                                Stamina.Integer{
                                73
                                Stamina.Integer{
                                74
                                Stamina.Integer{
                                75
                                Stamina.Integer{
                                76
                                Stamina.Integer{
                                77
                                Stamina.Integer{
                                78
                                Stamina.Integer{
                                79
                                Stamina.Integer{
                                80
                                Stamina.Integer{
                                81
                                Stamina.Integer{
                                82
                                Stamina.Integer{
                                83
                                Stamina.Integer{
                                84
                                Stamina.Integer{
                                85
                                Stamina.Integer{
                                86
                                Stamina.Integer{
                                87
                                Stamina.Integer{
                                88
                                Stamina.Integer{
                                89
                                Stamina.Integer{
                                90
                                Stamina.Integer{
                                91
                                Stamina.Integer{
                                92
                                Stamina.Integer{
                                93
                                Stamina.Integer{
                                94
                                Stamina.Integer{
                                95
                                Stamina.Integer{
                                96
                                Stamina.Integer{
                                97
                                Stamina.Integer{
                                98
                                Stamina.Integer{
                                99
                                Stamina.Integer{
                                100
                                Stamina.Integer{
                                101
                                Stamina.Integer{
                                102
                                Stamina.Integer{
                                103
                                Stamina.Integer{
                                104
                                Stamina.Integer{
                                105
                                Stamina.Integer{
                                106
                                Stamina.Integer{
                                107
                                Stamina.Integer{
                                108
                                Stamina.Integer{
                                109
                            },
                        },
                    ),
                ),
                stamina.StaminaModel(
                    name="raidBattle",
                    recover_interval_minutes=60,
                    recover_value=1,
                    initial_capacity=10,
                    options=stamina.StaminaModelOptions(
                        metadata="RAID_BATTLE",
                    ),
                ),
                stamina.StaminaModel(
                    name="special",
                    recover_interval_minutes=30,
                    recover_value=3,
                    initial_capacity=100,
                    is_overflow=pointy.Bool(true),
                    options=stamina.StaminaModelOptions(
                        metadata="SPECIAL",
                        max_capacity=999,
                        max_stamina_table=stamina.MaxStaminaTable{
                            Name: "special",
                            Metadata: "SPECIAL",
                            ExperienceModelId: "special",
                            Values: []Stamina.Integer{    
                                Stamina.Integer{
                                102
                                Stamina.Integer{
                                104
                                Stamina.Integer{
                                106
                                Stamina.Integer{
                                108
                                Stamina.Integer{
                                110
                                Stamina.Integer{
                                112
                                Stamina.Integer{
                                114
                                Stamina.Integer{
                                116
                                Stamina.Integer{
                                118
                                Stamina.Integer{
                                120
                                Stamina.Integer{
                                122
                                Stamina.Integer{
                                124
                                Stamina.Integer{
                                126
                                Stamina.Integer{
                                128
                                Stamina.Integer{
                                130
                                Stamina.Integer{
                                132
                                Stamina.Integer{
                                134
                                Stamina.Integer{
                                136
                                Stamina.Integer{
                                138
                                Stamina.Integer{
                                140
                                Stamina.Integer{
                                142
                                Stamina.Integer{
                                144
                                Stamina.Integer{
                                146
                                Stamina.Integer{
                                148
                                Stamina.Integer{
                                150
                                Stamina.Integer{
                                152
                                Stamina.Integer{
                                154
                                Stamina.Integer{
                                156
                                Stamina.Integer{
                                158
                                Stamina.Integer{
                                160
                                Stamina.Integer{
                                162
                                Stamina.Integer{
                                164
                                Stamina.Integer{
                                166
                                Stamina.Integer{
                                168
                                Stamina.Integer{
                                170
                                Stamina.Integer{
                                172
                                Stamina.Integer{
                                174
                                Stamina.Integer{
                                176
                                Stamina.Integer{
                                178
                                Stamina.Integer{
                                180
                                Stamina.Integer{
                                182
                                Stamina.Integer{
                                184
                                Stamina.Integer{
                                186
                                Stamina.Integer{
                                188
                                Stamina.Integer{
                                190
                                Stamina.Integer{
                                192
                                Stamina.Integer{
                                194
                                Stamina.Integer{
                                196
                                Stamina.Integer{
                                198
                                Stamina.Integer{
                                200
                                Stamina.Integer{
                                202
                                Stamina.Integer{
                                204
                                Stamina.Integer{
                                206
                                Stamina.Integer{
                                208
                                Stamina.Integer{
                                210
                                Stamina.Integer{
                                212
                                Stamina.Integer{
                                214
                                Stamina.Integer{
                                216
                                Stamina.Integer{
                                218
                                Stamina.Integer{
                                220
                                Stamina.Integer{
                                222
                                Stamina.Integer{
                                224
                                Stamina.Integer{
                                226
                                Stamina.Integer{
                                228
                                Stamina.Integer{
                                230
                                Stamina.Integer{
                                232
                                Stamina.Integer{
                                234
                                Stamina.Integer{
                                236
                                Stamina.Integer{
                                238
                                Stamina.Integer{
                                240
                                Stamina.Integer{
                                242
                                Stamina.Integer{
                                244
                                Stamina.Integer{
                                246
                                Stamina.Integer{
                                248
                                Stamina.Integer{
                                250
                                Stamina.Integer{
                                252
                                Stamina.Integer{
                                254
                                Stamina.Integer{
                                256
                                Stamina.Integer{
                                258
                            },
                        },
                    ),
                ),
            ],
        )

println(SampleStack.Yaml())  // Generate Template
class SampleStack extends \Gs2Cdk\Core\Model\Stack
{
    function __construct() {
        parent::__construct();
        (new \Gs2Cdk\Stamina\Model\Namespace_(
            stack: $this,
            // 省略
        ))->masterData(
            [
                new \Gs2Cdk\Stamina\Model\StaminaModel(
                    name:"quest",
                    recoverIntervalMinutes:15,
                    recoverValue:1,
                    initialCapacity:50,
                    isOverflow:True,
                    options: new \Gs2Cdk\Stamina\Model\Options\StaminaModelOptions(
                        metadata:"QUEST",
                        maxCapacity:999,
                        maxStaminaTable:new \Gs2Cdk\Stamina\Model\MaxStaminaTable(
                            name = "playerLevel",
                            experienceModelId = "playerLevel",
                            values = [51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129],
                            option: new \Gs2Cdk\stamina\Model\Options\MaxStaminaTableOptions(
                                metadata = "PLAYER_LEVEL",
                            )
                        ),
                        recoverIntervalTable:new \Gs2Cdk\Stamina\Model\RecoverIntervalTable(
                            name = "staminaRecoverInterval",
                            experienceModelId = "playerLevel",
                            values = [41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119],
                            option: new \Gs2Cdk\stamina\Model\Options\RecoverIntervalTableOptions(
                                metadata = "STAMINA_RECOVER_INTERVAL",
                            )
                        ),
                        recoverValueTable:new \Gs2Cdk\Stamina\Model\RecoverValueTable(
                            name = "staminaRecoverValue",
                            experienceModelId = "playerLevel",
                            values = [31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109],
                            option: new \Gs2Cdk\stamina\Model\Options\RecoverValueTableOptions(
                                metadata = "STAMINA_RECOVER_VALUE",
                            )
                        )
                    )
                ),
                new \Gs2Cdk\Stamina\Model\StaminaModel(
                    name:"raidBattle",
                    recoverIntervalMinutes:60,
                    recoverValue:1,
                    initialCapacity:10,
                    options: new \Gs2Cdk\Stamina\Model\Options\StaminaModelOptions(
                        metadata:"RAID_BATTLE"
                    )
                ),
                new \Gs2Cdk\Stamina\Model\StaminaModel(
                    name:"special",
                    recoverIntervalMinutes:30,
                    recoverValue:3,
                    initialCapacity:100,
                    isOverflow:True,
                    options: new \Gs2Cdk\Stamina\Model\Options\StaminaModelOptions(
                        metadata:"SPECIAL",
                        maxCapacity:999,
                        maxStaminaTable:new \Gs2Cdk\Stamina\Model\MaxStaminaTable(
                            name = "special",
                            experienceModelId = "special",
                            values = [102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 254, 256, 258],
                            option: new \Gs2Cdk\stamina\Model\Options\MaxStaminaTableOptions(
                                metadata = "SPECIAL",
                            )
                        )
                    )
                )
            ]
        );
    }
}

print((new SampleStack())->yaml());  // Generate Template
class SampleStack extends io.gs2.cdk.core.model.Stack
{
    public SampleStack() {
        super();
        new io.gs2.cdk.stamina.model.Namespace(
            this,
            // 省略
        ).masterData(
            Arrays.asList(
                new io.gs2.cdk.stamina.model.StaminaModel(
                    "quest",
                    15,
                    1,
                    50,
                    true,
                    new io.gs2.cdk.stamina.model.options.StaminaModelOptions()
                            .withMetadata("QUEST")
                            .withMaxCapacity(999)
                            .withMaxStaminaTable(new io.gs2.cdk.stamina.model.MaxStaminaTable(
                            name = "playerLevel",
                            experienceModelId = "playerLevel",
                            values = [51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129],
                            option: new io.gs2.cdk.stamina.model.options.MaxStaminaTableOptions()
                                .withMetadata("PLAYER_LEVEL"),
                            )
                        ))
                            .withRecoverIntervalTable(new io.gs2.cdk.stamina.model.RecoverIntervalTable(
                            name = "staminaRecoverInterval",
                            experienceModelId = "playerLevel",
                            values = [41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119],
                            option: new io.gs2.cdk.stamina.model.options.RecoverIntervalTableOptions()
                                .withMetadata("STAMINA_RECOVER_INTERVAL"),
                            )
                        ))
                            .withRecoverValueTable(new io.gs2.cdk.stamina.model.RecoverValueTable(
                            name = "staminaRecoverValue",
                            experienceModelId = "playerLevel",
                            values = [31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109],
                            option: new io.gs2.cdk.stamina.model.options.RecoverValueTableOptions()
                                .withMetadata("STAMINA_RECOVER_VALUE"),
                            )
                        ))
                    }
                ),
                new io.gs2.cdk.stamina.model.StaminaModel(
                    "raidBattle",
                    60,
                    1,
                    10,
                    new io.gs2.cdk.stamina.model.options.StaminaModelOptions()
                            .withMetadata("RAID_BATTLE")
                    }
                ),
                new io.gs2.cdk.stamina.model.StaminaModel(
                    "special",
                    30,
                    3,
                    100,
                    true,
                    new io.gs2.cdk.stamina.model.options.StaminaModelOptions()
                            .withMetadata("SPECIAL")
                            .withMaxCapacity(999)
                            .withMaxStaminaTable(new io.gs2.cdk.stamina.model.MaxStaminaTable(
                            name = "special",
                            experienceModelId = "special",
                            values = [102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 254, 256, 258],
                            option: new io.gs2.cdk.stamina.model.options.MaxStaminaTableOptions()
                                .withMetadata("SPECIAL"),
                            )
                        ))
                    }
                )
            )
        );
    }
}

System.out.println(new SampleStack().yaml());  // Generate Template
public class SampleStack : Gs2Cdk.Core.Model.Stack
{
    public SampleStack() {
        new Gs2Cdk.Gs2Stamina.Model.Namespace(
            stack: this,
            // 省略
        ).MasterData(
            new [] {
                new Gs2Cdk.Gs2Stamina.Model.StaminaModel(
                    "quest",
                    15,
                    1,
                    50,
                    true,
                    new Gs2Cdk.Gs2Stamina.Model.StaminaModelOptions {
                        metadata = "QUEST",
                        maxCapacity = 999,
                        maxStaminaTable = new Gs2Cdk.Gs2Stamina.Model.MaxStaminaTable(
                            name: "playerLevel",
                            metadata: "PLAYER_LEVEL",
                            experienceModelId: "playerLevel",
                            values: new int[] {
                                51,
                                52,
                                53,
                                54,
                                55,
                                56,
                                57,
                                58,
                                59,
                                60,
                                61,
                                62,
                                63,
                                64,
                                65,
                                66,
                                67,
                                68,
                                69,
                                70,
                                71,
                                72,
                                73,
                                74,
                                75,
                                76,
                                77,
                                78,
                                79,
                                80,
                                81,
                                82,
                                83,
                                84,
                                85,
                                86,
                                87,
                                88,
                                89,
                                90,
                                91,
                                92,
                                93,
                                94,
                                95,
                                96,
                                97,
                                98,
                                99,
                                100,
                                101,
                                102,
                                103,
                                104,
                                105,
                                106,
                                107,
                                108,
                                109,
                                110,
                                111,
                                112,
                                113,
                                114,
                                115,
                                116,
                                117,
                                118,
                                119,
                                120,
                                121,
                                122,
                                123,
                                124,
                                125,
                                126,
                                127,
                                128,
                                129
                            }
                        ),
                        recoverIntervalTable = new Gs2Cdk.Gs2Stamina.Model.RecoverIntervalTable(
                            name: "staminaRecoverInterval",
                            metadata: "STAMINA_RECOVER_INTERVAL",
                            experienceModelId: "playerLevel",
                            values: new int[] {
                                41,
                                42,
                                43,
                                44,
                                45,
                                46,
                                47,
                                48,
                                49,
                                50,
                                51,
                                52,
                                53,
                                54,
                                55,
                                56,
                                57,
                                58,
                                59,
                                60,
                                61,
                                62,
                                63,
                                64,
                                65,
                                66,
                                67,
                                68,
                                69,
                                70,
                                71,
                                72,
                                73,
                                74,
                                75,
                                76,
                                77,
                                78,
                                79,
                                80,
                                81,
                                82,
                                83,
                                84,
                                85,
                                86,
                                87,
                                88,
                                89,
                                90,
                                91,
                                92,
                                93,
                                94,
                                95,
                                96,
                                97,
                                98,
                                99,
                                100,
                                101,
                                102,
                                103,
                                104,
                                105,
                                106,
                                107,
                                108,
                                109,
                                110,
                                111,
                                112,
                                113,
                                114,
                                115,
                                116,
                                117,
                                118,
                                119
                            }
                        ),
                        recoverValueTable = new Gs2Cdk.Gs2Stamina.Model.RecoverValueTable(
                            name: "staminaRecoverValue",
                            metadata: "STAMINA_RECOVER_VALUE",
                            experienceModelId: "playerLevel",
                            values: new int[] {
                                31,
                                32,
                                33,
                                34,
                                35,
                                36,
                                37,
                                38,
                                39,
                                40,
                                41,
                                42,
                                43,
                                44,
                                45,
                                46,
                                47,
                                48,
                                49,
                                50,
                                51,
                                52,
                                53,
                                54,
                                55,
                                56,
                                57,
                                58,
                                59,
                                60,
                                61,
                                62,
                                63,
                                64,
                                65,
                                66,
                                67,
                                68,
                                69,
                                70,
                                71,
                                72,
                                73,
                                74,
                                75,
                                76,
                                77,
                                78,
                                79,
                                80,
                                81,
                                82,
                                83,
                                84,
                                85,
                                86,
                                87,
                                88,
                                89,
                                90,
                                91,
                                92,
                                93,
                                94,
                                95,
                                96,
                                97,
                                98,
                                99,
                                100,
                                101,
                                102,
                                103,
                                104,
                                105,
                                106,
                                107,
                                108,
                                109
                            }
                        )
                    }
                );,
                new Gs2Cdk.Gs2Stamina.Model.StaminaModel(
                    "raidBattle",
                    60,
                    1,
                    10,
                    new Gs2Cdk.Gs2Stamina.Model.StaminaModelOptions {
                        metadata = "RAID_BATTLE"
                    }
                );,
                new Gs2Cdk.Gs2Stamina.Model.StaminaModel(
                    "special",
                    30,
                    3,
                    100,
                    true,
                    new Gs2Cdk.Gs2Stamina.Model.StaminaModelOptions {
                        metadata = "SPECIAL",
                        maxCapacity = 999,
                        maxStaminaTable = new Gs2Cdk.Gs2Stamina.Model.MaxStaminaTable(
                            name: "special",
                            metadata: "SPECIAL",
                            experienceModelId: "special",
                            values: new int[] {
                                102,
                                104,
                                106,
                                108,
                                110,
                                112,
                                114,
                                116,
                                118,
                                120,
                                122,
                                124,
                                126,
                                128,
                                130,
                                132,
                                134,
                                136,
                                138,
                                140,
                                142,
                                144,
                                146,
                                148,
                                150,
                                152,
                                154,
                                156,
                                158,
                                160,
                                162,
                                164,
                                166,
                                168,
                                170,
                                172,
                                174,
                                176,
                                178,
                                180,
                                182,
                                184,
                                186,
                                188,
                                190,
                                192,
                                194,
                                196,
                                198,
                                200,
                                202,
                                204,
                                206,
                                208,
                                210,
                                212,
                                214,
                                216,
                                218,
                                220,
                                222,
                                224,
                                226,
                                228,
                                230,
                                232,
                                234,
                                236,
                                238,
                                240,
                                242,
                                244,
                                246,
                                248,
                                250,
                                252,
                                254,
                                256,
                                258
                            }
                        )
                    }
                );
            }
        )
    }
}

Debug.Log(new SampleStack().Yaml());  // Generate Template
import core from "@/gs2cdk/core";
import stamina from "@/gs2cdk/stamina";

class SampleStack extends core.Stack
{
    public constructor() {
        super();
        new stamina.model.Namespace(
            this,
            // 省略
        ).masterData(
            [
                new stamina.model.StaminaModel(
                    "quest",
                    15,
                    1,
                    50,
                    true,
                    {
                        metadata: "QUEST",
                        maxCapacity: 999,
                        maxStaminaTable: new stamina.model.MaxStaminaTable(
                            "playerLevel",
                            "PLAYER_LEVEL",
                            "playerLevel",
                            new number[
                                51,
                                52,
                                53,
                                54,
                                55,
                                56,
                                57,
                                58,
                                59,
                                60,
                                61,
                                62,
                                63,
                                64,
                                65,
                                66,
                                67,
                                68,
                                69,
                                70,
                                71,
                                72,
                                73,
                                74,
                                75,
                                76,
                                77,
                                78,
                                79,
                                80,
                                81,
                                82,
                                83,
                                84,
                                85,
                                86,
                                87,
                                88,
                                89,
                                90,
                                91,
                                92,
                                93,
                                94,
                                95,
                                96,
                                97,
                                98,
                                99,
                                100,
                                101,
                                102,
                                103,
                                104,
                                105,
                                106,
                                107,
                                108,
                                109,
                                110,
                                111,
                                112,
                                113,
                                114,
                                115,
                                116,
                                117,
                                118,
                                119,
                                120,
                                121,
                                122,
                                123,
                                124,
                                125,
                                126,
                                127,
                                128,
                                129
                            ]
                        ),
                        recoverIntervalTable: new stamina.model.RecoverIntervalTable(
                            "staminaRecoverInterval",
                            "STAMINA_RECOVER_INTERVAL",
                            "playerLevel",
                            new number[
                                41,
                                42,
                                43,
                                44,
                                45,
                                46,
                                47,
                                48,
                                49,
                                50,
                                51,
                                52,
                                53,
                                54,
                                55,
                                56,
                                57,
                                58,
                                59,
                                60,
                                61,
                                62,
                                63,
                                64,
                                65,
                                66,
                                67,
                                68,
                                69,
                                70,
                                71,
                                72,
                                73,
                                74,
                                75,
                                76,
                                77,
                                78,
                                79,
                                80,
                                81,
                                82,
                                83,
                                84,
                                85,
                                86,
                                87,
                                88,
                                89,
                                90,
                                91,
                                92,
                                93,
                                94,
                                95,
                                96,
                                97,
                                98,
                                99,
                                100,
                                101,
                                102,
                                103,
                                104,
                                105,
                                106,
                                107,
                                108,
                                109,
                                110,
                                111,
                                112,
                                113,
                                114,
                                115,
                                116,
                                117,
                                118,
                                119
                            ]
                        ),
                        recoverValueTable: new stamina.model.RecoverValueTable(
                            "staminaRecoverValue",
                            "STAMINA_RECOVER_VALUE",
                            "playerLevel",
                            new number[
                                31,
                                32,
                                33,
                                34,
                                35,
                                36,
                                37,
                                38,
                                39,
                                40,
                                41,
                                42,
                                43,
                                44,
                                45,
                                46,
                                47,
                                48,
                                49,
                                50,
                                51,
                                52,
                                53,
                                54,
                                55,
                                56,
                                57,
                                58,
                                59,
                                60,
                                61,
                                62,
                                63,
                                64,
                                65,
                                66,
                                67,
                                68,
                                69,
                                70,
                                71,
                                72,
                                73,
                                74,
                                75,
                                76,
                                77,
                                78,
                                79,
                                80,
                                81,
                                82,
                                83,
                                84,
                                85,
                                86,
                                87,
                                88,
                                89,
                                90,
                                91,
                                92,
                                93,
                                94,
                                95,
                                96,
                                97,
                                98,
                                99,
                                100,
                                101,
                                102,
                                103,
                                104,
                                105,
                                106,
                                107,
                                108,
                                109
                            ]
                        )
                    }
                ),
                new stamina.model.StaminaModel(
                    "raidBattle",
                    60,
                    1,
                    10,
                    {
                        metadata: "RAID_BATTLE"
                    }
                ),
                new stamina.model.StaminaModel(
                    "special",
                    30,
                    3,
                    100,
                    true,
                    {
                        metadata: "SPECIAL",
                        maxCapacity: 999,
                        maxStaminaTable: new stamina.model.MaxStaminaTable(
                            "special",
                            "SPECIAL",
                            "special",
                            new number[
                                102,
                                104,
                                106,
                                108,
                                110,
                                112,
                                114,
                                116,
                                118,
                                120,
                                122,
                                124,
                                126,
                                128,
                                130,
                                132,
                                134,
                                136,
                                138,
                                140,
                                142,
                                144,
                                146,
                                148,
                                150,
                                152,
                                154,
                                156,
                                158,
                                160,
                                162,
                                164,
                                166,
                                168,
                                170,
                                172,
                                174,
                                176,
                                178,
                                180,
                                182,
                                184,
                                186,
                                188,
                                190,
                                192,
                                194,
                                196,
                                198,
                                200,
                                202,
                                204,
                                206,
                                208,
                                210,
                                212,
                                214,
                                216,
                                218,
                                220,
                                222,
                                224,
                                226,
                                228,
                                230,
                                232,
                                234,
                                236,
                                238,
                                240,
                                242,
                                244,
                                246,
                                248,
                                250,
                                252,
                                254,
                                256,
                                258
                            ]
                        )
                    }
                )
            ]
        );
    }
}

console.log(new SampleStack().yaml());  // Generate Template
from gs2_cdk import Stack, core, stamina

class SampleStack(Stack):

    def __init__(self):
        super().__init__()
        stamina.Namespace(
            stack=self,
            # 省略
        ).master_data(
            stamina_models=[
                stamina.StaminaModel(
                    name='quest',
                    recover_interval_minutes=15,
                    recover_value=1,
                    initial_capacity=50,
                    is_overflow=True,
                    options=stamina.StaminaModelOptions(
                        metadata='QUEST',
                        max_capacity=999,
                        max_stamina_table=stamina.MaxStaminaTable(
                            name='playerLevel',
                            metadata='PLAYER_LEVEL',
                            experience_model_id='playerLevel',
                            values=[
                                51,
                                52,
                                53,
                                54,
                                55,
                                56,
                                57,
                                58,
                                59,
                                60,
                                61,
                                62,
                                63,
                                64,
                                65,
                                66,
                                67,
                                68,
                                69,
                                70,
                                71,
                                72,
                                73,
                                74,
                                75,
                                76,
                                77,
                                78,
                                79,
                                80,
                                81,
                                82,
                                83,
                                84,
                                85,
                                86,
                                87,
                                88,
                                89,
                                90,
                                91,
                                92,
                                93,
                                94,
                                95,
                                96,
                                97,
                                98,
                                99,
                                100,
                                101,
                                102,
                                103,
                                104,
                                105,
                                106,
                                107,
                                108,
                                109,
                                110,
                                111,
                                112,
                                113,
                                114,
                                115,
                                116,
                                117,
                                118,
                                119,
                                120,
                                121,
                                122,
                                123,
                                124,
                                125,
                                126,
                                127,
                                128,
                                129
                            ]
                        ),
                        recover_interval_table=stamina.RecoverIntervalTable(
                            name='staminaRecoverInterval',
                            metadata='STAMINA_RECOVER_INTERVAL',
                            experience_model_id='playerLevel',
                            values=[
                                41,
                                42,
                                43,
                                44,
                                45,
                                46,
                                47,
                                48,
                                49,
                                50,
                                51,
                                52,
                                53,
                                54,
                                55,
                                56,
                                57,
                                58,
                                59,
                                60,
                                61,
                                62,
                                63,
                                64,
                                65,
                                66,
                                67,
                                68,
                                69,
                                70,
                                71,
                                72,
                                73,
                                74,
                                75,
                                76,
                                77,
                                78,
                                79,
                                80,
                                81,
                                82,
                                83,
                                84,
                                85,
                                86,
                                87,
                                88,
                                89,
                                90,
                                91,
                                92,
                                93,
                                94,
                                95,
                                96,
                                97,
                                98,
                                99,
                                100,
                                101,
                                102,
                                103,
                                104,
                                105,
                                106,
                                107,
                                108,
                                109,
                                110,
                                111,
                                112,
                                113,
                                114,
                                115,
                                116,
                                117,
                                118,
                                119
                            ]
                        ),
                        recover_value_table=stamina.RecoverValueTable(
                            name='staminaRecoverValue',
                            metadata='STAMINA_RECOVER_VALUE',
                            experience_model_id='playerLevel',
                            values=[
                                31,
                                32,
                                33,
                                34,
                                35,
                                36,
                                37,
                                38,
                                39,
                                40,
                                41,
                                42,
                                43,
                                44,
                                45,
                                46,
                                47,
                                48,
                                49,
                                50,
                                51,
                                52,
                                53,
                                54,
                                55,
                                56,
                                57,
                                58,
                                59,
                                60,
                                61,
                                62,
                                63,
                                64,
                                65,
                                66,
                                67,
                                68,
                                69,
                                70,
                                71,
                                72,
                                73,
                                74,
                                75,
                                76,
                                77,
                                78,
                                79,
                                80,
                                81,
                                82,
                                83,
                                84,
                                85,
                                86,
                                87,
                                88,
                                89,
                                90,
                                91,
                                92,
                                93,
                                94,
                                95,
                                96,
                                97,
                                98,
                                99,
                                100,
                                101,
                                102,
                                103,
                                104,
                                105,
                                106,
                                107,
                                108,
                                109
                            ]
                        ),
                    ),
                ),
                stamina.StaminaModel(
                    name='raidBattle',
                    recover_interval_minutes=60,
                    recover_value=1,
                    initial_capacity=10,
                    options=stamina.StaminaModelOptions(
                        metadata='RAID_BATTLE',
                    ),
                ),
                stamina.StaminaModel(
                    name='special',
                    recover_interval_minutes=30,
                    recover_value=3,
                    initial_capacity=100,
                    is_overflow=True,
                    options=stamina.StaminaModelOptions(
                        metadata='SPECIAL',
                        max_capacity=999,
                        max_stamina_table=stamina.MaxStaminaTable(
                            name='special',
                            metadata='SPECIAL',
                            experience_model_id='special',
                            values=[
                                102,
                                104,
                                106,
                                108,
                                110,
                                112,
                                114,
                                116,
                                118,
                                120,
                                122,
                                124,
                                126,
                                128,
                                130,
                                132,
                                134,
                                136,
                                138,
                                140,
                                142,
                                144,
                                146,
                                148,
                                150,
                                152,
                                154,
                                156,
                                158,
                                160,
                                162,
                                164,
                                166,
                                168,
                                170,
                                172,
                                174,
                                176,
                                178,
                                180,
                                182,
                                184,
                                186,
                                188,
                                190,
                                192,
                                194,
                                196,
                                198,
                                200,
                                202,
                                204,
                                206,
                                208,
                                210,
                                212,
                                214,
                                216,
                                218,
                                220,
                                222,
                                224,
                                226,
                                228,
                                230,
                                232,
                                234,
                                236,
                                238,
                                240,
                                242,
                                244,
                                246,
                                248,
                                250,
                                252,
                                254,
                                256,
                                258
                            ]
                        ),
                    ),
                ),
            ],
        )

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

GitHubCheckoutSetting

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

必須デフォルト値の制限説明
apiKeyIdstring~ 1024文字GitHub のAPIキーGRN
repositoryNamestring~ 1024文字リポジトリ名
sourcePathstring~ 1024文字ソースコードのファイルパス
referenceTypeenum {
    “commit_hash”,
    “branch”,
    “tag”
}
~ 128文字コードの取得元
commitHashstring{referenceType} == “commit_hash”~ 1024文字コミットハッシュ
branchNamestring{referenceType} == “branch”~ 1024文字ブランチ名
tagNamestring{referenceType} == “tag”~ 1024文字タグ名

referenceType に指定する列挙型の定義

定義説明
commit_hashコミットハッシュ
branchブランチ
tagタグ

LogSetting

ログの書き出し設定

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

必須デフォルト値の制限説明
loggingNamespaceIdstring~ 1024文字ネームスペースGRN

ScriptSetting

スクリプト設定

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

スクリプトの実行方式は大きく2種類あり、それは「同期実行」と「非同期実行」です。
同期実行は、スクリプトの実行が完了するまで処理がブロックされます。
かわりに、スクリプトの実行結果を使ってAPIの実行を止めたり、APIの結果を改ざんすることができます。

一方、非同期実行は、スクリプトの実行が完了するまで処理がブロックされません。
かわりに、スクリプトの実行結果を使ってAPIの実行を止めたり、APIの結果を改ざんすることはできません。
しかし、非同期実行は、スクリプトの実行が完了するまで処理がブロックされないため、APIの応答に影響を与えないため、原則非同期実行を使用することをおすすめします。

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

必須デフォルト値の制限説明
triggerScriptIdstring~ 1024文字スクリプトGRN
doneTriggerTargetTypeenum {
    “none”,
    “gs2_script”,
    “aws”
}
“none”~ 128文字完了通知の通知先
doneTriggerScriptIdstring{doneTriggerTargetType} == “gs2_script”~ 1024文字スクリプトGRN
doneTriggerQueueNamespaceIdstring{doneTriggerTargetType} == “gs2_script”~ 1024文字ネームスペースGRN

doneTriggerTargetType に指定する列挙型の定義

定義説明
noneなし
gs2_scriptGS2-Script
awsAmazon EventBridge