// This is an automatically generated code sample. 
// To make this code sample work in your Oracle Cloud tenancy, 
// please replace the values for any parameters whose current values do not fit
// your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and 
// boolean, number, and enum parameters with values not fitting your use case).

import * as generativeaiagent from "oci-generativeaiagent";
import common = require("oci-common");

// Create a default authentication provider that uses the DEFAULT
// profile in the configuration file.
// Refer to <see href="https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File>the public documentation</see> on how to prepare a configuration file.

const provider: common.ConfigFileAuthenticationDetailsProvider = new common.ConfigFileAuthenticationDetailsProvider();

(async () => {
    try {
     // Create a service client
     const client = new generativeaiagent.GenerativeAiAgentClient({ authenticationDetailsProvider: provider });

     // Create a request and dependent object(s).
	const  updateAgentEndpointDetails = {
		displayName: "EXAMPLE-displayName-Value",
		description: "EXAMPLE-description-Value",
		contentModerationConfig: {
			shouldEnableOnInput: false,
			shouldEnableOnOutput: true,

			}
,
		guardrailConfig: {
			contentModerationConfig: {
				inputGuardrailMode: generativeaiagent.models.GuardrailMode.Inform,
				outputGuardrailMode: generativeaiagent.models.GuardrailMode.Block,

				}
,
			promptInjectionConfig: {
				inputGuardrailMode: generativeaiagent.models.GuardrailMode.Block,

				}
,
			personallyIdentifiableInformationConfig: {
				inputGuardrailMode: generativeaiagent.models.GuardrailMode.Disable,
				outputGuardrailMode: generativeaiagent.models.GuardrailMode.Block,

				}
,

			}
,
		metadata: {
			EXAMPLE_KEY_Idtfp :"EXAMPLE_VALUE_XikJUlIp84A3CAVzv1G7"
			},
		humanInputConfig: {
			shouldEnableHumanInput: false,

			}
,
		outputConfig: {
			outputLocation: {
				outputLocationType: "OBJECT_STORAGE_PREFIX",				namespaceName: "EXAMPLE-namespaceName-Value",
				bucketName: "EXAMPLE-bucketName-Value",
				prefix: "EXAMPLE-prefix-Value"

				}
,
			retentionPeriodInMinutes: 721,

			}
,
		shouldEnableTrace: false,
		shouldEnableCitation: false,
		shouldEnableMultiLanguage: false,
		sessionConfig: {
			idleTimeoutInSeconds: 4,

			}
,
		provisionedCapacityConfig: {
			provisionedCapacityId: "ocid1.test.oc1..<unique_ID>EXAMPLE-provisionedCapacityId-Value",
			platformRuntimeConfig: {
				platformRuntimeConfigType: generativeaiagent.models.PlatformRuntimeConfig.PlatformRuntimeConfigType.AgentPlatform,
				version: "EXAMPLE-version-Value",

				}
,
			toolRuntimeConfigs: [{
					toolRuntimeConfigType: generativeaiagent.models.ToolRuntimeConfig.ToolRuntimeConfigType.SqlLarge,
					version: "EXAMPLE-version-Value",

					}
					],

			}
,
		freeformTags: {
			EXAMPLE_KEY_cCSax :"EXAMPLE_VALUE_56PhIBkL4rkNHMH7t2KR"
			},
		definedTags: {
			EXAMPLE_KEY_MdhHD :{
				EXAMPLE_KEY_0hyt0 :"EXAMPLE--Value"
				}
			},

		}

	const updateAgentEndpointRequest: generativeaiagent.requests.UpdateAgentEndpointRequest = { 
	agentEndpointId: "ocid1.test.oc1..<unique_ID>EXAMPLE-agentEndpointId-Value",
	updateAgentEndpointDetails: updateAgentEndpointDetails,
	ifMatch: "EXAMPLE-ifMatch-Value",
	opcRequestId: "JVFYOSEWFHX2N31VBKHH<unique_ID>",

		}; 


     // Send request to the Client.
     const updateAgentEndpointResponse = await client.updateAgentEndpoint(updateAgentEndpointRequest);
     }
     catch (error) {
         console.log("updateAgentEndpoint Failed with error  " + error);
     }
})();