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

from datetime import datetime
import 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.config.from_file()


# Initialize service client with default config file
data_integration_client = oci.data_integration.DataIntegrationClient(config)


# Send the request to service, some parameters are not required, see API
# doc for more info
update_task_schedule_response = data_integration_client.update_task_schedule(
    workspace_id="ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value",
    application_key="EXAMPLE-applicationKey-Value",
    task_schedule_key="EXAMPLE-taskScheduleKey-Value",
    update_task_schedule_details=oci.data_integration.models.UpdateTaskScheduleDetails(
        key="EXAMPLE-key-Value",
        object_version=71,
        model_version="EXAMPLE-modelVersion-Value",
        model_type="EXAMPLE-modelType-Value",
        parent_ref=oci.data_integration.models.ParentReference(
            parent="EXAMPLE-parent-Value",
            root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
        name="EXAMPLE-name-Value",
        description="EXAMPLE-description-Value",
        object_status=115,
        identifier="EXAMPLE-identifier-Value",
        schedule_ref=oci.data_integration.models.Schedule(
            key="EXAMPLE-key-Value",
            model_version="EXAMPLE-modelVersion-Value",
            model_type="EXAMPLE-modelType-Value",
            parent_ref=oci.data_integration.models.ParentReference(
                    parent="EXAMPLE-parent-Value",
                    root_doc_id="ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value"),
            name="EXAMPLE-name-Value",
            description="EXAMPLE-description-Value",
            object_version=534,
            object_status=427,
            identifier="EXAMPLE-identifier-Value",
            frequency_details=oci.data_integration.models.DailyFrequencyDetails(
                        model_type="DAILY",
                        frequency="DAILY",
                        interval=230,
                        time=oci.data_integration.models.Time(
                            hour=46,
                            minute=648,
                            second=727)),
            timezone="EXAMPLE-timezone-Value",
            is_daylight_adjustment_enabled=True,
            metadata=oci.data_integration.models.ObjectMetadata(
                created_by="EXAMPLE-createdBy-Value",
                created_by_name="EXAMPLE-createdByName-Value",
                updated_by="EXAMPLE-updatedBy-Value",
                updated_by_name="EXAMPLE-updatedByName-Value",
                time_created=datetime.strptime(
                    "2044-12-19T06:40:16.365Z",
                    "%Y-%m-%dT%H:%M:%S.%fZ"),
                time_updated=datetime.strptime(
                    "2033-09-13T19:11:25.086Z",
                    "%Y-%m-%dT%H:%M:%S.%fZ"),
                aggregator_key="EXAMPLE-aggregatorKey-Value",
                aggregator=oci.data_integration.models.AggregatorSummary(
                    type="EXAMPLE-type-Value",
                    key="EXAMPLE-key-Value",
                    name="EXAMPLE-name-Value",
                    identifier="EXAMPLE-identifier-Value",
                    description="EXAMPLE-description-Value"),
                identifier_path="EXAMPLE-identifierPath-Value",
                info_fields={
                    'EXAMPLE_KEY_mmyEV': 'EXAMPLE_VALUE_6Jpn4ajXq6em9O3wWj4m'},
                registry_version=795,
                labels=["EXAMPLE--Value"],
                is_favorite=True,
                count_statistics=oci.data_integration.models.CountStatistic(
                    object_type_count_list=[
                        oci.data_integration.models.CountStatisticSummary(
                            object_type="CONNECTION",
                            object_count=720)]))),
        is_enabled=True,
        number_of_retries=221,
        retry_delay=4125.9736,
        retry_delay_unit="HOURS",
        start_time_millis=670,
        end_time_millis=7,
        is_concurrent_allowed=True,
        is_backfill_enabled=True,
        auth_mode="RESOURCE_PRINCIPAL",
        expected_duration=1627.3153,
        expected_duration_unit="DAYS",
        registry_metadata=oci.data_integration.models.RegistryMetadata(
            aggregator_key="EXAMPLE-aggregatorKey-Value",
            labels=["EXAMPLE--Value"],
            registry_version=975,
            key="EXAMPLE-key-Value",
            is_favorite=False)),
    if_match="EXAMPLE-ifMatch-Value",
    opc_request_id="BYKCMFQS3BCKTML0IZ51<unique_ID>")

# Get the data from response
print(update_task_schedule_response.data)