// 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 datascience from "oci-datascience";
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 datascience.DataScienceClient({ authenticationDetailsProvider: provider });

     // Create a request and dependent object(s).
	const  updateScheduleDetails = {
		displayName: "EXAMPLE-displayName-Value",
		description: "EXAMPLE-description-Value",
		trigger: {
			triggerType: "INTERVAL",			frequency: datascience.models.ScheduleIntervalTrigger.Frequency.Daily,
			interval: 594,
			isRandomStartTime: false,
			timeStart: new Date("Fri Dec 12 20:33:25 UTC 2014"),
			timeEnd: new Date("Sun Nov 02 12:47:17 UTC 2003")

			}
,
		action: {
			actionType: "HTTP",			actionDetails: {
				httpActionType: "CREATE_PIPELINE_RUN",				createPipelineRunDetails: {
					projectId: "ocid1.test.oc1..<unique_ID>EXAMPLE-projectId-Value",
					compartmentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
					pipelineId: "ocid1.test.oc1..<unique_ID>EXAMPLE-pipelineId-Value",
					displayName: "EXAMPLE-displayName-Value",
					configurationOverrideDetails: {
						type: "DEFAULT",						maximumRuntimeInMinutes: 12814,
						environmentVariables: {
							EXAMPLE_KEY_jVmEM :"EXAMPLE_VALUE_4Hz0aSqbOm6rTbrKXy0v"
							},
						commandLineArguments: "EXAMPLE-commandLineArguments-Value"

						}
,
					logConfigurationOverrideDetails: {
						enableLogging: false,
						enableAutoLogCreation: true,
						logGroupId: "ocid1.test.oc1..<unique_ID>EXAMPLE-logGroupId-Value",
						logId: "ocid1.test.oc1..<unique_ID>EXAMPLE-logId-Value",

						}
,
					stepOverrideDetails: [{
							stepName: "EXAMPLE-stepName-Value",
							stepConfigurationDetails: {
								maximumRuntimeInMinutes: 16833,
								environmentVariables: {
									EXAMPLE_KEY_sj9wB :"EXAMPLE_VALUE_sk1yyC72eORnuDZrgNWT"
									},
								commandLineArguments: "EXAMPLE-commandLineArguments-Value",

								}
,
							stepContainerConfigurationDetails: {
								containerType: "OCIR_CONTAINER",								image: "EXAMPLE-image-Value",
								cmd: ["EXAMPLE--Value"										],
								entrypoint: ["EXAMPLE--Value"										],
								imageDigest: "EXAMPLE-imageDigest-Value",
								imageSignatureId: "ocid1.test.oc1..<unique_ID>EXAMPLE-imageSignatureId-Value"

								}
,
							stepDataflowConfigurationDetails: {
								configuration: "EXAMPLE-configuration-Value",
								driverShape: "EXAMPLE-driverShape-Value",
								driverShapeConfigDetails: {
									ocpus: 26.896126,
									memoryInGBs: 688.79944,

									}
,
								executorShape: "EXAMPLE-executorShape-Value",
								executorShapeConfigDetails: {
									ocpus: 26.96986,
									memoryInGBs: 140.32574,

									}
,
								numExecutors: 237,
								warehouseBucketUri: "EXAMPLE-warehouseBucketUri-Value",
								logsBucketUri: "EXAMPLE-logsBucketUri-Value",

								}
,

							}
							],
					freeformTags: {
						EXAMPLE_KEY_bYhhn :"EXAMPLE_VALUE_XgMDGOpsKjnulscae9wn"
						},
					definedTags: {
						EXAMPLE_KEY_IdquF :{
							EXAMPLE_KEY_HrJBT :"EXAMPLE--Value"
							}
						},
					systemTags: {
						EXAMPLE_KEY_qi9eU :{
							EXAMPLE_KEY_4arpV :"EXAMPLE--Value"
							}
						},

					}


				}


			}
,
		logDetails: {
			logGroupId: "ocid1.test.oc1..<unique_ID>EXAMPLE-logGroupId-Value",
			logId: "ocid1.test.oc1..<unique_ID>EXAMPLE-logId-Value",

			}
,
		freeformTags: {
			EXAMPLE_KEY_HqRkR :"EXAMPLE_VALUE_9foOa3KXwe3KeNpMR7kv"
			},
		definedTags: {
			EXAMPLE_KEY_k2zUe :{
				EXAMPLE_KEY_GrQO6 :"EXAMPLE--Value"
				}
			},

		}

	const updateScheduleRequest: datascience.requests.UpdateScheduleRequest = { 
	scheduleId: "ocid1.test.oc1..<unique_ID>EXAMPLE-scheduleId-Value",
	updateScheduleDetails: updateScheduleDetails,
	ifMatch: "EXAMPLE-ifMatch-Value",
	opcRequestId: "SQRSZJVOBC8NOWKGUZ8W<unique_ID>",

		}; 


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