@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,089 lines • 159 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApikeysKey = exports.ApikeysKeyTimeoutsOutputReference = exports.apikeysKeyTimeoutsToHclTerraform = exports.apikeysKeyTimeoutsToTerraform = exports.ApikeysKeyRestrictionsOutputReference = exports.apikeysKeyRestrictionsToHclTerraform = exports.apikeysKeyRestrictionsToTerraform = exports.ApikeysKeyRestrictionsServerKeyRestrictionsOutputReference = exports.apikeysKeyRestrictionsServerKeyRestrictionsToHclTerraform = exports.apikeysKeyRestrictionsServerKeyRestrictionsToTerraform = exports.ApikeysKeyRestrictionsIosKeyRestrictionsOutputReference = exports.apikeysKeyRestrictionsIosKeyRestrictionsToHclTerraform = exports.apikeysKeyRestrictionsIosKeyRestrictionsToTerraform = exports.ApikeysKeyRestrictionsBrowserKeyRestrictionsOutputReference = exports.apikeysKeyRestrictionsBrowserKeyRestrictionsToHclTerraform = exports.apikeysKeyRestrictionsBrowserKeyRestrictionsToTerraform = exports.ApikeysKeyRestrictionsApiTargetsList = exports.ApikeysKeyRestrictionsApiTargetsOutputReference = exports.apikeysKeyRestrictionsApiTargetsToHclTerraform = exports.apikeysKeyRestrictionsApiTargetsToTerraform = exports.ApikeysKeyRestrictionsAndroidKeyRestrictionsOutputReference = exports.apikeysKeyRestrictionsAndroidKeyRestrictionsToHclTerraform = exports.apikeysKeyRestrictionsAndroidKeyRestrictionsToTerraform = exports.ApikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsList = exports.ApikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsOutputReference = exports.apikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsToHclTerraform = exports.apikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function apikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsToTerraform(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 {
package_name: cdktf.stringToTerraform(struct.packageName),
sha1_fingerprint: cdktf.stringToTerraform(struct.sha1Fingerprint),
};
}
exports.apikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsToTerraform = apikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsToTerraform;
function apikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsToHclTerraform(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 = {
package_name: {
value: cdktf.stringToHclTerraform(struct.packageName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
sha1_fingerprint: {
value: cdktf.stringToHclTerraform(struct.sha1Fingerprint),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsToHclTerraform = apikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsToHclTerraform;
class ApikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsOutputReference 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._packageName !== undefined) {
hasAnyValues = true;
internalValueResult.packageName = this._packageName;
}
if (this._sha1Fingerprint !== undefined) {
hasAnyValues = true;
internalValueResult.sha1Fingerprint = this._sha1Fingerprint;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._packageName = undefined;
this._sha1Fingerprint = 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._packageName = value.packageName;
this._sha1Fingerprint = value.sha1Fingerprint;
}
}
get packageName() {
return this.getStringAttribute('package_name');
}
set packageName(value) {
this._packageName = value;
}
// Temporarily expose input value. Use with caution.
get packageNameInput() {
return this._packageName;
}
get sha1Fingerprint() {
return this.getStringAttribute('sha1_fingerprint');
}
set sha1Fingerprint(value) {
this._sha1Fingerprint = value;
}
// Temporarily expose input value. Use with caution.
get sha1FingerprintInput() {
return this._sha1Fingerprint;
}
}
exports.ApikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsOutputReference = ApikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsOutputReference;
_a = JSII_RTTI_SYMBOL_1;
ApikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsOutputReference[_a] = { fqn: "@cdktf/provider-google.apikeysKey.ApikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsOutputReference", version: "14.12.0" };
class ApikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsList 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 ApikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ApikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsList = ApikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsList;
_b = JSII_RTTI_SYMBOL_1;
ApikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsList[_b] = { fqn: "@cdktf/provider-google.apikeysKey.ApikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsList", version: "14.12.0" };
function apikeysKeyRestrictionsAndroidKeyRestrictionsToTerraform(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 {
allowed_applications: cdktf.listMapper(apikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsToTerraform, true)(struct.allowedApplications),
};
}
exports.apikeysKeyRestrictionsAndroidKeyRestrictionsToTerraform = apikeysKeyRestrictionsAndroidKeyRestrictionsToTerraform;
function apikeysKeyRestrictionsAndroidKeyRestrictionsToHclTerraform(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 = {
allowed_applications: {
value: cdktf.listMapperHcl(apikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsToHclTerraform, true)(struct.allowedApplications),
isBlock: true,
type: "list",
storageClassType: "ApikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apikeysKeyRestrictionsAndroidKeyRestrictionsToHclTerraform = apikeysKeyRestrictionsAndroidKeyRestrictionsToHclTerraform;
class ApikeysKeyRestrictionsAndroidKeyRestrictionsOutputReference 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;
// allowed_applications - computed: false, optional: false, required: true
this._allowedApplications = new ApikeysKeyRestrictionsAndroidKeyRestrictionsAllowedApplicationsList(this, "allowed_applications", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._allowedApplications?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.allowedApplications = this._allowedApplications?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._allowedApplications.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._allowedApplications.internalValue = value.allowedApplications;
}
}
get allowedApplications() {
return this._allowedApplications;
}
putAllowedApplications(value) {
this._allowedApplications.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get allowedApplicationsInput() {
return this._allowedApplications.internalValue;
}
}
exports.ApikeysKeyRestrictionsAndroidKeyRestrictionsOutputReference = ApikeysKeyRestrictionsAndroidKeyRestrictionsOutputReference;
_c = JSII_RTTI_SYMBOL_1;
ApikeysKeyRestrictionsAndroidKeyRestrictionsOutputReference[_c] = { fqn: "@cdktf/provider-google.apikeysKey.ApikeysKeyRestrictionsAndroidKeyRestrictionsOutputReference", version: "14.12.0" };
function apikeysKeyRestrictionsApiTargetsToTerraform(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 {
methods: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.methods),
service: cdktf.stringToTerraform(struct.service),
};
}
exports.apikeysKeyRestrictionsApiTargetsToTerraform = apikeysKeyRestrictionsApiTargetsToTerraform;
function apikeysKeyRestrictionsApiTargetsToHclTerraform(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 = {
methods: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.methods),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
service: {
value: cdktf.stringToHclTerraform(struct.service),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apikeysKeyRestrictionsApiTargetsToHclTerraform = apikeysKeyRestrictionsApiTargetsToHclTerraform;
class ApikeysKeyRestrictionsApiTargetsOutputReference 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._methods !== undefined) {
hasAnyValues = true;
internalValueResult.methods = this._methods;
}
if (this._service !== undefined) {
hasAnyValues = true;
internalValueResult.service = this._service;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._methods = undefined;
this._service = 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._methods = value.methods;
this._service = value.service;
}
}
get methods() {
return this.getListAttribute('methods');
}
set methods(value) {
this._methods = value;
}
resetMethods() {
this._methods = undefined;
}
// Temporarily expose input value. Use with caution.
get methodsInput() {
return this._methods;
}
get service() {
return this.getStringAttribute('service');
}
set service(value) {
this._service = value;
}
// Temporarily expose input value. Use with caution.
get serviceInput() {
return this._service;
}
}
exports.ApikeysKeyRestrictionsApiTargetsOutputReference = ApikeysKeyRestrictionsApiTargetsOutputReference;
_d = JSII_RTTI_SYMBOL_1;
ApikeysKeyRestrictionsApiTargetsOutputReference[_d] = { fqn: "@cdktf/provider-google.apikeysKey.ApikeysKeyRestrictionsApiTargetsOutputReference", version: "14.12.0" };
class ApikeysKeyRestrictionsApiTargetsList 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 ApikeysKeyRestrictionsApiTargetsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ApikeysKeyRestrictionsApiTargetsList = ApikeysKeyRestrictionsApiTargetsList;
_e = JSII_RTTI_SYMBOL_1;
ApikeysKeyRestrictionsApiTargetsList[_e] = { fqn: "@cdktf/provider-google.apikeysKey.ApikeysKeyRestrictionsApiTargetsList", version: "14.12.0" };
function apikeysKeyRestrictionsBrowserKeyRestrictionsToTerraform(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 {
allowed_referrers: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.allowedReferrers),
};
}
exports.apikeysKeyRestrictionsBrowserKeyRestrictionsToTerraform = apikeysKeyRestrictionsBrowserKeyRestrictionsToTerraform;
function apikeysKeyRestrictionsBrowserKeyRestrictionsToHclTerraform(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 = {
allowed_referrers: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.allowedReferrers),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apikeysKeyRestrictionsBrowserKeyRestrictionsToHclTerraform = apikeysKeyRestrictionsBrowserKeyRestrictionsToHclTerraform;
class ApikeysKeyRestrictionsBrowserKeyRestrictionsOutputReference 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._allowedReferrers !== undefined) {
hasAnyValues = true;
internalValueResult.allowedReferrers = this._allowedReferrers;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._allowedReferrers = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._allowedReferrers = value.allowedReferrers;
}
}
get allowedReferrers() {
return this.getListAttribute('allowed_referrers');
}
set allowedReferrers(value) {
this._allowedReferrers = value;
}
// Temporarily expose input value. Use with caution.
get allowedReferrersInput() {
return this._allowedReferrers;
}
}
exports.ApikeysKeyRestrictionsBrowserKeyRestrictionsOutputReference = ApikeysKeyRestrictionsBrowserKeyRestrictionsOutputReference;
_f = JSII_RTTI_SYMBOL_1;
ApikeysKeyRestrictionsBrowserKeyRestrictionsOutputReference[_f] = { fqn: "@cdktf/provider-google.apikeysKey.ApikeysKeyRestrictionsBrowserKeyRestrictionsOutputReference", version: "14.12.0" };
function apikeysKeyRestrictionsIosKeyRestrictionsToTerraform(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 {
allowed_bundle_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.allowedBundleIds),
};
}
exports.apikeysKeyRestrictionsIosKeyRestrictionsToTerraform = apikeysKeyRestrictionsIosKeyRestrictionsToTerraform;
function apikeysKeyRestrictionsIosKeyRestrictionsToHclTerraform(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 = {
allowed_bundle_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.allowedBundleIds),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apikeysKeyRestrictionsIosKeyRestrictionsToHclTerraform = apikeysKeyRestrictionsIosKeyRestrictionsToHclTerraform;
class ApikeysKeyRestrictionsIosKeyRestrictionsOutputReference 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._allowedBundleIds !== undefined) {
hasAnyValues = true;
internalValueResult.allowedBundleIds = this._allowedBundleIds;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._allowedBundleIds = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._allowedBundleIds = value.allowedBundleIds;
}
}
get allowedBundleIds() {
return this.getListAttribute('allowed_bundle_ids');
}
set allowedBundleIds(value) {
this._allowedBundleIds = value;
}
// Temporarily expose input value. Use with caution.
get allowedBundleIdsInput() {
return this._allowedBundleIds;
}
}
exports.ApikeysKeyRestrictionsIosKeyRestrictionsOutputReference = ApikeysKeyRestrictionsIosKeyRestrictionsOutputReference;
_g = JSII_RTTI_SYMBOL_1;
ApikeysKeyRestrictionsIosKeyRestrictionsOutputReference[_g] = { fqn: "@cdktf/provider-google.apikeysKey.ApikeysKeyRestrictionsIosKeyRestrictionsOutputReference", version: "14.12.0" };
function apikeysKeyRestrictionsServerKeyRestrictionsToTerraform(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 {
allowed_ips: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.allowedIps),
};
}
exports.apikeysKeyRestrictionsServerKeyRestrictionsToTerraform = apikeysKeyRestrictionsServerKeyRestrictionsToTerraform;
function apikeysKeyRestrictionsServerKeyRestrictionsToHclTerraform(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 = {
allowed_ips: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.allowedIps),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apikeysKeyRestrictionsServerKeyRestrictionsToHclTerraform = apikeysKeyRestrictionsServerKeyRestrictionsToHclTerraform;
class ApikeysKeyRestrictionsServerKeyRestrictionsOutputReference 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._allowedIps !== undefined) {
hasAnyValues = true;
internalValueResult.allowedIps = this._allowedIps;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._allowedIps = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._allowedIps = value.allowedIps;
}
}
get allowedIps() {
return this.getListAttribute('allowed_ips');
}
set allowedIps(value) {
this._allowedIps = value;
}
// Temporarily expose input value. Use with caution.
get allowedIpsInput() {
return this._allowedIps;
}
}
exports.ApikeysKeyRestrictionsServerKeyRestrictionsOutputReference = ApikeysKeyRestrictionsServerKeyRestrictionsOutputReference;
_h = JSII_RTTI_SYMBOL_1;
ApikeysKeyRestrictionsServerKeyRestrictionsOutputReference[_h] = { fqn: "@cdktf/provider-google.apikeysKey.ApikeysKeyRestrictionsServerKeyRestrictionsOutputReference", version: "14.12.0" };
function apikeysKeyRestrictionsToTerraform(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 {
android_key_restrictions: apikeysKeyRestrictionsAndroidKeyRestrictionsToTerraform(struct.androidKeyRestrictions),
api_targets: cdktf.listMapper(apikeysKeyRestrictionsApiTargetsToTerraform, true)(struct.apiTargets),
browser_key_restrictions: apikeysKeyRestrictionsBrowserKeyRestrictionsToTerraform(struct.browserKeyRestrictions),
ios_key_restrictions: apikeysKeyRestrictionsIosKeyRestrictionsToTerraform(struct.iosKeyRestrictions),
server_key_restrictions: apikeysKeyRestrictionsServerKeyRestrictionsToTerraform(struct.serverKeyRestrictions),
};
}
exports.apikeysKeyRestrictionsToTerraform = apikeysKeyRestrictionsToTerraform;
function apikeysKeyRestrictionsToHclTerraform(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 = {
android_key_restrictions: {
value: apikeysKeyRestrictionsAndroidKeyRestrictionsToHclTerraform(struct.androidKeyRestrictions),
isBlock: true,
type: "list",
storageClassType: "ApikeysKeyRestrictionsAndroidKeyRestrictionsList",
},
api_targets: {
value: cdktf.listMapperHcl(apikeysKeyRestrictionsApiTargetsToHclTerraform, true)(struct.apiTargets),
isBlock: true,
type: "list",
storageClassType: "ApikeysKeyRestrictionsApiTargetsList",
},
browser_key_restrictions: {
value: apikeysKeyRestrictionsBrowserKeyRestrictionsToHclTerraform(struct.browserKeyRestrictions),
isBlock: true,
type: "list",
storageClassType: "ApikeysKeyRestrictionsBrowserKeyRestrictionsList",
},
ios_key_restrictions: {
value: apikeysKeyRestrictionsIosKeyRestrictionsToHclTerraform(struct.iosKeyRestrictions),
isBlock: true,
type: "list",
storageClassType: "ApikeysKeyRestrictionsIosKeyRestrictionsList",
},
server_key_restrictions: {
value: apikeysKeyRestrictionsServerKeyRestrictionsToHclTerraform(struct.serverKeyRestrictions),
isBlock: true,
type: "list",
storageClassType: "ApikeysKeyRestrictionsServerKeyRestrictionsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apikeysKeyRestrictionsToHclTerraform = apikeysKeyRestrictionsToHclTerraform;
class ApikeysKeyRestrictionsOutputReference 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;
// android_key_restrictions - computed: false, optional: true, required: false
this._androidKeyRestrictions = new ApikeysKeyRestrictionsAndroidKeyRestrictionsOutputReference(this, "android_key_restrictions");
// api_targets - computed: false, optional: true, required: false
this._apiTargets = new ApikeysKeyRestrictionsApiTargetsList(this, "api_targets", false);
// browser_key_restrictions - computed: false, optional: true, required: false
this._browserKeyRestrictions = new ApikeysKeyRestrictionsBrowserKeyRestrictionsOutputReference(this, "browser_key_restrictions");
// ios_key_restrictions - computed: false, optional: true, required: false
this._iosKeyRestrictions = new ApikeysKeyRestrictionsIosKeyRestrictionsOutputReference(this, "ios_key_restrictions");
// server_key_restrictions - computed: false, optional: true, required: false
this._serverKeyRestrictions = new ApikeysKeyRestrictionsServerKeyRestrictionsOutputReference(this, "server_key_restrictions");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._androidKeyRestrictions?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.androidKeyRestrictions = this._androidKeyRestrictions?.internalValue;
}
if (this._apiTargets?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.apiTargets = this._apiTargets?.internalValue;
}
if (this._browserKeyRestrictions?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.browserKeyRestrictions = this._browserKeyRestrictions?.internalValue;
}
if (this._iosKeyRestrictions?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.iosKeyRestrictions = this._iosKeyRestrictions?.internalValue;
}
if (this._serverKeyRestrictions?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.serverKeyRestrictions = this._serverKeyRestrictions?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._androidKeyRestrictions.internalValue = undefined;
this._apiTargets.internalValue = undefined;
this._browserKeyRestrictions.internalValue = undefined;
this._iosKeyRestrictions.internalValue = undefined;
this._serverKeyRestrictions.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._androidKeyRestrictions.internalValue = value.androidKeyRestrictions;
this._apiTargets.internalValue = value.apiTargets;
this._browserKeyRestrictions.internalValue = value.browserKeyRestrictions;
this._iosKeyRestrictions.internalValue = value.iosKeyRestrictions;
this._serverKeyRestrictions.internalValue = value.serverKeyRestrictions;
}
}
get androidKeyRestrictions() {
return this._androidKeyRestrictions;
}
putAndroidKeyRestrictions(value) {
this._androidKeyRestrictions.internalValue = value;
}
resetAndroidKeyRestrictions() {
this._androidKeyRestrictions.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get androidKeyRestrictionsInput() {
return this._androidKeyRestrictions.internalValue;
}
get apiTargets() {
return this._apiTargets;
}
putApiTargets(value) {
this._apiTargets.internalValue = value;
}
resetApiTargets() {
this._apiTargets.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get apiTargetsInput() {
return this._apiTargets.internalValue;
}
get browserKeyRestrictions() {
return this._browserKeyRestrictions;
}
putBrowserKeyRestrictions(value) {
this._browserKeyRestrictions.internalValue = value;
}
resetBrowserKeyRestrictions() {
this._browserKeyRestrictions.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get browserKeyRestrictionsInput() {
return this._browserKeyRestrictions.internalValue;
}
get iosKeyRestrictions() {
return this._iosKeyRestrictions;
}
putIosKeyRestrictions(value) {
this._iosKeyRestrictions.internalValue = value;
}
resetIosKeyRestrictions() {
this._iosKeyRestrictions.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get iosKeyRestrictionsInput() {
return this._iosKeyRestrictions.internalValue;
}
get serverKeyRestrictions() {
return this._serverKeyRestrictions;
}
putServerKeyRestrictions(value) {
this._serverKeyRestrictions.internalValue = value;
}
resetServerKeyRestrictions() {
this._serverKeyRestrictions.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get serverKeyRestrictionsInput() {
return this._serverKeyRestrictions.internalValue;
}
}
exports.ApikeysKeyRestrictionsOutputReference = ApikeysKeyRestrictionsOutputReference;
_j = JSII_RTTI_SYMBOL_1;
ApikeysKeyRestrictionsOutputReference[_j] = { fqn: "@cdktf/provider-google.apikeysKey.ApikeysKeyRestrictionsOutputReference", version: "14.12.0" };
function apikeysKeyTimeoutsToTerraform(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),
update: cdktf.stringToTerraform(struct.update),
};
}
exports.apikeysKeyTimeoutsToTerraform = apikeysKeyTimeoutsToTerraform;
function apikeysKeyTimeoutsToHclTerraform(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",
},
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.apikeysKeyTimeoutsToHclTerraform = apikeysKeyTimeoutsToHclTerraform;
class ApikeysKeyTimeoutsOutputReference 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._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._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._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 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.ApikeysKeyTimeoutsOutputReference = ApikeysKeyTimeoutsOutputReference;
_k = JSII_RTTI_SYMBOL_1;
ApikeysKeyTimeoutsOutputReference[_k] = { fqn: "@cdktf/provider-google.apikeysKey.ApikeysKeyTimeoutsOutputReference", version: "14.12.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/apikeys_key google_apikeys_key}
*/
class ApikeysKey extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a ApikeysKey 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 ApikeysKey to import
* @param importFromId The id of the existing ApikeysKey that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/apikeys_key#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the ApikeysKey to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_apikeys_key", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/apikeys_key google_apikeys_key} 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 ApikeysKeyConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'google_apikeys_key',
terraformGeneratorMetadata: {
providerName: 'google',
providerVersion: '6.13.0',
providerVersionConstraint: '~> 6.0'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// restrictions - computed: false, optional: true, required: false
this._restrictions = new ApikeysKeyRestrictionsOutputReference(this, "restrictions");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new ApikeysKeyTimeoutsOutputReference(this, "timeouts");
this._displayName = config.displayName;
this._id = config.id;
this._name = config.name;
this._project = config.project;
this._restrictions.internalValue = config.restrictions;
this._timeouts.internalValue = config.timeouts;
}
get displayName() {
return this.getStringAttribute('display_name');
}
set displayName(value) {
this._displayName = value;
}
resetDisplayName() {
this._displayName = undefined;
}
// Temporarily expose input value. Use with caution.
get displayNameInput() {
return this._displayName;
}
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;
}
// key_string - computed: true, optional: false, required: false
get keyString() {
return this.getStringAttribute('key_string');
}
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 project() {
return this.getStringAttribute('project');
}
set project(value) {
this._project = value;
}
resetProject() {
this._project = undefined;
}
// Temporarily expose input value. Use with caution.
get projectInput() {
return this._project;
}
// uid - computed: true, optional: false, required: false
get uid() {
return this.getStringAttribute('uid');
}
get restrictions() {
return this._restrictions;
}
putRestrictions(value) {
this._restrictions.internalValue = value;
}
resetRestrictions() {
this._restrictions.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get restrictionsInput() {
return this._restrictions.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 {
display_name: cdktf.stringToTerraform(this._displayName),
id: cdktf.stringToTerraform(this._id),
name: cdktf.stringToTerraform(this._name),
project: cdktf.stringToTerraform(this._project),
restrictions: apikeysKeyRestrictionsToTerraform(this._restrictions.internalValue),
timeouts: apikeysKeyTimeoutsToTerraform(this._timeouts.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
display_name: {
value: cdktf.stringToHclTerraform(this._displayName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(this._name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
project: {
value: cdktf.stringToHclTerraform(this._project),
isBlock: false,
type: "simple",
storageClassType: "string",
},
restrictions: {
value: apikeysKeyRestrictionsToHclTerraform(this._restrictions.internalValue),
isBlock: true,
type: "list",
storageClassType: "ApikeysKeyRestrictionsList",
},
timeouts: {
value: apikeysKeyTimeoutsToHclTerraform(this._timeouts.internalValue),
isBlock: true,
type: "struct",
storageClassType: "ApikeysKeyTimeouts",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
}
exports.ApikeysKey = ApikeysKey;
_l = JSII_RTTI_SYMBOL_1;
ApikeysKey[_l] = { fqn: "@cdktf/provider-google.apikeysKey.ApikeysKey", version: "14.12.0" };
// =================
// STATIC PROPERTIES
// =================
ApikeysKey.tfResourceType = "google_apikeys_key";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYXBpa2V5cy1rZXkvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFTQSwrQkFBK0I7QUEwRC9CLFNBQWdCLDBFQUEwRSxDQUFDLE1BQTRGO0lBQ3JMLElBQUksQ0FBQyxLQUFLLENBQUMsVUFBVSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEtBQUssQ0FBQyxZQUFZLENBQUMsWUFBWSxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUM7UUFBQyxPQUFPLE1BQU0sQ0FBQztJQUFDLENBQUM7SUFDNUYsSUFBSSxLQUFLLENBQUMsZ0JBQWdCLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQztRQUNuQyxNQUFNLElBQUksS0FBSyxDQUFDLG9IQUFvSCxDQUFDLENBQUM7SUFDeEksQ0FBQztJQUNELE9BQU87UUFDTCxZQUFZLEVBQUUsS0FBSyxDQUFDLGlCQUFpQixDQUFDLE1BQU8sQ0FBQyxXQUFXLENBQUM7UUFDMUQsZ0JBQWdCLEVBQUUsS0FBSyxDQUFDLGlCQUFpQixDQUFDLE1BQU8sQ0FBQyxlQUFlLENBQUM7S0FDbkUsQ0FBQTtBQUNILENBQUM7QUFURCxnS0FTQztBQUdELFNBQWdCLDZFQUE2RSxDQUFDLE1BQTRGO0lBQ3hMLElBQUksQ0FBQyxLQUFLLENBQUMsVUFBVSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEtBQUssQ0FBQyxZQUFZLENBQUMsWUFBWSxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUM7UUFBQyxPQUFPLE1BQU0sQ0FBQztJQUFDLENBQUM7SUFDNUYsSUFBSSxLQUFLLENBQUMsZ0JBQWdCLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQztRQUNuQyxNQUFNLElBQUksS0FBSyxDQUFDLG9IQUFvSCxDQUFDLENBQUM7SUFDeEksQ0FBQztJQUNELE1BQU0sS0FBSyxHQUFHO1FBQ1osWUFBWSxFQUFFO1lBQ1osS0FBSyxFQUFFLEtBQUssQ0FBQyxvQkFBb0IsQ0FBQyxNQUFPLENBQUMsV0FBVyxDQUFDO1lBQ3RELE9BQU8sRUFBRSxLQUFLO1lBQ2QsSUFBSSxFQUFFLFFBQVE7WUFDZCxnQkFBZ0IsRUFBRSxRQUFRO1NBQzNCO1FBQ0QsZ0JBQWdCLEVBQUU7WUFDaEIsS0FBSyxFQUFFLEtBQUssQ0FBQyxvQkFBb0IsQ0FBQyxNQUFPLENBQUMsZUFBZSxDQUFDO1lBQzFELE9BQU8sRUFBRSxLQUFLO1lBQ2QsSUFBSSxFQUFFLFFBQVE7WUFDZCxnQkFBZ0IsRUFBRSxRQUFRO1NBQzNCO0tBQ0YsQ0FBQztJQUVGLDhCQUE4QjtJQUM5QixPQUFPLE1BQU0sQ0FBQyxXQUFXLENBQUMsT