<commit_before>﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Nexmo.Api.Request;

namespace Nexmo.Api.Voice
{
    public static partial class Call
    {
        public class Endpoint
        {
            /// <summary>
            /// One of the following: phone, websocket, sip
            /// </summary>
            public string type { get; set; }

            // phone:

            /// <summary>
            /// The phone number to connect to in E.164 format.
            /// </summary>
            public string number { get; set; }
            /// <summary>
            /// Set the digits that are sent to the user as soon as the Call is answered. The * and # digits are respected. You create pauses using p. Each pause is 500ms.
            /// </summary>
            public string dtmfAnswer { get; set; }

            // websocket/sip:

            /// <summary>
            /// The URI to the websocket you are streaming to.
            /// OR
            /// The SIP URI to the endpoint you are connecting to in the format sip:<EMAIL>.
            /// </summary>
            public string uri { get; set; }

            // websocket:

            /// <summary>
            /// The internet media type for the audio you are streaming.Possible values are: audio/l16; rate=16000
            /// </summary>
            [JsonProperty("content-type")]
            public string contentType { get; set; }

            /// <summary>
            /// A JSON object containing any metadata you want.
            /// </summary>
            public string headers { get; set; }
        }

        public class CallCommand
        {
            /// <summary>
            /// The single or mixed collection of endpoint types you connected to. Possible values.
            /// </summary>
            public Endpoint[] to { get; set; }
            /// <summary>
            /// The endpoint you are calling from. Possible value are the same as to.
            /// </summary>
            public Endpoint from { get; set; }
            /// <summary>
            /// The webhook endpoint where you provide the Nexmo Call Control Object that governs this call. As soon as your user answers a call, Platform requests this NCCO from answer_url. Use answer_method to manage the HTTP method.
            /// </summary>
            public string[] answer_url { get; set; }
            /// <summary>
            /// Optional. The HTTP method used to send event information to answer_url. The default value is GET.
            /// </summary>
            public string answer_method { get; set; }
            /// <summary>
            /// Optional. Platform sends event information asynchronously to this endpoint when status changes. For more information about the values sent, see callback.
            /// </summary>
            public string event_url { get; set; }
            /// <summary>
            /// Optional. The HTTP method used to send event information to event_url. The default value is POST.
            /// </summary>
            public string event_method { get; set; }
            /// <summary>
            /// Optional. Configure the behavior when Nexmo detects that a destination is an answerphone.
            /// </summary>
            public string machine_detection { get; set; }
            /// <summary>
            /// Optional. Set the number of seconds that elapse before Nexmo hangs up after the call state changes to in_progress. The default value is 7200, two hours. This is also the maximum value.
            /// </summary>
            public decimal length_timer { get; set; }
            /// <summary>
            /// Optional. Set the number of seconds that elapse before Nexmo hangs up after the call state changes to 'ringing'. The default value is 60, the maximum value is 120.
            /// </summary>
            public decimal ringing_timer { get; set; }
        }

        public class CallCommandResponse
        {
            /// <summary><commit_msg>Fix #78 : event_url returns the url and other meta data thus it is a string[] (#81)<commit_after>﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Nexmo.Api.Request;

namespace Nexmo.Api.Voice
{
    public static partial class Call
    {
        public class Endpoint
        {
            /// <summary>
            /// One of the following: phone, websocket, sip
            /// </summary>
            public string type { get; set; }

            // phone:

            /// <summary>
            /// The phone number to connect to in E.164 format.
            /// </summary>
            public string number { get; set; }
            /// <summary>
            /// Set the digits that are sent to the user as soon as the Call is answered. The * and # digits are respected. You create pauses using p. Each pause is 500ms.
            /// </summary>
            public string dtmfAnswer { get; set; }

            // websocket/sip:

            /// <summary>
            /// The URI to the websocket you are streaming to.
            /// OR
            /// The SIP URI to the endpoint you are connecting to in the format sip:<EMAIL>.
            /// </summary>
            public string uri { get; set; }

            // websocket:

            /// <summary>
            /// The internet media type for the audio you are streaming.Possible values are: audio/l16; rate=16000
            /// </summary>
            [JsonProperty("content-type")]
            public string contentType { get; set; }

            /// <summary>
            /// A JSON object containing any metadata you want.
            /// </summary>
            public string headers { get; set; }
        }

        public class CallCommand
        {
            /// <summary>
            /// The single or mixed collection of endpoint types you connected to. Possible values.
            /// </summary>
            public Endpoint[] to { get; set; }
            /// <summary>
            /// The endpoint you are calling from. Possible value are the same as to.
            /// </summary>
            public Endpoint from { get; set; }
            /// <summary>
            /// The webhook endpoint where you provide the Nexmo Call Control Object that governs this call. As soon as your user answers a call, Platform requests this NCCO from answer_url. Use answer_method to manage the HTTP method.
            /// </summary>
            public string[] answer_url { get; set; }
            /// <summary>
            /// Optional. The HTTP method used to send event information to answer_url. The default value is GET.
            /// </summary>
            public string answer_method { get; set; }
            /// <summary>
            /// Optional. Platform sends event information asynchronously to this endpoint when status changes. For more information about the values sent, see callback.
            /// </summary>
            public string[] event_url { get; set; }
            /// <summary>
            /// Optional. The HTTP method used to send event information to event_url. The default value is POST.
            /// </summary>
            public string event_method { get; set; }
            /// <summary>
            /// Optional. Configure the behavior when Nexmo detects that a destination is an answerphone.
            /// </summary>
            public string machine_detection { get; set; }
            /// <summary>
            /// Optional. Set the number of seconds that elapse before Nexmo hangs up after the call state changes to in_progress. The default value is 7200, two hours. This is also the maximum value.
            /// </summary>
            public decimal length_timer { get; set; }
            /// <summary>
            /// Optional. Set the number of seconds that elapse before Nexmo hangs up after the call state changes to 'ringing'. The default value is 60, the maximum value is 120.
            /// </summary>
            public decimal ringing_timer { get; set; }
        }

        public class CallCommandResponse
        {
            /// <summary>
{'fraction_non_alphanumeric': 0.09417427795606023, 'fraction_numerical': 0.005924463095531967, 'mean_word_length': 1.5188063413117812, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3478469', 'n_tokens_mistral': 1948, 'n_tokens_neox': 1849, 'n_words': 844}