// https://www.terraform.io/docs/providers/time/r/static.html // generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; // Configuration export interface StaticConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/time/r/static.html#rfc3339 Static#rfc3339} */ readonly rfc3339?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/time/r/static.html#triggers Static#triggers} */ readonly triggers?: { [key: string]: string } | cdktf.IResolvable; } /** * Represents a {@link https://www.terraform.io/docs/providers/time/r/static.html time_static} */ export class Static extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "time_static"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/time/r/static.html time_static} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options StaticConfig = {} */ public constructor(scope: Construct, id: string, config: StaticConfig = {}) { super(scope, id, { terraformResourceType: 'time_static', terraformGeneratorMetadata: { providerName: 'time' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._rfc3339 = config.rfc3339; this._triggers = config.triggers; } // ========== // ATTRIBUTES // ========== // day - computed: true, optional: false, required: false public get day() { return this.getNumberAttribute('day'); } // hour - computed: true, optional: false, required: false public get hour() { return this.getNumberAttribute('hour'); } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // minute - computed: true, optional: false, required: false public get minute() { return this.getNumberAttribute('minute'); } // month - computed: true, optional: false, required: false public get month() { return this.getNumberAttribute('month'); } // rfc3339 - computed: true, optional: true, required: false private _rfc3339?: string; public get rfc3339() { return this.getStringAttribute('rfc3339'); } public set rfc3339(value: string) { this._rfc3339 = value; } public resetRfc3339() { this._rfc3339 = undefined; } // Temporarily expose input value. Use with caution. public get rfc3339Input() { return this._rfc3339; } // second - computed: true, optional: false, required: false public get second() { return this.getNumberAttribute('second'); } // triggers - computed: false, optional: true, required: false private _triggers?: { [key: string]: string } | cdktf.IResolvable; public get triggers() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('triggers') as any; } public set triggers(value: { [key: string]: string } | cdktf.IResolvable) { this._triggers = value; } public resetTriggers() { this._triggers = undefined; } // Temporarily expose input value. Use with caution. public get triggersInput() { return this._triggers; } // unix - computed: true, optional: false, required: false public get unix() { return this.getNumberAttribute('unix'); } // year - computed: true, optional: false, required: false public get year() { return this.getNumberAttribute('year'); } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { rfc3339: cdktf.stringToTerraform(this._rfc3339), triggers: cdktf.hashMapper(cdktf.anyToTerraform)(this._triggers), }; } }