package constructs import ( _init_ "github.com/aws/constructs-go/constructs/v3/jsii" _jsii_ "github.com/aws/jsii-runtime-go/runtime" ) // Represents the building block of the construct graph. // // All constructs besides the root construct must be created within the scope of // another construct. type Construct interface { IConstruct // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. OnPrepare() // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. OnSynthesize(session ISynthesisSession) // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if there the construct is valid. // Deprecated: use `Node.addValidation()` to subscribe validation functions on this construct // instead of overriding this method. OnValidate() *[]*string // Returns a string representation of this construct. ToString() *string } // The jsii proxy struct for Construct type jsiiProxy_Construct struct { jsiiProxy_IConstruct } // Creates a new construct node. func NewConstruct(scope Construct, id *string, options *ConstructOptions) Construct { _init_.Initialize() if err := validateNewConstructParameters(scope, id, options); err != nil { panic(err) } j := jsiiProxy_Construct{} _jsii_.Create( "constructs.Construct", []interface{}{scope, id, options}, &j, ) return &j } // Creates a new construct node. func NewConstruct_Override(c Construct, scope Construct, id *string, options *ConstructOptions) { _init_.Initialize() _jsii_.Create( "constructs.Construct", []interface{}{scope, id, options}, c, ) } func (c *jsiiProxy_Construct) OnPrepare() { _jsii_.InvokeVoid( c, "onPrepare", nil, // no parameters ) } func (c *jsiiProxy_Construct) OnSynthesize(session ISynthesisSession) { if err := c.validateOnSynthesizeParameters(session); err != nil { panic(err) } _jsii_.InvokeVoid( c, "onSynthesize", []interface{}{session}, ) } func (c *jsiiProxy_Construct) OnValidate() *[]*string { var returns *[]*string _jsii_.Invoke( c, "onValidate", nil, // no parameters &returns, ) return returns } func (c *jsiiProxy_Construct) ToString() *string { var returns *string _jsii_.Invoke( c, "toString", nil, // no parameters &returns, ) return returns }