# 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 'oci'
require 'date'

# 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_integration_client =
  OCI::DataIntegration::DataIntegrationClient.new(config: config)

# Send the request to service, some parameters are not required, see API doc for more info
create_user_defined_function_validation_response =
  data_integration_client.create_user_defined_function_validation(
    'ocid1.test.oc1..<unique_ID>EXAMPLE-workspaceId-Value',
    OCI::DataIntegration::Models::CreateUserDefinedFunctionValidationDetails
      .new(
      key: 'EXAMPLE-key-Value',
      model_type: 'DIS_USER_DEFINED_FUNCTION',
      model_version: 'EXAMPLE-modelVersion-Value',
      parent_ref:
        OCI::DataIntegration::Models::ParentReference.new(
          parent: 'EXAMPLE-parent-Value',
          root_doc_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
        ),
      name: 'EXAMPLE-name-Value',
      identifier: 'EXAMPLE-identifier-Value',
      object_version: 743,
      signatures: [
        OCI::DataIntegration::Models::FunctionSignature.new(
          key: 'EXAMPLE-key-Value',
          model_type: 'DIS_FUNCTION_SIGNATURE',
          model_version: 'EXAMPLE-modelVersion-Value',
          parent_ref:
            OCI::DataIntegration::Models::ParentReference.new(
              parent: 'EXAMPLE-parent-Value',
              root_doc_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
            ),
          name: 'EXAMPLE-name-Value',
          ret_type:
            OCI::DataIntegration::Models::ConfiguredType.new(
              model_type: 'CONFIGURED_TYPE',
              key: 'EXAMPLE-key-Value',
              model_version: 'EXAMPLE-modelVersion-Value',
              parent_ref:
                OCI::DataIntegration::Models::ParentReference.new(
                  parent: 'EXAMPLE-parent-Value',
                  root_doc_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
                ),
              name: 'EXAMPLE-name-Value',
              object_status: 794,
              description: 'EXAMPLE-description-Value',
              wrapped_type: 'EXAMPLE-wrappedType-Value',
              config_values:
                OCI::DataIntegration::Models::ConfigValues.new(
                  config_param_values: {
                    'EXAMPLE_KEY_0CqGM' => {
                      'stringValue' => 'EXAMPLE-stringValue-Value',
                      'intValue' => 599,
                      'objectValue' => 'EXAMPLE-objectValue-Value',
                      'refValue' => 'EXAMPLE-refValue-Value',
                      'parameterValue' => 'EXAMPLE-parameterValue-Value',
                      'rootObjectValue' => 'EXAMPLE-rootObjectValue-Value'
                    }
                  },
                  parent_ref:
                    OCI::DataIntegration::Models::ParentReference.new(
                      parent: 'EXAMPLE-parent-Value',
                      root_doc_id:
                        'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
                    )
                ),
              config_definition:
                OCI::DataIntegration::Models::ConfigDefinition.new(
                  key: 'EXAMPLE-key-Value',
                  model_type: 'EXAMPLE-modelType-Value',
                  model_version: 'EXAMPLE-modelVersion-Value',
                  parent_ref:
                    OCI::DataIntegration::Models::ParentReference.new(
                      parent: 'EXAMPLE-parent-Value',
                      root_doc_id:
                        'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
                    ),
                  name: 'EXAMPLE-name-Value',
                  is_contained: false,
                  object_status: 544,
                  config_parameter_definitions: {
                    'EXAMPLE_KEY_vT08l' => {
                      'parameterType' => {
                        'modelType' => 'DATA_TYPE',
                        'key' => 'EXAMPLE-key-Value',
                        'modelVersion' => 'EXAMPLE-modelVersion-Value',
                        'parentRef' => {
                          'parent' => 'EXAMPLE-parent-Value',
                          'rootDocId' =>
                            'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
                        },
                        'name' => 'EXAMPLE-name-Value',
                        'objectStatus' => 969,
                        'description' => 'EXAMPLE-description-Value',
                        'dtType' => 'STRUCTURED',
                        'typeSystemName' => 'EXAMPLE-typeSystemName-Value'
                      },
                      'parameterName' => 'EXAMPLE-parameterName-Value',
                      'description' => 'EXAMPLE-description-Value',
                      'defaultValue' => 'EXAMPLE-defaultValue-Value',
                      'classFieldName' => 'EXAMPLE-classFieldName-Value',
                      'isStatic' => False,
                      'isClassFieldValue' => False
                    }
                  }
                )
            ),
          arguments: [
            OCI::DataIntegration::Models::InputPort.new(
              model_type: 'INPUT_PORT',
              key: 'EXAMPLE-key-Value',
              model_version: 'EXAMPLE-modelVersion-Value',
              parent_ref:
                OCI::DataIntegration::Models::ParentReference.new(
                  parent: 'EXAMPLE-parent-Value',
                  root_doc_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
                ),
              config_values:
                OCI::DataIntegration::Models::ConfigValues.new(
                  config_param_values: {
                    'EXAMPLE_KEY_Nmeja' => {
                      'stringValue' => 'EXAMPLE-stringValue-Value',
                      'intValue' => 524,
                      'objectValue' => 'EXAMPLE-objectValue-Value',
                      'refValue' => 'EXAMPLE-refValue-Value',
                      'parameterValue' => 'EXAMPLE-parameterValue-Value',
                      'rootObjectValue' => 'EXAMPLE-rootObjectValue-Value'
                    }
                  },
                  parent_ref:
                    OCI::DataIntegration::Models::ParentReference.new(
                      parent: 'EXAMPLE-parent-Value',
                      root_doc_id:
                        'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
                    )
                ),
              object_status: 756,
              name: 'EXAMPLE-name-Value',
              description: 'EXAMPLE-description-Value',
              port_type: 'DATA'
            )
          ],
          description: 'EXAMPLE-description-Value',
          object_status: 640
        )
      ],
      expr:
        OCI::DataIntegration::Models::Expression.new(
          key: 'EXAMPLE-key-Value',
          model_type: 'EXAMPLE-modelType-Value',
          model_version: 'EXAMPLE-modelVersion-Value',
          parent_ref:
            OCI::DataIntegration::Models::ParentReference.new(
              parent: 'EXAMPLE-parent-Value',
              root_doc_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
            ),
          expr_string: 'EXAMPLE-exprString-Value',
          config_values:
            OCI::DataIntegration::Models::ConfigValues.new(
              config_param_values: {
                'EXAMPLE_KEY_LFuWA' => {
                  'stringValue' => 'EXAMPLE-stringValue-Value',
                  'intValue' => 439,
                  'objectValue' => 'EXAMPLE-objectValue-Value',
                  'refValue' => 'EXAMPLE-refValue-Value',
                  'parameterValue' => 'EXAMPLE-parameterValue-Value',
                  'rootObjectValue' => 'EXAMPLE-rootObjectValue-Value'
                }
              },
              parent_ref:
                OCI::DataIntegration::Models::ParentReference.new(
                  parent: 'EXAMPLE-parent-Value',
                  root_doc_id:
                    'ocid1.test.oc1..<unique_ID>EXAMPLE-rootDocId-Value'
                )
            ),
          object_status: 293
        ),
      description: 'EXAMPLE-description-Value',
      object_status: 310,
      metadata:
        OCI::DataIntegration::Models::ObjectMetadata.new(
          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.parse('2035-02-09T08:13:23.826Z'),
          time_updated: DateTime.parse('2005-01-04T15:02:24.234Z'),
          aggregator_key: 'EXAMPLE-aggregatorKey-Value',
          aggregator:
            OCI::DataIntegration::Models::AggregatorSummary.new(
              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_A19FU' => 'EXAMPLE_VALUE_667JM6GhWVCzkQOtrUca'
          },
          registry_version: 431,
          labels: %w[EXAMPLE--Value],
          is_favorite: true,
          count_statistics:
            OCI::DataIntegration::Models::CountStatistic.new(
              object_type_count_list: [
                OCI::DataIntegration::Models::CountStatisticSummary.new(
                  object_type: 'CONNECTION', object_count: 612
                )
              ]
            )
        ),
      key_map: { 'EXAMPLE_KEY_xGOak' => 'EXAMPLE_VALUE_MrkR1yyo7Ct3ZjOUefUG' }
    )
  )

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