Class: AWSCDK::GameLift::CfnMatchmakingConfiguration::GamePropertyProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::GameLift::CfnMatchmakingConfiguration::GamePropertyProperty
- Defined in:
- game_lift/cfn_matchmaking_configuration.rb
Overview
This key-value pair can store custom data about a game session.
For example, you might use a GameProperty to track a game session's map, level of difficulty, or remaining time. The difficulty level could be specified like this: {"Key": "difficulty", "Value":"Novice"} .
You can set game properties when creating a game session. You can also modify game properties of an active game session. When searching for game sessions, you can filter on game property keys and values. You can't delete game properties from a game session.
For examples of working with game properties, see Create a game session with properties .
Instance Attribute Summary collapse
-
#key ⇒ String
readonly
The game property identifier.
-
#value ⇒ String
readonly
The game property value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(key:, value:) ⇒ GamePropertyProperty
constructor
A new instance of GamePropertyProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(key:, value:) ⇒ GamePropertyProperty
Returns a new instance of GamePropertyProperty.
768 769 770 771 772 773 |
# File 'game_lift/cfn_matchmaking_configuration.rb', line 768 def initialize(key:, value:) @key = key Jsii::Type.check_type(@key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") @value = value Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") end |
Instance Attribute Details
#key ⇒ String (readonly)
The game property identifier.
779 780 781 |
# File 'game_lift/cfn_matchmaking_configuration.rb', line 779 def key @key end |
#value ⇒ String (readonly)
The game property value.
784 785 786 |
# File 'game_lift/cfn_matchmaking_configuration.rb', line 784 def value @value end |
Class Method Details
.jsii_properties ⇒ Object
786 787 788 789 790 791 |
# File 'game_lift/cfn_matchmaking_configuration.rb', line 786 def self.jsii_properties { :key => "key", :value => "value", } end |
Instance Method Details
#to_jsii ⇒ Object
793 794 795 796 797 798 799 800 |
# File 'game_lift/cfn_matchmaking_configuration.rb', line 793 def to_jsii result = {} result.merge!({ "key" => @key, "value" => @value, }) result.compact end |