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

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Oci.AispeechService;
using Oci.Common;
using Oci.Common.Auth;

namespace Oci.Sdk.DotNet.Example.Aispeech
{
    public class CreateTranscriptionJobExample
    {
        public static async Task Main()
        {
            // Create a request and dependent object(s).
			var createTranscriptionJobDetails = new Oci.AispeechService.Models.CreateTranscriptionJobDetails
			{
				DisplayName = "EXAMPLE-displayName-Value",
				CompartmentId = "ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
				Description = "EXAMPLE-description-Value",
				AdditionalTranscriptionFormats = new List<Oci.AispeechService.Models.CreateTranscriptionJobDetails.AdditionalTranscriptionFormatsEnum>
				{
					Oci.AispeechService.Models.CreateTranscriptionJobDetails.AdditionalTranscriptionFormatsEnum.Srt
				},
				ModelDetails = new Oci.AispeechService.Models.TranscriptionModelDetails
				{
					ModelType = "EXAMPLE-modelType-Value",
					Domain = Oci.AispeechService.Models.TranscriptionModelDetails.DomainEnum.Generic,
					LanguageCode = Oci.AispeechService.Models.TranscriptionModelDetails.LanguageCodeEnum.Da,
					TranscriptionSettings = new Oci.AispeechService.Models.TranscriptionSettings
					{
						Diarization = new Oci.AispeechService.Models.Diarization
						{
							IsDiarizationEnabled = true,
							NumberOfSpeakers = 12
						}
					}
				},
				Normalization = new Oci.AispeechService.Models.TranscriptionNormalization
				{
					IsPunctuationEnabled = true,
					Filters = new List<Oci.AispeechService.Models.TranscriptionFilter>
					{
						new Oci.AispeechService.Models.ProfanityTranscriptionFilter
						{
							Mode = Oci.AispeechService.Models.ProfanityTranscriptionFilter.ModeEnum.Tag
						}
					}
				},
				InputLocation = new Oci.AispeechService.Models.ObjectListFileInputLocation
				{
					ObjectLocation = new Oci.AispeechService.Models.ObjectLocation
					{
						NamespaceName = "EXAMPLE-namespaceName-Value",
						BucketName = "EXAMPLE-bucketName-Value",
						ObjectNames = new List<string>
						{
							"EXAMPLE--Value"
						}
					}
				},
				OutputLocation = new Oci.AispeechService.Models.OutputLocation
				{
					NamespaceName = "EXAMPLE-namespaceName-Value",
					BucketName = "EXAMPLE-bucketName-Value",
					Prefix = "EXAMPLE-prefix-Value"
				},
				FreeformTags = new Dictionary<string, string>()
				{
					{
						"EXAMPLE_KEY_m3awa", 
						"EXAMPLE_VALUE_cc9Y0ObOOrKN8BvGv7go"
					}
				},
				DefinedTags = new Dictionary<string, Dictionary<string, Object>>()
				{
					{
						"EXAMPLE_KEY_JRJgF", 
						new Dictionary<string, Object>()
						{
							{
								"EXAMPLE_KEY_Ntmh6", 
								"EXAMPLE--Value"
							}
						}
					}
				}
			};
			var createTranscriptionJobRequest = new Oci.AispeechService.Requests.CreateTranscriptionJobRequest
			{
				CreateTranscriptionJobDetails = createTranscriptionJobDetails,
				OpcRetryToken = "EXAMPLE-opcRetryToken-Value",
				OpcRequestId = "UJQ8UYRY04DYPWG0AMAA<unique_ID>"
			};

            // Create a default authentication provider that uses the DEFAULT
            // profile in the configuration file.
            // Refer to <see href="https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File>the public documentation</see> on how to prepare a configuration file. 
            var provider = new ConfigFileAuthenticationDetailsProvider("DEFAULT");
            try
            {
                // Create a service client and send the request.
				using (var client = new AIServiceSpeechClient(provider, new ClientConfiguration()))
				{
					var response = await client.CreateTranscriptionJob(createTranscriptionJobRequest);
					// Retrieve value from the response.
					var id = response.TranscriptionJob.Id;
				}
            }
            catch (Exception e)
            {
                Console.WriteLine($"CreateTranscriptionJob Failed with {e.Message}");
                throw e;
            }
        }

    }
}