# 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'

# 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
oda_client = OCI::Oda::ManagementClient.new(config: config)

# Send the request to service, some parameters are not required, see API doc for more info
bulk_create_skill_entities_response =
  oda_client.bulk_create_skill_entities(
    'ocid1.test.oc1..<unique_ID>EXAMPLE-odaInstanceId-Value',
    'ocid1.test.oc1..<unique_ID>EXAMPLE-skillId-Value',
    OCI::Oda::Models::BulkCreateSkillEntitiesDetails.new(
      items: [
        OCI::Oda::Models::CreateSkillCompositeEntityDetails.new(
          type: 'COMPOSITE',
          name: 'EXAMPLE-name-Value',
          attributes: [
            OCI::Oda::Models::EntityAttribute.new(
              name: 'EXAMPLE-name-Value',
              type: 'BOOLEAN',
              natural_language_mapping:
                OCI::Oda::Models::EntityAttributeNaturalLanguageMapping.new(
                  languages: [
                    OCI::Oda::Models::LanguageMapping.new(
                      language_tag: 'EXAMPLE-languageTag-Value',
                      primary_name: 'EXAMPLE-primaryName-Value',
                      names: [
                        OCI::Oda::Models::NameMapping.new(
                          name: 'EXAMPLE-name-Value'
                        )
                      ]
                    )
                  ]
                ),
              is_multi_value: false,
              is_fuzzy_match: false,
              is_invert_comparisons: true,
              temporal_preference: 'NEAREST',
              entity_name: 'EXAMPLE-entityName-Value'
            )
          ],
          actions: [
            OCI::Oda::Models::EntityAction.new(
              name: 'EXAMPLE-name-Value',
              arguments: [
                OCI::Oda::Models::EntityActionArgument.new(
                  name: 'EXAMPLE-name-Value',
                  type: 'BOOLEAN',
                  meta_type: 'EXAMPLE-metaType-Value',
                  natural_language_mapping:
                    OCI::Oda::Models::EntityActionArgumentNaturalLanguageMapping
                      .new(
                      languages: [
                        OCI::Oda::Models::LanguageMapping.new(
                          language_tag: 'EXAMPLE-languageTag-Value',
                          primary_name: 'EXAMPLE-primaryName-Value',
                          names: [
                            OCI::Oda::Models::NameMapping.new(
                              name: 'EXAMPLE-name-Value'
                            )
                          ]
                        )
                      ]
                    ),
                  is_multi_value: false,
                  entity_name: 'EXAMPLE-entityName-Value'
                )
              ],
              crud_type: 'EXAMPLE-crudType-Value',
              natural_language_mapping:
                OCI::Oda::Models::EntityActionNaturalLanguageMapping.new(
                  languages: [
                    OCI::Oda::Models::LanguageMapping.new(
                      language_tag: 'EXAMPLE-languageTag-Value',
                      primary_name: 'EXAMPLE-primaryName-Value',
                      names: [
                        OCI::Oda::Models::NameMapping.new(
                          name: 'EXAMPLE-name-Value'
                        )
                      ]
                    )
                  ]
                )
            )
          ],
          natural_language_mapping:
            OCI::Oda::Models::EntityNaturalLanguageMapping.new(
              languages: [
                OCI::Oda::Models::LanguageMapping.new(
                  language_tag: 'EXAMPLE-languageTag-Value',
                  primary_name: 'EXAMPLE-primaryName-Value',
                  names: [
                    OCI::Oda::Models::NameMapping.new(
                      name: 'EXAMPLE-name-Value'
                    )
                  ]
                )
              ]
            )
        )
      ]
    )
  )

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

Was this article helpful?