# 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).

require 'date'
require 'oci'

# Create a default config using DEFAULT profile in default location
# Refer to https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File for more info
config = OCI::ConfigFileLoader.load_config

# Initialize service client with default config file
data_science_client = OCI::DataScience::DataScienceClient.new(config: config)

# Send the request to service, some parameters are not required, see API doc for more info
update_schedule_response =
  data_science_client.update_schedule(
    'ocid1.test.oc1..<unique_ID>EXAMPLE-scheduleId-Value',
    OCI::DataScience::Models::UpdateScheduleDetails.new(
      display_name: 'EXAMPLE-displayName-Value',
      description: 'EXAMPLE-description-Value',
      trigger:
        OCI::DataScience::Models::ScheduleCronTrigger.new(
          trigger_type: 'CRON',
          cron_expression: 'EXAMPLE-cronExpression-Value',
          time_start: DateTime.parse('2014-01-31T08:53:31.619Z'),
          time_end: DateTime.parse('2026-12-03T18:10:47.212Z')
        ),
      action:
        OCI::DataScience::Models::ScheduleHttpAction.new(
          action_type: 'HTTP',
          action_details:
            OCI::DataScience::Models::CreatePipelineRunScheduleActionDetails
              .new(
              http_action_type: 'CREATE_PIPELINE_RUN',
              create_pipeline_run_details:
                OCI::DataScience::Models::CreatePipelineRunDetails.new(
                  compartment_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value',
                  pipeline_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-pipelineId-Value',
                  project_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-projectId-Value',
                  display_name: 'EXAMPLE-displayName-Value',
                  configuration_override_details:
                    OCI::DataScience::Models::PipelineDefaultConfigurationDetails
                      .new(
                      type: 'DEFAULT',
                      maximum_runtime_in_minutes: 6623,
                      environment_variables: {
                        'EXAMPLE_KEY_COlqt' =>
                          'EXAMPLE_VALUE_gemGwM37M5IZa2WVl9P2'
                      },
                      command_line_arguments:
                        'EXAMPLE-commandLineArguments-Value'
                    ),
                  log_configuration_override_details:
                    OCI::DataScience::Models::PipelineLogConfigurationDetails
                      .new(
                      enable_logging: true,
                      enable_auto_log_creation: true,
                      log_group_id:
                        'ocid1.test.oc1..<unique_ID>EXAMPLE-logGroupId-Value',
                      log_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-logId-Value'
                    ),
                  infrastructure_configuration_override_details:
                    OCI::DataScience::Models::PipelineInfrastructureConfigurationDetails
                      .new(
                      shape_name: 'EXAMPLE-shapeName-Value',
                      block_storage_size_in_gbs: 9535,
                      subnet_id:
                        'ocid1.test.oc1..<unique_ID>EXAMPLE-subnetId-Value',
                      shape_config_details:
                        OCI::DataScience::Models::PipelineShapeConfigDetails
                          .new(
                          ocpus: 43.749332,
                          memory_in_gbs: 645.04047,
                          cpu_baseline: 'BASELINE_1_1',
                          ocpus_parameterized:
                            'EXAMPLE-ocpusParameterized-Value',
                          memory_in_gbs_parameterized:
                            'EXAMPLE-memoryInGBsParameterized-Value'
                        ),
                      block_storage_size_in_gbs_parameterized:
                        'EXAMPLE-blockStorageSizeInGBsParameterized-Value'
                    ),
                  storage_mount_configuration_override_details_list: [
                    OCI::DataScience::Models::ObjectStorageMountConfigurationDetails
                      .new(
                      storage_type: 'OBJECT_STORAGE',
                      destination_directory_name:
                        'EXAMPLE-destinationDirectoryName-Value',
                      namespace: 'EXAMPLE-namespace-Value',
                      bucket: 'EXAMPLE-bucket-Value',
                      destination_path: 'EXAMPLE-destinationPath-Value',
                      prefix: 'EXAMPLE-prefix-Value'
                    )
                  ],
                  parameters_override: {
                    'EXAMPLE_KEY_6hkWB' => 'EXAMPLE_VALUE_12F1RNvcBp8T2QfyO5pE'
                  },
                  step_override_details: [
                    OCI::DataScience::Models::PipelineStepOverrideDetails.new(
                      step_name: 'EXAMPLE-stepName-Value',
                      step_configuration_details:
                        OCI::DataScience::Models::PipelineStepConfigurationDetails
                          .new(
                          maximum_runtime_in_minutes: 31_433,
                          environment_variables: {
                            'EXAMPLE_KEY_R0E1x' =>
                              'EXAMPLE_VALUE_SWOZwIqVcYhj7AwWA8WK'
                          },
                          command_line_arguments:
                            'EXAMPLE-commandLineArguments-Value'
                        ),
                      step_container_configuration_details:
                        OCI::DataScience::Models::PipelineOcirContainerConfigurationDetails
                          .new(
                          container_type: 'OCIR_CONTAINER',
                          image: 'EXAMPLE-image-Value',
                          cmd: %w[EXAMPLE--Value],
                          entrypoint: %w[EXAMPLE--Value],
                          image_digest: 'EXAMPLE-imageDigest-Value',
                          image_signature_id:
                            'ocid1.test.oc1..<unique_ID>EXAMPLE-imageSignatureId-Value'
                        ),
                      step_dataflow_configuration_details:
                        OCI::DataScience::Models::PipelineDataflowConfigurationDetails
                          .new(
                          configuration: 'EXAMPLE-configuration-Value',
                          driver_shape: 'EXAMPLE-driverShape-Value',
                          driver_shape_config_details:
                            OCI::DataScience::Models::PipelineShapeConfigDetails
                              .new(
                              ocpus: 61.859962,
                              memory_in_gbs: 63.371704,
                              cpu_baseline: 'BASELINE_1_1',
                              ocpus_parameterized:
                                'EXAMPLE-ocpusParameterized-Value',
                              memory_in_gbs_parameterized:
                                'EXAMPLE-memoryInGBsParameterized-Value'
                            ),
                          executor_shape: 'EXAMPLE-executorShape-Value',
                          executor_shape_config_details:
                            OCI::DataScience::Models::PipelineShapeConfigDetails
                              .new(
                              ocpus: 29.302227,
                              memory_in_gbs: 70.352844,
                              cpu_baseline: 'BASELINE_1_8',
                              ocpus_parameterized:
                                'EXAMPLE-ocpusParameterized-Value',
                              memory_in_gbs_parameterized:
                                'EXAMPLE-memoryInGBsParameterized-Value'
                            ),
                          num_executors: 998,
                          warehouse_bucket_uri:
                            'EXAMPLE-warehouseBucketUri-Value',
                          logs_bucket_uri: 'EXAMPLE-logsBucketUri-Value'
                        ),
                      step_infrastructure_configuration_details:
                        OCI::DataScience::Models::PipelineInfrastructureConfigurationDetails
                          .new(
                          shape_name: 'EXAMPLE-shapeName-Value',
                          block_storage_size_in_gbs: 4694,
                          subnet_id:
                            'ocid1.test.oc1..<unique_ID>EXAMPLE-subnetId-Value',
                          shape_config_details:
                            OCI::DataScience::Models::PipelineShapeConfigDetails
                              .new(
                              ocpus: 38.209538,
                              memory_in_gbs: 399.90607,
                              cpu_baseline: 'BASELINE_1_8',
                              ocpus_parameterized:
                                'EXAMPLE-ocpusParameterized-Value',
                              memory_in_gbs_parameterized:
                                'EXAMPLE-memoryInGBsParameterized-Value'
                            ),
                          block_storage_size_in_gbs_parameterized:
                            'EXAMPLE-blockStorageSizeInGBsParameterized-Value'
                        ),
                      step_storage_mount_configuration_details_list: [
                        OCI::DataScience::Models::ObjectStorageMountConfigurationDetails
                          .new(
                          storage_type: 'OBJECT_STORAGE',
                          destination_directory_name:
                            'EXAMPLE-destinationDirectoryName-Value',
                          namespace: 'EXAMPLE-namespace-Value',
                          bucket: 'EXAMPLE-bucket-Value',
                          destination_path: 'EXAMPLE-destinationPath-Value',
                          prefix: 'EXAMPLE-prefix-Value'
                        )
                      ]
                    )
                  ],
                  freeform_tags: {
                    'EXAMPLE_KEY_6FgvJ' => 'EXAMPLE_VALUE_opPimi0UrkxUJgiJLAyi'
                  },
                  defined_tags: {
                    'EXAMPLE_KEY_f2byG' => {
                      'EXAMPLE_KEY_wx2o9' => 'EXAMPLE--Value'
                    }
                  },
                  system_tags: {
                    'EXAMPLE_KEY_BT79M' => {
                      'EXAMPLE_KEY_QqcEg' => 'EXAMPLE--Value'
                    }
                  }
                )
            )
        ),
      log_details:
        OCI::DataScience::Models::ScheduleLogDetails.new(
          log_group_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-logGroupId-Value',
          log_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-logId-Value'
        ),
      freeform_tags: {
        'EXAMPLE_KEY_HIaDI' => 'EXAMPLE_VALUE_oLKUe1RllbvRO7Rl4u20'
      },
      defined_tags: {
        'EXAMPLE_KEY_jub8U' => { 'EXAMPLE_KEY_mEsZR' => 'EXAMPLE--Value' }
      }
    )
  )

# Get the data from response
puts "#{update_schedule_response.headers}"