UNPKG

@cdktf/provider-azurerm

Version:

Prebuilt azurerm Provider for Terraform CDK (cdktf)

1,184 lines 170 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; Object.defineProperty(exports, "__esModule", { value: true }); exports.MediaStreamingEndpoint = exports.MediaStreamingEndpointTimeoutsOutputReference = exports.mediaStreamingEndpointTimeoutsToHclTerraform = exports.mediaStreamingEndpointTimeoutsToTerraform = exports.MediaStreamingEndpointCrossSiteAccessPolicyOutputReference = exports.mediaStreamingEndpointCrossSiteAccessPolicyToHclTerraform = exports.mediaStreamingEndpointCrossSiteAccessPolicyToTerraform = exports.MediaStreamingEndpointAccessControlOutputReference = exports.mediaStreamingEndpointAccessControlToHclTerraform = exports.mediaStreamingEndpointAccessControlToTerraform = exports.MediaStreamingEndpointAccessControlIpAllowList = exports.MediaStreamingEndpointAccessControlIpAllowOutputReference = exports.mediaStreamingEndpointAccessControlIpAllowToHclTerraform = exports.mediaStreamingEndpointAccessControlIpAllowToTerraform = exports.MediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyList = exports.MediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyOutputReference = exports.mediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyToHclTerraform = exports.mediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyToTerraform = exports.MediaStreamingEndpointSkuList = exports.MediaStreamingEndpointSkuOutputReference = exports.mediaStreamingEndpointSkuToHclTerraform = exports.mediaStreamingEndpointSkuToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function mediaStreamingEndpointSkuToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return {}; } exports.mediaStreamingEndpointSkuToTerraform = mediaStreamingEndpointSkuToTerraform; function mediaStreamingEndpointSkuToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = {}; return attrs; } exports.mediaStreamingEndpointSkuToHclTerraform = mediaStreamingEndpointSkuToHclTerraform; class MediaStreamingEndpointSkuOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; } else { this.isEmptyObject = Object.keys(value).length === 0; } } // capacity - computed: true, optional: false, required: false get capacity() { return this.getNumberAttribute('capacity'); } // name - computed: true, optional: false, required: false get name() { return this.getStringAttribute('name'); } } exports.MediaStreamingEndpointSkuOutputReference = MediaStreamingEndpointSkuOutputReference; _a = JSII_RTTI_SYMBOL_1; MediaStreamingEndpointSkuOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.mediaStreamingEndpoint.MediaStreamingEndpointSkuOutputReference", version: "12.27.0" }; class MediaStreamingEndpointSkuList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new MediaStreamingEndpointSkuOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.MediaStreamingEndpointSkuList = MediaStreamingEndpointSkuList; _b = JSII_RTTI_SYMBOL_1; MediaStreamingEndpointSkuList[_b] = { fqn: "@cdktf/provider-azurerm.mediaStreamingEndpoint.MediaStreamingEndpointSkuList", version: "12.27.0" }; function mediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { base64_key: cdktf.stringToTerraform(struct.base64Key), expiration: cdktf.stringToTerraform(struct.expiration), identifier: cdktf.stringToTerraform(struct.identifier), }; } exports.mediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyToTerraform = mediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyToTerraform; function mediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { base64_key: { value: cdktf.stringToHclTerraform(struct.base64Key), isBlock: false, type: "simple", storageClassType: "string", }, expiration: { value: cdktf.stringToHclTerraform(struct.expiration), isBlock: false, type: "simple", storageClassType: "string", }, identifier: { value: cdktf.stringToHclTerraform(struct.identifier), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.mediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyToHclTerraform = mediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyToHclTerraform; class MediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._base64Key !== undefined) { hasAnyValues = true; internalValueResult.base64Key = this._base64Key; } if (this._expiration !== undefined) { hasAnyValues = true; internalValueResult.expiration = this._expiration; } if (this._identifier !== undefined) { hasAnyValues = true; internalValueResult.identifier = this._identifier; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._base64Key = undefined; this._expiration = undefined; this._identifier = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._base64Key = value.base64Key; this._expiration = value.expiration; this._identifier = value.identifier; } } get base64Key() { return this.getStringAttribute('base64_key'); } set base64Key(value) { this._base64Key = value; } resetBase64Key() { this._base64Key = undefined; } // Temporarily expose input value. Use with caution. get base64KeyInput() { return this._base64Key; } get expiration() { return this.getStringAttribute('expiration'); } set expiration(value) { this._expiration = value; } resetExpiration() { this._expiration = undefined; } // Temporarily expose input value. Use with caution. get expirationInput() { return this._expiration; } get identifier() { return this.getStringAttribute('identifier'); } set identifier(value) { this._identifier = value; } resetIdentifier() { this._identifier = undefined; } // Temporarily expose input value. Use with caution. get identifierInput() { return this._identifier; } } exports.MediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyOutputReference = MediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyOutputReference; _c = JSII_RTTI_SYMBOL_1; MediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyOutputReference[_c] = { fqn: "@cdktf/provider-azurerm.mediaStreamingEndpoint.MediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyOutputReference", version: "12.27.0" }; class MediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new MediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.MediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyList = MediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyList; _d = JSII_RTTI_SYMBOL_1; MediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyList[_d] = { fqn: "@cdktf/provider-azurerm.mediaStreamingEndpoint.MediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyList", version: "12.27.0" }; function mediaStreamingEndpointAccessControlIpAllowToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { address: cdktf.stringToTerraform(struct.address), name: cdktf.stringToTerraform(struct.name), subnet_prefix_length: cdktf.numberToTerraform(struct.subnetPrefixLength), }; } exports.mediaStreamingEndpointAccessControlIpAllowToTerraform = mediaStreamingEndpointAccessControlIpAllowToTerraform; function mediaStreamingEndpointAccessControlIpAllowToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { address: { value: cdktf.stringToHclTerraform(struct.address), isBlock: false, type: "simple", storageClassType: "string", }, name: { value: cdktf.stringToHclTerraform(struct.name), isBlock: false, type: "simple", storageClassType: "string", }, subnet_prefix_length: { value: cdktf.numberToHclTerraform(struct.subnetPrefixLength), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.mediaStreamingEndpointAccessControlIpAllowToHclTerraform = mediaStreamingEndpointAccessControlIpAllowToHclTerraform; class MediaStreamingEndpointAccessControlIpAllowOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._address !== undefined) { hasAnyValues = true; internalValueResult.address = this._address; } if (this._name !== undefined) { hasAnyValues = true; internalValueResult.name = this._name; } if (this._subnetPrefixLength !== undefined) { hasAnyValues = true; internalValueResult.subnetPrefixLength = this._subnetPrefixLength; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._address = undefined; this._name = undefined; this._subnetPrefixLength = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._address = value.address; this._name = value.name; this._subnetPrefixLength = value.subnetPrefixLength; } } get address() { return this.getStringAttribute('address'); } set address(value) { this._address = value; } resetAddress() { this._address = undefined; } // Temporarily expose input value. Use with caution. get addressInput() { return this._address; } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } resetName() { this._name = undefined; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get subnetPrefixLength() { return this.getNumberAttribute('subnet_prefix_length'); } set subnetPrefixLength(value) { this._subnetPrefixLength = value; } resetSubnetPrefixLength() { this._subnetPrefixLength = undefined; } // Temporarily expose input value. Use with caution. get subnetPrefixLengthInput() { return this._subnetPrefixLength; } } exports.MediaStreamingEndpointAccessControlIpAllowOutputReference = MediaStreamingEndpointAccessControlIpAllowOutputReference; _e = JSII_RTTI_SYMBOL_1; MediaStreamingEndpointAccessControlIpAllowOutputReference[_e] = { fqn: "@cdktf/provider-azurerm.mediaStreamingEndpoint.MediaStreamingEndpointAccessControlIpAllowOutputReference", version: "12.27.0" }; class MediaStreamingEndpointAccessControlIpAllowList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new MediaStreamingEndpointAccessControlIpAllowOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.MediaStreamingEndpointAccessControlIpAllowList = MediaStreamingEndpointAccessControlIpAllowList; _f = JSII_RTTI_SYMBOL_1; MediaStreamingEndpointAccessControlIpAllowList[_f] = { fqn: "@cdktf/provider-azurerm.mediaStreamingEndpoint.MediaStreamingEndpointAccessControlIpAllowList", version: "12.27.0" }; function mediaStreamingEndpointAccessControlToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { akamai_signature_header_authentication_key: cdktf.listMapper(mediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyToTerraform, true)(struct.akamaiSignatureHeaderAuthenticationKey), ip_allow: cdktf.listMapper(mediaStreamingEndpointAccessControlIpAllowToTerraform, true)(struct.ipAllow), }; } exports.mediaStreamingEndpointAccessControlToTerraform = mediaStreamingEndpointAccessControlToTerraform; function mediaStreamingEndpointAccessControlToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { akamai_signature_header_authentication_key: { value: cdktf.listMapperHcl(mediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyToHclTerraform, true)(struct.akamaiSignatureHeaderAuthenticationKey), isBlock: true, type: "list", storageClassType: "MediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyList", }, ip_allow: { value: cdktf.listMapperHcl(mediaStreamingEndpointAccessControlIpAllowToHclTerraform, true)(struct.ipAllow), isBlock: true, type: "list", storageClassType: "MediaStreamingEndpointAccessControlIpAllowList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.mediaStreamingEndpointAccessControlToHclTerraform = mediaStreamingEndpointAccessControlToHclTerraform; class MediaStreamingEndpointAccessControlOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; // akamai_signature_header_authentication_key - computed: false, optional: true, required: false this._akamaiSignatureHeaderAuthenticationKey = new MediaStreamingEndpointAccessControlAkamaiSignatureHeaderAuthenticationKeyList(this, "akamai_signature_header_authentication_key", false); // ip_allow - computed: false, optional: true, required: false this._ipAllow = new MediaStreamingEndpointAccessControlIpAllowList(this, "ip_allow", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._akamaiSignatureHeaderAuthenticationKey?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.akamaiSignatureHeaderAuthenticationKey = this._akamaiSignatureHeaderAuthenticationKey?.internalValue; } if (this._ipAllow?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.ipAllow = this._ipAllow?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._akamaiSignatureHeaderAuthenticationKey.internalValue = undefined; this._ipAllow.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._akamaiSignatureHeaderAuthenticationKey.internalValue = value.akamaiSignatureHeaderAuthenticationKey; this._ipAllow.internalValue = value.ipAllow; } } get akamaiSignatureHeaderAuthenticationKey() { return this._akamaiSignatureHeaderAuthenticationKey; } putAkamaiSignatureHeaderAuthenticationKey(value) { this._akamaiSignatureHeaderAuthenticationKey.internalValue = value; } resetAkamaiSignatureHeaderAuthenticationKey() { this._akamaiSignatureHeaderAuthenticationKey.internalValue = undefined; } // Temporarily expose input value. Use with caution. get akamaiSignatureHeaderAuthenticationKeyInput() { return this._akamaiSignatureHeaderAuthenticationKey.internalValue; } get ipAllow() { return this._ipAllow; } putIpAllow(value) { this._ipAllow.internalValue = value; } resetIpAllow() { this._ipAllow.internalValue = undefined; } // Temporarily expose input value. Use with caution. get ipAllowInput() { return this._ipAllow.internalValue; } } exports.MediaStreamingEndpointAccessControlOutputReference = MediaStreamingEndpointAccessControlOutputReference; _g = JSII_RTTI_SYMBOL_1; MediaStreamingEndpointAccessControlOutputReference[_g] = { fqn: "@cdktf/provider-azurerm.mediaStreamingEndpoint.MediaStreamingEndpointAccessControlOutputReference", version: "12.27.0" }; function mediaStreamingEndpointCrossSiteAccessPolicyToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { client_access_policy: cdktf.stringToTerraform(struct.clientAccessPolicy), cross_domain_policy: cdktf.stringToTerraform(struct.crossDomainPolicy), }; } exports.mediaStreamingEndpointCrossSiteAccessPolicyToTerraform = mediaStreamingEndpointCrossSiteAccessPolicyToTerraform; function mediaStreamingEndpointCrossSiteAccessPolicyToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { client_access_policy: { value: cdktf.stringToHclTerraform(struct.clientAccessPolicy), isBlock: false, type: "simple", storageClassType: "string", }, cross_domain_policy: { value: cdktf.stringToHclTerraform(struct.crossDomainPolicy), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.mediaStreamingEndpointCrossSiteAccessPolicyToHclTerraform = mediaStreamingEndpointCrossSiteAccessPolicyToHclTerraform; class MediaStreamingEndpointCrossSiteAccessPolicyOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._clientAccessPolicy !== undefined) { hasAnyValues = true; internalValueResult.clientAccessPolicy = this._clientAccessPolicy; } if (this._crossDomainPolicy !== undefined) { hasAnyValues = true; internalValueResult.crossDomainPolicy = this._crossDomainPolicy; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._clientAccessPolicy = undefined; this._crossDomainPolicy = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._clientAccessPolicy = value.clientAccessPolicy; this._crossDomainPolicy = value.crossDomainPolicy; } } get clientAccessPolicy() { return this.getStringAttribute('client_access_policy'); } set clientAccessPolicy(value) { this._clientAccessPolicy = value; } resetClientAccessPolicy() { this._clientAccessPolicy = undefined; } // Temporarily expose input value. Use with caution. get clientAccessPolicyInput() { return this._clientAccessPolicy; } get crossDomainPolicy() { return this.getStringAttribute('cross_domain_policy'); } set crossDomainPolicy(value) { this._crossDomainPolicy = value; } resetCrossDomainPolicy() { this._crossDomainPolicy = undefined; } // Temporarily expose input value. Use with caution. get crossDomainPolicyInput() { return this._crossDomainPolicy; } } exports.MediaStreamingEndpointCrossSiteAccessPolicyOutputReference = MediaStreamingEndpointCrossSiteAccessPolicyOutputReference; _h = JSII_RTTI_SYMBOL_1; MediaStreamingEndpointCrossSiteAccessPolicyOutputReference[_h] = { fqn: "@cdktf/provider-azurerm.mediaStreamingEndpoint.MediaStreamingEndpointCrossSiteAccessPolicyOutputReference", version: "12.27.0" }; function mediaStreamingEndpointTimeoutsToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { create: cdktf.stringToTerraform(struct.create), delete: cdktf.stringToTerraform(struct.delete), read: cdktf.stringToTerraform(struct.read), update: cdktf.stringToTerraform(struct.update), }; } exports.mediaStreamingEndpointTimeoutsToTerraform = mediaStreamingEndpointTimeoutsToTerraform; function mediaStreamingEndpointTimeoutsToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { create: { value: cdktf.stringToHclTerraform(struct.create), isBlock: false, type: "simple", storageClassType: "string", }, delete: { value: cdktf.stringToHclTerraform(struct.delete), isBlock: false, type: "simple", storageClassType: "string", }, read: { value: cdktf.stringToHclTerraform(struct.read), isBlock: false, type: "simple", storageClassType: "string", }, update: { value: cdktf.stringToHclTerraform(struct.update), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.mediaStreamingEndpointTimeoutsToHclTerraform = mediaStreamingEndpointTimeoutsToHclTerraform; class MediaStreamingEndpointTimeoutsOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._create !== undefined) { hasAnyValues = true; internalValueResult.create = this._create; } if (this._delete !== undefined) { hasAnyValues = true; internalValueResult.delete = this._delete; } if (this._read !== undefined) { hasAnyValues = true; internalValueResult.read = this._read; } if (this._update !== undefined) { hasAnyValues = true; internalValueResult.update = this._update; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._create = undefined; this._delete = undefined; this._read = undefined; this._update = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._create = value.create; this._delete = value.delete; this._read = value.read; this._update = value.update; } } get create() { return this.getStringAttribute('create'); } set create(value) { this._create = value; } resetCreate() { this._create = undefined; } // Temporarily expose input value. Use with caution. get createInput() { return this._create; } get delete() { return this.getStringAttribute('delete'); } set delete(value) { this._delete = value; } resetDelete() { this._delete = undefined; } // Temporarily expose input value. Use with caution. get deleteInput() { return this._delete; } get read() { return this.getStringAttribute('read'); } set read(value) { this._read = value; } resetRead() { this._read = undefined; } // Temporarily expose input value. Use with caution. get readInput() { return this._read; } get update() { return this.getStringAttribute('update'); } set update(value) { this._update = value; } resetUpdate() { this._update = undefined; } // Temporarily expose input value. Use with caution. get updateInput() { return this._update; } } exports.MediaStreamingEndpointTimeoutsOutputReference = MediaStreamingEndpointTimeoutsOutputReference; _j = JSII_RTTI_SYMBOL_1; MediaStreamingEndpointTimeoutsOutputReference[_j] = { fqn: "@cdktf/provider-azurerm.mediaStreamingEndpoint.MediaStreamingEndpointTimeoutsOutputReference", version: "12.27.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/media_streaming_endpoint azurerm_media_streaming_endpoint} */ class MediaStreamingEndpoint extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a MediaStreamingEndpoint resource upon running "cdktf plan <stack-name>" * @param scope The scope in which to define this construct * @param importToId The construct id used in the generated config for the MediaStreamingEndpoint to import * @param importFromId The id of the existing MediaStreamingEndpoint that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/media_streaming_endpoint#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the MediaStreamingEndpoint to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azurerm_media_streaming_endpoint", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/media_streaming_endpoint azurerm_media_streaming_endpoint} 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 MediaStreamingEndpointConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'azurerm_media_streaming_endpoint', terraformGeneratorMetadata: { providerName: 'azurerm', providerVersion: '3.116.0', providerVersionConstraint: '~> 3.10' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle, provisioners: config.provisioners, connection: config.connection, forEach: config.forEach }); // sku - computed: true, optional: false, required: false this._sku = new MediaStreamingEndpointSkuList(this, "sku", false); // access_control - computed: false, optional: true, required: false this._accessControl = new MediaStreamingEndpointAccessControlOutputReference(this, "access_control"); // cross_site_access_policy - computed: false, optional: true, required: false this._crossSiteAccessPolicy = new MediaStreamingEndpointCrossSiteAccessPolicyOutputReference(this, "cross_site_access_policy"); // timeouts - computed: false, optional: true, required: false this._timeouts = new MediaStreamingEndpointTimeoutsOutputReference(this, "timeouts"); this._autoStartEnabled = config.autoStartEnabled; this._cdnEnabled = config.cdnEnabled; this._cdnProfile = config.cdnProfile; this._cdnProvider = config.cdnProvider; this._customHostNames = config.customHostNames; this._description = config.description; this._id = config.id; this._location = config.location; this._maxCacheAgeSeconds = config.maxCacheAgeSeconds; this._mediaServicesAccountName = config.mediaServicesAccountName; this._name = config.name; this._resourceGroupName = config.resourceGroupName; this._scaleUnits = config.scaleUnits; this._tags = config.tags; this._accessControl.internalValue = config.accessControl; this._crossSiteAccessPolicy.internalValue = config.crossSiteAccessPolicy; this._timeouts.internalValue = config.timeouts; } get autoStartEnabled() { return this.getBooleanAttribute('auto_start_enabled'); } set autoStartEnabled(value) { this._autoStartEnabled = value; } resetAutoStartEnabled() { this._autoStartEnabled = undefined; } // Temporarily expose input value. Use with caution. get autoStartEnabledInput() { return this._autoStartEnabled; } get cdnEnabled() { return this.getBooleanAttribute('cdn_enabled'); } set cdnEnabled(value) { this._cdnEnabled = value; } resetCdnEnabled() { this._cdnEnabled = undefined; } // Temporarily expose input value. Use with caution. get cdnEnabledInput() { return this._cdnEnabled; } get cdnProfile() { return this.getStringAttribute('cdn_profile'); } set cdnProfile(value) { this._cdnProfile = value; } resetCdnProfile() { this._cdnProfile = undefined; } // Temporarily expose input value. Use with caution. get cdnProfileInput() { return this._cdnProfile; } get cdnProvider() { return this.getStringAttribute('cdn_provider'); } set cdnProvider(value) { this._cdnProvider = value; } resetCdnProvider() { this._cdnProvider = undefined; } // Temporarily expose input value. Use with caution. get cdnProviderInput() { return this._cdnProvider; } get customHostNames() { return cdktf.Fn.tolist(this.getListAttribute('custom_host_names')); } set customHostNames(value) { this._customHostNames = value; } resetCustomHostNames() { this._customHostNames = undefined; } // Temporarily expose input value. Use with caution. get customHostNamesInput() { return this._customHostNames; } get description() { return this.getStringAttribute('description'); } set description(value) { this._description = value; } resetDescription() { this._description = undefined; } // Temporarily expose input value. Use with caution. get descriptionInput() { return this._description; } // host_name - computed: true, optional: false, required: false get hostName() { return this.getStringAttribute('host_name'); } get id() { return this.getStringAttribute('id'); } set id(value) { this._id = value; } resetId() { this._id = undefined; } // Temporarily expose input value. Use with caution. get idInput() { return this._id; } get location() { return this.getStringAttribute('location'); } set location(value) { this._location = value; } // Temporarily expose input value. Use with caution. get locationInput() { return this._location; } get maxCacheAgeSeconds() { return this.getNumberAttribute('max_cache_age_seconds'); } set maxCacheAgeSeconds(value) { this._maxCacheAgeSeconds = value; } resetMaxCacheAgeSeconds() { this._maxCacheAgeSeconds = undefined; } // Temporarily expose input value. Use with caution. get maxCacheAgeSecondsInput() { return this._maxCacheAgeSeconds; } get mediaServicesAccountName() { return this.getStringAttribute('media_services_account_name'); } set mediaServicesAccountName(value) { this._mediaServicesAccountName = value; } // Temporarily expose input value. Use with caution. get mediaServicesAccountNameInput() { return this._mediaServicesAccountName; } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get resourceGroupName() { return this.getStringAttribute('resource_group_name'); } set resourceGroupName(value) { this._resourceGroupName = value; } // Temporarily expose input value. Use with caution. get resourceGroupNameInput() { return this._resourceGroupName; } get scaleUnits() { return this.getNumberAttribute('scale_units'); } set scaleUnits(value) { this._scaleUnits = value; } // Temporarily expose input value. Use with caution. get scaleUnitsInput() { return this._scaleUnits; } get sku() { return this._sku; } get tags() { return this.getStringMapAttribute('tags'); } set tags(value) { this._tags = value; } resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. get tagsInput() { return this._tags; } get accessControl() { return this._accessControl; } putAccessControl(value) { this._accessControl.internalValue = value; } resetAccessControl() { this._accessControl.internalValue = undefined; } // Temporarily expose input value. Use with caution. get accessControlInput() { return this._accessControl.internalValue; } get crossSiteAccessPolicy() { return this._crossSiteAccessPolicy; } putCrossSiteAccessPolicy(value) { this._crossSiteAccessPolicy.internalValue = value; } resetCrossSiteAccessPolicy() { this._crossSiteAccessPolicy.internalValue = undefined; } // Temporarily expose input value. Use with caution. get crossSiteAccessPolicyInput() { return this._crossSiteAccessPolicy.internalValue; } get timeouts() { return this._timeouts; } putTimeouts(value) { this._timeouts.internalValue = value; } resetTimeouts() { this._timeouts.internalValue = undefined; } // Temporarily expose input value. Use with caution. get timeoutsInput() { return this._timeouts.internalValue; } // ========= // SYNTHESIS // ========= synthesizeAttributes() { return { auto_start_enabled: cdktf.booleanToTerraform(this._autoStartEnabled), cdn_enabled: cdktf.booleanToTerraform(this._cdnEnabled), cdn_profile: cdktf.stringToTerraform(this._cdnProfile), cdn_provider: cdktf.stringToTerraform(this._cdnProvider), custom_host_names: cdktf.listMapper(cdktf.stringToTerraform, false)(this._customHostNames), description: cdktf.stringToTerraform(this._description), id: cdktf.stringToTerraform(this._id), location: cdktf.stringToTerraform(this._location), max_cache_age_seconds: cdktf.numberToTerraform(this._maxCacheAgeSeconds), media_services_account_name: cdktf.stringToTerraform(this._mediaServicesAccountName), name: cdktf.stringToTerraform(this._name), resource_group_name: cdktf.stringToTerraform(this._resourceGroupName), scale_units: cdktf.numberToTerraform(this._scaleUnits), tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags), access_control: mediaStreamingEndpointAccessControlToTerraform(this._accessControl.internalValue), cross_site_access_policy: mediaStreamingEndpointCrossSiteAccessPolicyToTerraform(this._crossSiteAccessPolicy.internalValue), timeouts: mediaStreamingEndpointTimeoutsToTerraform(this._timeouts.internalValue), }; } synthesizeHclAttributes() { const attrs = { auto_start_enabled: { value: cdktf.booleanToHclTerraform(this._autoStartEnabled), isBlock: false, type: "simple", storageClassType: "boolean", }, cdn_enabled: { value: cdktf.booleanToHclTerraform(this._cdnEnabled), isBlock: false, type: "simple", storageClassType: "boolean", }, cdn_profile: { value: cdktf.stringToHclTerraform(this._cdnProfile), isBlock: false, type: "simple", storageClassType: "string", }, cdn_provider: { value: cdktf.stringToHclTerraform(this._cdnProvider), isBlock: false, type: "simple", storageClassType: "string", }, custom_host_names: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._customHostNames), isBlock: false, type: "set", storageClassType: "stringList", }, description: { value: cdktf.stringToHclTerraform(this._description), isBlock: false, type: "simple", storageClassType: "string", }, id: { value: cdktf.stringToHclTerraform(this._id), isBlock: false, type: "simple", storageClassType: "string", }, location: { value: cdktf.stringToHclTerraform(this._location), isBlock: false, type: "simple", storageClassType: "string", }, max_cache_age_seconds: { value: cdktf.numberToHclTerraform(this._maxCacheAgeSeconds), isBlock: false, type: "simple", storageClassType: "number", }, media_services_account_name: { value: cdktf.stringToHclTerraform(this._mediaServicesAccountName), isBlock: false, type: "simple", storageClassType: "string", }, name: { value: cdktf.stringToHclTerraform(this._name), isBlock: false, type: "simple", storageClassType: "string", }, resource_group_name: { value: cdktf.stringToHclTerraform(this._resourceGroupName), isBlock: false, type: "simple", storageClassType: "string", }, scale_units: { value: cdktf.numberToHclTerraform(this._scaleUnits), isBlock: false, type: "simple", storageClassType: "number", }, tags: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._tags), isBlock: false, type: "map", storageClassType: "stringMap", }, access_control: { value: mediaStreamingEndpointAccessControlToHclTerraform(this._accessControl.internalValue), isBlock: true, type: "list", storageClassType: "MediaStreamingEndpointAccessControlList", }, cross_site_access_policy: { value: mediaStreamingEndpointCrossSiteAccessPolicyToHclTerraform(this._crossSiteAccessPolicy.internalValue), isBlock: true, type: "list", storageClassType: "MediaStreamingEndpointCrossSiteAccessPolicyList", }, timeouts: { value: mediaStreamingE