# 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
generative_ai_client = OCI::GenerativeAi::GenerativeAiClient.new(config: config)

# Send the request to service, some parameters are not required, see API doc for more info
update_vector_store_connector_response =
  generative_ai_client.update_vector_store_connector(
    'ocid1.test.oc1..<unique_ID>EXAMPLE-vectorStoreConnectorId-Value',
    OCI::GenerativeAi::Models::UpdateVectorStoreConnectorDetails.new(
      description: 'EXAMPLE-description-Value',
      display_name: 'EXAMPLE-displayName-Value',
      schedule_config:
        OCI::GenerativeAi::Models::ScheduleCronConfig.new(
          config_type: 'CRON',
          cron_expression: 'EXAMPLE-cronExpression-Value',
          state: 'ENABLED',
          time_start: DateTime.parse('2015-07-12T08:21:13.303Z'),
          time_end: DateTime.parse('2016-09-17T18:44:17.165Z')
        ),
      configuration:
        OCI::GenerativeAi::Models::OciObjectStorageConfiguration.new(
          type: 'OBJECT_STORAGE_FILES',
          storage_config_list: [
            OCI::GenerativeAi::Models::ObjectStorageConfig.new(
              namespace: 'EXAMPLE-namespace-Value',
              bucket_name: 'EXAMPLE-bucketName-Value',
              prefix_list: %w[EXAMPLE--Value]
            )
          ]
        ),
      freeform_tags: {
        'EXAMPLE_KEY_KtZRl' => 'EXAMPLE_VALUE_d0aJFm7I6Ylrqb04Vciu'
      },
      defined_tags: {
        'EXAMPLE_KEY_e2d8Z' => { 'EXAMPLE_KEY_YwvsZ' => 'EXAMPLE--Value' }
      }
    )
  )

# Get the data from response
puts "#{update_vector_store_connector_response.data}"