Class: AWSCDK::JsonNull

Inherits:
Jsii::Object
  • Object
show all
Includes:
IResolvable
Defined in:
json_null.rb

Overview

An object which serializes to the JSON null literal, and which can safely be passed across languages where undefined and null are not different.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ JsonNull

Returns a new instance of JsonNull.

Raises:

  • (NoMethodError)


9
10
11
# File 'json_null.rb', line 9

def initialize(*args)
  raise NoMethodError, "aws-cdk-lib.JsonNull does not have a visible constructor; use the provided factory methods"
end

Class Method Details

.INSTANCEAWSCDK::JsonNull

The canonical instance of JsonNull.

Returns:

  • (AWSCDK::JsonNull)


25
26
27
# File 'json_null.rb', line 25

def self.INSTANCE()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.JsonNull", "INSTANCE")
end

.jsii_overridable_methodsObject



13
14
15
16
17
18
19
20
# File 'json_null.rb', line 13

def self.jsii_overridable_methods
  {
    :creation_stack => { kind: :property, name: "creationStack", is_optional: false },
    :resolve => { kind: :method, name: "resolve", is_optional: false },
    :to_json => { kind: :method, name: "toJSON", is_optional: false },
    :to_string => { kind: :method, name: "toString", is_optional: false },
  }
end

Instance Method Details

#creation_stackArray<String>

The creation stack of this resolvable which will be appended to errors thrown during resolution.

This may return an array with a single informational element indicating how to get this property populated, if it was skipped for performance reasons.

Returns:

  • (Array<String>)


35
36
37
# File 'json_null.rb', line 35

def creation_stack()
  jsii_get_property("creationStack")
end

#resolve(_ctx) ⇒ Object

Produce the Token's value at resolution time.

Parameters:

Returns:

  • (Object)


43
44
45
46
# File 'json_null.rb', line 43

def resolve(_ctx)
  Jsii::Type.check_type(_ctx, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JUmVzb2x2ZUNvbnRleHQifQ==")), "_ctx")
  jsii_call_method("resolve", [_ctx])
end

#to_jsonObject

Obtains the JSON representation of this object (null).

Returns:

  • (Object)


51
52
53
# File 'json_null.rb', line 51

def to_json()
  jsii_call_method("toJSON", [])
end

#to_stringString

Obtains the string representation of this object ('null').

Returns:

  • (String)


58
59
60
# File 'json_null.rb', line 58

def to_string()
  jsii_call_method("toString", [])
end