rhizo-co-terraform-provider-oci
Version:
Prebuilt oci Provider for Terraform CDK (cdktf)
1,161 lines • 160 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GenerativeAiModel = exports.GenerativeAiModelTimeoutsOutputReference = exports.generativeAiModelTimeoutsToHclTerraform = exports.generativeAiModelTimeoutsToTerraform = exports.GenerativeAiModelFineTuneDetailsOutputReference = exports.generativeAiModelFineTuneDetailsToHclTerraform = exports.generativeAiModelFineTuneDetailsToTerraform = exports.GenerativeAiModelFineTuneDetailsTrainingDatasetOutputReference = exports.generativeAiModelFineTuneDetailsTrainingDatasetToHclTerraform = exports.generativeAiModelFineTuneDetailsTrainingDatasetToTerraform = exports.GenerativeAiModelFineTuneDetailsTrainingConfigOutputReference = exports.generativeAiModelFineTuneDetailsTrainingConfigToHclTerraform = exports.generativeAiModelFineTuneDetailsTrainingConfigToTerraform = exports.GenerativeAiModelModelMetricsList = exports.GenerativeAiModelModelMetricsOutputReference = exports.generativeAiModelModelMetricsToHclTerraform = exports.generativeAiModelModelMetricsToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function generativeAiModelModelMetricsToTerraform(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.generativeAiModelModelMetricsToTerraform = generativeAiModelModelMetricsToTerraform;
function generativeAiModelModelMetricsToHclTerraform(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.generativeAiModelModelMetricsToHclTerraform = generativeAiModelModelMetricsToHclTerraform;
class GenerativeAiModelModelMetricsOutputReference 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;
}
}
// final_accuracy - computed: true, optional: false, required: false
get finalAccuracy() {
return this.getNumberAttribute('final_accuracy');
}
// final_loss - computed: true, optional: false, required: false
get finalLoss() {
return this.getNumberAttribute('final_loss');
}
// model_metrics_type - computed: true, optional: false, required: false
get modelMetricsType() {
return this.getStringAttribute('model_metrics_type');
}
}
exports.GenerativeAiModelModelMetricsOutputReference = GenerativeAiModelModelMetricsOutputReference;
_a = JSII_RTTI_SYMBOL_1;
GenerativeAiModelModelMetricsOutputReference[_a] = { fqn: "rhizo-co-terraform-provider-oci.generativeAiModel.GenerativeAiModelModelMetricsOutputReference", version: "1.0.0" };
class GenerativeAiModelModelMetricsList 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 GenerativeAiModelModelMetricsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.GenerativeAiModelModelMetricsList = GenerativeAiModelModelMetricsList;
_b = JSII_RTTI_SYMBOL_1;
GenerativeAiModelModelMetricsList[_b] = { fqn: "rhizo-co-terraform-provider-oci.generativeAiModel.GenerativeAiModelModelMetricsList", version: "1.0.0" };
function generativeAiModelFineTuneDetailsTrainingConfigToTerraform(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 {
early_stopping_patience: cdktf.numberToTerraform(struct.earlyStoppingPatience),
early_stopping_threshold: cdktf.numberToTerraform(struct.earlyStoppingThreshold),
learning_rate: cdktf.numberToTerraform(struct.learningRate),
log_model_metrics_interval_in_steps: cdktf.numberToTerraform(struct.logModelMetricsIntervalInSteps),
lora_alpha: cdktf.numberToTerraform(struct.loraAlpha),
lora_dropout: cdktf.numberToTerraform(struct.loraDropout),
lora_r: cdktf.numberToTerraform(struct.loraR),
num_of_last_layers: cdktf.numberToTerraform(struct.numOfLastLayers),
total_training_epochs: cdktf.numberToTerraform(struct.totalTrainingEpochs),
training_batch_size: cdktf.numberToTerraform(struct.trainingBatchSize),
training_config_type: cdktf.stringToTerraform(struct.trainingConfigType),
};
}
exports.generativeAiModelFineTuneDetailsTrainingConfigToTerraform = generativeAiModelFineTuneDetailsTrainingConfigToTerraform;
function generativeAiModelFineTuneDetailsTrainingConfigToHclTerraform(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 = {
early_stopping_patience: {
value: cdktf.numberToHclTerraform(struct.earlyStoppingPatience),
isBlock: false,
type: "simple",
storageClassType: "number",
},
early_stopping_threshold: {
value: cdktf.numberToHclTerraform(struct.earlyStoppingThreshold),
isBlock: false,
type: "simple",
storageClassType: "number",
},
learning_rate: {
value: cdktf.numberToHclTerraform(struct.learningRate),
isBlock: false,
type: "simple",
storageClassType: "number",
},
log_model_metrics_interval_in_steps: {
value: cdktf.numberToHclTerraform(struct.logModelMetricsIntervalInSteps),
isBlock: false,
type: "simple",
storageClassType: "number",
},
lora_alpha: {
value: cdktf.numberToHclTerraform(struct.loraAlpha),
isBlock: false,
type: "simple",
storageClassType: "number",
},
lora_dropout: {
value: cdktf.numberToHclTerraform(struct.loraDropout),
isBlock: false,
type: "simple",
storageClassType: "number",
},
lora_r: {
value: cdktf.numberToHclTerraform(struct.loraR),
isBlock: false,
type: "simple",
storageClassType: "number",
},
num_of_last_layers: {
value: cdktf.numberToHclTerraform(struct.numOfLastLayers),
isBlock: false,
type: "simple",
storageClassType: "number",
},
total_training_epochs: {
value: cdktf.numberToHclTerraform(struct.totalTrainingEpochs),
isBlock: false,
type: "simple",
storageClassType: "number",
},
training_batch_size: {
value: cdktf.numberToHclTerraform(struct.trainingBatchSize),
isBlock: false,
type: "simple",
storageClassType: "number",
},
training_config_type: {
value: cdktf.stringToHclTerraform(struct.trainingConfigType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.generativeAiModelFineTuneDetailsTrainingConfigToHclTerraform = generativeAiModelFineTuneDetailsTrainingConfigToHclTerraform;
class GenerativeAiModelFineTuneDetailsTrainingConfigOutputReference 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._earlyStoppingPatience !== undefined) {
hasAnyValues = true;
internalValueResult.earlyStoppingPatience = this._earlyStoppingPatience;
}
if (this._earlyStoppingThreshold !== undefined) {
hasAnyValues = true;
internalValueResult.earlyStoppingThreshold = this._earlyStoppingThreshold;
}
if (this._learningRate !== undefined) {
hasAnyValues = true;
internalValueResult.learningRate = this._learningRate;
}
if (this._logModelMetricsIntervalInSteps !== undefined) {
hasAnyValues = true;
internalValueResult.logModelMetricsIntervalInSteps = this._logModelMetricsIntervalInSteps;
}
if (this._loraAlpha !== undefined) {
hasAnyValues = true;
internalValueResult.loraAlpha = this._loraAlpha;
}
if (this._loraDropout !== undefined) {
hasAnyValues = true;
internalValueResult.loraDropout = this._loraDropout;
}
if (this._loraR !== undefined) {
hasAnyValues = true;
internalValueResult.loraR = this._loraR;
}
if (this._numOfLastLayers !== undefined) {
hasAnyValues = true;
internalValueResult.numOfLastLayers = this._numOfLastLayers;
}
if (this._totalTrainingEpochs !== undefined) {
hasAnyValues = true;
internalValueResult.totalTrainingEpochs = this._totalTrainingEpochs;
}
if (this._trainingBatchSize !== undefined) {
hasAnyValues = true;
internalValueResult.trainingBatchSize = this._trainingBatchSize;
}
if (this._trainingConfigType !== undefined) {
hasAnyValues = true;
internalValueResult.trainingConfigType = this._trainingConfigType;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._earlyStoppingPatience = undefined;
this._earlyStoppingThreshold = undefined;
this._learningRate = undefined;
this._logModelMetricsIntervalInSteps = undefined;
this._loraAlpha = undefined;
this._loraDropout = undefined;
this._loraR = undefined;
this._numOfLastLayers = undefined;
this._totalTrainingEpochs = undefined;
this._trainingBatchSize = undefined;
this._trainingConfigType = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._earlyStoppingPatience = value.earlyStoppingPatience;
this._earlyStoppingThreshold = value.earlyStoppingThreshold;
this._learningRate = value.learningRate;
this._logModelMetricsIntervalInSteps = value.logModelMetricsIntervalInSteps;
this._loraAlpha = value.loraAlpha;
this._loraDropout = value.loraDropout;
this._loraR = value.loraR;
this._numOfLastLayers = value.numOfLastLayers;
this._totalTrainingEpochs = value.totalTrainingEpochs;
this._trainingBatchSize = value.trainingBatchSize;
this._trainingConfigType = value.trainingConfigType;
}
}
get earlyStoppingPatience() {
return this.getNumberAttribute('early_stopping_patience');
}
set earlyStoppingPatience(value) {
this._earlyStoppingPatience = value;
}
resetEarlyStoppingPatience() {
this._earlyStoppingPatience = undefined;
}
// Temporarily expose input value. Use with caution.
get earlyStoppingPatienceInput() {
return this._earlyStoppingPatience;
}
get earlyStoppingThreshold() {
return this.getNumberAttribute('early_stopping_threshold');
}
set earlyStoppingThreshold(value) {
this._earlyStoppingThreshold = value;
}
resetEarlyStoppingThreshold() {
this._earlyStoppingThreshold = undefined;
}
// Temporarily expose input value. Use with caution.
get earlyStoppingThresholdInput() {
return this._earlyStoppingThreshold;
}
get learningRate() {
return this.getNumberAttribute('learning_rate');
}
set learningRate(value) {
this._learningRate = value;
}
resetLearningRate() {
this._learningRate = undefined;
}
// Temporarily expose input value. Use with caution.
get learningRateInput() {
return this._learningRate;
}
get logModelMetricsIntervalInSteps() {
return this.getNumberAttribute('log_model_metrics_interval_in_steps');
}
set logModelMetricsIntervalInSteps(value) {
this._logModelMetricsIntervalInSteps = value;
}
resetLogModelMetricsIntervalInSteps() {
this._logModelMetricsIntervalInSteps = undefined;
}
// Temporarily expose input value. Use with caution.
get logModelMetricsIntervalInStepsInput() {
return this._logModelMetricsIntervalInSteps;
}
get loraAlpha() {
return this.getNumberAttribute('lora_alpha');
}
set loraAlpha(value) {
this._loraAlpha = value;
}
resetLoraAlpha() {
this._loraAlpha = undefined;
}
// Temporarily expose input value. Use with caution.
get loraAlphaInput() {
return this._loraAlpha;
}
get loraDropout() {
return this.getNumberAttribute('lora_dropout');
}
set loraDropout(value) {
this._loraDropout = value;
}
resetLoraDropout() {
this._loraDropout = undefined;
}
// Temporarily expose input value. Use with caution.
get loraDropoutInput() {
return this._loraDropout;
}
get loraR() {
return this.getNumberAttribute('lora_r');
}
set loraR(value) {
this._loraR = value;
}
resetLoraR() {
this._loraR = undefined;
}
// Temporarily expose input value. Use with caution.
get loraRInput() {
return this._loraR;
}
get numOfLastLayers() {
return this.getNumberAttribute('num_of_last_layers');
}
set numOfLastLayers(value) {
this._numOfLastLayers = value;
}
resetNumOfLastLayers() {
this._numOfLastLayers = undefined;
}
// Temporarily expose input value. Use with caution.
get numOfLastLayersInput() {
return this._numOfLastLayers;
}
get totalTrainingEpochs() {
return this.getNumberAttribute('total_training_epochs');
}
set totalTrainingEpochs(value) {
this._totalTrainingEpochs = value;
}
resetTotalTrainingEpochs() {
this._totalTrainingEpochs = undefined;
}
// Temporarily expose input value. Use with caution.
get totalTrainingEpochsInput() {
return this._totalTrainingEpochs;
}
get trainingBatchSize() {
return this.getNumberAttribute('training_batch_size');
}
set trainingBatchSize(value) {
this._trainingBatchSize = value;
}
resetTrainingBatchSize() {
this._trainingBatchSize = undefined;
}
// Temporarily expose input value. Use with caution.
get trainingBatchSizeInput() {
return this._trainingBatchSize;
}
get trainingConfigType() {
return this.getStringAttribute('training_config_type');
}
set trainingConfigType(value) {
this._trainingConfigType = value;
}
// Temporarily expose input value. Use with caution.
get trainingConfigTypeInput() {
return this._trainingConfigType;
}
}
exports.GenerativeAiModelFineTuneDetailsTrainingConfigOutputReference = GenerativeAiModelFineTuneDetailsTrainingConfigOutputReference;
_c = JSII_RTTI_SYMBOL_1;
GenerativeAiModelFineTuneDetailsTrainingConfigOutputReference[_c] = { fqn: "rhizo-co-terraform-provider-oci.generativeAiModel.GenerativeAiModelFineTuneDetailsTrainingConfigOutputReference", version: "1.0.0" };
function generativeAiModelFineTuneDetailsTrainingDatasetToTerraform(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 {
bucket: cdktf.stringToTerraform(struct.bucket),
dataset_type: cdktf.stringToTerraform(struct.datasetType),
namespace: cdktf.stringToTerraform(struct.namespace),
object: cdktf.stringToTerraform(struct.object),
};
}
exports.generativeAiModelFineTuneDetailsTrainingDatasetToTerraform = generativeAiModelFineTuneDetailsTrainingDatasetToTerraform;
function generativeAiModelFineTuneDetailsTrainingDatasetToHclTerraform(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 = {
bucket: {
value: cdktf.stringToHclTerraform(struct.bucket),
isBlock: false,
type: "simple",
storageClassType: "string",
},
dataset_type: {
value: cdktf.stringToHclTerraform(struct.datasetType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
namespace: {
value: cdktf.stringToHclTerraform(struct.namespace),
isBlock: false,
type: "simple",
storageClassType: "string",
},
object: {
value: cdktf.stringToHclTerraform(struct.object),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.generativeAiModelFineTuneDetailsTrainingDatasetToHclTerraform = generativeAiModelFineTuneDetailsTrainingDatasetToHclTerraform;
class GenerativeAiModelFineTuneDetailsTrainingDatasetOutputReference 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._bucket !== undefined) {
hasAnyValues = true;
internalValueResult.bucket = this._bucket;
}
if (this._datasetType !== undefined) {
hasAnyValues = true;
internalValueResult.datasetType = this._datasetType;
}
if (this._namespace !== undefined) {
hasAnyValues = true;
internalValueResult.namespace = this._namespace;
}
if (this._object !== undefined) {
hasAnyValues = true;
internalValueResult.object = this._object;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._bucket = undefined;
this._datasetType = undefined;
this._namespace = undefined;
this._object = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._bucket = value.bucket;
this._datasetType = value.datasetType;
this._namespace = value.namespace;
this._object = value.object;
}
}
get bucket() {
return this.getStringAttribute('bucket');
}
set bucket(value) {
this._bucket = value;
}
// Temporarily expose input value. Use with caution.
get bucketInput() {
return this._bucket;
}
get datasetType() {
return this.getStringAttribute('dataset_type');
}
set datasetType(value) {
this._datasetType = value;
}
// Temporarily expose input value. Use with caution.
get datasetTypeInput() {
return this._datasetType;
}
get namespace() {
return this.getStringAttribute('namespace');
}
set namespace(value) {
this._namespace = value;
}
// Temporarily expose input value. Use with caution.
get namespaceInput() {
return this._namespace;
}
get object() {
return this.getStringAttribute('object');
}
set object(value) {
this._object = value;
}
// Temporarily expose input value. Use with caution.
get objectInput() {
return this._object;
}
}
exports.GenerativeAiModelFineTuneDetailsTrainingDatasetOutputReference = GenerativeAiModelFineTuneDetailsTrainingDatasetOutputReference;
_d = JSII_RTTI_SYMBOL_1;
GenerativeAiModelFineTuneDetailsTrainingDatasetOutputReference[_d] = { fqn: "rhizo-co-terraform-provider-oci.generativeAiModel.GenerativeAiModelFineTuneDetailsTrainingDatasetOutputReference", version: "1.0.0" };
function generativeAiModelFineTuneDetailsToTerraform(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 {
dedicated_ai_cluster_id: cdktf.stringToTerraform(struct.dedicatedAiClusterId),
training_config: generativeAiModelFineTuneDetailsTrainingConfigToTerraform(struct.trainingConfig),
training_dataset: generativeAiModelFineTuneDetailsTrainingDatasetToTerraform(struct.trainingDataset),
};
}
exports.generativeAiModelFineTuneDetailsToTerraform = generativeAiModelFineTuneDetailsToTerraform;
function generativeAiModelFineTuneDetailsToHclTerraform(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 = {
dedicated_ai_cluster_id: {
value: cdktf.stringToHclTerraform(struct.dedicatedAiClusterId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
training_config: {
value: generativeAiModelFineTuneDetailsTrainingConfigToHclTerraform(struct.trainingConfig),
isBlock: true,
type: "list",
storageClassType: "GenerativeAiModelFineTuneDetailsTrainingConfigList",
},
training_dataset: {
value: generativeAiModelFineTuneDetailsTrainingDatasetToHclTerraform(struct.trainingDataset),
isBlock: true,
type: "list",
storageClassType: "GenerativeAiModelFineTuneDetailsTrainingDatasetList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.generativeAiModelFineTuneDetailsToHclTerraform = generativeAiModelFineTuneDetailsToHclTerraform;
class GenerativeAiModelFineTuneDetailsOutputReference 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;
// training_config - computed: false, optional: true, required: false
this._trainingConfig = new GenerativeAiModelFineTuneDetailsTrainingConfigOutputReference(this, "training_config");
// training_dataset - computed: false, optional: false, required: true
this._trainingDataset = new GenerativeAiModelFineTuneDetailsTrainingDatasetOutputReference(this, "training_dataset");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._dedicatedAiClusterId !== undefined) {
hasAnyValues = true;
internalValueResult.dedicatedAiClusterId = this._dedicatedAiClusterId;
}
if (this._trainingConfig?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.trainingConfig = this._trainingConfig?.internalValue;
}
if (this._trainingDataset?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.trainingDataset = this._trainingDataset?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._dedicatedAiClusterId = undefined;
this._trainingConfig.internalValue = undefined;
this._trainingDataset.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._dedicatedAiClusterId = value.dedicatedAiClusterId;
this._trainingConfig.internalValue = value.trainingConfig;
this._trainingDataset.internalValue = value.trainingDataset;
}
}
get dedicatedAiClusterId() {
return this.getStringAttribute('dedicated_ai_cluster_id');
}
set dedicatedAiClusterId(value) {
this._dedicatedAiClusterId = value;
}
// Temporarily expose input value. Use with caution.
get dedicatedAiClusterIdInput() {
return this._dedicatedAiClusterId;
}
get trainingConfig() {
return this._trainingConfig;
}
putTrainingConfig(value) {
this._trainingConfig.internalValue = value;
}
resetTrainingConfig() {
this._trainingConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get trainingConfigInput() {
return this._trainingConfig.internalValue;
}
get trainingDataset() {
return this._trainingDataset;
}
putTrainingDataset(value) {
this._trainingDataset.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get trainingDatasetInput() {
return this._trainingDataset.internalValue;
}
}
exports.GenerativeAiModelFineTuneDetailsOutputReference = GenerativeAiModelFineTuneDetailsOutputReference;
_e = JSII_RTTI_SYMBOL_1;
GenerativeAiModelFineTuneDetailsOutputReference[_e] = { fqn: "rhizo-co-terraform-provider-oci.generativeAiModel.GenerativeAiModelFineTuneDetailsOutputReference", version: "1.0.0" };
function generativeAiModelTimeoutsToTerraform(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.generativeAiModelTimeoutsToTerraform = generativeAiModelTimeoutsToTerraform;
function generativeAiModelTimeoutsToHclTerraform(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.generativeAiModelTimeoutsToHclTerraform = generativeAiModelTimeoutsToHclTerraform;
class GenerativeAiModelTimeoutsOutputReference 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.GenerativeAiModelTimeoutsOutputReference = GenerativeAiModelTimeoutsOutputReference;
_f = JSII_RTTI_SYMBOL_1;
GenerativeAiModelTimeoutsOutputReference[_f] = { fqn: "rhizo-co-terraform-provider-oci.generativeAiModel.GenerativeAiModelTimeoutsOutputReference", version: "1.0.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/oracle/oci/6.18.0/docs/resources/generative_ai_model oci_generative_ai_model}
*/
class GenerativeAiModel extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a GenerativeAiModel 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 GenerativeAiModel to import
* @param importFromId The id of the existing GenerativeAiModel that should be imported. Refer to the {@link https://registry.terraform.io/providers/oracle/oci/6.18.0/docs/resources/generative_ai_model#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the GenerativeAiModel to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "oci_generative_ai_model", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/oracle/oci/6.18.0/docs/resources/generative_ai_model oci_generative_ai_model} 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 GenerativeAiModelConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'oci_generative_ai_model',
terraformGeneratorMetadata: {
providerName: 'oci',
providerVersion: '6.18.0',
providerVersionConstraint: '~> 6.18.0'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// model_metrics - computed: true, optional: false, required: false
this._modelMetrics = new GenerativeAiModelModelMetricsList(this, "model_metrics", false);
// system_tags - computed: true, optional: false, required: false
this._systemTags = new cdktf.StringMap(this, "system_tags");
// fine_tune_details - computed: false, optional: false, required: true
this._fineTuneDetails = new GenerativeAiModelFineTuneDetailsOutputReference(this, "fine_tune_details");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new GenerativeAiModelTimeoutsOutputReference(this, "timeouts");
this._baseModelId = config.baseModelId;
this._compartmentId = config.compartmentId;
this._definedTags = config.definedTags;
this._description = config.description;
this._displayName = config.displayName;
this._freeformTags = config.freeformTags;
this._id = config.id;
this._vendor = config.vendor;
this._version = config.version;
this._fineTuneDetails.internalValue = config.fineTuneDetails;
this._timeouts.internalValue = config.timeouts;
}
get baseModelId() {
return this.getStringAttribute('base_model_id');
}
set baseModelId(value) {
this._baseModelId = value;
}
// Temporarily expose input value. Use with caution.
get baseModelIdInput() {
return this._baseModelId;
}
// capabilities - computed: true, optional: false, required: false
get capabilities() {
return this.getListAttribute('capabilities');
}
get compartmentId() {
return this.getStringAttribute('compartment_id');
}
set compartmentId(value) {
this._compartmentId = value;
}
// Temporarily expose input value. Use with caution.
get compartmentIdInput() {
return this._compartmentId;
}
get definedTags() {
return this.getStringMapAttribute('defined_tags');
}
set definedTags(value) {
this._definedTags = value;
}
resetDefinedTags() {
this._definedTags = undefined;
}
// Temporarily expose input value. Use with caution.
get definedTagsInput() {
return this._definedTags;
}
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;
}
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 freeformTags() {
return this.getStringMapAttribute('freeform_tags');
}
set freeformTags(value) {
this._freeformTags = value;
}
resetFreeformTags() {
this._freeformTags = undefined;
}
// Temporarily expose input value. Use with caution.
get freeformTagsInput() {
return this._freeformTags;
}
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;
}
// is_long_term_supported - computed: true, optional: false, required: false
get isLongTermSupported() {
return this.getBooleanAttribute('is_long_term_supported');
}
// lifecycle_details - computed: true, optional: false, required: false
get lifecycleDetails() {
return this.getStringAttribute('lifecycle_details');
}
get modelMetrics() {
return this._modelMetrics;
}
// state - computed: true, optional: false, required: false
get state() {
return this.getStringAttribute('state');
}
get systemTags() {
return this._systemTags;
}
// time_created - computed: true, optional: false, required: false
get timeCreated() {
return this.getStringAttribute('time_created');
}
// time_deprecated - computed: true, optional: false, required: false
get timeDeprecated() {
return this.getStringAttribute('time_deprecated');
}
// time_updated - computed: true, optional: false, required: false
get timeUpdated() {
return this.getStringAttribute('time_updated');
}
// type - computed: true, optional: false, required: false
get type() {
return this.getStringAttribute('type');
}
get vendor() {
return this.getStringAttribute('vendor');
}
set vendor(value) {
this._vendor = value;
}
resetVendor() {
this._vendor = undefined;
}
// Temporarily expose input value. Use with caution.
get vendorInput() {
return this._vendor;
}
get version() {
return this.getStringAttribute('version');
}
set version(value) {
this._version = value;
}
resetVersion() {
this._version = undefined;
}
// Temporarily expose input value. Use with caution.
get versionInput() {
return this._version;
}
get fineTuneDetails() {
return this._fineTuneDetails;
}
putFineTuneDetails(value) {
this._fineTuneDetails.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get fineTuneDetailsInput() {
return this._fineTuneDetails.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 {
base_model_id: cdktf.stringToTerraform(this._baseModelId),
compartment_id: cdktf.stringToTerraform(this._compartmentId),
defined_tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._definedTags),
description: cdktf.stringToTerraform(this._description),
display_name: cdktf.stringToTerraform(this._displayName),
freeform_tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._freeformTags),
id: cdktf.stringToTerraform(this._id),
vendor: cdktf.stringToTerraform(this._vendor),
version: cdktf.stringToTerraform(this._version),
fine_tune_details: generativeAiModelFineTuneDetailsToTerraform(this._fineTuneDetails.internalValue),
timeouts: generativeAiModelTimeoutsToTerraform(this._timeouts.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
base_model_id: {
value: cdktf.stringToHclTerraform(this._baseModelId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
compartment_id: {
value: cdktf.stringToHclTerraform(this._compartmentId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
defined_tags: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._definedTags),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
description: {
value: cdktf.stringToHclTerraform(this._description),
isBlock: false,
type: "simple",
storageClassType: "string",
},
display_name: {
value: cdktf.stringToHclTerraform(this._displayName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
freeform_tags: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._freeformTags),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
vendor: {
value: cdktf.stringToHclTerraform(this._vendor),
isBlock: false,
type: "simple",
storageClassType: "string",
},
version: {
value: cdktf.stringToHclTerraform(this._version),
isBlock: false,
type: "simple",
storageClassType: "string",
},
fine_tune_details: {
value: generativeAiModelFineTuneDetailsToHclTerraform(this._fineTuneDetails.internalValue),
isBlock: true,
type: "list",
storageClassType: "GenerativeAiModelFineTuneDetailsList",
},
timeouts: {
value: generativeAiModelTimeoutsToHclTerraform(this._timeouts.internalValue),
isBlock: true,
type: "struct",
storageClassType: "GenerativeAiModelTimeouts",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
}
exports.GenerativeAiModel = GenerativeAiModel;
_g = JSII_RTTI_SYMBOL_1;
GenerativeAiModel[_g] = { fqn: "rhizo-co-terraform-provider-oci.generativeAiModel.GenerativeAiModel", version: "1.0.0" };
// =================
// STATIC PROPERTIES
// =================
GenerativeAiModel.tfResourceType = "oci_generative_ai_model";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZ2VuZXJhdGl2ZS1haS1tb2RlbC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUlBLCtCQUErQjtBQTREL0IsU0FBZ0Isd0NBQXdDLENBQUMsTUFBc0M7SUFDN0YsSUFBSSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFDLElBQUksS0FBSyxDQUFDLFlBQVksQ0FBQyxZQUFZLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQztRQUFDLE9BQU8sTUFBTSxDQUFDO0lBQUMsQ0FBQztJQUM1RixJQUFJLEtBQUssQ0FBQyxnQkFBZ0IsQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDO1FBQ25DLE1BQU0sSUFBSSxLQUFLLENBQUMsb0hBQW9ILENBQUMsQ0FBQztJQUN4SSxDQUFDO0lBQ0QsT0FBTyxFQUNOLENBQUE7QUFDSCxDQUFDO0FBUEQsNEZBT0M7QUFHRCxTQUFnQiwyQ0FBMkMsQ0FBQyxNQUFzQztJQUNoRyxJQUFJLENBQUMsS0FBSyxDQUFDLFVBQVUsQ0FBQyxNQUFNLENB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