diff --git a/Genesys.Workspace.userprefs b/Genesys.Workspace.userprefs index 21d3566..f865757 100644 --- a/Genesys.Workspace.userprefs +++ b/Genesys.Workspace.userprefs @@ -1,24 +1,5 @@  - - - - - - - - - - - - - - - - - - - - + diff --git a/src/Genesys.Workspace/ApiClientLogger.cs b/src/Genesys.Workspace/ApiClientLogger.cs new file mode 100644 index 0000000..f5f16ec --- /dev/null +++ b/src/Genesys.Workspace/ApiClientLogger.cs @@ -0,0 +1,71 @@ +using System; +using System.Linq; +using Newtonsoft.Json; +using RestSharp; + +namespace Genesys.Workspace.Internal.Client +{ + public partial class ApiClient + { + private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + + /// + /// Allows for extending request processing for generated code. + /// + /// The RestSharp request object + partial void InterceptRequest(IRestRequest request) + { + string contentType = null; + + foreach(Parameter p in request.Parameters) + { + if ( p.Type == ParameterType.RequestBody) + { + contentType = p.Name; + } + } + + if (contentType == null) + { + request.AddHeader("Content-type", "application/json"); + } + } + + /// + /// Allows for extending response processing for generated code. + /// + /// The RestSharp request object + /// The RestSharp response object + partial void InterceptResponse(IRestRequest request, IRestResponse response) + { + var requestToLog = new + { + // ToString() here to have the method as a nice string otherwise it will just show the enum value + method = request.Method.ToString(), + resource = request.Resource, + // Parameters are custom anonymous objects in order to have the parameter type as a nice string + // otherwise it will just show the enum value + parameters = request.Parameters.Select(parameter => new + { + name = parameter.Name, + value = parameter.Value, + type = parameter.Type.ToString() + }), + }; + + var responseToLog = new + { + statusCode = response.StatusCode, + content = response.Content, + headers = response.Headers, + // The Uri that actually responded (could be different from the requestUri if a redirection occurred) + responseUri = response.ResponseUri, + errorMessage = response.ErrorMessage, + }; + + log.Debug(string.Format("\nRequest: {0}\nResponse: {1}", + JsonConvert.SerializeObject(requestToLog), + JsonConvert.SerializeObject(responseToLog))); + } + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Bayeux/ChannelId.cs b/src/Genesys.Workspace/CometD.NET/Bayeux/ChannelId.cs new file mode 100755 index 0000000..7e2a0ab --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Bayeux/ChannelId.cs @@ -0,0 +1,315 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Globalization; + +namespace CometD.Bayeux +{ + /// + ///

Reification of a channel id with methods to test properties + /// and compare with other s.

+ ///

A breaks the channel id into path segments so that, for example, + /// "/foo/bar" breaks into ["foo","bar"].

+ ///

can be wild, when they end with one or two wild characters "*"; + /// a is shallow wild if it ends with one wild character (for example "/foo/bar/*") + /// and deep wild if it ends with two wild characters (for example "/foo/bar/**").

+ ///
+ [Serializable] + public sealed class ChannelId : IEquatable + { + private readonly string _id; + private readonly string[] _segments; + private readonly int _wild; + private readonly IList _wilds; + private readonly string _parent; + + /// + /// Constructs a new with the given id. + /// + /// The channel id in string form. + private ChannelId(string id) + { + if (null == id || (id = id.Trim()).Length == 0) + throw new ArgumentNullException("id"); + + if ("/".Equals(id = id.Replace('\\', '/')) || id[0] != '/' || id.Contains("//")) + throw new ArgumentException(String.Format(CultureInfo.InvariantCulture, "Invalid channel id '{0}'.", id)); + + id = id.TrimEnd('/'); + _id = id; + + _segments = id.Substring(1).Split('/'); + + string lastSegment = _segments[_segments.Length - 1]; + if ("*".Equals(lastSegment))// WILD + _wild = 1; + else if ("**".Equals(lastSegment))// DEEPWILD + _wild = 2; + else + _wild = 0; + + if (_wild > 0) + { + _wilds = (new List()).AsReadOnly(); + } + else + { + string[] wilds = new string[_segments.Length + 1]; + StringBuilder sb = new StringBuilder("/"); + + // [foo, bar] -> [/foo/*, /foo/**, /**] + for (int i = 0; i < _segments.Length; ++i) + { + if (i > 0) + sb.Append(_segments[i - 1]).Append('/'); + + wilds[_segments.Length - i] = sb.ToString() + "**"; + } + + wilds[0] = sb.ToString() + "*"; + _wilds = (new List(wilds)).AsReadOnly(); + } + + _parent = (_segments.Length == 1) ? null : _id.Substring(0, _id.Length - lastSegment.Length - 1); + } + + /// + /// Whether this is either shallow wild or deep wild. + /// + public bool IsWild + { + get { return (_wild > 0); } + } + + /// + /// Shallow wild s end with a single wild character "*" + /// and match non wild channels with the same depth. + /// + /// + /// "/foo/*" matches "/foo/bar", but not "/foo/bar/baz". + /// + /// Whether this is a shallow wild channel id. + public bool IsShallowWild + { + get { return this.IsWild && !this.IsDeepWild; } + } + + /// + /// Deep wild s end with a double wild character "**" + /// and match non wild channels with the same or greater depth. + /// + /// + /// "/foo/**" matches "/foo/bar" and "/foo/bar/baz". + /// + /// Whether this is a deep wild channel id. + public bool IsDeepWild + { + get { return (_wild > 1); } + } + + /// + /// A is a meta + /// if it starts with "/meta/". + /// + /// Whether the first segment is "meta". + public bool IsMeta + { + get { return Channel.IsMeta(_id); } + } + + /// + /// A is a service + /// if it starts with "/service/". + /// + /// Whether the first segment is "service". + public bool IsService + { + get { return Channel.IsService(_id); } + } + + /// + /// Returns whether this + /// is neither meta nor service. + /// + public bool IsBroadcast + { + get { return Channel.IsBroadcast(_id); } + } + + /// + ///

Tests whether this matches the given .

+ ///

If the given is wild, + /// then it matches only if it is equal to this .

+ ///

If this is non-wild, + /// then it matches only if it is equal to the given .

+ ///

Otherwise, this is either shallow or deep wild, and + /// matches s with the same number of equal segments (if it is + /// shallow wild), or s with the same or a greater number of + /// equal segments (if it is deep wild).

+ ///
+ /// The channelId to match. + /// True if this matches the given . + public bool Matches(ChannelId channelId) + { + if (null == channelId) return false; + + if (channelId.IsWild || _wild <= 0) + return this.Equals(channelId); + + if (_wild > 1)// DEEPWILD + { + if (_segments.Length >= channelId._segments.Length) + return false; + } + else// WILD + { + if (_segments.Length != channelId._segments.Length) + return false; + } + + for (int i = _segments.Length - 2; i >= 0; i--) + { + if (!_segments[i].Equals(channelId._segments[i], StringComparison.OrdinalIgnoreCase)) + return false; + } + + return true; + } + + /// + /// Returns how many segments this is made of. + /// + /// + public int Depth + { + get { return _segments.Length; } + } + + /// + /// Returns whether this is an ancestor + /// of the given . + /// + /// The channel to test. + /// + public bool IsAncestorOf(ChannelId id) + { + // Is root of another channel? + if (null == id) return false; + + if (this.IsWild || this.Depth >= id.Depth) + return false; + + for (int i = _segments.Length - 1; i >= 0; i--) + { + if (!_segments[i].Equals(id._segments[i], StringComparison.OrdinalIgnoreCase)) + return false; + } + + return true; + } + + /// + /// Returns whether this is the parent + /// of the given . + /// + /// The channel to test. + /// + public bool IsParentOf(ChannelId id) + { + return (null != id && this.IsAncestorOf(id) && this.Depth == id.Depth - 1); + } + + /// + /// Returns the parent of this . + /// + /// + public string Parent + { + get { return _parent; } + } + + /// + /// Returns the index-nth segment of this channel, + /// or null if no such segment exist. + /// + /// The segment index. + /// + public string GetSegment(int index) + { + return (index < 0 || index >= _segments.Length) ? null : _segments[index]; + } + + /// + /// The list of wilds channels that match this channel, + /// or the empty list if this channel is already wild. + /// + public IList Wilds + { + get { return _wilds; } + } + + #region IEquatable Members + + /// + /// Returns a that represents the current . + /// + public override string ToString() + { + return _id; + } + + /// + /// Determines whether this and a specified + /// object have the same value. + /// + public bool Equals(ChannelId other) + { + return (null == other) ? false + : _id.Equals(other._id, StringComparison.OrdinalIgnoreCase); + } + + /// + /// Determines whether the specified + /// is equal to the current . + /// + public override bool Equals(object obj) + { + if (null == obj) return false; + + ChannelId that = obj as ChannelId; + if (null != that) return this.Equals(that); + + return base.Equals(obj); + } + + /// + /// Returns the hash code for this . + /// + public override int GetHashCode() + { + return _id.GetHashCode(); + } + + #endregion + + private static readonly IDictionary _instances + = new Dictionary(StringComparer.OrdinalIgnoreCase); + + /// + /// Retrieves the cached or create it if it does not exist. + /// + public static ChannelId Create(string id) + { + if (null == id || (id = id.Trim()).Length == 0) + throw new ArgumentNullException("id"); + + lock (_instances) + { + if (!_instances.ContainsKey(id)) + _instances.Add(id, new ChannelId(id)); + + return _instances[id]; + } + } + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Bayeux/Client/IClientSession.cs b/src/Genesys.Workspace/CometD.NET/Bayeux/Client/IClientSession.cs new file mode 100755 index 0000000..b5b3d7b --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Bayeux/Client/IClientSession.cs @@ -0,0 +1,161 @@ +using System; +using System.Collections.Generic; + +namespace CometD.Bayeux.Client +{ + /// + ///

This interface represents the client side Bayeux session.

+ ///

In addition to the common Bayeux session, this + /// interface provides method to configure extension, access channels + /// and to initiate the communication with a Bayeux server(s).

+ ///
+ public interface IClientSession : ISession + { + /// + /// Adds a new extension to this session. + /// + /// The extension to add. + /// + void AddExtension(IExtension extension); + + /// + /// Removes an existing extension from this session. + /// + /// The extension to remove. + /// + void RemoveExtension(IExtension extension); + + /// + /// Returns an immutable list of extensions present in this instance. + /// + /// + IList Extensions { get; } + + /// + /// Equivalent to (null). + /// + void Handshake(); + + /// + ///

Initiates the Bayeux protocol handshake with the server(s).

+ ///

The handshake initiated by this method is asynchronous and + /// does not wait for the handshake response.

+ ///
+ /// Additional fields to add to the handshake message. + void Handshake(IDictionary handshakeFields); + + /// + ///

Returns a client side channel scoped by this session.

+ ///

The channel name may be for a specific channel (e.g. "/foo/bar") + /// or for a wild channel (e.g. "/meta/**" or "/foo/*").

+ ///

This method will always return a channel, even if the + /// the channel has not been created on the server side. The server + /// side channel is only involved once a publish or subscribe method + /// is called on the channel returned by this method.

+ ///
+ /// + ///

Typical usage examples are:

+ ///
+		///     clientSession.GetChannel("/foo/bar").Subscribe(mySubscriptionListener);
+		///     clientSession.GetChannel("/foo/bar").Publish("Hello");
+		///     clientSession.GetChannel("/meta/*").AddListener(myMetaChannelListener);
+		/// 
+ ///
+ /// Specific or wild channel name. + /// Whether to create the client session channel if it does not exist. + /// A channel scoped by this session. + IClientSessionChannel GetChannel(string channelId, bool create = true); + } + + /// + ///

Extension API for client session.

+ ///

An extension allows user code to interact with the Bayeux protocol as late + /// as messages are sent or as soon as messages are received.

+ ///

Messages may be modified, or state held, so that the extension adds a + /// specific behavior simply by observing the flow of Bayeux messages.

+ ///
+ /// + public interface IExtension : IEquatable + { + /// + /// Callback method invoked every time a normal message is received. + /// + /// The session object that is receiving the message. + /// The message received. + /// True if message processing should continue, false if it should stop. + bool Receive(IClientSession session, IMutableMessage message); + + /// + /// Callback method invoked every time a meta message is received. + /// + /// The session object that is receiving the meta message. + /// The meta message received. + /// True if message processing should continue, false if it should stop. + bool ReceiveMeta(IClientSession session, IMutableMessage message); + + /// + /// Callback method invoked every time a normal message is being sent. + /// + /// The session object that is sending the message. + /// The message being sent. + /// True if message processing should continue, false if it should stop. + bool Send(IClientSession session, IMutableMessage message); + + /// + /// Callback method invoked every time a meta message is being sent. + /// + /// The session object that is sending the meta message. + /// The meta message being sent. + /// True if message processing should continue, false if it should stop. + bool SendMeta(IClientSession session, IMutableMessage message); + } + + /// + /// Empty implementation of . + /// + public abstract class AdapterExtension : IExtension + { + /// + /// Callback method invoked every time a normal message is received. + /// + /// Always true. + public virtual bool Receive(IClientSession session, IMutableMessage message) + { + return true; + } + + /// + /// Callback method invoked every time a meta message is received. + /// + /// Always true. + public virtual bool ReceiveMeta(IClientSession session, IMutableMessage message) + { + return true; + } + + /// + /// Callback method invoked every time a normal message is being sent. + /// + /// Always true. + public virtual bool Send(IClientSession session, IMutableMessage message) + { + return true; + } + + /// + /// Callback method invoked every time a meta message is being sent. + /// + /// Always true. + public virtual bool SendMeta(IClientSession session, IMutableMessage message) + { + return true; + } + + /// + /// Indicates whether the current + /// is equal to another . + /// + public abstract bool Equals(IExtension other); + } + +} diff --git a/src/Genesys.Workspace/CometD.NET/Bayeux/Client/IClientSessionChannel.cs b/src/Genesys.Workspace/CometD.NET/Bayeux/Client/IClientSessionChannel.cs new file mode 100755 index 0000000..5bcf95d --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Bayeux/Client/IClientSessionChannel.cs @@ -0,0 +1,274 @@ +using System; +using System.Collections.Generic; +using System.Runtime.Remoting.Messaging; + +namespace CometD.Bayeux.Client +{ + /// + ///

A client side channel representation.

+ ///

An is scoped to a particular + /// that is obtained by a call to .

+ ///
+ /// + ///

Typical usage examples are:

+ ///
+	///     clientSession.GetChannel("/foo/bar").Subscribe(mySubscriptionListener);
+	///     clientSession.GetChannel("/foo/bar").Publish("Hello");
+	///     clientSession.GetChannel("/meta/*").AddListener(myMetaChannelListener);
+	/// 
+ ///
+ public interface IClientSessionChannel : IChannel + { + /// + ///

Adds a listener to this channel.

+ ///

If the listener is a , it will be invoked + /// if a message arrives to this channel.

+ ///

Adding a listener never involves communication with the server, + /// differently from .

+ ///

Listeners are best suited to receive messages from meta channels.

+ ///
+ /// The listener to add. + /// + void AddListener(IClientSessionChannelListener listener); + + /// + ///

Removes the given from this channel.

+ ///

Removing a listener never involves communication with the server, + /// differently from .

+ ///
+ /// The listener to remove (null to remove all). + /// + void RemoveListener(IClientSessionChannelListener listener); + + /// + /// Returns an immutable snapshot of the listeners. + /// + /// + IList Listeners { get; } + + /// + /// The client session associated with this channel. + /// + IClientSession Session { get; } + + /// + ///

Publishes the given onto this channel.

+ ///

The published must not be null and can be any object that + /// can be natively converted to JSON (numbers, strings, arrays, lists, maps), + /// or objects for which a JSON converter has been registered with the + /// infrastructure responsible of the JSON conversion.

+ ///
+ /// The data to publish. + /// + void Publish(object data); + + /// + /// Publishes the given to this channel, + /// optionally specifying the to set on the publish message. + /// + /// The data to publish. + /// The message id to set on the message, + /// or null to let the implementation choose the message id. + /// + void Publish(object data, string messageId); + + /// + ///

Subscribes the given to receive messages sent to this channel.

+ ///

Subscription involves communication with the server only for the first listener + /// subscribed to this channel. Listeners registered after the first will not cause a message + /// being sent to the server.

+ ///
+ /// The listener to register and invoke when a message arrives on this channel. + /// + /// + void Subscribe(IMessageListener listener); + + /// + ///

Unsubscribes the given from receiving messages sent to this channel.

+ ///

Unsubscription involves communication with the server only for the last listener + /// unsubscribed from this channel.

+ ///
+ /// The listener to unsubscribe. + /// + /// + void Unsubscribe(IMessageListener listener); + + /// + /// Unsubscribes all subscribers registered on this channel. + /// + /// + void Unsubscribe(); + + /// + /// Return an immutable snapshot of the subscribers. + /// + /// + IList Subscribers { get; } + + /// + /// Notifies the received message to all existing listeners. + /// + void NotifyMessageListeners(IMessage message); + + /* + /// + ///

Releases this channel from its .

+ ///

If the release is successful, subsequent invocations of + /// will return a new, different, instance of a .

+ ///

The release of a is successful only if no listeners and no + /// subscribers are present at the moment of the release.

+ ///
+ /// True if the release was successful, false otherwise. + /// + bool Release(); + + /// + /// Returns whether this channel has been released. + /// + /// + bool IsReleased { get; } + */ + } + + /// + ///

Represents a listener on a .

+ ///

Sub-interfaces specify the exact semantic of the listener.

+ ///
+ public interface IClientSessionChannelListener : IBayeuxListener, IEquatable + { + } + + /// + /// A listener for messages on a . + /// + public interface IMessageListener : IClientSessionChannelListener, IEquatable + { + /// + /// Callback invoked when a message is received on the given . + /// + /// The channel that received the message. + /// The message received. + void OnMessage(IClientSessionChannel channel, IMessage message); + } + + /// + /// This is the implementation of a listener for messages on a + /// via an callback delegation. + /// + [Serializable] + public sealed class CallbackMessageListener : IMessageListener, IEquatable> + { + private readonly Action _callback; + private readonly T _stateObject; + + /// + /// Initializes a new instance of the class. + /// + public CallbackMessageListener( + Action callback, T state) + { + if (null == callback) + throw new ArgumentNullException("callback"); + + _callback = callback; + _stateObject = state; + } + + #region IMessageListener Members + + /// + /// Callback invoked when a message is received on the given . + /// + public void OnMessage(IClientSessionChannel channel, IMessage message) + { + // Specify what method to call when callbackAction completes + _callback.BeginInvoke(channel, message, _stateObject, ExecAsyncCallback, null); + } + + /// + /// All calls to BeginInvoke must be matched with calls to EndInvoke according to the MSDN documentation. + /// + private static void ExecAsyncCallback(IAsyncResult asyncResult) + { + // Retrieve the delegate + AsyncResult result = asyncResult as AsyncResult; + if (null != result) + { + Action caller + = result.AsyncDelegate as Action; + if (null != caller) + { + // Call EndInvoke to retrieve the results + caller.EndInvoke(asyncResult); + // DEBUG + //System.Diagnostics.Debug.Print("Done calling: {0}#{1}", caller, caller.GetHashCode()); + } + } + } + + #endregion + + #region IEquatable Members + + /// + /// Returns the hash code for this instance. + /// + public override int GetHashCode() + { + return _callback.GetHashCode(); + } + + /// + /// Used to debug. + /// + public override string ToString() + { + return _callback.ToString() + "#" + _callback.GetHashCode(); + } + + /// + /// Determines whether this callback listener + /// and the specified are equal. + /// + public override bool Equals(object obj) + { + CallbackMessageListener other = obj as CallbackMessageListener; + if (other != null) + return this.Equals(other); + + return base.Equals(obj); + } + + /// + /// Determines whether this callback listener + /// and the specified are equal. + /// + public bool Equals(IClientSessionChannelListener other) + { + return this.Equals(other as CallbackMessageListener); + } + + /// + /// Determines whether this callback listener + /// and the specified are equal. + /// + public bool Equals(IMessageListener other) + { + return this.Equals(other as CallbackMessageListener); + } + + /// + /// Determines whether this callback listener + /// is equal to another object. + /// + public bool Equals(CallbackMessageListener other) + { + // TODO: Object.ReferenceEquals() + return (other != null && _callback.Equals(other._callback) + && ((_stateObject == null && other._stateObject == null) + || (_stateObject != null && other._stateObject != null && _stateObject.Equals(other._stateObject)))); + } + + #endregion + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Bayeux/IBayeux.cs b/src/Genesys.Workspace/CometD.NET/Bayeux/IBayeux.cs new file mode 100755 index 0000000..80d9113 --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Bayeux/IBayeux.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; + +namespace CometD.Bayeux +{ + /// + ///

This interface is the common API for both client-side and + /// server-side configuration and usage of the Bayeux object.

+ ///

The object handles configuration options and a set of + /// transports that is negotiated with the server.

+ ///
+ /// + public interface IBayeux + { + /// + /// The set of known transport names of this object. + /// + /// + ICollection KnownTransportNames { get; } + + /// + /// The transport with the given name or null if no such transport exist. + /// + /// The transport name. + ITransport GetTransport(string transport); + + /// + /// The ordered list of transport names that will be used in the + /// negotiation of transports with the other peer. + /// + /// + ICollection AllowedTransports { get; } + + /// + /// Gets the configuration option with the given . + /// + /// The configuration option name. + /// + /// + object GetOption(string qualifiedName); + + /// + /// Sets the specified configuration option with the given . + /// + /// The configuration option name. + /// The configuration option value. + /// + void SetOption(string qualifiedName, object value); + + /// + /// The set of configuration options. + /// + /// + ICollection OptionNames { get; } + } + + /// + ///

The common base interface for Bayeux listeners.

+ ///

Specific sub-interfaces define what kind of events listeners will be notified.

+ ///
+ public interface IBayeuxListener + { + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Bayeux/IChannel.cs b/src/Genesys.Workspace/CometD.NET/Bayeux/IChannel.cs new file mode 100755 index 0000000..bef8058 --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Bayeux/IChannel.cs @@ -0,0 +1,187 @@ +using System; +using System.Collections.Generic; + +namespace CometD.Bayeux +{ + /// + /// Bayeux channel constants. + /// + public static class Channel + { + /// + /// Constant representing the meta prefix. + /// + public const string Meta = "/meta"; + + /// + /// Constant representing the handshake meta channel. + /// + public const string MetaHandshake = Meta + "/handshake"; + + /// + /// Constant representing the connect meta channel. + /// + public const string MetaConnect = Meta + "/connect"; + + /// + /// Constant representing the subscribe meta channel. + /// + public const string MetaSubscribe = Meta + "/subscribe"; + + /// + /// Constant representing the unsubscribe meta channel. + /// + public const string MetaUnsubscribe = Meta + "/unsubscribe"; + + /// + /// Constant representing the disconnect meta channel. + /// + public const string MetaDisconnect = Meta + "/disconnect"; + + + /// + /// Constant representing the "service" prefix. + /// + public const string Service = "/service"; + + /// + /// Constant representing the "topic" prefix. + /// + public const string Topic = "/topic"; + + /// + /// Helper method to test if the string form of a + /// represents a meta . + /// + /// The channel id to test. + /// Whether the given channel id is a meta channel id. + public static bool IsMeta(string channelId) + { + return channelId != null + && channelId.StartsWith(Meta + "/", StringComparison.OrdinalIgnoreCase); + } + + /// + /// Helper method to test if the string form of a + /// represents a service . + /// + /// The channel id to test. + /// Whether the given channel id is a service channel id. + public static bool IsService(string channelId) + { + return channelId != null + && channelId.StartsWith(Service + "/", StringComparison.OrdinalIgnoreCase); + } + + /// + /// Helper method to test if the string form of a + /// represents a broadcast . + /// + /// The channel id to test. + /// Whether the given channel id is a broadcast channel id. + public static bool IsBroadcast(string channelId) + { + return (channelId != null && !IsMeta(channelId) && !IsService(channelId)); + } + } + + /// + ///

A Bayeux channel is the primary message routing mechanism within Bayeux: + /// both Bayeux clients and Bayeux server use channels to group listeners that + /// are interested in receiving messages with that channel.

+ /// + ///

This interface is the common root for both the client side + /// representation of a channel and the server side representation of a channel.

+ /// + ///

Channels are identified with strings that look like paths (e.g. "/foo/bar") + /// called "channel id".
+ /// Meta channels have channel ids starting with "/meta/" and are reserved for the + /// operation of they Bayeux protocol.
+ /// Service channels have channel ids starting with "/service/" and are channels + /// for which publish is disabled, so that only server side listeners will receive + /// the messages.

+ /// + ///

A channel id may also be specified with wildcards.
+ /// For example "/meta/*" refers to all top level meta channels + /// like "/meta/subscribe" or "/meta/handshake".
+ /// The channel "/foo/**" is deeply wild and refers to all channels like "/foo/bar", + /// "/foo/bar/bob" and "/foo/bar/wibble/bip".
+ /// Wildcards can only be specified as last segment of a channel; therefore channel + /// "/foo/*/bar/**" is an invalid channel.

+ ///
+ public interface IChannel + { + /// + /// The channel id as a string. + /// + string Id { get; } + + /// + /// The channel ID as a . + /// + ChannelId ChannelId { get; } + + /// + /// Tells whether the channel is a meta channel, that is if its + /// id starts with "/meta/". + /// + /// True if the channel is a meta channel. + bool IsMeta { get; } + + /// + /// Tells whether the channel is a service channel, that is if its + /// id starts with "/service/". + /// + /// True if the channel is a service channel. + bool IsService { get; } + + /// + /// A broadcasting channel is a channel that is neither a + /// meta channel nor a service channel. + /// + /// Whether the channel is a broadcasting channel. + bool IsBroadcast { get; } + + /// + /// Tells whether a channel contains the wild character '*', for example + /// "/foo/*" or if it is . + /// + /// True if the channel contains the '*' or '**' characters. + bool IsWild { get; } + + /// + /// Tells whether a channel contains the deep wild characters '**', for example + /// "/foo/**". + /// + /// True if the channel contains the '**' characters. + bool IsDeepWild { get; } + + /// + ///

Sets a named channel attribute value.

+ ///

Channel attributes are convenience data that allows arbitrary + /// application data to be associated with a channel.

+ ///
+ /// The attribute name. + /// The attribute value. + void SetAttribute(string name, object value); + + /// + /// Retrieves the value of named channel attribute. + /// + /// The name of the attribute. + /// The attribute value or null if the attribute is not present. + object GetAttribute(string name); + + /// + /// The list of channel attribute names. + /// + ICollection AttributeNames { get; } + + /// + /// Removes a named channel attribute. + /// + /// The name of the attribute. + /// The value of the attribute. + object RemoveAttribute(string name); + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Bayeux/IMessage.cs b/src/Genesys.Workspace/CometD.NET/Bayeux/IMessage.cs new file mode 100755 index 0000000..68aba8d --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Bayeux/IMessage.cs @@ -0,0 +1,265 @@ +using System; +using System.Collections.Generic; + +namespace CometD.Bayeux +{ + /// + /// Bayeux message fields and enumeration values. + /// + public static class Message + { + /// + /// Constant representing the message client-id field. + /// + public const string ClientIdField = "clientId"; + + /// + /// Constant representing the message data field. + /// + public const string DataField = "data"; + + /// + /// Constant representing the message channel field. + /// + public const string ChannelField = "channel"; + + /// + /// Constant representing the message id field. + /// + public const string IdField = "id"; + + /// + /// Constant representing the message error field. + /// + public const string ErrorField = "error"; + + /// + /// Constant representing the message timestamp field. + /// + public const string TimestampField = "timestamp"; + + /// + /// Constant representing the message transport field. + /// + public const string TransportField = "transport"; + + /// + /// Constant representing the message advice field. + /// + public const string AdviceField = "advice"; + + /// + /// Constant representing the message successful field. + /// + public const string SuccessfulField = "successful"; + + /// + /// Constant representing the message subscription field. + /// + public const string SubscriptionField = "subscription"; + + /// + /// Constant representing the message extension field. + /// + public const string ExtensionField = "ext"; + + /// + /// Constant representing the message connection-type field. + /// + public const string ConnectionTypeField = "connectionType"; + + /// + /// Constant representing the message version field. + /// + public const string VersionField = "version"; + + /// + /// Constant representing the message minimum-version field. + /// + public const string MinVersionField = "minimumVersion"; + + /// + /// Constant representing the message supported-connection-types field. + /// + public const string SupportedConnectionTypesField = "supportedConnectionTypes"; + + /// + /// Constant representing the message reconnect field. + /// + public const string ReconnectField = "reconnect"; + + /// + /// Constant representing the message interval field. + /// + public const string IntervalField = "interval"; + + + /// + /// Constant representing the message timeout field. + /// + public const string TimeoutField = "timeout"; + + /// + /// Constant representing the message "message" field that contain sent failed messages. + /// + public const string MessageField = "message"; + + /// + /// Constant representing the message "exception" field. + /// + public const string ExceptionField = "exception"; + + + /// + /// Constant representing the message reconnect retry value. + /// + public const string ReconnectRetryValue = "retry"; + + /// + /// Constant representing the message reconnect handshake value. + /// + public const string ReconnectHandshakeValue = "handshake"; + + /// + /// Constant representing the message reconnect none value. + /// + public const string ReconnectNoneValue = "none"; + } + + /// + ///

The Bayeux protocol exchange information by means of messages.

+ ///

This interface represents the API of a Bayeux message, and consists + /// mainly of convenience methods to access the known fields of the message dictionary.

+ ///

This interface comes in both an immutable and mutable versions.
+ /// Mutability may be deeply enforced by an implementation, so that it is not correct + /// to cast a passed Message, to a Message.Mutable, even if the implementation allows this.

+ ///
+ public interface IMessage : IDictionary + { + /// + /// Convenience method to retrieve the . + /// + /// The advice of the message. + IDictionary Advice { get; } + + /// + /// Convenience method to retrieve the . + /// + /// Bayeux message always have a non null channel. + /// The channel of the message. + string Channel { get; } + + /// + /// Convenience method to retrieve the . + /// + /// Bayeux message always have a non null channel. + /// The channel of the message. + ChannelId ChannelId { get; } + + /// + /// Convenience method to retrieve the . + /// + /// The client id of the message. + string ClientId { get; } + + /// + /// Convenience method to retrieve the . + /// + /// The data of the message. + /// + object Data { get; } + + /// + /// A messages that has a meta channel is dubbed a "meta message". + /// + /// Whether the channel's message is a meta channel. + bool IsMeta { get; } + + /// + /// Publish message replies contain the "successful" field. + /// + /// Whether this message is a publish reply (as opposed to a published message). + bool IsPublishReply { get; } + + /// + /// Convenience method to retrieve the . + /// + /// Whether the message is successful. + bool IsSuccessful { get; } + + /// + /// The data of the message as a Dictionary. + /// + /// + IDictionary DataAsDictionary { get; } + + /// + /// Convenience method to retrieve the . + /// + /// The extension of the message. + IDictionary Extension { get; } + + /// + /// Convenience method to retrieve the . + /// + /// The id of the message. + string Id { get; } + } + + /// + /// The mutable version of a . + /// + public interface IMutableMessage : IMessage + { + #region Overwritten Properties + + /// + /// The channel of this message. + /// + new string Channel { get; set; } + + /// + /// The client id of this message. + /// + new string ClientId { get; set; } + + /// + /// The data of this message. + /// + new object Data { get; set; } + + /// + /// The id of this message. + /// + new string Id { get; set; } + + /// + /// The successfulness of this message. + /// + new bool IsSuccessful { get; set; } + + #endregion + + /// + /// Convenience method to retrieve the and create it if it does not exist. + /// + /// Whether to create the advice field if it does not exist. + /// The advice of the message. + IDictionary GetAdvice(bool create); + + /// + /// Convenience method to retrieve the and create it if it does not exist. + /// + /// Whether to create the data field if it does not exist. + /// The data of the message. + IDictionary GetDataAsDictionary(bool create); + + /// + /// Convenience method to retrieve the and create it if it does not exist. + /// + /// Whether to create the extension field if it does not exist. + /// The extension of the message. + IDictionary GetExtension(bool create); + } + +} diff --git a/src/Genesys.Workspace/CometD.NET/Bayeux/ISession.cs b/src/Genesys.Workspace/CometD.NET/Bayeux/ISession.cs new file mode 100755 index 0000000..f3ec219 --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Bayeux/ISession.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; + +namespace CometD.Bayeux +{ + /// + ///

A Bayeux session represents a connection between a Bayeux client and a Bayeux server.

+ ///

This interface is the common base interface for both the server side and the client side + /// representations of a session:

+ ///
    + ///
  • if the remote client is not a Java client, then only a Server.IServerSession + /// instance will exist on the server and represents the remote client.
  • + ///
  • if the remote client is a Java client, then a + /// instance will exist on the client and a Server.IServerSession + /// instance will exist on the server, linked by the same client id.
  • + ///
  • if the client is a Java client, but it is located in the server, then the + /// instance will be an instance + /// of Server.ILocalSession and will be associated + /// with a Server.IServerSession instance.
  • + ///
+ ///
+ public interface ISession + { + /// + ///

The client id of the session.

+ ///

This would more correctly be called a "sessionId", but for + /// backwards compatibility with the Bayeux protocol, + /// it is a field called "clientId" that identifies a session.

+ ///
+ /// The id of this session. + string Id { get; } + + /// + /// A connected session is a session where the link between the client and the server + /// has been established. + /// + /// Whether the session is connected. + /// + bool IsConnected { get; } + + /// + /// A handshook session is a session where the handshake has successfully completed. + /// + /// Whether the session is handshook. + bool IsHandshook { get; } + + /// + /// Disconnects this session, ending the link between the client and the server peers. + /// + /// + void Disconnect(); + + /// + ///

Sets a named session attribute value.

+ ///

Session attributes are convenience data that allows arbitrary + /// application data to be associated with a session.

+ ///
+ /// The attribute name. + /// The attribute value. + void SetAttribute(string name, object value); + + /// + /// Retrieves the value of named session attribute. + /// + /// The name of the attribute. + /// The attribute value or null if the attribute is not present. + object GetAttribute(string name); + + /// + /// Returns the list of session attribute names. + /// + ICollection AttributeNames { get; } + + /// + /// Removes a named session attribute. + /// + /// The name of the attribute. + /// The value of the attribute. + object RemoveAttribute(string name); + + /// + /// Executes the given command in a batch so that any Bayeux message sent + /// by the command (via the Bayeux API) is queued up until the end of the + /// command and then all messages are sent at once. + /// + /// The Runnable to run as a batch. + void Batch(Action batch); + + /// + ///

Starts a batch, to be ended with .

+ ///

The method should be preferred since it automatically + /// starts and ends a batch without relying on a try/finally block.

+ ///

This method is to be used in the cases where the use of + /// is not possible or would make the code more complex.

+ ///
+ /// + /// + void StartBatch(); + + /// + /// Ends a batch started with . + /// + /// True if the batch ended and there were messages to send. + /// + bool EndBatch(); + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Bayeux/ITransport.cs b/src/Genesys.Workspace/CometD.NET/Bayeux/ITransport.cs new file mode 100755 index 0000000..a865865 --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Bayeux/ITransport.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; + +namespace CometD.Bayeux +{ + /// + ///

A transport abstract the details of the protocol used to send + /// Bayeux messages over the network.

+ ///

Transports have well known names and both a Bayeux client + /// and a Bayeux server can negotiate the transport they want to use by + /// exchanging the list of supported transport names.

+ ///

Transports can be configured using options. The transport + /// implementation provides a set of option names that + /// it uses to configure itself and an option prefix + /// that allows specific tuning of the configuration.
+ /// Option prefixes may be composed of segments separated by the "." character.

+ ///

For example, imagine to configure the transports for normal long polling, + /// for JSONP long polling and for WebSocket. All provide a common option name + /// called "timeout" and the JSONP long polling transport provides also a specific + /// option name called "callback".
+ /// The normal long polling transport has prefix "long-polling.json", + /// the JSONP long polling transport has prefix "long-polling.jsonp" and the + /// WebSocket long polling transport has prefix "ws". The first two prefixes + /// have 2 segments.

+ ///

The configurator will asks the transports the set of option names, obtaining + /// ["timeout", "callback"]; then will ask each transport its prefix, obtaining + /// ["long-polling.json", "long-polling.jsonp"].
+ /// The configurator can now look in the configuration (for example a properties + /// file or servlet init parameters) for entries that combine the option names and + /// option prefix segments, such as:

+ ///
    + ///
  • "timeout" => specifies the timeout for all transports
  • + ///
  • "long-polling.timeout" => specifies the timeout for both normal long polling + /// transport and JSONP long polling transport, but not for the WebSocket transport
  • + ///
  • "long-polling.jsonp.timeout" => specifies the timeout for JSONP long polling + /// transport overriding more generic entries
  • + ///
  • "ws.timeout" => specifies the timeout for WebSocket transport overriding more + /// generic entries
  • + ///
  • "long-polling.jsonp.callback" => specifies the "callback" parameter for the + /// JSONP long polling transport.
  • + ///
+ ///
+ public interface ITransport + { + /// + /// The well known name of this transport, used in transport negotiations. + /// + /// + string Name { get; } + + /// + /// Returns the configuration option with the given . + /// + /// The configuration option name. + /// + object GetOption(string qualifiedName); + + /// + /// Sets the specified configuration option with the given . + /// + /// The configuration option name. + /// The configuration option value. + /// + void SetOption(string qualifiedName, object value); + + /// + /// The set of configuration options. + /// + /// + ICollection OptionNames { get; } + + /// + /// Specifies an option prefix made of string segments separated by the "." + /// character, used to override more generic configuration entries. + /// + /// The option prefix for this transport. + string OptionPrefix { get; } + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Client/BayeuxClient.cs b/src/Genesys.Workspace/CometD.NET/Client/BayeuxClient.cs new file mode 100755 index 0000000..00c7960 --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Client/BayeuxClient.cs @@ -0,0 +1,1419 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Net; +using System.Text; +using System.Threading; + +using CometD.Bayeux; +using CometD.Bayeux.Client; +using CometD.Common; +using CometD.Client.Transport; + +namespace CometD.Client +{ + /// + ///

This class is the implementation of a client for the Bayeux protocol.

+ ///

A can receive/publish messages from/to a Bayeux server, + /// and it is the counterpart in Java of the JavaScript library used in browsers + /// (and as such it is ideal for Swing applications, load testing tools, etc.).

+ ///

A handshakes with a Bayeux server + /// and then subscribes to channels in order + /// to receive messages, and may also publish messages to the Bayeux server.

+ ///

relies on pluggable transports for communication with the Bayeux + /// server, and the most common transport is , + /// which uses HTTP to transport Bayeux messages and it is based on + /// Jetty's HTTP client.

+ ///

When the communication with the server is finished, + /// the can be disconnected from the Bayeux server.

+ ///
+ /// + ///

Typical usage:

+ ///
+	/// // Handshake
+	/// string url = "http://localhost:8080/cometd";
+	/// BayeuxClient client = new BayeuxClient(url, new LongPollingTransport(null, null));
+	/// client.Handshake();
+	/// client.WaitFor(1000, BayeuxClientStates.Connected);
+	///
+	/// // Subscription to channels
+	/// IClientSessionChannel channel = client.GetChannel("/foo");
+	/// channel.Subscribe(new IMessageListener() {
+	///     public void OnMessage(IClientSessionChannel channel, IMessage message) {
+	///         // Handle the message
+	///     }
+	/// });
+	///
+	/// // Publishing to channels
+	/// IDictionary<string, object> data = new Dictionary<string, object>();
+	/// data["bar"] = "baz";
+	/// channel.Publish(data);
+	///
+	/// // Disconnecting
+	/// client.Disconnect();
+	/// client.WaitFor(1000, BayeuxClientStates.Disconnected);
+	/// 
+ ///
+ public partial class BayeuxClient : AbstractClientSession, IBayeux, IDisposable + { + #region Constants + + /// + /// The Bayeux client option "backOffIncrement". + /// + public const string BackOffIncrementOption = "backOffIncrement"; + + /// + /// The Bayeux client option "maxBackOff". + /// + public const string MaxBackOffOption = "maxBackOff"; + + /// + /// Constant representing the Bayeux protocol version "1.0". + /// + public const string BayeuxVersion = "1.0"; + + #endregion + + /// Used to debug. + private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(typeof(BayeuxClient)); + + private readonly TransportRegistry _transportRegistry = new TransportRegistry(); + private readonly IDictionary _options + = new Dictionary(StringComparer.OrdinalIgnoreCase); + + private volatile BayeuxClientState _bayeuxClientState;// readonly AtomicReference + private readonly IList _messagesQueue = new List(32); + private readonly CookieCollection _cookieProvider = new CookieCollection(); + + #region Transport Listeners + + private readonly ITransportListener _handshakeListener; + private readonly ITransportListener _connectListener; + private readonly ITransportListener _disconnectListener; + private readonly ITransportListener _publishListener; + + /// + /// Refers to an instance of the class . + /// + public virtual ITransportListener DisconnectListener + { + get { return _disconnectListener; } + } + + #endregion + + private /*volatile*/ long _backOffIncrement; + private /*volatile*/ long _maxBackOff; + + /// + ///

Creates a that will connect to the Bayeux server + /// at the given URL and with the given transport(s).

+ ///

This constructor allocates a new scheduler; it is recommended that + /// when creating a large number of s a shared scheduler is used.

+ ///
+ /// The Bayeux server URL to connect to. + /// The default (mandatory) and additional optional transports to use. + public BayeuxClient(string url, params ClientTransport[] transports) + { + if (transports == null || transports.Length == 0 || transports[0] == null) + throw new ArgumentNullException("transports"); + + foreach (ClientTransport t in transports) + _transportRegistry.Add(t); + + HttpClientTransport clientTransport; + foreach (string transportName in _transportRegistry.KnownTransports) + { + clientTransport = _transportRegistry.GetTransport(transportName) as HttpClientTransport; + if (clientTransport != null) + { + if (!String.IsNullOrEmpty(url)) + clientTransport.Url = url; + clientTransport.CookieProvider = _cookieProvider; + } + } + + _handshakeListener = new HandshakeTransportListener(this); + _connectListener = new ConnectTransportListener(this); + _disconnectListener = new DisconnectTransportListener(this); + _publishListener = new PublishTransportListener(this); + +#pragma warning disable 0420 + Interlocked.Exchange(ref _bayeuxClientState, new DisconnectedState(this, transports[0])); +#pragma warning restore 0420 + } + + /// + /// Returns the period of time that increments the pause to wait before trying to reconnect + /// after each failed attempt to connect to the Bayeux server. + /// + /// + public virtual long BackOffIncrement + { + get { return Interlocked.Read(ref _backOffIncrement); } + } + + /// + /// Returns the maximum pause to wait before trying to reconnect after each failed attempt + /// to connect to the Bayeux server. + /// + /// + public virtual long MaxBackOff + { + get { return Interlocked.Read(ref _maxBackOff); } + } + + /// + /// Returns the options that configure with . + /// + public virtual IDictionary Options + { + get { return _options; }// TODO: UnmodifiableMap + } + + #region Cookies Management + + /// + /// Retrieves the cookie with the given name, if available. + /// + /// Note that currently only HTTP transports support cookies. + /// The cookie name. + /// The cookie value. + /// + public virtual string GetCookie(string name) + { + if (String.IsNullOrEmpty(name)) + throw new ArgumentNullException("name"); + + Cookie cookie = _cookieProvider[name]; + if (cookie != null) + return cookie.Value; + + return null; + } + + /// + /// Sets a cookie that never expires. + /// + /// The cookie name. + /// The cookie value. + /// + public virtual void SetCookie(string name, string value) + { + this.SetCookie(name, value, -1); + } + + /// + /// Sets a cookie with the given max age in seconds. + /// + /// The cookie name. + /// The cookie value. + /// The max age of the cookie, in seconds, before expiration. + public virtual void SetCookie(string name, string value, int maxAge) + { + SetCookie(name, value, null, null, maxAge); + } + + /// + /// Sets a cookie with the given max age in seconds. + /// + /// The cookie name. + /// The cookie value. + /// The cookie path. + /// The cookie domain. + /// The max age of the cookie, in seconds, before expiration. + public virtual void SetCookie(string name, string value, string path, string domain, int maxAge) + { + Cookie cookie = new Cookie(name, value, path, domain); + if (maxAge >= 0) + cookie.Expires = DateTime.Now.AddSeconds(maxAge); + + lock (_cookieProvider) _cookieProvider.Add(cookie); + } + #endregion + + #region IBayeux Members + + /// + /// Returns unmodifiable collection of known transports. + /// + public virtual ICollection KnownTransportNames + { + get { return _transportRegistry.KnownTransports; } + } + + /// + /// Returns a registered within this . + /// + /// The transport name. + /// Return null if the did not registered. + public virtual ITransport GetTransport(string transport) + { + if (String.IsNullOrEmpty(transport)) + throw new ArgumentNullException("transport"); + + return _transportRegistry.GetTransport(transport); + } + + /// + /// Returns unmodifiable list of allowed transports. + /// + public virtual ICollection AllowedTransports + { + get { return _transportRegistry.AllowedTransports; } + } + + /// + /// Gets the configuration option with the given . + /// + /// The configuration option name. + /// + /// + public virtual object GetOption(string qualifiedName) + { + if (String.IsNullOrEmpty(qualifiedName)) + throw new ArgumentNullException("qualifiedName"); + + object val; + return _options.TryGetValue(qualifiedName, out val) ? val : null; + } + + /// + /// Sets the specified configuration option with the given . + /// + /// The configuration option name. + /// The configuration option value. + /// + public virtual void SetOption(string qualifiedName, object value) + { + if (String.IsNullOrEmpty(qualifiedName)) + throw new ArgumentNullException("qualifiedName"); + + lock (_options) _options[qualifiedName] = value; + } + + /// + /// The set of configuration options. + /// + /// + public virtual ICollection OptionNames + { + get { return _options.Keys; } + } + + #endregion + + /// + /// Returns a list of negotiated allowed transports. + /// + public virtual IList NegotiateAllowedTransports() + { + return _transportRegistry.Negotiate(this.AllowedTransports, BayeuxVersion); + } + + #region AbstractClientSession Implementation Methods + + /// + /// Equivalent to (null). + /// + public override void Handshake() + { + this.Handshake(null); + } + + /// + /// Initiates the Bayeux protocol handshake with the server(s). + /// + /// Additional fields to add to the handshake message. + public override void Handshake(IDictionary handshakeFields) + { + this.Initialize(); + + // Pick the first transport for the handshake, it will renegotiate if not right + IList clientTransports = this.NegotiateAllowedTransports(); + ClientTransport initialTransport = (null != clientTransports && clientTransports.Count > 0) ? clientTransports[0] : null; + if (initialTransport != null) + { + initialTransport.Init(); + // DEBUG + if (logger.IsDebugEnabled) + { + logger.DebugFormat("Using initial transport '{0}' from {1}", + initialTransport.Name, ObjectConverter.Serialize(this.AllowedTransports)); + } + + this.UpdateBayeuxClientState(oldState => + { + return new HandshakingState(this, handshakeFields, initialTransport); + }); + } + } + + /// + /// Initiates BackOff properties for this client session. + /// + protected virtual void Initialize() + { + long bi = ObjectConverter.ToPrimitive(this.GetOption(BackOffIncrementOption), 0); + Interlocked.Exchange(ref _backOffIncrement, (bi > 0) ? bi : 1000L); + + long mb = ObjectConverter.ToPrimitive(this.GetOption(MaxBackOffOption), 0); + Interlocked.Exchange(ref _maxBackOff, (mb > 0) ? mb : 30000L); + } + + /// + /// Creates a new object from the specified channel id string. + /// + protected override ChannelId NewChannelId(string channelId) + { + if (String.IsNullOrEmpty(channelId)) + throw new ArgumentNullException("channelId"); + + // Save some parsing by checking if there is already one + IClientSessionChannel channel = this.GetChannel(channelId, false); + return (channel == null) ? ChannelId.Create(channelId) : channel.ChannelId; + } + + /// + /// Creates a new object from the specified channel id. + /// + protected override AbstractSessionChannel NewChannel(ChannelId channelId) + { + if (null == channelId) + throw new ArgumentNullException("channelId"); + + return new BayeuxClientChannel(this, channelId); + } + + /// + /// The client id of the session. + /// + public override string Id + { + get + { + BayeuxClientState state = _bayeuxClientState; + return state.ClientId; + } + } + + /// + /// A connected session is a session where the link between the client and the server + /// has been established. + /// + public override bool IsConnected + { + get + { + BayeuxClientState state = _bayeuxClientState; + return state.IsConnected; + } + } + + /// + /// A handshook session is a session where the handshake has successfully completed. + /// + public override bool IsHandshook + { + get + { + BayeuxClientState state = _bayeuxClientState; + return state.IsHandshook; + } + } + + /// + /// Disconnects this session, ending the link between the client and the server peers. + /// + /// . + public override void Disconnect() + { + this.UpdateBayeuxClientState(oldState => + { + if (oldState.IsConnecting || oldState.IsConnected) + return new DisconnectingState(this, oldState.Transport, oldState.ClientId); + else if (oldState.IsDisconnecting) + return new DisconnectingState(this, oldState.Transport, oldState.ClientId); + + return new DisconnectedState(this, oldState.Transport); + }); + } + + /// + /// Sends all existing messages at the end of the batch. + /// + public override void SendBatch() + { + if (this.CanSend) + { + IMutableMessage[] messages = this.TakeMessages(); + if (messages != null && messages.Length > 0) + this.SendMessages(messages); + } + } + + /// + /// Sends the specified messages via the current . + /// + protected virtual bool SendMessages(params IMutableMessage[] messages) + { + BayeuxClientState currState = _bayeuxClientState; + if (currState.IsConnecting || currState.IsConnected) + { + currState.Send(_publishListener, messages); + return true; + } + + this.FailMessages(null, messages); + return false; + } + + /// + /// Multiple threads can call this method concurrently (for example + /// a batched Publish() is executed exactly when a message arrives + /// and a listener also performs a batched Publish() in response to + /// the message). + /// The queue must be drained atomically, otherwise we risk that the + /// same message is drained twice. + /// + public virtual IMutableMessage[] TakeMessages() + { + IMutableMessage[] messages; + lock (_messagesQueue) + { + messages = new IMutableMessage[_messagesQueue.Count]; + _messagesQueue.CopyTo(messages, 0); + + _messagesQueue.Clear(); + } + + return messages; + } + + #endregion + + /// + /// Returns whether this is disconnecting or disconnected. + /// + public virtual bool IsDisconnected + { + get + { + BayeuxClientState state = _bayeuxClientState; + return (state.IsDisconnecting || state.IsDisconnected); + } + } + + /// + /// Returns the current state of this . + /// + protected virtual BayeuxClientStates CurrentState + { + get + { + BayeuxClientState state = _bayeuxClientState; + return state.Type; + } + } + + /// + /// Returns the of the current session state. + /// + public virtual ClientTransport CurrentTransport + { + get + { + BayeuxClientState currState = _bayeuxClientState; + return (currState == null) ? null : currState.Transport; + } + } + + #region Handshake Overload Methods + + /// + ///

Performs the handshake and waits at most the given time for the handshake to complete.

+ ///

When this method returns, the handshake may have failed (for example because the Bayeux + /// server denied it), so it is important to check the return value to know whether the handshake + /// completed or not.

+ ///
+ /// The time to wait for the handshake to complete. + /// + public virtual bool Handshake(int waitMilliseconds) + { + return this.Handshake(null, waitMilliseconds); + } + + /// + ///

Performs the handshake with the given template and waits at most the given time + /// for the handshake to complete.

+ ///

When this method returns, the handshake may have failed (for example because the Bayeux + /// server denied it), so it is important to check the return value to know whether the handshake + /// completed or not.

+ ///
+ /// The template object to be merged with the handshake message. + /// The time to wait for the handshake to complete. + /// + public virtual bool Handshake(IDictionary template, int waitMilliseconds) + { + this.Handshake(template); + + return this.WaitFor(waitMilliseconds, + BayeuxClientStates.Connecting + | BayeuxClientStates.Connected + | BayeuxClientStates.Disconnected); + } + + #endregion + + private /*volatile*/ int _stateUpdaters = 0; + private readonly AutoResetEvent _stateUpdated = new AutoResetEvent(false); + //private static readonly object _syncRoot = new object(); + + /// + /// Waits for this to reach the given state(s) within the given time. + /// + /// The time to wait to reach the given state(s). + /// The primary and alternative states to reach. + /// True if one of the state(s) has been reached within the given time, false otherwise. + public virtual bool WaitFor(int waitMilliseconds, BayeuxClientStates states) + { + if (states == BayeuxClientStates.None) + throw new ArgumentNullException("states"); + + DateTime stop = DateTime.Now.AddMilliseconds(waitMilliseconds); + long duration; + BayeuxClientState currState; + + //lock (_syncRoot) + //{ + try + { + while (((currState = _bayeuxClientState).Type & states) == 0 + && (duration = unchecked((long)(stop - DateTime.Now).TotalMilliseconds)) > 0 + && _stateUpdated.WaitOne(unchecked((int)duration), false)) + { + // This check is needed to avoid that we return from WaitFor() too early, + // when the state has been set, but its effects (like notifying listeners) + // are not completed yet (COMETD-212). + // Transient states (like CONNECTING or DISCONNECTING) may "miss" the + // wake up in this way: + // * T1 goes in wait - releases lock + // * T2 finishes update to CONNECTING - notifies lock + // * T3 starts a state update to CONNECTED - releases lock + // * T1 wakes up, takes lock, but sees update in progress, waits - releases lock + // * T3 finishes update to CONNECTED - notifies lock + // * T1 wakes up, takes lock, sees status == CONNECTED - CONNECTING has been "missed" + // To avoid this, we use BayeuxClientStates.Implies() + /*if (_stateUpdaters == 0) + { + currState = _bayeuxClientState; + if ((currState.Type & states) > 0) return true; + }*/ + } + } + catch (ObjectDisposedException) { } + catch (ThreadInterruptedException/*AbandonedMutexException*/) + { + Thread.CurrentThread.Interrupt(); + } + //} + + currState = _bayeuxClientState; + return ((currState.Type & states) > 0); + } + + #region IDisposable Members + + private volatile bool _disposed = false; + + /// + /// Releases the unmanaged resources and disposes of the managed resources used by the . + /// + public void Dispose() + { + this.Dispose(true); + GC.SuppressFinalize(this); + } + + /// + /// Releases the unmanaged resources used by the and optionally disposes of the managed resources. + /// + /// true to release both managed and unmanaged resources; false to releases only unmanaged resources. + protected virtual void Dispose(bool disposing) + { + if (disposing && !_disposed) + { + _disposed = true; + + _stateUpdated.Close(); + } + } + + #endregion + + #region Disconnect Overload Methods + + private static void WaitForNoneReconnection( + IClientSessionChannel channel, IMessage message, ManualResetEvent latch) + { + if (null != message && null != latch) + { + string action = GetAdviceAction(message.Advice, Message.ReconnectNoneValue); + if (Message.ReconnectNoneValue.Equals(action, StringComparison.OrdinalIgnoreCase)) + { + latch.Set();// Signal() + // DEBUG + logger.InfoFormat("None reconnection message was found, signal Latch#{0}", latch.GetHashCode()); + } + } + } + + /// + ///

Performs a and uses the given + /// to wait for the disconnect to complete.

+ ///

When a disconnect is sent to the server, the server also wakes up the long + /// poll that may be outstanding, so that a connect reply message may arrive to + /// the client later than the disconnect reply message.

+ ///

This method waits for the given for the disconnect reply, but also + /// waits the same timeout for the last connect reply; in the worst case the + /// maximum time waited will therefore be twice the given parameter.

+ ///

This method returns true if the disconnect reply message arrived within the + /// given parameter, no matter if the connect reply message arrived or not.

+ ///
+ /// The timeout to wait for the disconnect to complete. + /// True if the disconnect completed within the given timeout. + public virtual bool Disconnect(int timeout) + { + BayeuxClientState currState = _bayeuxClientState; + if (currState.IsDisconnected) return true; + + bool disconnected; + using (ManualResetEvent latch = new ManualResetEvent(false))// TODO: CountdownEvent(1) + { + IMessageListener lastConnectListener + = new CallbackMessageListener(WaitForNoneReconnection, latch); + + IClientSessionChannel ch = this.GetChannel(Channel.MetaConnect); + if (ch != null) ch.AddListener(lastConnectListener); + + this.Disconnect(); + disconnected = this.WaitFor(timeout, + BayeuxClientStates.Disconnected + // TODO: | BayeuxClientStates.Disconnecting + ); + + // There is a possibility that we are in the window where the server + // has returned the long poll and the client has not issued it again, + // so wait for the timeout, but do not complain if the latch does not trigger. + if (ch != null) + { + try + { + latch.WaitOne(timeout, false);// Wait(timeout) + } + catch (ThreadInterruptedException/*AbandonedMutexException*/) + { + Thread.CurrentThread.Interrupt(); + } + finally + { + ch.RemoveListener(lastConnectListener); + } + } + } + + currState = _bayeuxClientState; + if (currState.IsDisconnected && currState.Transport != null) + currState.Transport.Terminate(); + + return disconnected; + } + + /// + ///

Interrupts abruptly the communication with the Bayeux server.

+ ///

This method may be useful to simulate network failures.

+ ///
+ /// + public virtual void Abort() + { + this.UpdateBayeuxClientState(oldState => + { + return (oldState == null) ? null : new AbortedState(this, oldState.Transport); + }); + } + + #endregion + + #region Messages Processing + + /// + /// Sends a new handshaking command to the Bayeux server. + /// + public virtual bool SendHandshake() + { + if (_terminated) return false; + + BayeuxClientState currState = _bayeuxClientState; + if (currState.IsHandshaking) + { + // Generates a new meta handshake message + IMutableMessage message = this.NewMessage(); + + // Adds extra fields into the created message + if (currState.HandshakeFields != null) + { + lock (currState.HandshakeFields) + { + foreach (KeyValuePair field in currState.HandshakeFields) + { + if (!String.IsNullOrEmpty(field.Key)) + message[field.Key] = field.Value; + } + } + } + + message.Channel = Channel.MetaHandshake; + + // Gets the supported connection types + IList transports = this.NegotiateAllowedTransports(); + if (null != transports && transports.Count > 0) + { + IList transportNames = new List(transports.Count); + foreach (ClientTransport t in transports) + transportNames.Add(t.Name); + + message[Message.SupportedConnectionTypesField] = transportNames; + } + + message[Message.VersionField] = BayeuxClient.BayeuxVersion; + //if (String.IsNullOrEmpty(message.Id)) + // message.Id = this.NewMessageId(); + + // DEBUG + if (logger.IsDebugEnabled) + { + logger.DebugFormat(CultureInfo.InvariantCulture, + "Handshaking with transport: {0}, extra fields: {1}", + currState.Transport, ObjectConverter.Serialize(currState.HandshakeFields)); + } + + currState.Send(_handshakeListener, message); + return true; + } + + return false; + } + + /// + /// Sends a new handshaking command to the Bayeux server. + /// + public virtual bool SendConnect() + { + if (_terminated) return false; + + BayeuxClientState currState = _bayeuxClientState; + if (currState.IsHandshook) + { + // Generates a new meta connect message + IMutableMessage message = this.NewMessage(); + + message.Channel = Channel.MetaConnect; + message[Message.ConnectionTypeField] = currState.Transport.Name; + + if (currState.IsConnecting || (currState.Type & BayeuxClientStates.Unconnected) > 0) + { + // First connect after handshake or after failure, add advice + IDictionary advice = message.GetAdvice(true); + advice[Message.TimeoutField] = 0; + } + + // DEBUG + if (logger.IsDebugEnabled) + logger.DebugFormat("Connecting, transport: {0}", currState.Transport); + + currState.Send(_connectListener, message); + return true; + } + + return false; + } + + /// + /// Processes a handshaking message have just arrived. + /// + public virtual void ProcessHandshake(IMutableMessage handshake) + { + if (null == handshake) + throw new ArgumentNullException("handshake"); + + // DEBUG + if (logger.IsDebugEnabled) + logger.DebugFormat("Processing meta handshake: {0}", handshake); + + if (handshake.IsSuccessful) + { + object field; + object[] serverTransports = handshake.TryGetValue(Message.SupportedConnectionTypesField, out field) + ? ObjectConverter.ToObject(field) : null; + + IList negotiatedTransports + = (serverTransports != null && serverTransports.Length > 0) + ? _transportRegistry.Negotiate(Array.ConvertAll( + serverTransports, o => (null == o) ? null : o.ToString()), BayeuxVersion) : null; + + ClientTransport newTransport = (negotiatedTransports != null && negotiatedTransports.Count > 0) + ? negotiatedTransports[0] : null; + if (newTransport == null) + { + // Signal the failure + string error = String.Format(CultureInfo.InvariantCulture, "405:c{0},s{1}:No transport", + ObjectConverter.Serialize(this.AllowedTransports), ObjectConverter.Serialize(serverTransports)); + + handshake.IsSuccessful = false; + handshake[Message.ErrorField] = error; + // TODO: Also update the advice with reconnect=none for listeners ? + + this.UpdateBayeuxClientState(oldState => + { + return (oldState == null) ? null : new DisconnectedState(this, oldState.Transport); + }, + () => + { + this.Receive(handshake); + }); + } + else // Has a valid transport ? + { + this.UpdateBayeuxClientState(oldState => + { + if (oldState != null) + { + if (!newTransport.Equals(oldState.Transport)) + { + oldState.Transport.Reset(); + newTransport.Init(); + } + + string action = GetAdviceAction(handshake.Advice, Message.ReconnectRetryValue); + if (Message.ReconnectRetryValue.Equals(action, StringComparison.OrdinalIgnoreCase)) + { + return new ConnectingState(this, oldState.HandshakeFields, + handshake.Advice, newTransport, handshake.ClientId); + } + else if (Message.ReconnectNoneValue.Equals(action, StringComparison.OrdinalIgnoreCase)) + { + return new DisconnectedState(this, oldState.Transport); + } + } + + return null; + }, + () => + { + this.Receive(handshake); + }); + } + } + else // Try to re-handshake when an error message was arrived + { + this.UpdateBayeuxClientState(oldState => + { + if (oldState != null) + { + string action = GetAdviceAction(handshake.Advice, Message.ReconnectHandshakeValue); + if (Message.ReconnectHandshakeValue.Equals(action, StringComparison.OrdinalIgnoreCase) + || Message.ReconnectRetryValue.Equals(action, StringComparison.OrdinalIgnoreCase)) + { + return new ReHandshakingState(this, oldState.HandshakeFields, + oldState.Transport, oldState.NextBackOff); + } + else if (Message.ReconnectNoneValue.Equals(action, StringComparison.OrdinalIgnoreCase)) + { + return new DisconnectedState(this, oldState.Transport); + } + } + + return null; + }, + () => + { + this.Receive(handshake); + }); + } + } + + /// + /// Processes a connecting message have just arrived. + /// + public virtual void ProcessConnect(IMutableMessage connect) + { + if (null == connect) + throw new ArgumentNullException("connect"); + // TODO: Split "connected" state into ConnectSent + ConnectReceived ? + // It may happen that the server replies to the meta connect with a delay + // that exceeds the maxNetworkTimeout (for example because the server is + // busy and the meta connect reply thread is starved). + // In this case, it is possible that we issue 2 concurrent connects, one + // for the response arrived late, and one from the unconnected state. + // We should avoid this, although it is a very rare case. + + // DEBUG + if (logger.IsDebugEnabled) + logger.DebugFormat("Processing meta connect: {0}", connect); + + this.UpdateBayeuxClientState(oldState => + { + if (oldState != null) + { + IDictionary advice = connect.Advice; + if (advice == null) + advice = oldState.Advice; + + string action = GetAdviceAction(advice, Message.ReconnectRetryValue); + if (connect.IsSuccessful) + { + if (Message.ReconnectRetryValue.Equals(action, StringComparison.OrdinalIgnoreCase)) + { + return new ConnectedState(this, oldState.HandshakeFields, + advice, oldState.Transport, oldState.ClientId); + } + else if (Message.ReconnectNoneValue.Equals(action, StringComparison.OrdinalIgnoreCase)) + { + // This case happens when the connect reply arrives after a disconnect + // We do not go into a disconnected state to allow normal processing of the disconnect reply + return new DisconnectingState(this, oldState.Transport, oldState.ClientId); + } + } + else // Try to re-handshake / re-connect when an error message was arrived + { + if (Message.ReconnectHandshakeValue.Equals(action, StringComparison.OrdinalIgnoreCase)) + { + return new ReHandshakingState(this, oldState.HandshakeFields, oldState.Transport, 0); + } + else if (Message.ReconnectRetryValue.Equals(action, StringComparison.OrdinalIgnoreCase)) + { + return new UnconnectedState(this, oldState.HandshakeFields, + advice, oldState.Transport, oldState.ClientId, oldState.NextBackOff); + } + else if (Message.ReconnectNoneValue.Equals(action, StringComparison.OrdinalIgnoreCase)) + { + return new DisconnectedState(this, oldState.Transport); + } + } + } + + return null; + }, + () => + { + this.Receive(connect); + }); + } + + /// + /// Processes a disconnecting message have just arrived. + /// + public virtual void ProcessDisconnect(IMutableMessage disconnect) + { + if (null == disconnect) + throw new ArgumentNullException("disconnect"); + + // DEBUG + if (logger.IsDebugEnabled) + logger.DebugFormat("Processing meta disconnect: {0}", disconnect); + + this.UpdateBayeuxClientState(oldState => + { + return (oldState == null) ? null : new DisconnectedState(this, oldState.Transport); + }, + () => + { + this.Receive(disconnect); + }); + } + + /// + /// Receives a normal message. + /// + public virtual void ProcessMessage(IMutableMessage message) + { + if (null == message) + throw new ArgumentNullException("message"); + + // DEBUG + if (logger.IsDebugEnabled) + logger.DebugFormat("Processing message: {0}", message); + + this.Receive(message); + } + + #endregion + + private static string GetAdviceAction(IDictionary advice, string defaultResult) + { + object action; + string result; + + if (null != advice + && advice.TryGetValue(Message.ReconnectField, out action) + && null != action + && (result = action.ToString().Trim()).Length > 0) + { + return result; + } + + return defaultResult; + } + + #region Scheduled Actions + + /// + /// Try to re-handshake after the given delay ( + ). + /// + public virtual bool ScheduleHandshake(long interval, long backOff) + { + return ScheduleAction(this.SendHandshake, interval, backOff); + } + + /// + /// Try to re-connect after the given delay ( + ). + /// + public virtual bool ScheduleConnect(long interval, long backOff) + { + return ScheduleAction(this.SendConnect, interval, backOff); + } + + /// + /// Executes a one-shot action that becomes enabled after the given delay. + /// + private static bool ScheduleAction(Func action, long interval, long backOff) + { + // Prevent NPE in case of concurrent disconnect + System.Timers.Timer timer = new System.Timers.Timer(); + timer.Interval = Math.Max(interval + backOff, 1);// TODO: MinInterval is 1Ms ? + + timer.Elapsed += new System.Timers.ElapsedEventHandler((source, e) => + { + // Stop the Timer + try + { + timer.Enabled = false; + timer.Close(); + // DEBUG + //logger.InfoFormat("The Timer #{0} has been disposed.", timer.GetHashCode()); + } + catch (ObjectDisposedException) { } + finally + { + action(); + } + }); + timer.AutoReset = false; + timer.Enabled = true; // Start the Timer + + return true; + } + + #endregion + + /// + /// Used to shutdown scheduler. + /// + private volatile bool _terminated = false; + + /// + /// Terminates this client session before disconnected. + /// + public virtual void Terminate() + { + if (!_terminated) + { + _terminated = true; + + IMutableMessage[] messages = this.TakeMessages(); + this.FailMessages(null, messages); + + lock (_cookieProvider) + { + // TODO: _cookieProvider.Clear(); + foreach (Cookie c in _cookieProvider) + { + c.Expired = true; + c.Discard = true; + } + } + } + } + + /// + /// Processes all sent failed messages + /// by invoking of the receiving callback with a message that was generated from failed messages. + /// + public virtual void FailMessages(Exception ex, params IMessage[] messages) + { + if (null != messages && messages.Length > 0) + { + foreach (IMessage m in messages) + { + if (null != m) + { + IMutableMessage failed = this.NewMessage(); + failed.Id = m.Id; + failed.IsSuccessful = false; + failed.Channel = m.Channel; + + failed[Message.MessageField] = m; + if (null != ex) + failed[Message.ExceptionField] = ex; + + ClientTransport transport = this.CurrentTransport; + if (null != transport) + failed[Message.ConnectionTypeField] = transport.Name; + + this.Receive(failed); + } + } + } + } + + #region Methods used for BayeuxClientChannel + + /// + /// Generates a new with . + /// + public virtual IMutableMessage NewMessage() + { + return new DictionaryMessage(); + } + + /// + /// En-queues or sends a channel message. + /// + public virtual void EnqueueSend(IMutableMessage message) + { + if (null == message) return; + + if (this.CanSend) + { + bool sent = this.SendMessages(message); + // DEBUG + if (logger.IsDebugEnabled) + logger.DebugFormat("{0} message: {1}", sent ? "Sent" : "Failed", message); + } + else + { + bool found = false; + lock (_messagesQueue) + { + // Check existence of the message before enqueue + object field1, field2; + foreach (IMutableMessage m in _messagesQueue) + { + if (String.Compare(m.Channel, message.Channel, StringComparison.OrdinalIgnoreCase) == 0 + && ((m.TryGetValue(Message.SubscriptionField, out field1) + && message.TryGetValue(Message.SubscriptionField, out field2) + && field1 != null && field2 != null && field1.Equals(field2)) + || (m.Data != null && message.Data != null && m.Data.Equals(message.Data))) + ) + { + found = true; + break; + } + } + + // Ignores duplicate messages + if (!found) + _messagesQueue.Add(message); + } + + // DEBUG + if (!found && logger.IsDebugEnabled) + logger.DebugFormat("Enqueued message {0} (batching: {1})", message, this.IsBatching); + } + } + + private bool CanSend + { + get + { + BayeuxClientState state = _bayeuxClientState; + return (!this.IsBatching && !state.IsHandshaking); + } + } + + #endregion + + #region Message Listeners + + /// + ///

Callback method invoked when the given messages have hit the network towards the Bayeux server.

+ ///

The messages may not be modified, and any modification will be useless because the message have + /// already been sent.

+ ///
+ /// The messages sent. + public virtual void OnSending(IMessage[] messages) + { + } + + /// + ///

Callback method invoke when the given messages have just arrived from the Bayeux server.

+ ///

The messages may be modified, but it's suggested to use s instead.

+ ///

Extensions will be processed after the invocation of this method.

+ ///
+ /// The messages arrived. + public virtual void OnMessages(IList messages) + { + } + + /// + ///

Callback method invoked when the given messages have failed to be sent.

+ ///

The default implementation logs the failure at ERROR level.

+ ///
+ /// The exception that caused the failure. + /// The messages being sent. + public virtual void OnFailure(Exception ex, IMessage[] messages) + { + // DEBUG + logger.Error("Messages failed: " + ObjectConverter.Serialize(messages), ex); + } + + #endregion + + /// + /// Updates the state of this Bayeux client session + /// with the specified creation callback. + /// + public virtual void UpdateBayeuxClientState( + Func create, Action postCreate = null) + { + if (null == create) + throw new ArgumentNullException("create"); + + // Increase how many threads are updating the state. + // This is needed so that in WaitFor() we can check + // the state being sure that nobody is updating it. + //lock (_syncRoot) + //#pragma warning disable 0420 + Interlocked.Increment(ref _stateUpdaters); + //#pragma warning restore 0420 + + // State update is non-blocking + try + { + BayeuxClientState origState, newState = null; + bool updated = false; + + BayeuxClientState oldState = _bayeuxClientState; + while (!updated) + { + newState = create(oldState); + if (newState == null) + throw new InvalidOperationException("Newly created Bayeux client state must be not null."); + + if (oldState != null && !oldState.IsUpdateableTo(newState)) + { + // DEBUG + logger.WarnFormat("State not updateable: {0} -> {1}", oldState, newState); + break; + } + +#pragma warning disable 0420 + origState = Interlocked.CompareExchange( + ref _bayeuxClientState, newState, oldState);// CompareAndSet(oldState, newState) +#pragma warning restore 0420 + + // TODO: Object.ReferenceEquals() + updated = ((oldState == null && origState == null) + || (oldState != null && origState != null && oldState.Equals(origState))); + // DEBUG + if (logger.IsDebugEnabled) + { + logger.DebugFormat(CultureInfo.InvariantCulture, "State update: {0} -> {1}{2}", + oldState, newState, updated ? String.Empty : " failed (concurrent update)"); + } + + if (!updated) + { + Thread.Sleep(1); // TODO: Thread.Sleep(1) ? + oldState = _bayeuxClientState; + } + } + + if (postCreate != null) + postCreate(); + + if (updated) + { + if (oldState != null && oldState.Type != newState.Type) + newState.Enter(oldState.Type); + + newState.Execute(); + } + } + finally + { + // Notify threads waiting in WaitFor() + //lock (_syncRoot) + //{ + //#pragma warning disable 0420 + if (Interlocked.Decrement(ref _stateUpdaters) == 0) + //#pragma warning restore 0420 + { + try { _stateUpdated.Set(); } + catch (ObjectDisposedException) { } + } + //} + } + } + + /// + /// Used to debug. + /// + public override string ToString() + { + StringBuilder sb = new StringBuilder(base.ToString()); +#if DEBUG + if (sb[sb.Length - 1] == '}') sb.Length--; + sb.Append(" TransportRegistry: "); + lock (_transportRegistry) + { + sb.Append(_transportRegistry.ToString().Replace(Environment.NewLine, Environment.NewLine + " ")); + } + + sb.Append(Environment.NewLine).Append(" Options: "); + lock (_options) + { + sb.Append(ObjectConverter.Serialize(_options).Replace("\r", String.Empty).Replace("\n", Environment.NewLine + " ")); + } + + sb.Append(Environment.NewLine).Append(" BayeuxClientState: "); + BayeuxClientState currState = _bayeuxClientState; + if (currState != null) + { + lock (currState) + sb.Append(currState.ToString().Replace(Environment.NewLine, Environment.NewLine + " ")); + } + + sb.Append(Environment.NewLine).Append(" MessagesQueue: "); + lock (_messagesQueue) + { + sb.Append(ObjectConverter.Serialize(_messagesQueue).Replace("\r", String.Empty).Replace("\n", Environment.NewLine + " ")); + } + + sb.Append(Environment.NewLine).Append(" CookiesProvider: "); + lock (_cookieProvider) + { + sb.Append(ObjectConverter.Serialize(_cookieProvider).Replace("\r", String.Empty).Replace("\n", Environment.NewLine + " ")); + } + + sb.AppendFormat(CultureInfo.InvariantCulture, + "{0} BackOffIncrement: {1},{0} MaxBackOff: {2},{0} StateUpdaters: {3}{0}}}", + Environment.NewLine, Interlocked.Read(ref _backOffIncrement), Interlocked.Read(ref _maxBackOff), _stateUpdaters); +#endif + + return sb.ToString(); + } + + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Client/BayeuxClientChannel.cs b/src/Genesys.Workspace/CometD.NET/Client/BayeuxClientChannel.cs new file mode 100755 index 0000000..9877184 --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Client/BayeuxClientChannel.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; + +using CometD.Common; +using CometD.Bayeux; +using CometD.Bayeux.Client; + +namespace CometD.Client +{ + /// + /// Provides a Bayeux client implementation of the class. + /// + public class BayeuxClientChannel : AbstractSessionChannel + { + private readonly BayeuxClient _bayeuxClient; + + /// + /// Initializes a new instance of the class + /// with the specified . + /// + public BayeuxClientChannel(BayeuxClient session, ChannelId channelId) + : base(channelId) + { + if (null == session) + throw new ArgumentNullException("session"); + + _bayeuxClient = session; + } + + /// + /// The client session associated with this channel. + /// + public override IClientSession Session + { + get { return _bayeuxClient; } + } + + /// + /// Send subscription message(s) to Bayeux server + /// to subscribe this session channel with all assigned message listeners. + /// + protected override void SendSubscribe() + { + if (this.ChannelId.IsWild) return; + + IMutableMessage message = _bayeuxClient.NewMessage(); + message.Channel = Channel.MetaSubscribe; + message[Message.SubscriptionField] = this.Id; + + _bayeuxClient.EnqueueSend(message); + } + + /// + /// Send un-subscription message(s) to Bayeux server + /// to un-subscribe all assigned message listeners from this session channel. + /// + protected override void SendUnsubscribe() + { + if (this.ChannelId.IsWild) return; + + IMutableMessage message = _bayeuxClient.NewMessage(); + message.Channel = Channel.MetaUnsubscribe; + message[Message.SubscriptionField] = this.Id; + + _bayeuxClient.EnqueueSend(message); + } + + /// + /// Publishes the given to this channel, + /// optionally specifying the to set on the publish message. + /// + /// The data to publish. + /// The message id to set on the message, + /// or null to let the implementation choose the message id. + public override void Publish(object data, string messageId) + { + if (this.ChannelId.IsWild) return; + + IMutableMessage message = _bayeuxClient.NewMessage(); + message.Channel = this.Id; + message.Data = data; + if (!String.IsNullOrEmpty(messageId)) + message.Id = messageId; + + _bayeuxClient.EnqueueSend(message); + } + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Client/BayeuxClientState.cs b/src/Genesys.Workspace/CometD.NET/Client/BayeuxClientState.cs new file mode 100755 index 0000000..5d4791c --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Client/BayeuxClientState.cs @@ -0,0 +1,627 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; + +using CometD.Bayeux; +using CometD.Common; +using CometD.Client.Transport; + +namespace CometD.Client +{ + /// + /// Represents the state of a Bayeux client session. + /// + /// + public abstract class BayeuxClientState + { + private readonly BayeuxClientStates _type; + private readonly IDictionary _handshakeFields; + private readonly IDictionary _advice; + private readonly ClientTransport _transport; + private readonly string _clientId; + private readonly long _backOff; + + #region Properties + + /// + /// This client session state type (PK). + /// + public virtual BayeuxClientStates Type + { + get { return _type; } + } + + /// + /// The handshaking message template. + /// + public virtual IDictionary HandshakeFields + { + get { return _handshakeFields; } + } + + /// + /// The last connecting message advices. + /// + public virtual IDictionary Advice + { + get { return _advice; } + } + + /// + /// The current Bayeux client session transport. + /// + public virtual ClientTransport Transport + { + get { return _transport; } + } + + /// + /// The last connected Bayeux client ID. + /// + public virtual string ClientId + { + get { return _clientId; } + } + + /// + /// The scheduler action extra delay time (in milliseconds). + /// + protected virtual long BackOff + { + get { return _backOff; } + } + + /// + /// The scheduler action delay time (in milliseconds). + /// + protected virtual long Interval + { + get + { + object val; + if (_advice != null && _advice.TryGetValue(Message.IntervalField, out val)) + return ObjectConverter.ToPrimitive(val, 0); + + return 0; + } + } + + /// + /// The next scheduler action back-off time. + /// + public virtual long NextBackOff + { + get + { + return Math.Min(this.BackOff + _session.BackOffIncrement, _session.MaxBackOff); + } + } + + + /// + /// Determines whether this client session state is handshaking or not. + /// + public virtual bool IsHandshaking + { + get + { + return ((_type & (BayeuxClientStates.Handshaking + | BayeuxClientStates.ReHandshaking)) > 0); + } + } + + /// + /// Determines whether this client session state is handshook or not. + /// + public virtual bool IsHandshook + { + get + { + return ((_type & (BayeuxClientStates.Connecting + | BayeuxClientStates.Connected + | BayeuxClientStates.Unconnected)) > 0); + } + } + + /// + /// Determines whether this client session state is connecting or not. + /// + public virtual bool IsConnecting + { + get + { + return ((_type & BayeuxClientStates.Connecting) > 0); + } + } + + /// + /// Determines whether this client session state is connected or not. + /// + public virtual bool IsConnected + { + get + { + return ((_type & BayeuxClientStates.Connected) > 0); + } + } + + /// + /// Determines whether this client session state is disconnecting or not. + /// + public virtual bool IsDisconnecting + { + get + { + return ((_type & BayeuxClientStates.Disconnecting) > 0); + } + } + + /// + /// Determines whether this client session state is disconnected or not. + /// + public virtual bool IsDisconnected + { + get + { + return ((_type & BayeuxClientStates.Disconnected) > 0); + } + } + + #endregion + + [NonSerialized] + private readonly BayeuxClient _session; + + /// + /// The Bayeux client session. + /// + protected virtual BayeuxClient Session + { + get { return _session; } + } + + /// + /// Initializes a new instance of the class + /// with the specified type. + /// + protected BayeuxClientState( + BayeuxClient session, + BayeuxClientStates type, + IDictionary handshakeFields, + IDictionary advice, + ClientTransport transport, + string clientId, + long backOff) + { + if (session == null) + throw new ArgumentNullException("session"); + if (type == BayeuxClientStates.None) + throw new ArgumentOutOfRangeException("type"); + if (transport == null) + throw new ArgumentNullException("transport"); + + _session = session; + + _type = type; + _handshakeFields = handshakeFields; + _advice = advice; + _transport = transport; + _clientId = clientId; + _backOff = backOff; + } + + /// + /// Sends the specified messages to a Bayeux server asynchronously. + /// + /// The listener used to process the request response. + /// The list of messages will be sent in one request. + public virtual void Send(ITransportListener listener, params IMutableMessage[] messages) + { + if (messages == null) + throw new ArgumentNullException("messages"); + + List validMessages = new List(); + foreach (IMutableMessage message in messages) + { + if (message != null) + { + string msgId = message.Id; + if (String.IsNullOrEmpty(msgId)) + { + msgId = _session.NewMessageId(); + message.Id = msgId; + } + + if (!String.IsNullOrEmpty(_clientId))// TODO: && String.IsNullOrEmpty(message.ClientId) + message.ClientId = _clientId; + + if (_session.ExtendSend(message)) + { + // Extensions may have modified the messageId, but we need to own + // the messageId in case of meta messages to link request/response + // in non request/response transports such as websocket + message.Id = msgId; + + validMessages.Add(message); + } + } + } + + if (validMessages.Count > 0) + { + // DEBUG + Debug.Print("Sending messages: {0}", ObjectConverter.Serialize(validMessages)); + + _transport.Send(listener, validMessages.ToArray()); + } + } + + /// + /// Checks if this client session state can be updated to the specified new state. + /// + public abstract bool IsUpdateableTo(BayeuxClientState newState); + + /// + /// Callback invoked when the state changed from the given + /// to this state (and only when the two states are different). + /// + /// The previous state. + /// + public virtual void Enter(BayeuxClientStates oldState) + { + } + + /// + /// Callback invoked when this state becomes the new state, + /// even if the previous state was equal to this state. + /// + /// + public abstract void Execute(); + + /// + /// Used to debug. + /// + public override string ToString() + { + lock (_transport) + { + return String.Format(CultureInfo.InvariantCulture, + "{{{0} Type: '{1}',{0} HandshakeFields: {2},{0} Advice: {3},{0} Transport: {4},{0} ClientId: '{5}',{0} BackOff: {6}{0}}}", + Environment.NewLine, _type.ToString(), ObjectConverter.Serialize(_handshakeFields), ObjectConverter.Serialize(_advice), + _transport.ToString().Replace(Environment.NewLine, Environment.NewLine + " "), _clientId, _backOff); + } + } + } + + /// + /// Represents the disconnected state of a Bayeux client session. + /// + public class DisconnectedState : BayeuxClientState + { + /// + /// Initializes a new instance of the class. + /// + public DisconnectedState(BayeuxClient session, ClientTransport transport) + : base(session, BayeuxClientStates.Disconnected, null, null, transport, null, 0) + { + } + + /// + /// This state can be updated to state only. + /// + public override bool IsUpdateableTo(BayeuxClientState newState) + { + return (newState != null + && (newState.Type & BayeuxClientStates.Handshaking) > 0); + } + + /// + /// Cancels all queued messages and terminates the Bayeux client session. + /// + public override void Execute() + { + this.Transport.Reset(); + this.Session.Terminate(); + } + } + + /// + /// Represents the aborted state of a Bayeux client session. + /// + public class AbortedState : DisconnectedState + { + /// + /// Initializes a new instance of the class. + /// + public AbortedState(BayeuxClient session, ClientTransport transport) + : base(session, transport) { } + + /// + /// Cancels all available HTTP requests and terminates the Bayeux client session. + /// + public override void Execute() + { + this.Transport.Abort(); + base.Execute(); + } + } + + /// + /// Represents the handshaking state of a Bayeux client session. + /// + public class HandshakingState : BayeuxClientState + { + /// + /// Initializes a new instance of the class + /// with the specified handshaking message template: . + /// + public HandshakingState( + BayeuxClient session, + IDictionary handshakeFields, + ClientTransport transport) + : base(session, BayeuxClientStates.Handshaking, handshakeFields, null, transport, null, 0) + { + } + + /// + /// This state can be updated to , + /// or , or state only. + /// + public override bool IsUpdateableTo(BayeuxClientState newState) + { + return (newState != null + && (newState.Type & (BayeuxClientStates.Connecting + | BayeuxClientStates.ReHandshaking + | BayeuxClientStates.Disconnected)) > 0); + } + + /// + /// Always reset the subscriptions when a handshake has been requested. + /// + public override void Enter(BayeuxClientStates oldState) + { + // DEBUG + Trace.TraceInformation("Subscriptions will be cleaned when old-state '{0}' -enter-> Handshaking state", oldState.ToString()); + + this.Session.ResetSubscriptions(); + } + + /// + /// The state could change between now and when runs; + /// in this case the handshake message will not be sent and will not be failed, + /// because most probably the client has been disconnected. + /// + public override void Execute() + { + this.Session.SendHandshake(); + } + } + + /// + /// Represents the re-handshaking state of a Bayeux client session. + /// + public class ReHandshakingState : BayeuxClientState + { + /// + /// Initializes a new instance of the class + /// with the specified handshaking message template: . + /// + public ReHandshakingState( + BayeuxClient session, + IDictionary handshakeFields, + ClientTransport transport, + long backOff) + : base(session, BayeuxClientStates.ReHandshaking, handshakeFields, null, transport, null, backOff) + { + } + + /// + /// This state can be updated to , + /// or , or state only. + /// + public override bool IsUpdateableTo(BayeuxClientState newState) + { + return (newState != null + && (newState.Type & (BayeuxClientStates.Connecting + | BayeuxClientStates.ReHandshaking + | BayeuxClientStates.Disconnected)) > 0); + } + + /// + /// Reset the subscriptions if this is not a failure from a requested handshake. + /// Subscriptions may be queued after requested handshakes. + /// + public override void Enter(BayeuxClientStates oldState) + { + if ((oldState & BayeuxClientStates.Handshaking) == 0) + { + // DEBUG + Trace.TraceInformation("Subscriptions will be cleaned when old-state '{0}' -enter-> ReHandshaking state", oldState.ToString()); + + this.Session.ResetSubscriptions(); + } + } + + /// + /// Try to re-handshake to the Bayeux server after the delay: + /// + . + /// + public override void Execute() + { + this.Session.ScheduleHandshake(this.Interval, this.BackOff); + } + } + + /// + /// Represents the connecting state of a Bayeux client session. + /// + public class ConnectingState : BayeuxClientState + { + /// + /// Initializes a new instance of the class + /// with the specified handshaking message template: , + /// and the last received information from a Bayeux server like: , . + /// + public ConnectingState( + BayeuxClient session, + IDictionary handshakeFields, + IDictionary advice, + ClientTransport transport, + string clientId) + : base(session, BayeuxClientStates.Connecting, handshakeFields, advice, transport, clientId, 0) + { + } + + /// + /// This state can be updated to , + /// or , or , + /// or , or state only. + /// + public override bool IsUpdateableTo(BayeuxClientState newState) + { + return (newState != null + && (newState.Type & (BayeuxClientStates.Connected + | BayeuxClientStates.Unconnected + | BayeuxClientStates.ReHandshaking + | BayeuxClientStates.Disconnecting + | BayeuxClientStates.Disconnected)) > 0); + } + + /// + /// Send the messages that may have queued up before the handshake completed. + /// + public override void Execute() + { + this.Session.SendBatch(); + this.Session.ScheduleConnect(this.Interval, this.BackOff); + } + } + + /// + /// Represents the connected state of a Bayeux client session. + /// + public class ConnectedState : BayeuxClientState + { + /// + /// Initializes a new instance of the class + /// with the specified handshaking message template: , + /// and the last received information from a Bayeux server like: , . + /// + public ConnectedState( + BayeuxClient session, + IDictionary handshakeFields, + IDictionary advice, + ClientTransport transport, + string clientId) + : base(session, BayeuxClientStates.Connected, handshakeFields, advice, transport, clientId, 0) + { + } + + /// + /// This state can be updated to , + /// or , or , + /// or , or state only. + /// + public override bool IsUpdateableTo(BayeuxClientState newState) + { + return (newState != null + && (newState.Type & (BayeuxClientStates.Connected + | BayeuxClientStates.Unconnected + | BayeuxClientStates.ReHandshaking + | BayeuxClientStates.Disconnecting + | BayeuxClientStates.Disconnected)) > 0); + } + + /// + /// Schedule re-connect to the Bayeux server after the delay: + /// + + /// to keep the connection persistently. + /// + public override void Execute() + { + // http://www.salesforce.com/us/developer/docs/api_streaming/Content/limits.htm + // TODO: Timeout to reconnect after successful connection (Keep-Alive) = 40 seconds + this.Session.ScheduleConnect(this.Interval, this.BackOff); + } + } + + /// + /// Represents the unconnected (re-connecting) state of a Bayeux client session. + /// + public class UnconnectedState : BayeuxClientState + { + /// + /// Initializes a new instance of the class + /// with the specified handshaking message template: , + /// and the last received information from a Bayeux server like: , . + /// + public UnconnectedState( + BayeuxClient session, + IDictionary handshakeFields, + IDictionary advice, + ClientTransport transport, + string clientId, + long backOff) + : base(session, BayeuxClientStates.Unconnected, handshakeFields, advice, transport, clientId, backOff) + { + } + + /// + /// This state can be updated to , + /// or , or , + /// or state only. + /// + public override bool IsUpdateableTo(BayeuxClientState newState) + { + return (newState != null + && (newState.Type & (BayeuxClientStates.Connected + | BayeuxClientStates.Unconnected + | BayeuxClientStates.ReHandshaking + | BayeuxClientStates.Disconnected)) > 0); + } + + /// + /// Try to re-connect to the Bayeux server after the delay: + /// + . + /// + public override void Execute() + { + this.Session.ScheduleConnect(this.Interval, this.BackOff); + } + } + + /// + /// Represents the disconnecting state of a Bayeux client session. + /// + public class DisconnectingState : BayeuxClientState + { + /// + /// Initializes a new instance of the class + /// for the specified . + /// + public DisconnectingState(BayeuxClient session, ClientTransport transport, string clientId) + : base(session, BayeuxClientStates.Disconnecting, null, null, transport, clientId, 0) { } + + /// + /// This state can be updated to state only. + /// + public override bool IsUpdateableTo(BayeuxClientState newState) + { + return (newState != null + && (newState.Type & BayeuxClientStates.Disconnected) > 0); + } + + /// + /// Sends a new disconnecting command to the Bayeux server. + /// + public override void Execute() + { + IMutableMessage message = this.Session.NewMessage(); + message.Channel = Channel.MetaDisconnect; + + this.Send(this.Session.DisconnectListener, message); + } + } + +} diff --git a/src/Genesys.Workspace/CometD.NET/Client/Enumerations.cs b/src/Genesys.Workspace/CometD.NET/Client/Enumerations.cs new file mode 100755 index 0000000..d726aea --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Client/Enumerations.cs @@ -0,0 +1,53 @@ +using System; + +namespace CometD.Client +{ + /// + /// The states that a may assume. + /// + [Flags] + public enum BayeuxClientStates : int + { + /// + /// Invalid Bayeux client state. + /// + None = 0, + + /// + /// State assumed after the handshake when the connection is broken. + /// + Unconnected = 1, + + /// + /// State assumed when the handshake is being sent. + /// + Handshaking = 2, + + /// + /// State assumed when a first handshake failed and the handshake is retried, + /// or when the Bayeux server requests a re-handshake. + /// + ReHandshaking = 4, + + /// + /// State assumed when the connect is being sent for the first time. + /// + Connecting = /*Handshaking | */8, + + /// + /// State assumed when this is connected to the Bayeux server. + /// + Connected = /*Connecting | */16, + + /// + /// State assumed when the disconnect is being sent. + /// + Disconnecting = 32, + + /// + /// State assumed before the handshake and when the disconnect is completed. + /// + Disconnected = /*Disconnecting | */64 + } + +} diff --git a/src/Genesys.Workspace/CometD.NET/Client/Extension/AcknowledgedExtension.cs b/src/Genesys.Workspace/CometD.NET/Client/Extension/AcknowledgedExtension.cs new file mode 100755 index 0000000..aaad412 --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Client/Extension/AcknowledgedExtension.cs @@ -0,0 +1,154 @@ +using System; +using System.Collections.Generic; +using System.Globalization; + +using CometD.Bayeux; +using CometD.Bayeux.Client; +using CometD.Common; + +namespace CometD.Client.Extension +{ + /// + /// This client-side extension enables the client to acknowledge to the server + /// the messages that the client has received. + /// For the acknowledgement to work, the server must be configured with the + /// correspondent server-side ack extension. If both client and server support + /// the ack extension, then the ack functionality will take place automatically. + /// By enabling this extension, all messages arriving from the server will arrive + /// via the long poll, so the comet communication will be slightly chattier. + /// The fact that all messages will return via long poll means also that the + /// messages will arrive with total order, which is not guaranteed if messages + /// can arrive via both long poll and normal response. + /// Messages are not acknowledged one by one, but instead a group of messages is + /// acknowledged when long poll returns. + /// + [Serializable] + public sealed class AcknowledgedExtension : AdapterExtension, IEquatable + { + /// + /// The message "ack" field. + /// + public const string ExtensionField = "ack"; + + private volatile bool _serverSupportsAcks = false; + private volatile int _ackId = -1; + + #region IExtension Members + + /// + /// Callback method invoked every time a meta message is received. + /// + /// Always true. + /// is null. + public override bool ReceiveMeta(IClientSession session, IMutableMessage message) + { + if (message == null) + throw new ArgumentNullException("message"); + + string channel = message.Channel; + if (Channel.MetaHandshake.Equals(channel, StringComparison.OrdinalIgnoreCase)) + { + IDictionary ext = message.GetExtension(false); + + object val; + _serverSupportsAcks = (ext != null + && ext.TryGetValue(ExtensionField, out val) + && ObjectConverter.ToPrimitive(val, false)); + } + else if (_serverSupportsAcks + && message.IsSuccessful + && Channel.MetaConnect.Equals(channel, StringComparison.OrdinalIgnoreCase)) + { + IDictionary ext = message.GetExtension(false); + + object val; + if (ext != null && ext.TryGetValue(ExtensionField, out val)) + { + _ackId = ObjectConverter.ToPrimitive(val, _ackId); + } + } + + return true; + } + + /// + /// Callback method invoked every time a meta message is being sent. + /// + /// Always true. + /// is null. + public override bool SendMeta(IClientSession session, IMutableMessage message) + { + if (message == null) + throw new ArgumentNullException("message"); + + string channel = message.Channel; + if (Channel.MetaHandshake.Equals(channel, StringComparison.OrdinalIgnoreCase)) + { + IDictionary ext = message.GetExtension(true); + lock (ext) ext[ExtensionField] = true; + + _ackId = -1; + } + else if (_serverSupportsAcks + && Channel.MetaConnect.Equals(channel, StringComparison.OrdinalIgnoreCase)) + { + IDictionary ext = message.GetExtension(true); + lock (ext) ext[ExtensionField] = _ackId; + } + + return true; + } + + #endregion + + #region IEquatable Members + + /// + /// Returns a value indicating whether this extension + /// is equal to another object. + /// + public override bool Equals(IExtension other) + { + return (null == other) ? false : (other is AcknowledgedExtension); + } + + /// + /// Returns a value indicating whether this extension + /// is equal to another object. + /// + public bool Equals(AcknowledgedExtension other) + { + return (null != other + && _serverSupportsAcks == other._serverSupportsAcks + && _ackId == other._ackId); + } + + /// + /// Returns a value indicating whether this extension is equal to a specified object. + /// + public override bool Equals(object obj) + { + return (null == obj) ? false : (obj is AcknowledgedExtension); + } + + /// + /// Returns the hash code for this extension. + /// + public override int GetHashCode() + { + return ((_ackId.GetHashCode() << 1) | (_serverSupportsAcks ? 1 : 0)); + } + + /// + /// Used to debug. + /// + public override string ToString() + { + return String.Format(CultureInfo.InvariantCulture, + "{{ ServerSupportsAcks: {0}, AckId: {1} }}", + _serverSupportsAcks, _ackId); + } + + #endregion + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Client/Extension/TimeSyncExtension.cs b/src/Genesys.Workspace/CometD.NET/Client/Extension/TimeSyncExtension.cs new file mode 100755 index 0000000..c97896b --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Client/Extension/TimeSyncExtension.cs @@ -0,0 +1,173 @@ +using System; +using System.Collections.Generic; +using System.Globalization; + +using CometD.Bayeux; +using CometD.Bayeux.Client; +using CometD.Common; + +namespace CometD.Client.Extension +{ + /// + /// This client extension allows the client to synchronize message's timestamp + /// with the server. + /// + [Serializable] + public sealed class TimeSyncExtension : AdapterExtension, IEquatable + { + /// + /// The message "timesync" field. + /// + public const string ExtensionField = "timesync"; + + private volatile int _lag; + private volatile int _offset; + + #region IExtension Members + + /// + /// Callback method invoked every time a meta message is received. + /// + /// Always true. + /// is null. + public override bool ReceiveMeta(IClientSession session, IMutableMessage message) + { + if (message == null) + throw new ArgumentNullException("message"); + + IDictionary ext = message.GetExtension(false); + object val; + if (ext != null && ext.TryGetValue(ExtensionField, out val)) + { + IDictionary sync + = ObjectConverter.ToObject>(val); + + if (sync != null// && sync.ContainsKey("a") + && sync.ContainsKey("tc") && sync.ContainsKey("ts") && sync.ContainsKey("p")) + { + long now = CurrentTimeMillis(); + + long tc = ObjectConverter.ToPrimitive(sync["tc"], 0); + long ts = ObjectConverter.ToPrimitive(sync["ts"], 0); + int p = ObjectConverter.ToPrimitive(sync["p"], 0); + //int a = ObjectConverter.ToPrimitive(sync["a"], 0); + + int l2 = (int)((now - tc - p) / 2); + int o2 = (int)(ts - tc - l2); + + _lag = (_lag == 0) ? l2 : ((_lag + l2) / 2); + _offset = (_offset == 0) ? o2 : ((_offset + o2) / 2); + } + } + + return true; + } + + /// + /// Callback method invoked every time a meta message is being sent. + /// + /// Always true. + /// is null. + public override bool SendMeta(IClientSession session, IMutableMessage message) + { + if (message == null) + throw new ArgumentNullException("message"); + + long now = CurrentTimeMillis(); + IDictionary timesync + = new Dictionary(StringComparer.OrdinalIgnoreCase) + { + { "tc", now }, + { "l", _lag }, + { "o", _offset } + }; + + IDictionary ext = message.GetExtension(true); + lock (ext) ext[ExtensionField] = timesync; + + return true; + } + + #endregion + + /// + /// The server timezone offset in milliseconds. + /// + public int Offset + { + get { return _offset; } + } + + /// + /// The local timezone lag in milliseconds. + /// + public int Lag + { + get { return _lag; } + } + + /// + /// Returns the current UNIX timestamp of the server in milliseconds. + /// + public long ServerTime + { + get { return (CurrentTimeMillis() + _offset); } + } + + /// + /// Returns the current UNIX timestamp in milliseconds. + /// + public static long CurrentTimeMillis() + { + return (DateTime.UtcNow.Ticks / 10000 - 62135596800000); + } + + #region IEquatable Members + + /// + /// Returns a value indicating whether this extension + /// is equal to another object. + /// + public override bool Equals(IExtension other) + { + return (null == other) ? false : (other is TimeSyncExtension); + } + + /// + /// Returns a value indicating whether this extension + /// is equal to another object. + /// + public bool Equals(TimeSyncExtension other) + { + return (null != other + && _lag == other._lag && _offset == other._offset); + } + + /// + /// Returns a value indicating whether this extension is equal to a specified object. + /// + public override bool Equals(object obj) + { + return (null == obj) ? false : (obj is TimeSyncExtension); + } + + /// + /// Returns the hash code for this extension. + /// + public override int GetHashCode() + { + return (((long)_lag << 32) | unchecked((uint)_offset)).GetHashCode(); + } + + /// + /// Used to debug. + /// + public override string ToString() + { + return String.Format(CultureInfo.InvariantCulture, + "{{ Lag: {0}, Offset: {1} }}", _lag, _offset); + } + + #endregion + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Client/Extension/TimestampExtension.cs b/src/Genesys.Workspace/CometD.NET/Client/Extension/TimestampExtension.cs new file mode 100755 index 0000000..57d74a5 --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Client/Extension/TimestampExtension.cs @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; +using System.Globalization; + +using CometD.Bayeux; +using CometD.Bayeux.Client; +using CometD.Common; + +namespace CometD.Client.Extension +{ + /// + /// This client extension will add the client timestamp into each messages + /// that will be sent to the server. + /// + [Serializable] + public sealed class TimestampExtension : AdapterExtension, IEquatable + { + #region IExtension Members + + /// + /// Callback method invoked every time a normal message is being sent. + /// + /// Always true. + /// is null. + public override bool Send(IClientSession session, IMutableMessage message) + { + if (message == null) + throw new ArgumentNullException("message"); + + AddTimestamp(message); + return true; + } + + /// + /// Callback method invoked every time a meta message is being sent. + /// + /// Always true. + /// is null. + public override bool SendMeta(IClientSession session, IMutableMessage message) + { + if (message == null) + throw new ArgumentNullException("message"); + + AddTimestamp(message); + return true; + } + + #endregion + + private static void AddTimestamp(IMutableMessage message) + { + lock (message) + { + // RFC 1123 DateTime Format "EEE, dd MMM yyyy HH:mm:ss 'GMT'" + message[Message.TimestampField] + = DateTime.Now.ToString("r", CultureInfo.GetCultureInfo(1033));// en-US + } + } + + #region IEquatable Members + + /// + /// Returns a value indicating whether this extension + /// is equal to another object. + /// + public override bool Equals(IExtension other) + { + return (null == other) ? false : (other is TimestampExtension); + } + + /// + /// Returns a value indicating whether this extension + /// is equal to another object. + /// + public bool Equals(TimestampExtension other) + { + return (null != other); + } + + /// + /// Returns a value indicating whether this extension is equal to a specified object. + /// + public override bool Equals(object obj) + { + return (null == obj) ? false : (obj is TimestampExtension); + } + + /// + /// Returns the hash code for this extension. + /// + public override int GetHashCode() + { + return base.GetHashCode(); + } + + #endregion + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Client/Transport/ClientTransport.cs b/src/Genesys.Workspace/CometD.NET/Client/Transport/ClientTransport.cs new file mode 100755 index 0000000..f89d48d --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Client/Transport/ClientTransport.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; + +using CometD.Bayeux; +using CometD.Common; + +namespace CometD.Client.Transport +{ + /// + /// Represents the base client Transport of a Bayeux client session. + /// + public abstract class ClientTransport : AbstractTransport + { + #region Constants + + /// + /// The polling duration (timeout for all transports). + /// + [Obsolete("The Timeout option has not been used yet.")] + public const string TimeoutOption = "timeout"; + + /// + /// The polling interval. + /// + [Obsolete("The Interval option has not been used yet.")] + public const string IntervalOption = "interval"; + + /// + /// The HTTP request timeout option. + /// + public const string MaxNetworkDelayOption = "maxNetworkDelay"; + + #endregion + + /// + /// Initializes a new instance of the class. + /// + protected ClientTransport(string name, IDictionary options) + : base(name, options) { } + + /// + /// Initializes this client transport. + /// + public virtual void Init() + { + } + + /// + /// Cancels all available HTTP requests in the client transport. + /// + public abstract void Abort(); + + /// + /// Resets this client transport. + /// + public virtual void Reset() + { + } + + /// + /// Terminates this client transport. + /// + public virtual void Terminate() + { + } + + /// + /// Checks if this client transport supports the specified Bayeux version. + /// + public abstract bool Accept(string bayeuxVersion); + + /// + /// Sends the specified messages to a Bayeux server asynchronously. + /// + /// The listener used to process the request response. + /// The list of messages will be sent in one request. + public abstract void Send(ITransportListener listener, params IMutableMessage[] messages); + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Client/Transport/HttpClientTransport.cs b/src/Genesys.Workspace/CometD.NET/Client/Transport/HttpClientTransport.cs new file mode 100755 index 0000000..b7ee323 --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Client/Transport/HttpClientTransport.cs @@ -0,0 +1,125 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Net; + +using CometD.Bayeux; +using CometD.Common; + +namespace CometD.Client.Transport +{ + /// + /// Represents the base class of the HTTP Client Transport. + /// + public abstract class HttpClientTransport : ClientTransport + { + #region Properties + + private volatile string _url; + /// + /// All HTTP requests are made relative to this base URL. + /// + public virtual string Url + { + get { return _url; } + set { _url = value; } + } + + private volatile CookieCollection _cookieProvider; + /// + /// HTTP request cookies collection. + /// + public virtual CookieCollection CookieProvider + { + get { return _cookieProvider; } + set { _cookieProvider = value; } + } + + #endregion + + /// + /// Initializes a new instance of the class. + /// + /// The transport name (required). + /// The HTTP request (header) options. + protected HttpClientTransport(string name, IDictionary options) + : base(name, options) { } + + /// + /// Returns the with a specific name from this HTTP transport. + /// + public virtual Cookie GetCookie(string name) + { + if (String.IsNullOrEmpty(name)) + throw new ArgumentNullException("name"); + + CookieCollection cookies = _cookieProvider; + return (cookies != null) ? cookies[name] : null; + } + + /// + /// Adds a to this HTTP transport. + /// + public virtual void SetCookie(Cookie cookie) + { + if (null == cookie) + throw new ArgumentNullException("cookie"); + + CookieCollection cookies = _cookieProvider; + if (cookies != null) + { + lock (cookies) cookies.Add(cookie);// TODO: SetCookie + } + } + + /// + /// Setups HTTP request headers. + /// + protected virtual void ApplyRequestHeaders(HttpWebRequest request) + { + if (null == request) + throw new ArgumentNullException("request"); + + // Persistent Internet connection option + string s = this.GetOption(HttpRequestHeader.Connection.ToString(), null); + if (!String.IsNullOrEmpty(s)) + request.KeepAlive = "Keep-Alive".Equals(s, StringComparison.OrdinalIgnoreCase); + + // Accept HTTP header option + s = this.GetOption(HttpRequestHeader.Accept.ToString(), null); + if (!String.IsNullOrEmpty(s)) request.Accept = s; + + // Authorization header option + s = this.GetOption(HttpRequestHeader.Authorization.ToString(), null); + if (!String.IsNullOrEmpty(s)) + request.Headers[HttpRequestHeader.Authorization] = s; + } + + /// + /// Setups HTTP request cookies. + /// + protected virtual void ApplyRequestCookies(HttpWebRequest request) + { + if (null == request) + throw new ArgumentNullException("request"); + + CookieCollection cookies = _cookieProvider; + if (null != cookies) + { + lock (cookies) + { + if (request.CookieContainer == null) + request.CookieContainer = new CookieContainer(); + + // TODO: request.CookieContainer.Add(cookies); + foreach (Cookie c in cookies) + { + if (c != null && (!c.Discard || !c.Expired)) + request.CookieContainer.Add(c); + } + } + } + } + + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Client/Transport/ITransportListener.cs b/src/Genesys.Workspace/CometD.NET/Client/Transport/ITransportListener.cs new file mode 100755 index 0000000..3c06a35 --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Client/Transport/ITransportListener.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; + +using CometD.Bayeux; + +namespace CometD.Client.Transport +{ + /// + /// Represents a listener on a . + /// + public interface ITransportListener + { + /// + /// Callback method invoked when the given messages have hit the network towards the Bayeux server. + /// + /// + /// The messages may not be modified, and any modification will be useless + /// because the message have already been sent. + /// + /// The messages sent. + void OnSending(IMessage[] messages); + + /// + /// Callback method invoke when the given messages have just arrived from the Bayeux server. + /// + /// The messages arrived. + void OnMessages(IList messages); + + /// + /// Callback method invoked when the given messages have failed to be sent + /// because of a HTTP connection exception. + /// + /// The exception that caused the failure. + /// The messages being sent. + void OnConnectException(Exception ex, IMessage[] messages); + + /// + /// Callback method invoked when the given messages have failed to be sent + /// because of a Web exception. + /// + /// The exception that caused the failure. + /// The messages being sent. + void OnException(Exception ex, IMessage[] messages); + + /// + /// Callback method invoked when the given messages have failed to be sent + /// because of a HTTP request timeout. + /// + /// The messages being sent. + void OnExpire(IMessage[] messages); + + /// + /// Callback method invoked when the given messages have failed to be sent + /// because of an unexpected Bayeux server exception was thrown. + /// + /// Bayeux server error message. + /// The exception that caused the failure. + /// The messages being sent. + void OnProtocolError(string info, Exception ex, IMessage[] messages); + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Client/Transport/LongPollingRequest.cs b/src/Genesys.Workspace/CometD.NET/Client/Transport/LongPollingRequest.cs new file mode 100755 index 0000000..45c0903 --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Client/Transport/LongPollingRequest.cs @@ -0,0 +1,324 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Net; +using System.Text; +using System.Threading; + +using CometD.Bayeux; +using CometD.Common; + +namespace CometD.Client.Transport +{ + /// + /// The wrapper class of , used to make a HTTP request to a URI. + /// + public /*sealed*/ class LongPollingRequest + { + [NonSerialized] + private readonly LongPollingTransport _transport; + private readonly HttpWebRequest _request; + private readonly ITransportListener _listener; + private readonly IMessage[] _messages; + + /// + /// Initializes a new instance of the class. + /// + public LongPollingRequest( + LongPollingTransport transport, + HttpWebRequest request, + ITransportListener listener, + params IMessage[] messages) + { + if (null == transport) + throw new ArgumentNullException("transport"); + if (null == request) + throw new ArgumentNullException("request"); + if (messages == null || messages.Length == 0 || messages[0] == null) + throw new ArgumentNullException("messages"); + + _transport = transport; + _request = request; + _listener = listener; + _messages = messages; + } + + private volatile bool _isSending = false; + private volatile bool _aborted = false; + + /// + /// Cancels this HTTP Web request. + /// + public virtual void Abort() + { + if (_isSending && !_aborted) + { + _aborted = true; + + _request.Abort(); + if (null != _listener) + _listener.OnException(new OperationCanceledException("The HTTP request has been aborted."), _messages); + } + } + + private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(typeof(LongPollingRequest)); + + /// + /// Begins this HTTP Web request. + /// + public virtual void Send() + { + try + { + // Start the asynchronous operation + _request.BeginGetRequestStream(new AsyncCallback(GetRequestStreamCallback), this); + + _isSending = true; + } + catch (Exception ex) + { + if (_listener != null) + _listener.OnConnectException(ex, _messages); + else + logger.Error(ex);// DEBUG + + _transport.RemoveRequest(this); + } + } + + // From http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.begingetrequeststream.aspx + private static void GetRequestStreamCallback(IAsyncResult asyncResult) + { + LongPollingRequest exchange = asyncResult.AsyncState as LongPollingRequest; + try + { + string content = ObjectConverter.Serialize(exchange._messages); + // DEBUG + //if (logger.IsDebugEnabled) + // logger.DebugFormat(CultureInfo.InvariantCulture, "Sending message(s): {0}", content); + + // Convert the string into a byte array + byte[] buffer = Encoding.UTF8.GetBytes(content); + + // End the operation + using (Stream postStream = exchange._request.EndGetRequestStream(asyncResult)) + { + // Write to the request stream + postStream.Write(buffer, 0, buffer.Length); + } + + // On request committed + if (null != exchange._listener) + exchange._listener.OnSending(exchange._messages); + + int exchangeTimeout = exchange._request.Timeout; + // TODO: Restore request timeout (default: 100 seconds) + //exchange._request.Timeout = exchange._transport.GetOption(ClientTransport.MaxNetworkDelayOption, 100000); + // DEBUG + if (logger.IsDebugEnabled) + { + logger.DebugFormat(CultureInfo.InvariantCulture, + "Begin get response from URL: '{0}' with exchange timeout: {1}", + exchange._request.RequestUri, exchangeTimeout); + } + + // Start the asynchronous operation to get the response + IAsyncResult result = exchange._request.BeginGetResponse(new AsyncCallback(GetResponseCallback), exchange); + + // This line implements the timeout, if there is a timeout, the callback fires and the request becomes aborted + ThreadPool.RegisterWaitForSingleObject(result.AsyncWaitHandle, + new WaitOrTimerCallback(TimeoutCallback), exchange, exchangeTimeout, true); + } + catch (Exception ex) + { + exchange._isSending = false; + + // TODO: OnConnectException + if (null != exchange._listener && !exchange._aborted) + exchange._listener.OnException(ex, exchange._messages); + else + logger.Error(ex);// DEBUG + + exchange._transport.RemoveRequest(exchange); + } + } + + private static void GetResponseCallback(IAsyncResult asyncResult) + { + LongPollingRequest exchange = asyncResult.AsyncState as LongPollingRequest; + try + { + string responseString; + HttpStatusCode responseStatus; + + // End the operation + HttpWebResponse response; + Exception error = null; + try + { + response = exchange._request.EndGetResponse(asyncResult) as HttpWebResponse; + } + catch (WebException wex) + { + if (wex.Status == WebExceptionStatus.RequestCanceled) + throw; + + response = wex.Response as HttpWebResponse; + if (null == response) throw; + + error = wex; + } + + using (response) + { + responseStatus = response.StatusCode; + + using (StreamReader streamRead = new StreamReader(response.GetResponseStream(), Encoding.UTF8, true)) + { + responseString = streamRead.ReadToEnd(); + // DEBUG + if (logger.IsDebugEnabled) + logger.DebugFormat(CultureInfo.InvariantCulture, "Received message(s): {0}", responseString); + } + + // Stores the transport Cookies to use for next requests + if (response.Cookies != null && response.Cookies.Count > 0) + { + foreach (Cookie cookie in response.Cookies) + { + if (null != cookie && (!cookie.Discard || !cookie.Expired)) + exchange._transport.SetCookie(cookie); + } + } + } + + if (responseStatus != HttpStatusCode.OK)// TODO: error != null + { + if (null != exchange._listener) + { + exchange._listener.OnProtocolError(String.Format(CultureInfo.InvariantCulture, + "Unexpected response {0}: {1}", (int)responseStatus, responseString), error, exchange._messages); + } + else + { + // DEBUG + logger.Error(String.Format(CultureInfo.InvariantCulture, + "Unexpected response {0}: {1}", (int)responseStatus, responseString), error); + } + } + else if (responseString != null && (responseString = responseString.Trim()).Length > 0) + { + // TODO: responseString.Replace('"', '\'') + IList messages = DictionaryMessage.ParseMessages(responseString); + + // Backups the transport Timeout value (in milliseconds) to use for next requests + foreach (IMutableMessage message in messages) + { + if (message != null + && message.IsSuccessful + && Channel.MetaConnect.Equals(message.Channel, StringComparison.OrdinalIgnoreCase)) + { + IDictionary advice = message.Advice; + object timeout; + if (advice != null + && advice.TryGetValue(Message.TimeoutField, out timeout) + && timeout != null && timeout.ToString().Trim().Length > 0) + { + exchange._transport.Advice = advice; + } + } + } + + if (null != exchange._listener) + { + // Fixes the received messages before processing + string requestChannel = null; + string requestUrl, baseUrl; + foreach (IMutableMessage msg in messages) + { + if (String.IsNullOrEmpty(msg.Channel)) + { + if (null == requestChannel) + { + requestUrl = exchange._request.RequestUri.ToString();// Absolute request URI + + baseUrl = exchange._transport.Url; + baseUrl = (null == baseUrl) ? String.Empty : baseUrl.Trim(); + + if (requestUrl.StartsWith(baseUrl, StringComparison.OrdinalIgnoreCase)) + { + requestChannel = requestUrl.Substring(baseUrl.Length).Trim('\\', '/'); + requestChannel = Channel.Meta.TrimEnd('\\', '/') + "/" + requestChannel; + } + else + requestChannel = String.Empty; + } + + if (!String.IsNullOrEmpty(requestChannel)) + msg.Channel = requestChannel; + } + } + + exchange._listener.OnMessages(messages); + } + } + else + { + if (null != exchange._listener) + { + exchange._listener.OnProtocolError(String.Format(CultureInfo.InvariantCulture, + "Empty response (204) from URL: {0}", exchange._request.RequestUri), null, exchange._messages); + } + else + { + // DEBUG + logger.ErrorFormat(CultureInfo.InvariantCulture, "Empty response (204) from URL: {0}", exchange._request.RequestUri); + } + } + } + catch (Exception ex) + { + if (null != exchange._listener && !exchange._aborted) + exchange._listener.OnException(ex, exchange._messages); + else + logger.Error(ex);// DEBUG + } + finally + { + exchange._isSending = false; + exchange._transport.RemoveRequest(exchange); + } + } + + /// + /// Abort the request if the timer fires. + /// + private static void TimeoutCallback(object state, bool timedOut) + { + if (timedOut) + { + // DEBUG + logger.Warn("HTTP Web request Timeout detected!"); + + LongPollingRequest exchange = state as LongPollingRequest; + if (exchange != null) + { + exchange.Abort(); + + if (null != exchange._listener) + exchange._listener.OnExpire(exchange._messages); + } + } + } + + /// + /// Used to debug. + /// + public override string ToString() + { + return _request.RequestUri.ToString(); + } + + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Client/Transport/LongPollingTransport.cs b/src/Genesys.Workspace/CometD.NET/Client/Transport/LongPollingTransport.cs new file mode 100755 index 0000000..4e014ba --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Client/Transport/LongPollingTransport.cs @@ -0,0 +1,249 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Net; +using System.Text; +using System.Text.RegularExpressions; + +using CometD.Bayeux; +using CometD.Common; + +namespace CometD.Client.Transport +{ + /// + /// Represents the long-polling HTTP Transport of a Bayeux client session. + /// + public class LongPollingTransport : HttpClientTransport + { + private readonly IList _exchanges = new List(); + + private volatile bool _aborted; + private volatile IDictionary _advice; + + /// + /// Stores the last transport Timeout value (in milliseconds) + /// that was contained in the field + /// of the last received connecting message, to use for next requests. + /// + public virtual IDictionary Advice + { + get { return _advice; } + set { _advice = value; } + } + + /// + /// Removes a specified HTTP request from the requests queue (when it is completed). + /// + public virtual bool RemoveRequest(LongPollingRequest exchange) + { + if (null != exchange) + { + lock (_exchanges) + { + if (!_aborted) + return _exchanges.Remove(exchange); + // DEBUG + //Debug.Print("The HTTP request was removed; Exchanges count: {0}", _exchanges.Count); + } + } + + return false; + } + + // Used to customize the HTTP request before it is sent. + //private readonly Action _customize; + + /// + /// Initializes a new instance of the class. + /// + /// The HTTP request (header) options. + public LongPollingTransport(IDictionary options) + : base("long-polling", options) + { + this.OptionPrefix = "long-polling.json"; + } + + /// + /// Specifies an option prefix made of string segments separated by the "." character, + /// used to override more generic configuration entries. + /// + public override sealed string OptionPrefix + { + get { return base.OptionPrefix; } + set { base.OptionPrefix = value; } + } + + /// + /// Accepts all Bayeux versions below 2.3.1. + /// + public override bool Accept(string bayeuxVersion) + { + return true; + } + + /// + /// Initializes this client transport. + /// + public override void Init() + { + base.Init(); + + _aborted = false; + } + + /// + /// Cancels all available HTTP requests in the client transport. + /// + public override void Abort() + { + IList exchanges = null; + lock (_exchanges) + { + if (!_aborted) + { + _aborted = true; + + exchanges = new List(_exchanges); + _exchanges.Clear(); + } + } + + if (null != exchanges && exchanges.Count > 0) + { + foreach (LongPollingRequest exchange in exchanges) + exchange.Abort(); + } + } + + /// + /// Resets this client transport. + /// + public override void Reset() + { + // TODO: lock (_exchanges) _exchanges.Clear(); + } + + private static readonly Regex uriRegex = new Regex( + @"^(https?://(([^:/\?#]+)(:(\d+))?))?([^\?#]*)(.*)?$", + RegexOptions.Compiled | RegexOptions.IgnoreCase); + + /// + /// Sends the specified messages to a Bayeux server asynchronously. + /// + /// The listener used to process the request response. + /// The list of messages will be sent in one HTTP request. + public override void Send(ITransportListener listener, params IMutableMessage[] messages) + { + if (messages == null || messages.Length == 0 || messages[0] == null) + throw new ArgumentNullException("messages"); + + string url = this.Url; + + if (null == url) url = String.Empty; + else url = url.Trim(); + + // Builds the request URL based on the message channel name + Match uriMatch = uriRegex.Match(url); + if (uriMatch.Success) + { + string afterPath = (uriMatch.Groups.Count > 7) ? uriMatch.Groups[7].Value : null; + // Append message type into the URL ? + if ((afterPath == null || afterPath.Trim().Length == 0) + && messages.Length == 1 && messages[0].IsMeta) + { + string type = messages[0].Channel.Substring(Channel.Meta.Length); + url = url.TrimEnd('\\', '/') + "/" + type.Trim('\\', '/'); + } + } + + try + { + // Creates a new HttpWebRequest object + HttpWebRequest request = WebRequest.Create(new Uri(url, UriKind.RelativeOrAbsolute)) as HttpWebRequest; + request.Method = WebRequestMethods.Http.Post; + request.Accept = "application/json"; + request.ContentType = request.Accept + ";charset=" + Encoding.UTF8.WebName; + request.KeepAlive = true; + request.AllowWriteStreamBuffering = true; // Is needed for KeepAlive + request.AllowAutoRedirect = true; + request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate; + request.Proxy = null; // Skips the proxy auto-detect step (~ 7s) + + // Setups HTTP request headers + this.ApplyRequestHeaders(request); + + // Setups HTTP request cookies + this.ApplyRequestCookies(request); + + // Calculates the HTTP request timeout (in milliseconds) + int maxNetworkDelay = this.GetOption(MaxNetworkDelayOption, request.Timeout); + if (messages.Length == 1 + && Channel.MetaConnect.Equals(messages[0].Channel, StringComparison.OrdinalIgnoreCase)) + { + IDictionary advice = messages[0].Advice; + if (advice == null) + advice = _advice; + + object val; + if (advice != null && advice.TryGetValue(Message.TimeoutField, out val)) + { + long timeout = ObjectConverter.ToPrimitive(val, 0); + if (timeout != 0) + maxNetworkDelay += unchecked((int)timeout); + } + } + request.Timeout = maxNetworkDelay; + + //if (null != _customize) _customize(request); + + // Creates a new HTTP Transport Exchange + LongPollingRequest httpExchange; + lock (_exchanges) + { + if (_aborted) + throw new InvalidOperationException("The client transport has been aborted."); + + httpExchange = new LongPollingRequest(this, request, listener, messages); + _exchanges.Add(httpExchange); + } + + // Processes the HTTP request + httpExchange.Send(); + } + catch (Exception ex) + { + if (listener != null) + listener.OnException(ex, messages); + else + { + // DEBUG + Trace.TraceError("Failed to send messages:{0}{1}{0}--- via transport: {2}{0}{3}", + Environment.NewLine, ObjectConverter.Serialize(messages), this.ToString(), ex.ToString()); + } + } + } + + /// + /// Used to debug. + /// + public override string ToString() + { +#if DEBUG + StringBuilder sb = new StringBuilder(base.ToString()); + lock (_exchanges) + { + foreach (LongPollingRequest exchange in _exchanges) + { + sb.Append(Environment.NewLine).Append(" +- "); + sb.Append(exchange); + } + } + + return sb.ToString(); +#else + return base.ToString(); +#endif + } + + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Client/Transport/TransportRegistry.cs b/src/Genesys.Workspace/CometD.NET/Client/Transport/TransportRegistry.cs new file mode 100755 index 0000000..feef33d --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Client/Transport/TransportRegistry.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Globalization; + +namespace CometD.Client.Transport +{ + /// + /// Represents a registry of s. + /// + public class TransportRegistry + { + private readonly IDictionary _transports + = new Dictionary(StringComparer.OrdinalIgnoreCase); + private readonly ICollection _allowedTransports + = new HashSet(StringComparer.OrdinalIgnoreCase); + + /// + /// Adds a new into this registry. + /// + public virtual void Add(ClientTransport transport) + { + if (transport != null) + { + string transportName = transport.Name; + lock (_transports) + _transports[transportName] = transport; + + lock (_allowedTransports) + { + if (!_allowedTransports.Contains(transportName)) + _allowedTransports.Add(transportName); + } + } + } + + /// + /// Returns unmodifiable collection of known transports. + /// + public virtual ICollection KnownTransports + { + get { return _transports.Keys; } + } + + /// + /// Returns unmodifiable list of allowed transports. + /// + public virtual ICollection AllowedTransports + { + get { return _allowedTransports; } + } + + /// + /// Returns a list of requested transports that exists in this registry. + /// + public virtual IList Negotiate( + IEnumerable requestedTransports, string bayeuxVersion) + { + IList list = new List(); + + if (null != requestedTransports) + { + foreach (string transportName in requestedTransports) + { + if (!String.IsNullOrEmpty(transportName) + && _allowedTransports.Contains(transportName)) + { + ClientTransport transport = this.GetTransport(transportName); + if (transport != null && transport.Accept(bayeuxVersion)) + { + list.Add(transport); + } + } + } + } + + return list; + } + + /// + /// Returns an existing in this registry. + /// + /// The transport name. + /// Return null if the does not exist. + public virtual ClientTransport GetTransport(string transport) + { + if (String.IsNullOrEmpty(transport)) + throw new ArgumentNullException("transport"); + + ClientTransport val; + return _transports.TryGetValue(transport, out val) ? val : null; + } + + /// + /// Used to debug. + /// + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + + sb.AppendFormat(CultureInfo.InvariantCulture, "{{{0} AllowedTransports: [", Environment.NewLine); + lock (_allowedTransports) + { + string[] allowedTransports = new string[_allowedTransports.Count]; + _allowedTransports.CopyTo(allowedTransports, 0); + + sb.AppendFormat(CultureInfo.InvariantCulture, "'{0}'", String.Join("', '", allowedTransports)); + } + + sb.AppendFormat(CultureInfo.InvariantCulture, "]{0} KnownTransports: [", Environment.NewLine); + lock (_transports) + { + foreach (KeyValuePair t in _transports) + { + sb.AppendFormat(CultureInfo.InvariantCulture, "{0} +- '{1}': {2}", Environment.NewLine, + t.Key, t.Value.ToString().Replace(Environment.NewLine, Environment.NewLine + " ")); + } + } + + sb.AppendFormat(CultureInfo.InvariantCulture, "{0} ]{0}}}", Environment.NewLine); + return sb.ToString(); + } + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Client/TransportListeners.cs b/src/Genesys.Workspace/CometD.NET/Client/TransportListeners.cs new file mode 100755 index 0000000..8a81af1 --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Client/TransportListeners.cs @@ -0,0 +1,284 @@ +using System; +using System.Collections.Generic; +using System.Net; +using System.Reflection; + +using CometD.Bayeux; +using CometD.Client.Transport; + +namespace CometD.Client +{ + /// + /// The implementation of a listener for publishing messages on a . + /// + public class PublishTransportListener : ITransportListener + { + [NonSerialized] + private readonly BayeuxClient _session; + + /// + /// The Bayeux client session. + /// + protected virtual BayeuxClient Session + { + get { return _session; } + } + + /// + /// Initializes a new instance of the class. + /// + /// The Bayeux client session. + public PublishTransportListener(BayeuxClient session) + { + if (null == session) + throw new ArgumentNullException("session"); + + _session = session; + } + + /// + /// Callback method invoked when the given messages have hit the network towards the Bayeux server. + /// + /// + /// The messages may not be modified, and any modification will be useless + /// because the message have already been sent. + /// + /// The messages sent. + public virtual void OnSending(IMessage[] messages) + { + _session.OnSending(messages); + } + + /// + /// Callback method invoke when the given messages have just arrived from the Bayeux server. + /// + /// The messages arrived. + public virtual void OnMessages(IList messages) + { + _session.OnMessages(messages); + + if (null != messages) + { + for (int i = 0; i < messages.Count; i++) + this.ProcessMessage(messages[i]); + } + } + + /// + /// Callback method invoked when the given messages have failed to be sent + /// because of a HTTP connection exception. + /// + /// The exception that caused the failure. + /// The messages being sent. + public virtual void OnConnectException(Exception ex, IMessage[] messages) + { + this.OnFailure(ex, messages); + } + + /// + /// Callback method invoked when the given messages have failed to be sent + /// because of a Web exception. + /// + /// The exception that caused the failure. + /// The messages being sent. + public virtual void OnException(Exception ex, IMessage[] messages) + { + this.OnFailure(ex, messages); + } + + /// + /// Callback method invoked when the given messages have failed to be sent + /// because of a HTTP request timeout. + /// + /// The messages being sent. + public virtual void OnExpire(IMessage[] messages) + { + this.OnFailure(new TimeoutException("The timeout period for the client transport expired."), messages); + } + + /// + /// Callback method invoked when the given messages have failed to be sent + /// because of an unexpected Bayeux server exception was thrown. + /// + /// Bayeux server error message. + /// The exception that caused the failure. + /// The messages being sent. + public virtual void OnProtocolError(string info, Exception ex, IMessage[] messages) + { + Exception pex = new ProtocolViolationException(info); + if (ex != null) + { + FieldInfo f = pex.GetType().GetField("_innerException", + BindingFlags.IgnoreCase | BindingFlags.Instance | BindingFlags.NonPublic); + if (f != null) f.SetValue(pex, ex); + } + + this.OnFailure(pex, messages); + } + + /// + /// Receives a message (from the server) and process it. + /// + /// The mutable version of the message received. + protected virtual void ProcessMessage(IMutableMessage message) + { + if (null != message) + _session.ProcessMessage(message); + } + + /// + /// Callback method invoked when the given messages have failed to be sent. + /// + /// The exception that caused the failure. + /// The messages being sent. + protected virtual void OnFailure(Exception ex, IMessage[] messages) + { + _session.OnFailure(ex, messages); + _session.FailMessages(ex, messages); + } + } + + /// + /// The implementation of a listener for handshaking messages on a . + /// + public class HandshakeTransportListener : PublishTransportListener + { + /// + /// Initializes a new instance of the class. + /// + public HandshakeTransportListener(BayeuxClient session) : base(session) { } + + /// + /// Try to re-handshake on failure. + /// + protected override void OnFailure(Exception ex, IMessage[] messages) + { + this.Session.UpdateBayeuxClientState(oldState => + { + if (null != oldState) + { + IList transports = this.Session.NegotiateAllowedTransports(); + if (null == transports || transports.Count == 0) + { + return new DisconnectedState(this.Session, oldState.Transport); + } + else + { + ClientTransport newTransport = transports[0]; + if (newTransport != null && !newTransport.Equals(oldState.Transport)) + { + if (null != oldState.Transport) + oldState.Transport.Reset(); + newTransport.Init(); + } + + return new ReHandshakingState(this.Session, oldState.HandshakeFields, newTransport, oldState.NextBackOff); + } + } + + return null; + }); + + base.OnFailure(ex, messages); + } + + /// + /// Processes the handshaking message have just arrived. + /// + protected override void ProcessMessage(IMutableMessage message) + { + if (message != null + && Channel.MetaHandshake.Equals(message.Channel, StringComparison.OrdinalIgnoreCase)) + { + this.Session.ProcessHandshake(message); + } + else + { + base.ProcessMessage(message); + } + } + } + + /// + /// The implementation of a listener for connecting messages on a . + /// + public class ConnectTransportListener : PublishTransportListener + { + /// + /// Initializes a new instance of the class. + /// + public ConnectTransportListener(BayeuxClient session) : base(session) { } + + /// + /// Try to re-connect on failure. + /// + protected override void OnFailure(Exception ex, IMessage[] messages) + { + this.Session.UpdateBayeuxClientState(oldState => + { + return (null == oldState) ? null + : new UnconnectedState(this.Session, oldState.HandshakeFields, + oldState.Advice, oldState.Transport, oldState.ClientId, oldState.NextBackOff); + }); + + base.OnFailure(ex, messages); + } + + /// + /// Processes the connecting message have just arrived. + /// + protected override void ProcessMessage(IMutableMessage message) + { + if (message != null + && Channel.MetaConnect.Equals(message.Channel, StringComparison.OrdinalIgnoreCase)) + { + this.Session.ProcessConnect(message); + } + else + { + base.ProcessMessage(message); + } + } + } + + /// + /// The implementation of a listener for disconnecting messages on a . + /// + public class DisconnectTransportListener : PublishTransportListener + { + /// + /// Initializes a new instance of the class. + /// + public DisconnectTransportListener(BayeuxClient session) : base(session) { } + + /// + /// Terminates the Bayeux client session. + /// + protected override void OnFailure(Exception ex, IMessage[] messages) + { + this.Session.UpdateBayeuxClientState(oldState => + { + return (null == oldState) ? null : new DisconnectedState(this.Session, oldState.Transport); + }); + + base.OnFailure(ex, messages); + } + + /// + /// Processes the disconnecting message have just arrived. + /// + protected override void ProcessMessage(IMutableMessage message) + { + if (message != null + && Channel.MetaDisconnect.Equals(message.Channel, StringComparison.OrdinalIgnoreCase)) + { + this.Session.ProcessDisconnect(message); + } + else + { + base.ProcessMessage(message); + } + } + } + +} diff --git a/src/Genesys.Workspace/CometD.NET/Common/AbstractClientSession.cs b/src/Genesys.Workspace/CometD.NET/Common/AbstractClientSession.cs new file mode 100755 index 0000000..7b0e29e --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Common/AbstractClientSession.cs @@ -0,0 +1,425 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Text; +using System.Threading; + +using CometD.Bayeux.Client; +using CometD.Bayeux; + +namespace CometD.Common +{ + /// + ///

Partial implementation of .

+ ///

It handles extensions and batching, and provides utility methods to be used by subclasses.

+ ///
+ public abstract class AbstractClientSession : IClientSession + { + private readonly IDictionary _attributes + = new Dictionary(StringComparer.OrdinalIgnoreCase); + + private readonly IList _extensions = new List(); + private readonly IDictionary _channels + = new Dictionary(StringComparer.OrdinalIgnoreCase); + + // Atomic integer + private volatile int _batch; + private static long _idGen = 0; + + /// + /// Initializes a new instance of the class. + /// + protected AbstractClientSession() { } + + /// + /// Generates a new message id. + /// + public virtual string NewMessageId() + { + long newId = Interlocked.Increment(ref _idGen); + return newId.ToString(CultureInfo.InvariantCulture); + } + + #region IClientSession Members + + /// + /// Adds a new extension to this client session. + /// + public virtual void AddExtension(IExtension extension) + { + if (null != extension) + { + lock (_extensions) + { + if (!_extensions.Contains(extension)) + _extensions.Add(extension); + } + } + } + + /// + /// Removes an existing extension from this client session. + /// + public virtual void RemoveExtension(IExtension extension) + { + if (null != extension) + { + lock (_extensions) + { + if (_extensions.Contains(extension)) + _extensions.Remove(extension); + } + } + } + + /// + /// Returns an immutable list of extensions present in this instance. + /// + /// + public virtual IList Extensions + { + get + { + lock (_extensions) + { + return new ReadOnlyCollection(_extensions); + } + } + } + + /// + /// Equivalent to (null). + /// + public abstract void Handshake(); + + /// + /// Initiates the Bayeux protocol handshake with the server(s). + /// + /// Additional fields to add to the handshake message. + public abstract void Handshake(IDictionary handshakeFields); + + /// + /// Returns a client side channel scoped by this session. + /// + /// Specific or wild channel name. + /// Whether to create the client session channel if it does not exist. + public virtual IClientSessionChannel GetChannel(string channelId, bool create = true) + { + if (String.IsNullOrEmpty(channelId)) + throw new ArgumentNullException("channelId"); + + AbstractSessionChannel channel = null; + if ((!_channels.TryGetValue(channelId, out channel) || channel == null) && create) + { + ChannelId id = this.NewChannelId(channelId); + channel = this.NewChannel(id); + + lock (_channels) _channels[channelId] = channel; + } + + return channel; + } + + #endregion + + /* + /// + /// Returns all available channels of this client session. + /// + protected virtual IDictionary Channels + { + get { return _channels; } + } + */ + + /// + /// Sends the specified mutable message with each existing session extensions. + /// + public virtual bool ExtendSend(IMutableMessage message) + { + if (null == message) return false; + + if (message.IsMeta) + { + for (int i = 0; i < _extensions.Count; i++) + { + if (!_extensions[i].SendMeta(this, message)) + return false; + } + } + else + { + for (int i = 0; i < _extensions.Count; i++) + { + if (!_extensions[i].Send(this, message)) + return false; + } + } + + return true; + } + + /// + /// Receives the specified mutable message with each existing session extensions. + /// + public virtual bool ExtendReceive(IMutableMessage message) + { + if (null == message) return false; + + if (message.IsMeta) + { + for (int i = 0; i < _extensions.Count; i++) + { + if (!_extensions[i].ReceiveMeta(this, message)) + return false; + } + } + else + { + for (int i = 0; i < _extensions.Count; i++) + { + if (!_extensions[i].ReceiveMeta(this, message)) + return false; + } + } + + return true; + } + + /// + /// Creates a new object from the specified channel id string. + /// + protected abstract ChannelId NewChannelId(string channelId); + + /// + /// Creates a new object from the specified channel id. + /// + protected abstract AbstractSessionChannel NewChannel(ChannelId channelId); + + #region ISession Members + + /// + /// The client id of the session. + /// + public abstract string Id { get; } + + /// + /// A connected session is a session where the link between the client and the server + /// has been established. + /// + public abstract bool IsConnected { get; } + + /// + /// A handshook session is a session where the handshake has successfully completed. + /// + public abstract bool IsHandshook { get; } + + /// + /// Disconnects this session, ending the link between the client and the server peers. + /// + public abstract void Disconnect(); + + /// + /// Sets a named session attribute value. + /// + public virtual void SetAttribute(string name, object value) + { + if (String.IsNullOrEmpty(name)) + throw new ArgumentNullException("name"); + + lock (_attributes) _attributes[name] = value; + } + + /// + /// Retrieves the value of named session attribute. + /// + public object GetAttribute(string name) + { + if (String.IsNullOrEmpty(name)) + throw new ArgumentNullException("name"); + + lock (_attributes) + { + if (_attributes.ContainsKey(name)) + return _attributes[name]; + } + + return null; + } + + /// + /// Returns the list of session attribute names. + /// + public virtual ICollection AttributeNames + { + get { return _attributes.Keys; } + } + + /// + /// Removes a named session attribute. + /// + public virtual object RemoveAttribute(string name) + { + if (String.IsNullOrEmpty(name)) + throw new ArgumentNullException("name"); + + lock (_attributes) + { + if (_attributes.ContainsKey(name)) + { + object old = _attributes[name]; + _attributes.Remove(name); + + return old; + } + } + + return null; + } + + /// + /// Executes the given command in a batch so that any Bayeux message sent + /// by the command (via the Bayeux API) is queued up until the end of the + /// command and then all messages are sent at once. + /// + /// The Runnable to run as a batch. + public virtual void Batch(Action batch) + { + if (null != batch) + { + this.StartBatch(); + try + { + batch(); + } + finally + { + this.EndBatch(); + } + } + } + + /// + /// Starts a batch, to be ended with . + /// + public virtual void StartBatch() + { +#pragma warning disable 0420 + Interlocked.Increment(ref _batch); +#pragma warning restore 0420 + } + + /// + /// Ends a batch started with . + /// + public virtual bool EndBatch() + { +#pragma warning disable 0420 + if (Interlocked.Decrement(ref _batch) == 0) +#pragma warning restore 0420 + { + this.SendBatch(); + return true; + } + + return false; + } + + #endregion + + /// + /// Sends all existing messages at the end of the batch. + /// + public abstract void SendBatch(); + + /// + /// Whether batching is executing or not. + /// + protected virtual bool IsBatching + { + get { return (_batch > 0); } + } + + /// + /// Clears all subscriptions from each channels of this client session. + /// + public virtual void ResetSubscriptions() + { + lock (_channels) + { + foreach (AbstractSessionChannel ch in _channels.Values) + ch.ResetSubscriptions(); + } + } + + /// + ///

Receives a message (from the server) and process it.

+ ///

Processing the message involves calling the receive extensions and the channel listeners.

+ ///
+ /// The mutable version of the message received. + public virtual void Receive(IMutableMessage message) + { + if (null == message) + throw new ArgumentNullException("message"); + + string id = message.Channel; + if (String.IsNullOrEmpty(id)) + throw new ArgumentException("Bayeux messages must have a channel, " + message); + + if (!this.ExtendReceive(message)) + return; + + ChannelId channelId; + IClientSessionChannel channel = this.GetChannel(id, false); + if (null != channel) + { + channelId = channel.ChannelId; + channel.NotifyMessageListeners(message); + } + else + channelId = message.ChannelId; + + foreach (string wildChannelName in channelId.Wilds) + { + //channelIdPattern = this.NewChannelId(channelPattern); + //if (channelIdPattern != null && channelIdPattern.Matches(channelId)) + //{ + channel = this.GetChannel(wildChannelName, false);// Wild channel + if (channel != null) + channel.NotifyMessageListeners(message); + //} + } + } + + /// + /// Used to debug. + /// + public override string ToString() + { +#if DEBUG + StringBuilder sb = new StringBuilder(); + sb.AppendFormat(CultureInfo.InvariantCulture, "{{{0} Id: {1}", Environment.NewLine, this.Id); + + sb.Append(Environment.NewLine).Append(" Channels: ["); + lock (_channels) + { + foreach (KeyValuePair child in _channels) + { + sb.AppendFormat(CultureInfo.InvariantCulture, + "{0} +- '{1}': ", Environment.NewLine, child.Key); + + sb.Append((null == child.Value) ? "null" + : child.Value.ToString().Replace(Environment.NewLine, Environment.NewLine + " ")); + } + } + + sb.AppendFormat(CultureInfo.InvariantCulture, "{0} ]{0}}}", Environment.NewLine); + return sb.ToString(); +#else + return this.Id; +#endif + } + + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Common/AbstractSessionChannel.cs b/src/Genesys.Workspace/CometD.NET/Common/AbstractSessionChannel.cs new file mode 100755 index 0000000..1441bc4 --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Common/AbstractSessionChannel.cs @@ -0,0 +1,478 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Globalization; +using System.Text; + +using CometD.Bayeux; +using CometD.Bayeux.Client; + +namespace CometD.Common +{ + /// + /// A channel scoped to a . + /// + public abstract class AbstractSessionChannel : IClientSessionChannel + { + private readonly ChannelId _id; + + private readonly IDictionary _attributes + = new Dictionary(StringComparer.OrdinalIgnoreCase); + private readonly IList _subscriptions = new List(); + private readonly IList _listeners = new List(); + + /// + /// Initializes a new instance of the class + /// with the specified . + /// + /// Holder of a channel id broken into path segments. + protected AbstractSessionChannel(ChannelId id) + { + if (null == id) throw new ArgumentNullException("id"); + + _id = id; + } + + #region IClientSessionChannel Members + + /// + ///

Adds a listener to this channel.

+ ///

If the listener is a , it will be invoked + /// if a message arrives to this channel.

+ ///

Adding a listener never involves communication with the server, + /// differently from .

+ ///

Listeners are best suited to receive messages from meta channels.

+ ///
+ /// The listener to add. + public virtual void AddListener(IClientSessionChannelListener listener) + { + if (null != listener) + { + lock (_listeners) + { + if (!_listeners.Contains(listener)) + _listeners.Add(listener); + } + } + } + + /// + ///

Removes the given from this channel.

+ ///

Removing a listener never involves communication with the server, + /// differently from .

+ ///
+ /// The listener to remove (null to remove all). + public virtual void RemoveListener(IClientSessionChannelListener listener) + { + lock (_listeners) + { + if (null != listener) + { + if (_listeners.Contains(listener)) + _listeners.Remove(listener); + } + else + _listeners.Clear(); + } + } + + /// + /// Returns an immutable snapshot of the listeners. + /// + public virtual IList Listeners + { + get + { + lock (_listeners) + { + return new ReadOnlyCollection(_listeners); + } + } + } + + /// + /// The client session associated with this channel. + /// + public abstract IClientSession Session { get; } + + /// + ///

Publishes the given onto this channel.

+ ///

The published must not be null and can be any object that + /// can be natively converted to JSON (numbers, strings, arrays, lists, maps), + /// or objects for which a JSON converter has been registered with the + /// infrastructure responsible of the JSON conversion.

+ ///
+ /// Equivalent to (data, null). + /// The data to publish. + /// + public virtual void Publish(object data) + { + this.Publish(data, null); + } + + /// + /// Publishes the given to this channel, + /// optionally specifying the to set on the publish message. + /// + /// The data to publish. + /// The message id to set on the message, + /// or null to let the implementation choose the message id. + public abstract void Publish(object data, string messageId); + + /// + ///

Subscribes the given to receive messages sent to this channel.

+ ///

Subscription involves communication with the server only for the first listener + /// subscribed to this channel. Listeners registered after the first will not cause a message + /// being sent to the server.

+ ///
+ /// The listener to register and invoke when a message arrives on this channel. + /// + /// + public virtual void Subscribe(IMessageListener listener) + { + if (null != listener) + { + bool hasSubscriptions = false; + lock (_subscriptions) + { + if (!_subscriptions.Contains(listener)) + { + _subscriptions.Add(listener); + + if (_subscriptions.Count == 1) // TODO: > 0 + hasSubscriptions = true; + } + } + + if (hasSubscriptions) + this.SendSubscribe(); + } + } + + /// + ///

Unsubscribes the given from receiving messages sent to this channel.

+ ///

Unsubscription involves communication with the server only for the last listener + /// unsubscribed from this channel.

+ ///
+ /// The listener to unsubscribe. + /// + /// + public virtual void Unsubscribe(IMessageListener listener) + { + if (null != listener) + { + bool cleaned = false; + lock (_subscriptions) + { + bool removed = _subscriptions.Remove(listener); + if (removed) + { + if (_subscriptions.Count == 0) + cleaned = true; + } + } + + if (cleaned) + this.SendUnsubscribe(); + } + } + + /// + /// Unsubscribes all subscribers registered on this channel. + /// + /// + public virtual void Unsubscribe() + { + bool cleaned = false; + lock (_subscriptions) + { + if (_subscriptions.Count > 0) + { + _subscriptions.Clear(); + cleaned = true; + } + } + + if (cleaned) + this.SendUnsubscribe(); + } + + /// + /// Return an immutable snapshot of the subscribers. + /// + /// + public virtual IList Subscribers + { + get + { + lock (_subscriptions) + { + return new ReadOnlyCollection(_subscriptions); + } + } + } + + /// + /// Notifies the received message to all existing listeners. + /// + public virtual void NotifyMessageListeners(IMessage message) + { + IMessageListener listener; + for (int i = 0; i < _listeners.Count; i++) + { + listener = _listeners[i] as IMessageListener; + if (listener != null) + this.NotifyOnMessage(listener, message); + } + + if (message != null && message.Data != null) + { + for (int i = 0; i < _subscriptions.Count; i++) + { + listener = _subscriptions[i]; + if (listener != null) + this.NotifyOnMessage(listener, message); + } + } + } + + #endregion + + /// + /// Send subscription message(s) to Bayeux server + /// to subscribe this session channel with all assigned message listeners. + /// + protected abstract void SendSubscribe(); + + /// + /// Send un-subscription message(s) to Bayeux server + /// to un-subscribe all assigned message listeners from this session channel. + /// + protected abstract void SendUnsubscribe(); + + /// + /// Clears all subscriptions from this session channel. + /// + public virtual void ResetSubscriptions() + { + // TODO: lock (_subscriptions) _subscriptions.Clear(); + if (_subscriptions.Count > 0) this.SendSubscribe(); + } + + private void NotifyOnMessage(IMessageListener listener, IMessage message) + { + try + { + listener.OnMessage(this, message); + } + catch (Exception ex) + { + // DEBUG + Trace.TraceInformation("Exception while invoking listener: {1}{0}{2}", + Environment.NewLine, listener, ex.ToString()); + } + } + + /*public virtual bool Release() + { + if (_released) + return false; + + if (_subscriptions.Count == 0 && _listeners.Count == 0) + { + bool removed = AbstractClientSession.Channels.Remove(this.Id, this); + _released = removed; + + return removed; + } + + return false; + } + + public virtual bool IsReleased + { + get { return _released; } + }*/ + + #region IChannel Members + + /// + /// The channel id as a string. + /// + public virtual string Id + { + get { return _id.ToString(); } + } + + /// + /// The channel ID as a . + /// + public virtual ChannelId ChannelId + { + get { return _id; } + } + + /// + /// Tells whether the channel is a meta channel, + /// that is if its id starts with "/meta/". + /// + public virtual bool IsMeta + { + get { return _id.IsMeta; } + } + + /// + /// Tells whether the channel is a service channel, + /// that is if its id starts with "/service/". + /// + public virtual bool IsService + { + get { return _id.IsService; } + } + + /// + /// A broadcasting channel is a channel that is neither a + /// meta channel nor a service channel. + /// + public virtual bool IsBroadcast + { + get { return _id.IsBroadcast; } + } + + /// + /// Tells whether a channel contains the wild character '*', + /// for example "/foo/*" or if it is . + /// + public virtual bool IsWild + { + get { return _id.IsWild; } + } + + /// + /// Tells whether a channel contains the deep wild characters '**', + /// for example "/foo/**". + /// + public virtual bool IsDeepWild + { + get { return _id.IsDeepWild; } + } + + /// + /// Sets a named channel attribute value. + /// + public virtual void SetAttribute(string name, object value) + { + if (String.IsNullOrEmpty(name)) + throw new ArgumentNullException("name"); + + lock (_attributes) _attributes[name] = value; + } + + /// + /// Retrieves the value of named channel attribute. + /// + public virtual object GetAttribute(string name) + { + if (String.IsNullOrEmpty(name)) + throw new ArgumentNullException("name"); + + lock (_attributes) + { + if (_attributes.ContainsKey(name)) + return _attributes[name]; + } + + return null; + } + + /// + /// The list of channel attribute names. + /// + public virtual ICollection AttributeNames + { + get { return _attributes.Keys; } + } + + /// + /// Removes a named channel attribute. + /// + public virtual object RemoveAttribute(string name) + { + if (String.IsNullOrEmpty(name)) + throw new ArgumentNullException("name"); + + lock (_attributes) + { + if (_attributes.ContainsKey(name)) + { + object old = _attributes[name]; + _attributes.Remove(name); + + return old; + } + } + + return null; + } + + #endregion + + #region IEquatable Members + + /* + /// + /// Returns the hash code for this session channel. + /// + public override int GetHashCode() + { + return _id.GetHashCode(); + } + + /// + /// Returns a value indicating whether this session channel + /// is equal to a specified object. + /// + public override bool Equals(object obj) + { + IChannel ch = obj as IChannel; + if (ch != null) + return _id.Equals(ch.ChannelId); + + return base.Equals(obj); + } + */ + + /// + /// Used to debug. + /// + public override string ToString() + { +#if DEBUG + StringBuilder sb = new StringBuilder(); + sb.AppendFormat(CultureInfo.InvariantCulture, "{{{0} Id: {1}", Environment.NewLine, _id); + + sb.Append(Environment.NewLine).Append(" Listeners: ["); + for (int i = 0; i < _listeners.Count; i++) + { + sb.Append(Environment.NewLine).Append(" +- "); + sb.Append(_listeners[i]); + } + + sb.AppendFormat(CultureInfo.InvariantCulture, "{0} ]{0} Subscriptions: [", Environment.NewLine); + for (int i = 0; i < _subscriptions.Count; i++) + { + sb.Append(Environment.NewLine).Append(" +- "); + sb.Append(_subscriptions[i]); + } + + sb.AppendFormat(CultureInfo.InvariantCulture, "{0} ]{0}}}", Environment.NewLine); + return sb.ToString(); +#else + return _id.ToString(); +#endif + } + + #endregion + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Common/AbstractTransport.cs b/src/Genesys.Workspace/CometD.NET/Common/AbstractTransport.cs new file mode 100755 index 0000000..47d06d7 --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Common/AbstractTransport.cs @@ -0,0 +1,217 @@ +using System; +using System.Collections.Generic; + +using CometD.Bayeux; + +namespace CometD.Common +{ + /// + /// Partial implementation of . + /// + public abstract class AbstractTransport : ITransport + { + private readonly string _name; + private readonly IDictionary _options; + + private volatile string[] _prefix = new string[0]; + + /// + /// Initializes a new instance of the class. + /// + protected AbstractTransport(string name, IDictionary options) + { + if (null == name || (name = name.Trim()).Length == 0) + throw new ArgumentNullException("name"); + + _name = name; + _options = (options != null) ? options + : new Dictionary(StringComparer.OrdinalIgnoreCase); + } + + #region ITransport Members + + /// + /// The well known name of this transport, used in transport negotiations. + /// + public virtual string Name + { + get { return _name; } + } + + /// + /// Get an option value by searching the option name tree. + /// The option map obtained by calling BayeuxServer.Options + /// is searched for the option name with the most specific prefix. + /// + /// + /// If this transport was initialized with calls: + ///
+		///   OptionPrefix = "long-polling.jsonp";
+		/// 
+ /// then a call to GetOption("foobar") will look for the most specific value with names: + ///
+		///   long-polling.json.foobar
+		///   long-polling.foobar
+		///   foobar
+		/// 
+ ///
+ public virtual object GetOption(string qualifiedName) + { + if (String.IsNullOrEmpty(qualifiedName)) + throw new ArgumentNullException("qualifiedName"); + + object result = null; + _options.TryGetValue(qualifiedName, out result); + + string[] segments = _prefix; + if (segments != null && segments.Length > 0) + { + string prefix = null; + string key; + object val; + + foreach (string segment in segments) + { + prefix = (prefix == null) ? segment : (prefix + "." + segment); + + key = prefix + "." + qualifiedName; + if (_options.TryGetValue(key, out val)) + result = val; + } + } + + return result; + } + + /// + /// Sets the specified configuration option with the given . + /// + /// The configuration option name. + /// The configuration option value. + /// + public virtual void SetOption(string qualifiedName, object value) + { + if (String.IsNullOrEmpty(qualifiedName)) + throw new ArgumentNullException("qualifiedName"); + + string prefix = this.OptionPrefix; + lock (_options) + { + _options[String.IsNullOrEmpty(prefix) + ? qualifiedName : (prefix + "." + qualifiedName)] = value; + } + } + + /// + /// The set of configuration options. + /// + public virtual ICollection OptionNames + { + get + { + ICollection optionNames = new HashSet(StringComparer.OrdinalIgnoreCase); + lock (_options) + { + foreach (string name in _options.Keys) + { + int lastDot = name.LastIndexOf('.'); + optionNames.Add((lastDot < 0) ? name : name.Substring(lastDot + 1)); + } + } + + return optionNames; + } + } + + /// + /// Set the option name prefix segment. + ///

Normally this is called by the super class constructors to establish + /// a naming hierarchy for options and interacts with the + /// method to create a naming hierarchy for options.

+ ///
+ /// + /// The various methods will search this + /// name tree for the most specific match. + /// + /// + /// For example the following sequence of calls: + ///
+		///   SetOption("foo", "x");
+		///   SetOption("bar", "y");
+		///   OptionPrefix = "long-polling";
+		///   SetOption("foo", "z");
+		///   SetOption("whiz", "p");
+		///   OptionPrefix = "long-polling.jsonp";
+		///   SetOption("bang", "q");
+		///   SetOption("bar", "r");
+		/// 
+ /// will establish the following option names and values: + ///
+		///   foo: x
+		///   bar: y
+		///   long-polling.foo: z
+		///   long-polling.whiz: p
+		///   long-polling.jsonp.bang: q
+		///   long-polling.jsonp.bar: r
+		/// 
+ ///
+ public virtual string OptionPrefix + { + get + { + string[] segments = _prefix; + return (null == segments) ? null : String.Join(".", segments); + } + set + { + _prefix = (null == value) ? null + : ((value.Length == 0) ? new string[0] : value.Split('.')); + } + } + + #endregion + + #region GetOption overloaded methods + + /// + /// Get option or default value. + /// + /// The option name. + /// The default value. + /// The option or default value. + /// + public virtual string GetOption(string optionName, string defaultValue) + { + object val = this.GetOption(optionName); + if (val != null) return val.ToString(); + + return defaultValue; + } + + /// + /// Get option or default value. + /// + /// The option name. + /// The default value. + /// The option or default value. + /// + public virtual T GetOption(string optionName, T defaultValue) where T : struct + { + return ObjectConverter.ToPrimitive(this.GetOption(optionName), defaultValue); + } + + #endregion + + /// + /// Used to debug. + /// + public override string ToString() + { +#if DEBUG + return _name + "#" + this.GetHashCode(); +#else + return _name; +#endif + } + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Common/DictionaryMessage.cs b/src/Genesys.Workspace/CometD.NET/Common/DictionaryMessage.cs new file mode 100755 index 0000000..9dc3769 --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Common/DictionaryMessage.cs @@ -0,0 +1,345 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Text; +using System.Runtime.Serialization; + +using CometD.Bayeux; + +namespace CometD.Common +{ + /// + /// Implements the interface with a . + /// + [Serializable] + public sealed class DictionaryMessage : Dictionary, IMutableMessage + { + //private const long serialVersionUID = 4318697940670212190L; + + #region Constructors + + /// + /// Initializes a new instance of the class. + /// + public DictionaryMessage() : base(StringComparer.OrdinalIgnoreCase) { } + + /// + /// Initializes a new instance of the class + /// that contains elements copied from the specified . + /// + public DictionaryMessage(IDictionary message) + : base(message, StringComparer.OrdinalIgnoreCase) { } + + private DictionaryMessage(SerializationInfo info, StreamingContext context) + : base(info, context) { } + + #endregion + + #region IMessage Properties + + /// + /// Convenience method to retrieve the . + /// + public IDictionary Advice + { + get + { + return this.GetObjectValue>(Message.AdviceField); + } + } + + /// + /// Convenience method to retrieve the . + /// + /// Bayeux message always have a non null channel. + public string Channel + { + get + { + object val; + return (this.TryGetValue(Message.ChannelField, out val) && val != null) + ? val.ToString() : null; + } + set + { + this.SetOrDeleteValue(Message.ChannelField, value); + } + } + + /// + /// Convenience method to retrieve the . + /// + /// Bayeux message always have a non null channel. + public ChannelId ChannelId + { + get + { + string ch = this.Channel; + return (ch == null || (ch = ch.Trim()).Length == 0) + ? null : Bayeux.ChannelId.Create(ch); + } + } + + /// + /// Convenience method to retrieve the . + /// + public string ClientId + { + get + { + object val; + return (this.TryGetValue(Message.ClientIdField, out val) && val != null) + ? val.ToString() : null; + } + set + { + this.SetOrDeleteValue(Message.ClientIdField, value); + } + } + + /// + /// Convenience method to retrieve the . + /// + public object Data + { + get + { + object val; + return this.TryGetValue(Message.DataField, out val) ? val : null; + } + set + { + this.SetOrDeleteValue(Message.DataField, value); + } + } + + /// + /// The data of the message as a Dictionary. + /// + public IDictionary DataAsDictionary + { + get + { + return this.GetObjectValue>(Message.DataField); + } + } + + /// + /// Convenience method to retrieve the . + /// + public IDictionary Extension + { + get + { + return this.GetObjectValue>(Message.ExtensionField); + } + } + + /// + /// Convenience method to retrieve the . + /// + /// Support also old-style ids of type long. + public string Id + { + get + { + object val; + if (this.TryGetValue(Message.IdField, out val) && val != null) + return val.ToString(); + + return null; + } + set + { + this.SetOrDeleteValue(Message.IdField, value); + } + } + + /// + /// Whether the channel's message is a meta channel. + /// + public bool IsMeta + { + get { return Bayeux.Channel.IsMeta(this.Channel); } + } + + /// + /// Publish message replies contain the "successful" field. + /// + /// Whether this message is a publish reply (as opposed to a published message). + public bool IsPublishReply + { + get { return (!this.IsMeta && this.ContainsKey(Message.SuccessfulField)); } + } + + /// + /// Convenience method to retrieve the . + /// + public bool IsSuccessful + { + get + { + return this.GetValue(Message.SuccessfulField, false); + } + set + { + lock (this) this[Message.SuccessfulField] = value; + } + } + + #endregion + + #region IMutableMessage Members + + /// + /// Convenience method to retrieve the and create it if it does not exist. + /// + public IDictionary GetAdvice(bool create) + { + IDictionary result = this.Advice; + if (create && result == null) + { + result = new Dictionary(StringComparer.OrdinalIgnoreCase); + lock (this) this[Message.AdviceField] = result; + } + + return result; + } + + /// + /// Convenience method to retrieve the and create it if it does not exist. + /// + public IDictionary GetDataAsDictionary(bool create) + { + IDictionary result = this.DataAsDictionary; + if (create && result == null) + { + result = new Dictionary(StringComparer.OrdinalIgnoreCase); + lock (this) this[Message.DataField] = result; + } + + return result; + } + + /// + /// Convenience method to retrieve the and create it if it does not exist. + /// + public IDictionary GetExtension(bool create) + { + IDictionary result = this.Extension; + if (create && result == null) + { + result = new Dictionary(StringComparer.OrdinalIgnoreCase); + lock (this) this[Message.ExtensionField] = result; + } + + return result; + } + + #endregion + + #region IDictionary Extension Methods + + private void SetOrDeleteValue(string key, object value) + { + lock (this) + { + if (value == null) + { + if (this.ContainsKey(key)) + this.Remove(key); + } + else + this[key] = value; + } + } + + private T GetValue(string key, T defaultValue) where T : struct + { + object val; + return this.TryGetValue(key, out val) + ? ObjectConverter.ToPrimitive(val, defaultValue) : defaultValue; + } + + private T GetObjectValue(string key, T defaultValue = null) where T : class + { + object val; + return this.TryGetValue(key, out val) // Updates value back to the dictionary + ? ObjectConverter.ToObject(val, defaultValue, o => { lock (this) this[key] = o; }) + : defaultValue; + } + + #endregion + + #region IEquatable Members + + /// + /// Represents this message as a JSON string. + /// + public override string ToString() + { + return ObjectConverter.Serialize(this as IDictionary); + } + + #endregion + + /// + /// Converts the specified JSON string to a list of . + /// + public static IList ParseMessages(string content) + { + if (null == content || (content = content.Trim()).Length == 0) + return null; + + IList> list = null; + bool tryNext = false; + try + { + list = ObjectConverter.Deserialize>>(content); + } + catch (ArgumentException) { tryNext = true; } + catch (InvalidOperationException) { tryNext = true; } + + if (tryNext) + { + // DEBUG + //Trace.TraceInformation("Try to parse to IDictionary from JSON content: {0}", content); + try + { + IDictionary obj + = ObjectConverter.Deserialize>(content); + + if (null != obj) + { + list = new List>(); + list.Add(obj); + } + } + catch (ArgumentException ex) + { + // DEBUG + Trace.TraceWarning("Failed to parse invalid JSON content: {1}{0}{2}", + Environment.NewLine, content, ex.ToString()); + } + catch (InvalidOperationException ex) + { + // DEBUG + Trace.TraceWarning("Exception when parsing to IDictionary from JSON content: {1}{0}{2}", + Environment.NewLine, content, ex.ToString()); + } + } + + IList result = new List(); + if (list != null) + { + foreach (IDictionary message in list) + { + if (message != null && message.Count > 0) + result.Add(new DictionaryMessage(message)); + } + } + + return result; + } + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Common/ObjectConverter.cs b/src/Genesys.Workspace/CometD.NET/Common/ObjectConverter.cs new file mode 100755 index 0000000..47da983 --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Common/ObjectConverter.cs @@ -0,0 +1,178 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Text; + +using System.Web.Script.Serialization; + +namespace CometD.Common +{ + /// + /// Converts an object from one object type to another object type. + /// + public static class ObjectConverter + { + /// + /// Unsigned integer number style. + /// + public static readonly NumberStyles UnsignedNumberStyle + = NumberStyles.HexNumber | NumberStyles.AllowParentheses + | NumberStyles.AllowThousands | NumberStyles.AllowExponent; + + /// + /// Signed integer number style. + /// + public static readonly NumberStyles IntegerNumberStyle + = NumberStyles.Integer | NumberStyles.AllowTrailingSign | NumberStyles.AllowParentheses + | NumberStyles.AllowThousands | NumberStyles.AllowExponent | NumberStyles.AllowHexSpecifier; + + private static readonly IDictionary> parserLookup + = new Dictionary>() + { + { typeof(bool), s => bool.Parse(s) }, + // + { typeof(byte), s => byte.Parse(s, UnsignedNumberStyle, CultureInfo.CurrentCulture) }, + { typeof(sbyte), s => sbyte.Parse(s, IntegerNumberStyle, CultureInfo.CurrentCulture) }, + { typeof(short), s => short.Parse(s, IntegerNumberStyle, CultureInfo.CurrentCulture) }, + { typeof(ushort), s => ushort.Parse(s, UnsignedNumberStyle, CultureInfo.CurrentCulture) }, + { typeof(int), s => int.Parse(s, IntegerNumberStyle, CultureInfo.CurrentCulture) }, + { typeof(uint), s => uint.Parse(s, UnsignedNumberStyle, CultureInfo.CurrentCulture) }, + { typeof(long), s => long.Parse(s, IntegerNumberStyle, CultureInfo.CurrentCulture) }, + { typeof(ulong), s => ulong.Parse(s, UnsignedNumberStyle, CultureInfo.CurrentCulture) }, + // + { typeof(decimal), s => decimal.Parse(s, IntegerNumberStyle | NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture) }, + { typeof(float), s => float.Parse(s, IntegerNumberStyle | NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture) }, + { typeof(double), s => double.Parse(s, IntegerNumberStyle | NumberStyles.AllowDecimalPoint, CultureInfo.CurrentCulture) }, + // + { typeof(DateTime), s => DateTime.Parse(s, CultureInfo.CurrentCulture, DateTimeStyles.AssumeLocal | DateTimeStyles.AllowWhiteSpaces) }, + }; + + private static readonly JavaScriptSerializer jsonParser = new JavaScriptSerializer(); + + /// + /// Converts the specified JSON string to an object of type . + /// + /// The type of the resulting object. + /// The JSON string to be deserialized. + /// The deserialized object. + /// is null. + /// Invalid JSON string. + /// It is not possible to convert input to . + public static T Deserialize(string content) + { + return jsonParser.Deserialize(content); + } + + /// + /// Converts an object to a JSON string. + /// + /// The object to serialize. + /// The serialized JSON string. + /// The recursion limit was exceeded. + /// The resulting JSON string exceeds MaxJsonLength. + /// -or- contains a circular reference. + public static string Serialize(object value) + { + return jsonParser.Serialize(value); + } + + /// + /// Converts a specified to a primitive type + /// like , , ,.. + /// + public static T ToPrimitive(object value, T defaultValue) where T : struct + { + if (value != null) + { + Type type = typeof(T); + try + { + return (T)Convert.ChangeType(value, type, CultureInfo.InvariantCulture); + } + catch (InvalidCastException) + { + string s = value.ToString().Trim(); + if (!String.IsNullOrEmpty(s) && parserLookup.ContainsKey(type)) + { + try + { + return (T)parserLookup[type](s); + } + catch (ArgumentException ex) + { + // DEBUG + Trace.TraceWarning("Failed to parse invalid value '{1}' of type {2}:{0}{3}", + Environment.NewLine, s, type.Name, ex.ToString()); + } + catch (FormatException ex) + { + // DEBUG + Trace.TraceWarning("Failed to parse invalid-format value '{1}' of type {2}:{0}{3}", + Environment.NewLine, s, type.Name, ex.ToString()); + } + catch (OverflowException ex) + { + // DEBUG + Trace.TraceWarning("Failed to parse overflow value '{1}' of type {2}:{0}{3}", + Environment.NewLine, s, type.Name, ex.ToString()); + } + } + } + } + + return defaultValue; + } + + /// + /// Converts a specified to a generic object type + /// like , ,.. + /// + public static T ToObject(object value, T defaultValue = null, Action finallyCallback = null) where T : class + { + if (null != value) + { + T result = value as T; + if (result == null) + { + string s = value as string; + try + { + if (s != null) s = s.Trim(); + else + { + // DEBUG + Trace.TraceWarning("Invalid cast from type: {0} to type: {1}", value.GetType(), typeof(T)); + s = jsonParser.Serialize(value); + } + + result = jsonParser.Deserialize(s); + } + catch (ArgumentException ex) + { + // DEBUG + Trace.TraceWarning("Failed to parse invalid JSON value: {1}{0}{2}", + Environment.NewLine, s, ex.ToString()); + } + catch (InvalidOperationException ex) + { + // DEBUG + Trace.TraceWarning("Failed to parse to {1} from JSON content: {2}{0}{3}", + Environment.NewLine, typeof(T), s, ex.ToString()); + } + finally + { + if (null != finallyCallback) + finallyCallback(result); + } + } + + return result; + } + + return defaultValue; + } + + } +} diff --git a/src/Genesys.Workspace/CometD.NET/Common/TransportException.cs b/src/Genesys.Workspace/CometD.NET/Common/TransportException.cs new file mode 100755 index 0000000..f56c34d --- /dev/null +++ b/src/Genesys.Workspace/CometD.NET/Common/TransportException.cs @@ -0,0 +1,37 @@ +using System; +using System.Runtime.Serialization; + +namespace CometD.Common +{ + /// + /// Defines the base class for Bayeux transport exceptions. + /// + [Serializable] + public class TransportException : SystemException + { + /// + /// Initializes a new instance of the class. + /// + public TransportException() : base() { } + + /// + /// Initializes a new instance of the class + /// with a specified error message. + /// + public TransportException(string message) : base(message) { } + + /// + /// Initializes a new instance of the class + /// with a specified error message and a reference to the inner exception + /// that is the cause of this exception. + /// + public TransportException(string message, Exception cause) + : base(message, cause) { } + + /// + /// Initializes a new instance of the class with serialized data. + /// + protected TransportException(SerializationInfo info, StreamingContext context) + : base(info, context) { } + } +} diff --git a/src/Genesys.Workspace/Common/ClientTransport.cs b/src/Genesys.Workspace/Common/ClientTransport.cs new file mode 100644 index 0000000..5b98c2d --- /dev/null +++ b/src/Genesys.Workspace/Common/ClientTransport.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.Net; +using CometD.Client.Transport; + +namespace Genesys.Workspace.Common +{ + public class ClientTransport : LongPollingTransport + { + private IDictionary options; + private CookieCollection cookieCollection = new CookieCollection(); + + public ClientTransport(IDictionary options, CookieCollection cookies) + : base(options) + { + this.options = options; + + foreach (Cookie cookie in cookies) + { + this.cookieCollection.Add(cookie); + } + } + + /// + /// Returns the with a specific name from this HTTP transport. + /// + override public Cookie GetCookie(string name) + { + Cookie cookie = base.GetCookie(name); + return cookie; + } + + /// + /// Adds a to this HTTP transport. + /// + override public void SetCookie(Cookie cookie) + { + this.cookieCollection.Add(cookie); + + base.SetCookie(cookie); + } + + /// + /// Setups HTTP request headers. + /// + override protected void ApplyRequestHeaders(HttpWebRequest request) + { + if (null == request) + throw new ArgumentNullException("request"); + + foreach (String key in this.options.Keys) + { + request.Headers[key] = (string)this.options[key]; + } + } + + /// + /// Setups HTTP request cookies. + /// + override protected void ApplyRequestCookies(HttpWebRequest request) + { + if (null == request) + throw new ArgumentNullException("request"); + + request.CookieContainer = new CookieContainer(); + + foreach (Cookie c in this.cookieCollection) + { + request.CookieContainer.Add(new Cookie(c.Name, c.Value, "/", "api-usw1.genhtcc.com")); + } + } + } +} + diff --git a/src/Genesys.Workspace/Common/Util.cs b/src/Genesys.Workspace/Common/Util.cs new file mode 100755 index 0000000..743b19b --- /dev/null +++ b/src/Genesys.Workspace/Common/Util.cs @@ -0,0 +1,476 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Genesys.Workspace.Internal.Model; +using Genesys.Workspace.Model; + +namespace Genesys.Workspace.Common +{ + public enum StatusCode : int + { + OK = 0, + ASYNC_OK = 1 + } + + public enum AgentState + { + Unknown, + LoggedOut, + LoggedIn, + Ready, + NotReady, + OutOfService + } + + public enum AgentWorkMode + { + Unknown, + AuxWork, + AfterCallWork, + AutoIn, + ManualIn + } + + public enum ActionCodeType + { + UNKNOWN, + LOGIN, + LOGOUT, + READY, + NOT_READY, + BUSY_ON, + BUSY_OFF, + FORWARD_ON, + FORWARD_OFF, + INTERNAL_CALL, + INBOUND_CALL, + OUTBOUND_CALL, + CONFERENCE, + TRANSFER + } + + public enum CallState + { + UNKNOWN, + RINGING, + DIALING, + ESTABLISHED, + HELD, + RELEASED, + COMPLETED + } + + public enum NotificationType + { + UNKNOWN, + STATE_CHANGE, + PARTICIPANTS_UPDATED, + ATTACHED_DATA_CHANGED, + CALL_RECOVERED + } + + public enum AgentActivity + { + UNKNOWN, + IDLE, + HANDLING_INBOUND_CALL, + HANDLING_INTERNAL_CALL, + HANDLING_OUTBOUND_CALL, + HANDLING_CONSULT_CALL, + INITIATING_CALL, + RECEIVING_CALL, + CALL_ON_HOLD, + HANDLING_INBOUND_INTERACTION, + HANDLING_INTERNAL_INTERACTION, + HANDLING_OUTBOUND_INTERACTION, + DELIVERING_INTERACTION + } + + public enum DnCapability + { + ready, + not_ready, + dnd_on, + dnd_off, + set_forward, + cancel_forward, + login, + logoff + } + + public enum CallCapability + { + answer, + release, + hold, + retrieve, + send_dtmf, + attach_user_data, + delete_user_data_pair, + update_user_data, + initiate_conference, + initiate_transfer, + complete_conference, + complete_transfer, + single_step_conference, + single_step_transfer, + delete_from_conference, + start_recording, + stop_recording, + pause_recording, + resume_recording, + switch_to_listen_in, + switch_to_coaching, + switch_to_barge_in, + alternate, + clear, + reconnect, + redirect, + complete, + merge + } + + public enum TargetType + { + AGENT, + AGENT_GROUP, + ACD_QUEUE, + ROUTE_POINT, + SKILL, + CUSTOM_CONTACT + } + + public static class Util + { + public static ActionCodeType parseActionCodeType(String input) + { + + ActionCodeType type = ActionCodeType.UNKNOWN; + if (input == null) + { + return type; + } + + switch (input) + { + case "Login": + type = ActionCodeType.LOGIN; + break; + + case "Logout": + type = ActionCodeType.LOGOUT; + break; + + case "Ready": + type = ActionCodeType.READY; + break; + + case "NotReady": + type = ActionCodeType.NOT_READY; + break; + + case "BusyOn": + type = ActionCodeType.BUSY_ON; + break; + + case "BusyOff": + type = ActionCodeType.BUSY_OFF; + break; + + case "ForwardOn": + type = ActionCodeType.FORWARD_ON; + break; + + case "Forwardoff": + type = ActionCodeType.FORWARD_OFF; + break; + + case "InternalCall": + type = ActionCodeType.INTERNAL_CALL; + break; + + case "InboundCall": + type = ActionCodeType.INBOUND_CALL; + break; + + case "OutboundCall": + type = ActionCodeType.OUTBOUND_CALL; + break; + + case "Conference": + type = ActionCodeType.CONFERENCE; + break; + + case "Transfer": + type = ActionCodeType.TRANSFER; + break; + } + + return type; + } + + public static void extractKeyValueData(KeyValueCollection userData, object dataObj) + { + if (dataObj == null) + { + return; + } + + //JC: .NET Framework will return dataObj as an object[] + // Mono will return dataObj as an ArrayList + // Do the translation here to support both frameworks. + ArrayList data = null; + + if ( dataObj is ArrayList ) + data = (ArrayList)dataObj; + else if ( dataObj is object[] ) + data = new ArrayList((object[])dataObj); + else + data = new ArrayList(); + + for (int i = 0; i < data.Count; i++) + { + IDictionary pair = (IDictionary)data[i]; + string key = (string)pair["key"]; + string type = (string)pair["type"]; + + switch (type) + { + case "str": + userData.addString(key, (String)pair["value"]); + break; + + case "int": + userData.addInt(key, (int)pair["value"]); + break; + + case "kvlist": + KeyValueCollection list = new KeyValueCollection(); + Util.extractKeyValueData(list, pair["value"]); + userData.addList(key, list); + break; + } + } + } + + public static String[] extractParticipants(object dataObj) + { + if ( dataObj == null ) + { + return null; + } + + //JC: .NET Framework will return dataObj as an object[] + // Mono will return dataObj as an ArrayList + // Do the translation here to support both frameworks. + ArrayList data = null; + + if ( dataObj is ArrayList ) + data = (ArrayList)dataObj; + else if (dataObj is object[]) + data = new ArrayList((object[])dataObj); + else + data = new ArrayList(); + + String[] participants = new String[data.Count]; + + for (int i = 0; i < data.Count; i++) + { + IDictionary p = (IDictionary)data[i]; + String number = (String)p["number"]; + participants[i] = number; + } + + return participants; + } + + public static CallState parseCallState(String input) + { + CallState state = CallState.UNKNOWN; + if (input != null) + { + switch (input) + { + case "Ringing": + state = CallState.RINGING; + break; + + case "Dialing": + state = CallState.DIALING; + break; + + case "Established": + state = CallState.ESTABLISHED; + break; + + case "Held": + state = CallState.HELD; + break; + + case "Released": + state = CallState.RELEASED; + break; + + case "Completed": + state = CallState.COMPLETED; + break; + } + } + + return state; + } + + public static NotificationType parseNotificationType(String input) + { + NotificationType type = NotificationType.UNKNOWN; + if (input != null) + { + switch (input) + { + case "StateChange": + type = NotificationType.STATE_CHANGE; + break; + + case "ParticipantsUpdated": + type = NotificationType.PARTICIPANTS_UPDATED; + break; + + case "AttachedDataChanged": + type = NotificationType.ATTACHED_DATA_CHANGED; + break; + + case "CallRecovered": + type = NotificationType.CALL_RECOVERED; + break; + } + } + + return type; + } + + public static AgentActivity parseAgentActivity(String input) + { + AgentActivity activity = AgentActivity.UNKNOWN; + if (input != null) + { + switch (input) + { + case "Idle": + activity = AgentActivity.IDLE; + break; + + case "HandlingInboundCall": + activity = AgentActivity.HANDLING_INBOUND_CALL; + break; + + case "HandlingInternalCall": + activity = AgentActivity.HANDLING_INTERNAL_CALL; + break; + + case "HandlingOutboundCall": + activity = AgentActivity.HANDLING_OUTBOUND_CALL; + break; + + case "HandlingConsultCall": + activity = AgentActivity.HANDLING_CONSULT_CALL; + break; + + case "InitiatingCall": + activity = AgentActivity.INITIATING_CALL; + break; + + case "ReceivingCall": + activity = AgentActivity.RECEIVING_CALL; + break; + + case "CallOnHold": + activity = AgentActivity.CALL_ON_HOLD; + break; + + case "HandlingInboundInteraction": + activity = AgentActivity.HANDLING_INBOUND_INTERACTION; + break; + + case "HandlingInternalInteraction": + activity = AgentActivity.HANDLING_INTERNAL_INTERACTION; + break; + + case "HandlingOutboundInteraction": + activity = AgentActivity.HANDLING_OUTBOUND_INTERACTION; + break; + + case "DeliveringInteraction": + activity = AgentActivity.DELIVERING_INTERACTION; + break; + + + } + } + + return activity; + } + + //public static Capability? CapabilityFromString(String s) + //{ + // s = s.Replace("-", ""); + + // foreach (Capability v in Enum.GetValues(typeof(Capability))) + // { + // if (v.ToString().Equals(s, StringComparison.InvariantCultureIgnoreCase)) + // { + // return v; + // } + // } + + // return null; + //} + + public static TV GetValue(this IDictionary dict, TK key, TV defaultValue = default(TV)) + { + TV value; + return dict.TryGetValue(key, out value) ? value : defaultValue; + } + + public static ArrayList GetAsArrayList(this IDictionary dict, TK key) + { + ArrayList list; + + object data = dict.GetValue(key); + + if (data != null) + { + if (data is ArrayList) + list = (ArrayList)data; + else if (data is object[]) + list = new ArrayList((object[])data); + else + list = new ArrayList(); + } + else + { + list = new ArrayList(); + } + + return list; + } + + public static string ToDebugString(this IDictionary dictionary) + { + return "{" + string.Join(",", dictionary.Select(kv => kv.Key + "=" + kv.Value).ToArray()) + "}"; + } + + public static void ThrowIfNotOk(String requestName, ApiSuccessResponse response) + { + if ( response.Status == null ) + { + throw new WorkspaceApiException(requestName + " failed with code: "); + } + + if (response.Status.Code != (int)StatusCode.ASYNC_OK) + { + throw new WorkspaceApiException(requestName + " failed with code: " + response.Status.Code); + } + } + } +} diff --git a/src/Genesys.Workspace/Common/WorkspaceApiClient.cs b/src/Genesys.Workspace/Common/WorkspaceApiClient.cs new file mode 100644 index 0000000..88d5c35 --- /dev/null +++ b/src/Genesys.Workspace/Common/WorkspaceApiClient.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using Genesys.Workspace.Internal.Client; +using RestSharp; + +namespace Genesys.Workspace.Common +{ + public class WorkspaceApiClient : ApiClient + { + public WorkspaceApiClient(string basePath) : base( basePath) + { + } + + /// + /// Allows for extending request processing for generated code. + /// + /// The RestSharp request object + protected void InterceptRequest(IRestRequest request) + { + bool bodyFound = false; + + foreach(Parameter p in request.Parameters) + { + if ( p.Type == ParameterType.RequestBody ) + { + bodyFound = true; + } + } + + if ( !bodyFound ) + { + request.AddParameter("application/json", "", ParameterType.RequestBody); + } + } + + /// + /// Allows for extending response processing for generated code. + /// + /// The RestSharp request object + /// The RestSharp response object + protected void InterceptResponse(IRestRequest request, IRestResponse response) + { + + } + } +} diff --git a/src/Genesys.Workspace/Common/WorkspaceApiException.cs b/src/Genesys.Workspace/Common/WorkspaceApiException.cs new file mode 100644 index 0000000..bb8773f --- /dev/null +++ b/src/Genesys.Workspace/Common/WorkspaceApiException.cs @@ -0,0 +1,15 @@ +using System; + +namespace Genesys.Workspace.Common +{ + public class WorkspaceApiException : Exception + { + public WorkspaceApiException(String msg) : base(msg) + { + } + + public WorkspaceApiException(String msg, Exception cause) : base(msg, cause) + { + } + } +} diff --git a/src/Genesys.Workspace/Genesys.Workspace.csproj b/src/Genesys.Workspace/Genesys.Workspace.csproj index b1e2af8..0aca541 100644 --- a/src/Genesys.Workspace/Genesys.Workspace.csproj +++ b/src/Genesys.Workspace/Genesys.Workspace.csproj @@ -1,15 +1,5 @@ - - - + - Debug AnyCPU {B45B2CC4-D4B3-4E35-A913-D19D81215F4E} @@ -54,19 +44,245 @@ OpenAPI spec version: 1.0.0 ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\..\packages\RestSharp.105.2.3\lib\net45\RestSharp.dll + + + + ..\..\..\console-agent-app-csharp\packages\log4net.2.0.8\lib\net45-full\log4net.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + - - + \ No newline at end of file diff --git a/src/Genesys.Workspace/Api/DocumentationApi.cs b/src/Genesys.Workspace/Internal/Api/DocumentationApi.cs similarity index 87% rename from src/Genesys.Workspace/Api/DocumentationApi.cs rename to src/Genesys.Workspace/Internal/Api/DocumentationApi.cs index 2ad17d3..0951924 100644 --- a/src/Genesys.Workspace/Api/DocumentationApi.cs +++ b/src/Genesys.Workspace/Internal/Api/DocumentationApi.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -13,9 +13,9 @@ using System.Collections.ObjectModel; using System.Linq; using RestSharp; -using Genesys.Workspace.Client; +using Genesys.Workspace.Internal.Client; -namespace Genesys.Workspace.Api +namespace Genesys.Workspace.Internal.Api { /// /// Represents a collection of functions to interact with the API endpoints @@ -29,7 +29,7 @@ public interface IDocumentationApi : IApiAccessor /// /// Returns API description in Swagger format /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// void SwaggerDoc (); @@ -39,7 +39,7 @@ public interface IDocumentationApi : IApiAccessor /// /// Returns API description in Swagger format /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of Object(void) ApiResponse SwaggerDocWithHttpInfo (); #endregion Synchronous Operations @@ -50,7 +50,7 @@ public interface IDocumentationApi : IApiAccessor /// /// Returns API description in Swagger format /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of void System.Threading.Tasks.Task SwaggerDocAsync (); @@ -60,7 +60,7 @@ public interface IDocumentationApi : IApiAccessor /// /// Returns API description in Swagger format /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse System.Threading.Tasks.Task> SwaggerDocAsyncWithHttpInfo (); #endregion Asynchronous Operations @@ -71,7 +71,7 @@ public interface IDocumentationApi : IApiAccessor /// public partial class DocumentationApi : IDocumentationApi { - private Genesys.Workspace.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + private Genesys.Workspace.Internal.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class. @@ -81,7 +81,7 @@ public DocumentationApi(String basePath) { this.Configuration = new Configuration(new ApiClient(basePath)); - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -103,7 +103,7 @@ public DocumentationApi(Configuration configuration = null) else this.Configuration = configuration; - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -140,7 +140,7 @@ public void SetBasePath(String basePath) /// /// Provides a factory method hook for the creation of exceptions. /// - public Genesys.Workspace.Client.ExceptionFactory ExceptionFactory + public Genesys.Workspace.Internal.Client.ExceptionFactory ExceptionFactory { get { @@ -178,7 +178,7 @@ public void AddDefaultHeader(string key, string value) /// /// Returns API description in Swagger format Returns API description in Swagger format /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// public void SwaggerDoc () { @@ -188,7 +188,7 @@ public void SwaggerDoc () /// /// Returns API description in Swagger format Returns API description in Swagger format /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of Object(void) public ApiResponse SwaggerDocWithHttpInfo () { @@ -238,7 +238,7 @@ public ApiResponse SwaggerDocWithHttpInfo () /// /// Returns API description in Swagger format Returns API description in Swagger format /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of void public async System.Threading.Tasks.Task SwaggerDocAsync () { @@ -249,7 +249,7 @@ public async System.Threading.Tasks.Task SwaggerDocAsync () /// /// Returns API description in Swagger format Returns API description in Swagger format /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse public async System.Threading.Tasks.Task> SwaggerDocAsyncWithHttpInfo () { diff --git a/src/Genesys.Workspace/Api/GroupsApi.cs b/src/Genesys.Workspace/Internal/Api/GroupsApi.cs similarity index 91% rename from src/Genesys.Workspace/Api/GroupsApi.cs rename to src/Genesys.Workspace/Internal/Api/GroupsApi.cs index e31a850..1f41df5 100644 --- a/src/Genesys.Workspace/Api/GroupsApi.cs +++ b/src/Genesys.Workspace/Internal/Api/GroupsApi.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -13,10 +13,10 @@ using System.Collections.ObjectModel; using System.Linq; using RestSharp; -using Genesys.Workspace.Client; -using Genesys.Workspace.Model; +using Genesys.Workspace.Internal.Client; +using Genesys.Workspace.Internal.Model; -namespace Genesys.Workspace.Api +namespace Genesys.Workspace.Internal.Api { /// /// Represents a collection of functions to interact with the API endpoints @@ -30,7 +30,7 @@ public interface IGroupsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the group to get users for /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) @@ -45,7 +45,7 @@ public interface IGroupsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the group to get users for /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) @@ -61,7 +61,7 @@ public interface IGroupsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the group to get users for /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) @@ -76,7 +76,7 @@ public interface IGroupsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the group to get users for /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) @@ -92,7 +92,7 @@ public interface IGroupsApi : IApiAccessor /// public partial class GroupsApi : IGroupsApi { - private Genesys.Workspace.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + private Genesys.Workspace.Internal.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class. @@ -102,7 +102,7 @@ public GroupsApi(String basePath) { this.Configuration = new Configuration(new ApiClient(basePath)); - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -124,7 +124,7 @@ public GroupsApi(Configuration configuration = null) else this.Configuration = configuration; - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -161,7 +161,7 @@ public void SetBasePath(String basePath) /// /// Provides a factory method hook for the creation of exceptions. /// - public Genesys.Workspace.Client.ExceptionFactory ExceptionFactory + public Genesys.Workspace.Internal.Client.ExceptionFactory ExceptionFactory { get { @@ -199,7 +199,7 @@ public void AddDefaultHeader(string key, string value) /// /// Search for users by specific group ID /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the group to get users for /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) @@ -215,7 +215,7 @@ public ApiSuccessResponse GetGroupUsers (decimal? groupId, string searchTerm = n /// /// Search for users by specific group ID /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the group to get users for /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) @@ -278,7 +278,7 @@ public ApiResponse< ApiSuccessResponse > GetGroupUsersWithHttpInfo (decimal? gro /// /// Search for users by specific group ID /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the group to get users for /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) @@ -295,7 +295,7 @@ public async System.Threading.Tasks.Task GetGroupUsersAsync /// /// Search for users by specific group ID /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the group to get users for /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) diff --git a/src/Genesys.Workspace/Api/MediaApi.cs b/src/Genesys.Workspace/Internal/Api/MediaApi.cs similarity index 90% rename from src/Genesys.Workspace/Api/MediaApi.cs rename to src/Genesys.Workspace/Internal/Api/MediaApi.cs index 10e6892..41316e0 100644 --- a/src/Genesys.Workspace/Api/MediaApi.cs +++ b/src/Genesys.Workspace/Internal/Api/MediaApi.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -13,10 +13,10 @@ using System.Collections.ObjectModel; using System.Linq; using RestSharp; -using Genesys.Workspace.Client; -using Genesys.Workspace.Model; +using Genesys.Workspace.Internal.Client; +using Genesys.Workspace.Internal.Model; -namespace Genesys.Workspace.Api +namespace Genesys.Workspace.Internal.Api { /// /// Represents a collection of functions to interact with the API endpoints @@ -30,7 +30,7 @@ public interface IMediaApi : IApiAccessor /// /// Accept the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to accept /// id of interaction to accept /// Request parameters. (optional) @@ -43,7 +43,7 @@ public interface IMediaApi : IApiAccessor /// /// Accept the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to accept /// id of interaction to accept /// Request parameters. (optional) @@ -55,7 +55,7 @@ public interface IMediaApi : IApiAccessor /// /// Set the comment for the interaction /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// @@ -68,7 +68,7 @@ public interface IMediaApi : IApiAccessor /// /// Set the comment for the interaction /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// @@ -80,7 +80,7 @@ public interface IMediaApi : IApiAccessor /// /// Create the interaction in UCS database /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// (optional) @@ -93,7 +93,7 @@ public interface IMediaApi : IApiAccessor /// /// Create the interaction in UCS database /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// (optional) @@ -105,7 +105,7 @@ public interface IMediaApi : IApiAccessor /// /// Complete the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to complete /// id of interaction to complete /// ApiSuccessResponse @@ -117,7 +117,7 @@ public interface IMediaApi : IApiAccessor /// /// Complete the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to complete /// id of interaction to complete /// ApiResponse of ApiSuccessResponse @@ -128,7 +128,7 @@ public interface IMediaApi : IApiAccessor /// /// Deletes the specified key from the interaction data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// The keys of the key/value pairs to delete. @@ -141,7 +141,7 @@ public interface IMediaApi : IApiAccessor /// /// Deletes the specified key from the interaction data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// The keys of the key/value pairs to delete. @@ -153,7 +153,7 @@ public interface IMediaApi : IApiAccessor /// /// Turn off do not disturb for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse ApiSuccessResponse DndOff (); @@ -163,7 +163,7 @@ public interface IMediaApi : IApiAccessor /// /// Turn off do not disturb for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse ApiResponse DndOffWithHttpInfo (); /// @@ -172,7 +172,7 @@ public interface IMediaApi : IApiAccessor /// /// Turn on do not disturb for open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse ApiSuccessResponse DndOn (); @@ -182,7 +182,7 @@ public interface IMediaApi : IApiAccessor /// /// Turn on do not disturb for open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse ApiResponse DndOnWithHttpInfo (); /// @@ -191,7 +191,7 @@ public interface IMediaApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse ApiSuccessResponse LogoutAgentState (); @@ -201,7 +201,7 @@ public interface IMediaApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse ApiResponse LogoutAgentStateWithHttpInfo (); /// @@ -210,7 +210,7 @@ public interface IMediaApi : IApiAccessor /// /// Attach the interaction userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// An array of key/value pairs. @@ -223,7 +223,7 @@ public interface IMediaApi : IApiAccessor /// /// Attach the interaction userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// An array of key/value pairs. @@ -235,7 +235,7 @@ public interface IMediaApi : IApiAccessor /// /// Update the interaction userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// An array of key/value pairs. @@ -248,7 +248,7 @@ public interface IMediaApi : IApiAccessor /// /// Update the interaction userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// An array of key/value pairs. @@ -260,7 +260,7 @@ public interface IMediaApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse ApiSuccessResponse NotReadyAgentState (); @@ -270,7 +270,7 @@ public interface IMediaApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse ApiResponse NotReadyAgentStateWithHttpInfo (); /// @@ -279,7 +279,7 @@ public interface IMediaApi : IApiAccessor /// /// Change to the not ready state for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// /// ApiSuccessResponse @@ -291,7 +291,7 @@ public interface IMediaApi : IApiAccessor /// /// Change to the not ready state for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// /// ApiResponse of ApiSuccessResponse @@ -302,7 +302,7 @@ public interface IMediaApi : IApiAccessor /// /// Place the interaction in queue with modification of properties pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// @@ -315,7 +315,7 @@ public interface IMediaApi : IApiAccessor /// /// Place the interaction in queue with modification of properties pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// @@ -327,7 +327,7 @@ public interface IMediaApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse ApiSuccessResponse ReadyAgentState (); @@ -337,7 +337,7 @@ public interface IMediaApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse ApiResponse ReadyAgentStateWithHttpInfo (); /// @@ -346,7 +346,7 @@ public interface IMediaApi : IApiAccessor /// /// Change to the ready state for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// (optional) /// ApiSuccessResponse @@ -358,7 +358,7 @@ public interface IMediaApi : IApiAccessor /// /// Change to the ready state for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// (optional) /// ApiResponse of ApiSuccessResponse @@ -369,7 +369,7 @@ public interface IMediaApi : IApiAccessor /// /// Reject the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to reject /// id of interaction to reject /// Request parameters. (optional) @@ -382,7 +382,7 @@ public interface IMediaApi : IApiAccessor /// /// Reject the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to reject /// id of interaction to reject /// Request parameters. (optional) @@ -394,7 +394,7 @@ public interface IMediaApi : IApiAccessor /// /// Logout the open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// /// ApiSuccessResponse @@ -406,7 +406,7 @@ public interface IMediaApi : IApiAccessor /// /// Logout the open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// /// ApiResponse of ApiSuccessResponse @@ -419,7 +419,7 @@ public interface IMediaApi : IApiAccessor /// /// Accept the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to accept /// id of interaction to accept /// Request parameters. (optional) @@ -432,7 +432,7 @@ public interface IMediaApi : IApiAccessor /// /// Accept the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to accept /// id of interaction to accept /// Request parameters. (optional) @@ -444,7 +444,7 @@ public interface IMediaApi : IApiAccessor /// /// Set the comment for the interaction /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// @@ -457,7 +457,7 @@ public interface IMediaApi : IApiAccessor /// /// Set the comment for the interaction /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// @@ -469,7 +469,7 @@ public interface IMediaApi : IApiAccessor /// /// Create the interaction in UCS database /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// (optional) @@ -482,7 +482,7 @@ public interface IMediaApi : IApiAccessor /// /// Create the interaction in UCS database /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// (optional) @@ -494,7 +494,7 @@ public interface IMediaApi : IApiAccessor /// /// Complete the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to complete /// id of interaction to complete /// Task of ApiSuccessResponse @@ -506,7 +506,7 @@ public interface IMediaApi : IApiAccessor /// /// Complete the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to complete /// id of interaction to complete /// Task of ApiResponse (ApiSuccessResponse) @@ -517,7 +517,7 @@ public interface IMediaApi : IApiAccessor /// /// Deletes the specified key from the interaction data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// The keys of the key/value pairs to delete. @@ -530,7 +530,7 @@ public interface IMediaApi : IApiAccessor /// /// Deletes the specified key from the interaction data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// The keys of the key/value pairs to delete. @@ -542,7 +542,7 @@ public interface IMediaApi : IApiAccessor /// /// Turn off do not disturb for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse System.Threading.Tasks.Task DndOffAsync (); @@ -552,7 +552,7 @@ public interface IMediaApi : IApiAccessor /// /// Turn off do not disturb for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> DndOffAsyncWithHttpInfo (); /// @@ -561,7 +561,7 @@ public interface IMediaApi : IApiAccessor /// /// Turn on do not disturb for open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse System.Threading.Tasks.Task DndOnAsync (); @@ -571,7 +571,7 @@ public interface IMediaApi : IApiAccessor /// /// Turn on do not disturb for open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> DndOnAsyncWithHttpInfo (); /// @@ -580,7 +580,7 @@ public interface IMediaApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse System.Threading.Tasks.Task LogoutAgentStateAsync (); @@ -590,7 +590,7 @@ public interface IMediaApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> LogoutAgentStateAsyncWithHttpInfo (); /// @@ -599,7 +599,7 @@ public interface IMediaApi : IApiAccessor /// /// Attach the interaction userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// An array of key/value pairs. @@ -612,7 +612,7 @@ public interface IMediaApi : IApiAccessor /// /// Attach the interaction userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// An array of key/value pairs. @@ -624,7 +624,7 @@ public interface IMediaApi : IApiAccessor /// /// Update the interaction userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// An array of key/value pairs. @@ -637,7 +637,7 @@ public interface IMediaApi : IApiAccessor /// /// Update the interaction userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// An array of key/value pairs. @@ -649,7 +649,7 @@ public interface IMediaApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse System.Threading.Tasks.Task NotReadyAgentStateAsync (); @@ -659,7 +659,7 @@ public interface IMediaApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> NotReadyAgentStateAsyncWithHttpInfo (); /// @@ -668,7 +668,7 @@ public interface IMediaApi : IApiAccessor /// /// Change to the not ready state for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// /// Task of ApiSuccessResponse @@ -680,7 +680,7 @@ public interface IMediaApi : IApiAccessor /// /// Change to the not ready state for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// /// Task of ApiResponse (ApiSuccessResponse) @@ -691,7 +691,7 @@ public interface IMediaApi : IApiAccessor /// /// Place the interaction in queue with modification of properties pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// @@ -704,7 +704,7 @@ public interface IMediaApi : IApiAccessor /// /// Place the interaction in queue with modification of properties pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// @@ -716,7 +716,7 @@ public interface IMediaApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse System.Threading.Tasks.Task ReadyAgentStateAsync (); @@ -726,7 +726,7 @@ public interface IMediaApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> ReadyAgentStateAsyncWithHttpInfo (); /// @@ -735,7 +735,7 @@ public interface IMediaApi : IApiAccessor /// /// Change to the ready state for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// (optional) /// Task of ApiSuccessResponse @@ -747,7 +747,7 @@ public interface IMediaApi : IApiAccessor /// /// Change to the ready state for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// (optional) /// Task of ApiResponse (ApiSuccessResponse) @@ -758,7 +758,7 @@ public interface IMediaApi : IApiAccessor /// /// Reject the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to reject /// id of interaction to reject /// Request parameters. (optional) @@ -771,7 +771,7 @@ public interface IMediaApi : IApiAccessor /// /// Reject the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to reject /// id of interaction to reject /// Request parameters. (optional) @@ -783,7 +783,7 @@ public interface IMediaApi : IApiAccessor /// /// Logout the open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// /// Task of ApiSuccessResponse @@ -795,7 +795,7 @@ public interface IMediaApi : IApiAccessor /// /// Logout the open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// /// Task of ApiResponse (ApiSuccessResponse) @@ -808,7 +808,7 @@ public interface IMediaApi : IApiAccessor /// public partial class MediaApi : IMediaApi { - private Genesys.Workspace.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + private Genesys.Workspace.Internal.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class. @@ -818,7 +818,7 @@ public MediaApi(String basePath) { this.Configuration = new Configuration(new ApiClient(basePath)); - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -840,7 +840,7 @@ public MediaApi(Configuration configuration = null) else this.Configuration = configuration; - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -877,7 +877,7 @@ public void SetBasePath(String basePath) /// /// Provides a factory method hook for the creation of exceptions. /// - public Genesys.Workspace.Client.ExceptionFactory ExceptionFactory + public Genesys.Workspace.Internal.Client.ExceptionFactory ExceptionFactory { get { @@ -915,7 +915,7 @@ public void AddDefaultHeader(string key, string value) /// /// Accept an open-media interaction Accept the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to accept /// id of interaction to accept /// Request parameters. (optional) @@ -929,7 +929,7 @@ public ApiSuccessResponse Accept (string mediatype, string id, AcceptData accept /// /// Accept an open-media interaction Accept the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to accept /// id of interaction to accept /// Request parameters. (optional) @@ -998,7 +998,7 @@ public ApiResponse< ApiSuccessResponse > AcceptWithHttpInfo (string mediatype, s /// /// Accept an open-media interaction Accept the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to accept /// id of interaction to accept /// Request parameters. (optional) @@ -1013,7 +1013,7 @@ public async System.Threading.Tasks.Task AcceptAsync (string /// /// Accept an open-media interaction Accept the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to accept /// id of interaction to accept /// Request parameters. (optional) @@ -1082,7 +1082,7 @@ public async System.Threading.Tasks.Task> Accept /// /// Set the comment for the interaction Set the comment for the interaction /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// @@ -1096,7 +1096,7 @@ public ApiSuccessResponse AddComment (string mediatype, string id, AddCommentDat /// /// Set the comment for the interaction Set the comment for the interaction /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// @@ -1168,7 +1168,7 @@ public ApiResponse< ApiSuccessResponse > AddCommentWithHttpInfo (string mediatyp /// /// Set the comment for the interaction Set the comment for the interaction /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// @@ -1183,7 +1183,7 @@ public async System.Threading.Tasks.Task AddCommentAsync (st /// /// Set the comment for the interaction Set the comment for the interaction /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// @@ -1255,7 +1255,7 @@ public async System.Threading.Tasks.Task> AddCom /// /// Create the interaction in UCS database Create the interaction in UCS database /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// (optional) @@ -1269,7 +1269,7 @@ public ApiSuccessResponse AddContent (string mediatype, string id, AddContentDat /// /// Create the interaction in UCS database Create the interaction in UCS database /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// (optional) @@ -1338,7 +1338,7 @@ public ApiResponse< ApiSuccessResponse > AddContentWithHttpInfo (string mediatyp /// /// Create the interaction in UCS database Create the interaction in UCS database /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// (optional) @@ -1353,7 +1353,7 @@ public async System.Threading.Tasks.Task AddContentAsync (st /// /// Create the interaction in UCS database Create the interaction in UCS database /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// (optional) @@ -1422,7 +1422,7 @@ public async System.Threading.Tasks.Task> AddCon /// /// Complete open-media interaction Complete the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to complete /// id of interaction to complete /// ApiSuccessResponse @@ -1435,7 +1435,7 @@ public ApiSuccessResponse Complete (string mediatype, string id) /// /// Complete open-media interaction Complete the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to complete /// id of interaction to complete /// ApiResponse of ApiSuccessResponse @@ -1495,7 +1495,7 @@ public ApiResponse< ApiSuccessResponse > CompleteWithHttpInfo (string mediatype, /// /// Complete open-media interaction Complete the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to complete /// id of interaction to complete /// Task of ApiSuccessResponse @@ -1509,7 +1509,7 @@ public async System.Threading.Tasks.Task CompleteAsync (stri /// /// Complete open-media interaction Complete the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to complete /// id of interaction to complete /// Task of ApiResponse (ApiSuccessResponse) @@ -1569,7 +1569,7 @@ public async System.Threading.Tasks.Task> Comple /// /// Remove key/value pair from user data Deletes the specified key from the interaction data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// The keys of the key/value pairs to delete. @@ -1583,7 +1583,7 @@ public ApiSuccessResponse DeleteUserData (string mediatype, string id, UserData2 /// /// Remove key/value pair from user data Deletes the specified key from the interaction data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// The keys of the key/value pairs to delete. @@ -1655,7 +1655,7 @@ public ApiResponse< ApiSuccessResponse > DeleteUserDataWithHttpInfo (string medi /// /// Remove key/value pair from user data Deletes the specified key from the interaction data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// The keys of the key/value pairs to delete. @@ -1670,7 +1670,7 @@ public async System.Threading.Tasks.Task DeleteUserDataAsync /// /// Remove key/value pair from user data Deletes the specified key from the interaction data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// The keys of the key/value pairs to delete. @@ -1742,7 +1742,7 @@ public async System.Threading.Tasks.Task> Delete /// /// Turn off do not disturb for open media channel Turn off do not disturb for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse public ApiSuccessResponse DndOff () { @@ -1753,7 +1753,7 @@ public ApiSuccessResponse DndOff () /// /// Turn off do not disturb for open media channel Turn off do not disturb for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > DndOffWithHttpInfo () { @@ -1803,7 +1803,7 @@ public ApiResponse< ApiSuccessResponse > DndOffWithHttpInfo () /// /// Turn off do not disturb for open media channel Turn off do not disturb for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task DndOffAsync () { @@ -1815,7 +1815,7 @@ public async System.Threading.Tasks.Task DndOffAsync () /// /// Turn off do not disturb for open media channel Turn off do not disturb for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> DndOffAsyncWithHttpInfo () { @@ -1865,7 +1865,7 @@ public async System.Threading.Tasks.Task> DndOff /// /// Turn on do not disturb for open media channels Turn on do not disturb for open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse public ApiSuccessResponse DndOn () { @@ -1876,7 +1876,7 @@ public ApiSuccessResponse DndOn () /// /// Turn on do not disturb for open media channels Turn on do not disturb for open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > DndOnWithHttpInfo () { @@ -1926,7 +1926,7 @@ public ApiResponse< ApiSuccessResponse > DndOnWithHttpInfo () /// /// Turn on do not disturb for open media channels Turn on do not disturb for open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task DndOnAsync () { @@ -1938,7 +1938,7 @@ public async System.Threading.Tasks.Task DndOnAsync () /// /// Turn on do not disturb for open media channels Turn on do not disturb for open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> DndOnAsyncWithHttpInfo () { @@ -1988,7 +1988,7 @@ public async System.Threading.Tasks.Task> DndOnA /// /// Logout all open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse public ApiSuccessResponse LogoutAgentState () { @@ -1999,7 +1999,7 @@ public ApiSuccessResponse LogoutAgentState () /// /// Logout all open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > LogoutAgentStateWithHttpInfo () { @@ -2049,7 +2049,7 @@ public ApiResponse< ApiSuccessResponse > LogoutAgentStateWithHttpInfo () /// /// Logout all open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task LogoutAgentStateAsync () { @@ -2061,7 +2061,7 @@ public async System.Threading.Tasks.Task LogoutAgentStateAsy /// /// Logout all open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> LogoutAgentStateAsyncWithHttpInfo () { @@ -2111,7 +2111,7 @@ public async System.Threading.Tasks.Task> Logout /// /// Attach user data to an interaction Attach the interaction userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// An array of key/value pairs. @@ -2125,7 +2125,7 @@ public ApiSuccessResponse MediaAttachUserData (string mediatype, string id, User /// /// Attach user data to an interaction Attach the interaction userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// An array of key/value pairs. @@ -2197,7 +2197,7 @@ public ApiResponse< ApiSuccessResponse > MediaAttachUserDataWithHttpInfo (string /// /// Attach user data to an interaction Attach the interaction userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// An array of key/value pairs. @@ -2212,7 +2212,7 @@ public async System.Threading.Tasks.Task MediaAttachUserData /// /// Attach user data to an interaction Attach the interaction userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// An array of key/value pairs. @@ -2284,7 +2284,7 @@ public async System.Threading.Tasks.Task> MediaA /// /// Update user data to an interaction Update the interaction userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// An array of key/value pairs. @@ -2298,7 +2298,7 @@ public ApiSuccessResponse MediaUpdateUserData (string mediatype, string id, User /// /// Update user data to an interaction Update the interaction userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// An array of key/value pairs. @@ -2370,7 +2370,7 @@ public ApiResponse< ApiSuccessResponse > MediaUpdateUserDataWithHttpInfo (string /// /// Update user data to an interaction Update the interaction userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// An array of key/value pairs. @@ -2385,7 +2385,7 @@ public async System.Threading.Tasks.Task MediaUpdateUserData /// /// Update user data to an interaction Update the interaction userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// An array of key/value pairs. @@ -2457,7 +2457,7 @@ public async System.Threading.Tasks.Task> MediaU /// /// Change to the not ready state for all open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse public ApiSuccessResponse NotReadyAgentState () { @@ -2468,7 +2468,7 @@ public ApiSuccessResponse NotReadyAgentState () /// /// Change to the not ready state for all open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > NotReadyAgentStateWithHttpInfo () { @@ -2518,7 +2518,7 @@ public ApiResponse< ApiSuccessResponse > NotReadyAgentStateWithHttpInfo () /// /// Change to the not ready state for all open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task NotReadyAgentStateAsync () { @@ -2530,7 +2530,7 @@ public async System.Threading.Tasks.Task NotReadyAgentStateA /// /// Change to the not ready state for all open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> NotReadyAgentStateAsyncWithHttpInfo () { @@ -2580,7 +2580,7 @@ public async System.Threading.Tasks.Task> NotRea /// /// Change to the not ready state for open media channel Change to the not ready state for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// /// ApiSuccessResponse @@ -2593,7 +2593,7 @@ public ApiSuccessResponse NotReadyForMedia (string mediatype, NotReadyForMediaDa /// /// Change to the not ready state for open media channel Change to the not ready state for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// /// ApiResponse of ApiSuccessResponse @@ -2660,7 +2660,7 @@ public ApiResponse< ApiSuccessResponse > NotReadyForMediaWithHttpInfo (string me /// /// Change to the not ready state for open media channel Change to the not ready state for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// /// Task of ApiSuccessResponse @@ -2674,7 +2674,7 @@ public async System.Threading.Tasks.Task NotReadyForMediaAsy /// /// Change to the not ready state for open media channel Change to the not ready state for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// /// Task of ApiResponse (ApiSuccessResponse) @@ -2741,7 +2741,7 @@ public async System.Threading.Tasks.Task> NotRea /// /// Place the interaction in queue Place the interaction in queue with modification of properties pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// @@ -2755,7 +2755,7 @@ public ApiSuccessResponse PlaceInQueue (string mediatype, string id, PlaceInQueu /// /// Place the interaction in queue Place the interaction in queue with modification of properties pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// @@ -2827,7 +2827,7 @@ public ApiResponse< ApiSuccessResponse > PlaceInQueueWithHttpInfo (string mediat /// /// Place the interaction in queue Place the interaction in queue with modification of properties pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// @@ -2842,7 +2842,7 @@ public async System.Threading.Tasks.Task PlaceInQueueAsync ( /// /// Place the interaction in queue Place the interaction in queue with modification of properties pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction /// id of the interaction /// @@ -2914,7 +2914,7 @@ public async System.Threading.Tasks.Task> PlaceI /// /// Change to the ready state for all open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse public ApiSuccessResponse ReadyAgentState () { @@ -2925,7 +2925,7 @@ public ApiSuccessResponse ReadyAgentState () /// /// Change to the ready state for all open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > ReadyAgentStateWithHttpInfo () { @@ -2975,7 +2975,7 @@ public ApiResponse< ApiSuccessResponse > ReadyAgentStateWithHttpInfo () /// /// Change to the ready state for all open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task ReadyAgentStateAsync () { @@ -2987,7 +2987,7 @@ public async System.Threading.Tasks.Task ReadyAgentStateAsyn /// /// Change to the ready state for all open media channels /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> ReadyAgentStateAsyncWithHttpInfo () { @@ -3037,7 +3037,7 @@ public async System.Threading.Tasks.Task> ReadyA /// /// Change to the ready state for open media channel Change to the ready state for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// (optional) /// ApiSuccessResponse @@ -3050,7 +3050,7 @@ public ApiSuccessResponse ReadyForMedia (string mediatype, ReadyForMediaData rea /// /// Change to the ready state for open media channel Change to the ready state for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// (optional) /// ApiResponse of ApiSuccessResponse @@ -3114,7 +3114,7 @@ public ApiResponse< ApiSuccessResponse > ReadyForMediaWithHttpInfo (string media /// /// Change to the ready state for open media channel Change to the ready state for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// (optional) /// Task of ApiSuccessResponse @@ -3128,7 +3128,7 @@ public async System.Threading.Tasks.Task ReadyForMediaAsync /// /// Change to the ready state for open media channel Change to the ready state for open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// (optional) /// Task of ApiResponse (ApiSuccessResponse) @@ -3192,7 +3192,7 @@ public async System.Threading.Tasks.Task> ReadyF /// /// Reject an open-media interaction Reject the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to reject /// id of interaction to reject /// Request parameters. (optional) @@ -3206,7 +3206,7 @@ public ApiSuccessResponse Reject (string mediatype, string id, AcceptData1 accep /// /// Reject an open-media interaction Reject the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to reject /// id of interaction to reject /// Request parameters. (optional) @@ -3275,7 +3275,7 @@ public ApiResponse< ApiSuccessResponse > RejectWithHttpInfo (string mediatype, s /// /// Reject an open-media interaction Reject the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to reject /// id of interaction to reject /// Request parameters. (optional) @@ -3290,7 +3290,7 @@ public async System.Threading.Tasks.Task RejectAsync (string /// /// Reject an open-media interaction Reject the interaction specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// media-type of interaction to reject /// id of interaction to reject /// Request parameters. (optional) @@ -3359,7 +3359,7 @@ public async System.Threading.Tasks.Task> Reject /// /// Logout the open media channel Logout the open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// /// ApiSuccessResponse @@ -3372,7 +3372,7 @@ public ApiSuccessResponse RemoveMedia (string mediatype, LogoutMediaData logoutM /// /// Logout the open media channel Logout the open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// /// ApiResponse of ApiSuccessResponse @@ -3439,7 +3439,7 @@ public ApiResponse< ApiSuccessResponse > RemoveMediaWithHttpInfo (string mediaty /// /// Logout the open media channel Logout the open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// /// Task of ApiSuccessResponse @@ -3453,7 +3453,7 @@ public async System.Threading.Tasks.Task RemoveMediaAsync (s /// /// Logout the open media channel Logout the open media channel /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// /// Task of ApiResponse (ApiSuccessResponse) diff --git a/src/Genesys.Workspace/Api/NotificationsApi.cs b/src/Genesys.Workspace/Internal/Api/NotificationsApi.cs similarity index 90% rename from src/Genesys.Workspace/Api/NotificationsApi.cs rename to src/Genesys.Workspace/Internal/Api/NotificationsApi.cs index db0b2b4..e96da6c 100644 --- a/src/Genesys.Workspace/Api/NotificationsApi.cs +++ b/src/Genesys.Workspace/Internal/Api/NotificationsApi.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -13,9 +13,9 @@ using System.Collections.ObjectModel; using System.Linq; using RestSharp; -using Genesys.Workspace.Client; +using Genesys.Workspace.Internal.Client; -namespace Genesys.Workspace.Api +namespace Genesys.Workspace.Internal.Api { /// /// Represents a collection of functions to interact with the API endpoints @@ -29,7 +29,7 @@ public interface INotificationsApi : IApiAccessor /// /// Receives one of CometD notification events The following events are available<br> <h5>Channel: /workspace/v3/initialization</h5> Value:<br> {<br> data : {<br> state: 'initialization state'<br> <ul> <li><b>\"Complete\"</b> Initialization was completed successfully</li> <li><b>\"Failed\"</b> Initialization failed</li> </ul><br> }<br> }<br> <h5>Channel: /workspace/v3/voice</h5> Type: <ul> <li><b>\"CallStateChanged\"</b> Call status or state changed</li> Value:<br> {<br> call: {<br> id: '016202a673223196',<br> phoneNumber: '7504772884',<br> connId: '016202a673223196',<br> callUuid: '00PJ6OJ3OSCMR24QETB382LAES000CIG',<br> extensions: [ [list of DN extensions] ],<br> dnis: '7504772885',<br> callType: 'Internal',<br> state: 'state',<br> <ul> <li><b>\"Ringing\"</b> Ringing in progress <li><b>\"Dialing\"</b> Dialing in progress <li><b>\"Established</b> Call established <li><b>\"Released</b> Call released </ul> <br> participants: [ [list of participants] ],<br> capabilities:<br> [ 'release',<br> 'clear',<br> 'attach-user-data',<br> 'update-user-data',<br> 'delete-user-data-pair',<br> 'send-dtmf',<br> 'start-recording'<br> ],<br> duration: 0 <br> },<br> type: 'CallStateChanged' <br> }<br> <li><b>\"DnStateChanged\"</b> DN state changed</li> Value:<br> {<br> dn: { <br> number: '7504772884',<br> switchName: 'ap-southeast-2',<br> agentId: '7504772884',<br> capabilities: [ 'ready', 'not-ready', 'dnd-on', 'set-forward' ],<br> agentState: 'LoggedOut',<br> agentWorkMode: 'Unknown' <br> },<br> type: 'DnStateChanged' <br> } </ul> /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// void Notifications (); @@ -39,7 +39,7 @@ public interface INotificationsApi : IApiAccessor /// /// Receives one of CometD notification events The following events are available<br> <h5>Channel: /workspace/v3/initialization</h5> Value:<br> {<br> data : {<br> state: 'initialization state'<br> <ul> <li><b>\"Complete\"</b> Initialization was completed successfully</li> <li><b>\"Failed\"</b> Initialization failed</li> </ul><br> }<br> }<br> <h5>Channel: /workspace/v3/voice</h5> Type: <ul> <li><b>\"CallStateChanged\"</b> Call status or state changed</li> Value:<br> {<br> call: {<br> id: '016202a673223196',<br> phoneNumber: '7504772884',<br> connId: '016202a673223196',<br> callUuid: '00PJ6OJ3OSCMR24QETB382LAES000CIG',<br> extensions: [ [list of DN extensions] ],<br> dnis: '7504772885',<br> callType: 'Internal',<br> state: 'state',<br> <ul> <li><b>\"Ringing\"</b> Ringing in progress <li><b>\"Dialing\"</b> Dialing in progress <li><b>\"Established</b> Call established <li><b>\"Released</b> Call released </ul> <br> participants: [ [list of participants] ],<br> capabilities:<br> [ 'release',<br> 'clear',<br> 'attach-user-data',<br> 'update-user-data',<br> 'delete-user-data-pair',<br> 'send-dtmf',<br> 'start-recording'<br> ],<br> duration: 0 <br> },<br> type: 'CallStateChanged' <br> }<br> <li><b>\"DnStateChanged\"</b> DN state changed</li> Value:<br> {<br> dn: { <br> number: '7504772884',<br> switchName: 'ap-southeast-2',<br> agentId: '7504772884',<br> capabilities: [ 'ready', 'not-ready', 'dnd-on', 'set-forward' ],<br> agentState: 'LoggedOut',<br> agentWorkMode: 'Unknown' <br> },<br> type: 'DnStateChanged' <br> } </ul> /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of Object(void) ApiResponse NotificationsWithHttpInfo (); /// @@ -48,7 +48,7 @@ public interface INotificationsApi : IApiAccessor /// /// Subscribes to CometD notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// void NotificationsConnect (); @@ -58,7 +58,7 @@ public interface INotificationsApi : IApiAccessor /// /// Subscribes to CometD notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of Object(void) ApiResponse NotificationsConnectWithHttpInfo (); /// @@ -67,7 +67,7 @@ public interface INotificationsApi : IApiAccessor /// /// Close CometD notification subscriptions /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// void NotificationsDisconnect (); @@ -77,7 +77,7 @@ public interface INotificationsApi : IApiAccessor /// /// Close CometD notification subscriptions /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of Object(void) ApiResponse NotificationsDisconnectWithHttpInfo (); /// @@ -86,7 +86,7 @@ public interface INotificationsApi : IApiAccessor /// /// Subscribes to CometD notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// void NotificationsHandshake (); @@ -96,7 +96,7 @@ public interface INotificationsApi : IApiAccessor /// /// Subscribes to CometD notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of Object(void) ApiResponse NotificationsHandshakeWithHttpInfo (); /// @@ -105,7 +105,7 @@ public interface INotificationsApi : IApiAccessor /// /// Subscribes CometD channel notification.<br> <h5>The following channels are available right now:</h5> <ul> <li><b>/workspace/v3/initialization</b> Subscribe for initialization (login) event</li> <li><b>/workspace/v3/voice</b> Subscribe for call state change notification event</li> </ul> /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// void NotificationsSubscribe (); @@ -115,7 +115,7 @@ public interface INotificationsApi : IApiAccessor /// /// Subscribes CometD channel notification.<br> <h5>The following channels are available right now:</h5> <ul> <li><b>/workspace/v3/initialization</b> Subscribe for initialization (login) event</li> <li><b>/workspace/v3/voice</b> Subscribe for call state change notification event</li> </ul> /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of Object(void) ApiResponse NotificationsSubscribeWithHttpInfo (); /// @@ -124,7 +124,7 @@ public interface INotificationsApi : IApiAccessor /// /// Unsubscribes CometD channel notification /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// void NotificationsUnsubscribe (); @@ -134,7 +134,7 @@ public interface INotificationsApi : IApiAccessor /// /// Unsubscribes CometD channel notification /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of Object(void) ApiResponse NotificationsUnsubscribeWithHttpInfo (); /// @@ -143,7 +143,7 @@ public interface INotificationsApi : IApiAccessor /// /// Enables subscription to SocketIO notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// void Socketio (); @@ -153,7 +153,7 @@ public interface INotificationsApi : IApiAccessor /// /// Enables subscription to SocketIO notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of Object(void) ApiResponse SocketioWithHttpInfo (); #endregion Synchronous Operations @@ -164,7 +164,7 @@ public interface INotificationsApi : IApiAccessor /// /// Receives one of CometD notification events The following events are available<br> <h5>Channel: /workspace/v3/initialization</h5> Value:<br> {<br> data : {<br> state: 'initialization state'<br> <ul> <li><b>\"Complete\"</b> Initialization was completed successfully</li> <li><b>\"Failed\"</b> Initialization failed</li> </ul><br> }<br> }<br> <h5>Channel: /workspace/v3/voice</h5> Type: <ul> <li><b>\"CallStateChanged\"</b> Call status or state changed</li> Value:<br> {<br> call: {<br> id: '016202a673223196',<br> phoneNumber: '7504772884',<br> connId: '016202a673223196',<br> callUuid: '00PJ6OJ3OSCMR24QETB382LAES000CIG',<br> extensions: [ [list of DN extensions] ],<br> dnis: '7504772885',<br> callType: 'Internal',<br> state: 'state',<br> <ul> <li><b>\"Ringing\"</b> Ringing in progress <li><b>\"Dialing\"</b> Dialing in progress <li><b>\"Established</b> Call established <li><b>\"Released</b> Call released </ul> <br> participants: [ [list of participants] ],<br> capabilities:<br> [ 'release',<br> 'clear',<br> 'attach-user-data',<br> 'update-user-data',<br> 'delete-user-data-pair',<br> 'send-dtmf',<br> 'start-recording'<br> ],<br> duration: 0 <br> },<br> type: 'CallStateChanged' <br> }<br> <li><b>\"DnStateChanged\"</b> DN state changed</li> Value:<br> {<br> dn: { <br> number: '7504772884',<br> switchName: 'ap-southeast-2',<br> agentId: '7504772884',<br> capabilities: [ 'ready', 'not-ready', 'dnd-on', 'set-forward' ],<br> agentState: 'LoggedOut',<br> agentWorkMode: 'Unknown' <br> },<br> type: 'DnStateChanged' <br> } </ul> /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of void System.Threading.Tasks.Task NotificationsAsync (); @@ -174,7 +174,7 @@ public interface INotificationsApi : IApiAccessor /// /// Receives one of CometD notification events The following events are available<br> <h5>Channel: /workspace/v3/initialization</h5> Value:<br> {<br> data : {<br> state: 'initialization state'<br> <ul> <li><b>\"Complete\"</b> Initialization was completed successfully</li> <li><b>\"Failed\"</b> Initialization failed</li> </ul><br> }<br> }<br> <h5>Channel: /workspace/v3/voice</h5> Type: <ul> <li><b>\"CallStateChanged\"</b> Call status or state changed</li> Value:<br> {<br> call: {<br> id: '016202a673223196',<br> phoneNumber: '7504772884',<br> connId: '016202a673223196',<br> callUuid: '00PJ6OJ3OSCMR24QETB382LAES000CIG',<br> extensions: [ [list of DN extensions] ],<br> dnis: '7504772885',<br> callType: 'Internal',<br> state: 'state',<br> <ul> <li><b>\"Ringing\"</b> Ringing in progress <li><b>\"Dialing\"</b> Dialing in progress <li><b>\"Established</b> Call established <li><b>\"Released</b> Call released </ul> <br> participants: [ [list of participants] ],<br> capabilities:<br> [ 'release',<br> 'clear',<br> 'attach-user-data',<br> 'update-user-data',<br> 'delete-user-data-pair',<br> 'send-dtmf',<br> 'start-recording'<br> ],<br> duration: 0 <br> },<br> type: 'CallStateChanged' <br> }<br> <li><b>\"DnStateChanged\"</b> DN state changed</li> Value:<br> {<br> dn: { <br> number: '7504772884',<br> switchName: 'ap-southeast-2',<br> agentId: '7504772884',<br> capabilities: [ 'ready', 'not-ready', 'dnd-on', 'set-forward' ],<br> agentState: 'LoggedOut',<br> agentWorkMode: 'Unknown' <br> },<br> type: 'DnStateChanged' <br> } </ul> /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse System.Threading.Tasks.Task> NotificationsAsyncWithHttpInfo (); /// @@ -183,7 +183,7 @@ public interface INotificationsApi : IApiAccessor /// /// Subscribes to CometD notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of void System.Threading.Tasks.Task NotificationsConnectAsync (); @@ -193,7 +193,7 @@ public interface INotificationsApi : IApiAccessor /// /// Subscribes to CometD notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse System.Threading.Tasks.Task> NotificationsConnectAsyncWithHttpInfo (); /// @@ -202,7 +202,7 @@ public interface INotificationsApi : IApiAccessor /// /// Close CometD notification subscriptions /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of void System.Threading.Tasks.Task NotificationsDisconnectAsync (); @@ -212,7 +212,7 @@ public interface INotificationsApi : IApiAccessor /// /// Close CometD notification subscriptions /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse System.Threading.Tasks.Task> NotificationsDisconnectAsyncWithHttpInfo (); /// @@ -221,7 +221,7 @@ public interface INotificationsApi : IApiAccessor /// /// Subscribes to CometD notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of void System.Threading.Tasks.Task NotificationsHandshakeAsync (); @@ -231,7 +231,7 @@ public interface INotificationsApi : IApiAccessor /// /// Subscribes to CometD notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse System.Threading.Tasks.Task> NotificationsHandshakeAsyncWithHttpInfo (); /// @@ -240,7 +240,7 @@ public interface INotificationsApi : IApiAccessor /// /// Subscribes CometD channel notification.<br> <h5>The following channels are available right now:</h5> <ul> <li><b>/workspace/v3/initialization</b> Subscribe for initialization (login) event</li> <li><b>/workspace/v3/voice</b> Subscribe for call state change notification event</li> </ul> /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of void System.Threading.Tasks.Task NotificationsSubscribeAsync (); @@ -250,7 +250,7 @@ public interface INotificationsApi : IApiAccessor /// /// Subscribes CometD channel notification.<br> <h5>The following channels are available right now:</h5> <ul> <li><b>/workspace/v3/initialization</b> Subscribe for initialization (login) event</li> <li><b>/workspace/v3/voice</b> Subscribe for call state change notification event</li> </ul> /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse System.Threading.Tasks.Task> NotificationsSubscribeAsyncWithHttpInfo (); /// @@ -259,7 +259,7 @@ public interface INotificationsApi : IApiAccessor /// /// Unsubscribes CometD channel notification /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of void System.Threading.Tasks.Task NotificationsUnsubscribeAsync (); @@ -269,7 +269,7 @@ public interface INotificationsApi : IApiAccessor /// /// Unsubscribes CometD channel notification /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse System.Threading.Tasks.Task> NotificationsUnsubscribeAsyncWithHttpInfo (); /// @@ -278,7 +278,7 @@ public interface INotificationsApi : IApiAccessor /// /// Enables subscription to SocketIO notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of void System.Threading.Tasks.Task SocketioAsync (); @@ -288,7 +288,7 @@ public interface INotificationsApi : IApiAccessor /// /// Enables subscription to SocketIO notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse System.Threading.Tasks.Task> SocketioAsyncWithHttpInfo (); #endregion Asynchronous Operations @@ -299,7 +299,7 @@ public interface INotificationsApi : IApiAccessor /// public partial class NotificationsApi : INotificationsApi { - private Genesys.Workspace.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + private Genesys.Workspace.Internal.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class. @@ -309,7 +309,7 @@ public NotificationsApi(String basePath) { this.Configuration = new Configuration(new ApiClient(basePath)); - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -331,7 +331,7 @@ public NotificationsApi(Configuration configuration = null) else this.Configuration = configuration; - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -368,7 +368,7 @@ public void SetBasePath(String basePath) /// /// Provides a factory method hook for the creation of exceptions. /// - public Genesys.Workspace.Client.ExceptionFactory ExceptionFactory + public Genesys.Workspace.Internal.Client.ExceptionFactory ExceptionFactory { get { @@ -406,7 +406,7 @@ public void AddDefaultHeader(string key, string value) /// /// Enables subscription to CometD notification API Receives one of CometD notification events The following events are available<br> <h5>Channel: /workspace/v3/initialization</h5> Value:<br> {<br> data : {<br> state: 'initialization state'<br> <ul> <li><b>\"Complete\"</b> Initialization was completed successfully</li> <li><b>\"Failed\"</b> Initialization failed</li> </ul><br> }<br> }<br> <h5>Channel: /workspace/v3/voice</h5> Type: <ul> <li><b>\"CallStateChanged\"</b> Call status or state changed</li> Value:<br> {<br> call: {<br> id: '016202a673223196',<br> phoneNumber: '7504772884',<br> connId: '016202a673223196',<br> callUuid: '00PJ6OJ3OSCMR24QETB382LAES000CIG',<br> extensions: [ [list of DN extensions] ],<br> dnis: '7504772885',<br> callType: 'Internal',<br> state: 'state',<br> <ul> <li><b>\"Ringing\"</b> Ringing in progress <li><b>\"Dialing\"</b> Dialing in progress <li><b>\"Established</b> Call established <li><b>\"Released</b> Call released </ul> <br> participants: [ [list of participants] ],<br> capabilities:<br> [ 'release',<br> 'clear',<br> 'attach-user-data',<br> 'update-user-data',<br> 'delete-user-data-pair',<br> 'send-dtmf',<br> 'start-recording'<br> ],<br> duration: 0 <br> },<br> type: 'CallStateChanged' <br> }<br> <li><b>\"DnStateChanged\"</b> DN state changed</li> Value:<br> {<br> dn: { <br> number: '7504772884',<br> switchName: 'ap-southeast-2',<br> agentId: '7504772884',<br> capabilities: [ 'ready', 'not-ready', 'dnd-on', 'set-forward' ],<br> agentState: 'LoggedOut',<br> agentWorkMode: 'Unknown' <br> },<br> type: 'DnStateChanged' <br> } </ul> /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// public void Notifications () { @@ -416,7 +416,7 @@ public void Notifications () /// /// Enables subscription to CometD notification API Receives one of CometD notification events The following events are available<br> <h5>Channel: /workspace/v3/initialization</h5> Value:<br> {<br> data : {<br> state: 'initialization state'<br> <ul> <li><b>\"Complete\"</b> Initialization was completed successfully</li> <li><b>\"Failed\"</b> Initialization failed</li> </ul><br> }<br> }<br> <h5>Channel: /workspace/v3/voice</h5> Type: <ul> <li><b>\"CallStateChanged\"</b> Call status or state changed</li> Value:<br> {<br> call: {<br> id: '016202a673223196',<br> phoneNumber: '7504772884',<br> connId: '016202a673223196',<br> callUuid: '00PJ6OJ3OSCMR24QETB382LAES000CIG',<br> extensions: [ [list of DN extensions] ],<br> dnis: '7504772885',<br> callType: 'Internal',<br> state: 'state',<br> <ul> <li><b>\"Ringing\"</b> Ringing in progress <li><b>\"Dialing\"</b> Dialing in progress <li><b>\"Established</b> Call established <li><b>\"Released</b> Call released </ul> <br> participants: [ [list of participants] ],<br> capabilities:<br> [ 'release',<br> 'clear',<br> 'attach-user-data',<br> 'update-user-data',<br> 'delete-user-data-pair',<br> 'send-dtmf',<br> 'start-recording'<br> ],<br> duration: 0 <br> },<br> type: 'CallStateChanged' <br> }<br> <li><b>\"DnStateChanged\"</b> DN state changed</li> Value:<br> {<br> dn: { <br> number: '7504772884',<br> switchName: 'ap-southeast-2',<br> agentId: '7504772884',<br> capabilities: [ 'ready', 'not-ready', 'dnd-on', 'set-forward' ],<br> agentState: 'LoggedOut',<br> agentWorkMode: 'Unknown' <br> },<br> type: 'DnStateChanged' <br> } </ul> /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of Object(void) public ApiResponse NotificationsWithHttpInfo () { @@ -466,7 +466,7 @@ public ApiResponse NotificationsWithHttpInfo () /// /// Enables subscription to CometD notification API Receives one of CometD notification events The following events are available<br> <h5>Channel: /workspace/v3/initialization</h5> Value:<br> {<br> data : {<br> state: 'initialization state'<br> <ul> <li><b>\"Complete\"</b> Initialization was completed successfully</li> <li><b>\"Failed\"</b> Initialization failed</li> </ul><br> }<br> }<br> <h5>Channel: /workspace/v3/voice</h5> Type: <ul> <li><b>\"CallStateChanged\"</b> Call status or state changed</li> Value:<br> {<br> call: {<br> id: '016202a673223196',<br> phoneNumber: '7504772884',<br> connId: '016202a673223196',<br> callUuid: '00PJ6OJ3OSCMR24QETB382LAES000CIG',<br> extensions: [ [list of DN extensions] ],<br> dnis: '7504772885',<br> callType: 'Internal',<br> state: 'state',<br> <ul> <li><b>\"Ringing\"</b> Ringing in progress <li><b>\"Dialing\"</b> Dialing in progress <li><b>\"Established</b> Call established <li><b>\"Released</b> Call released </ul> <br> participants: [ [list of participants] ],<br> capabilities:<br> [ 'release',<br> 'clear',<br> 'attach-user-data',<br> 'update-user-data',<br> 'delete-user-data-pair',<br> 'send-dtmf',<br> 'start-recording'<br> ],<br> duration: 0 <br> },<br> type: 'CallStateChanged' <br> }<br> <li><b>\"DnStateChanged\"</b> DN state changed</li> Value:<br> {<br> dn: { <br> number: '7504772884',<br> switchName: 'ap-southeast-2',<br> agentId: '7504772884',<br> capabilities: [ 'ready', 'not-ready', 'dnd-on', 'set-forward' ],<br> agentState: 'LoggedOut',<br> agentWorkMode: 'Unknown' <br> },<br> type: 'DnStateChanged' <br> } </ul> /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of void public async System.Threading.Tasks.Task NotificationsAsync () { @@ -477,7 +477,7 @@ public async System.Threading.Tasks.Task NotificationsAsync () /// /// Enables subscription to CometD notification API Receives one of CometD notification events The following events are available<br> <h5>Channel: /workspace/v3/initialization</h5> Value:<br> {<br> data : {<br> state: 'initialization state'<br> <ul> <li><b>\"Complete\"</b> Initialization was completed successfully</li> <li><b>\"Failed\"</b> Initialization failed</li> </ul><br> }<br> }<br> <h5>Channel: /workspace/v3/voice</h5> Type: <ul> <li><b>\"CallStateChanged\"</b> Call status or state changed</li> Value:<br> {<br> call: {<br> id: '016202a673223196',<br> phoneNumber: '7504772884',<br> connId: '016202a673223196',<br> callUuid: '00PJ6OJ3OSCMR24QETB382LAES000CIG',<br> extensions: [ [list of DN extensions] ],<br> dnis: '7504772885',<br> callType: 'Internal',<br> state: 'state',<br> <ul> <li><b>\"Ringing\"</b> Ringing in progress <li><b>\"Dialing\"</b> Dialing in progress <li><b>\"Established</b> Call established <li><b>\"Released</b> Call released </ul> <br> participants: [ [list of participants] ],<br> capabilities:<br> [ 'release',<br> 'clear',<br> 'attach-user-data',<br> 'update-user-data',<br> 'delete-user-data-pair',<br> 'send-dtmf',<br> 'start-recording'<br> ],<br> duration: 0 <br> },<br> type: 'CallStateChanged' <br> }<br> <li><b>\"DnStateChanged\"</b> DN state changed</li> Value:<br> {<br> dn: { <br> number: '7504772884',<br> switchName: 'ap-southeast-2',<br> agentId: '7504772884',<br> capabilities: [ 'ready', 'not-ready', 'dnd-on', 'set-forward' ],<br> agentState: 'LoggedOut',<br> agentWorkMode: 'Unknown' <br> },<br> type: 'DnStateChanged' <br> } </ul> /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse public async System.Threading.Tasks.Task> NotificationsAsyncWithHttpInfo () { @@ -527,7 +527,7 @@ public async System.Threading.Tasks.Task> NotificationsAsync /// /// Subscribes to CometD notifications Subscribes to CometD notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// public void NotificationsConnect () { @@ -537,7 +537,7 @@ public void NotificationsConnect () /// /// Subscribes to CometD notifications Subscribes to CometD notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of Object(void) public ApiResponse NotificationsConnectWithHttpInfo () { @@ -587,7 +587,7 @@ public ApiResponse NotificationsConnectWithHttpInfo () /// /// Subscribes to CometD notifications Subscribes to CometD notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of void public async System.Threading.Tasks.Task NotificationsConnectAsync () { @@ -598,7 +598,7 @@ public async System.Threading.Tasks.Task NotificationsConnectAsync () /// /// Subscribes to CometD notifications Subscribes to CometD notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse public async System.Threading.Tasks.Task> NotificationsConnectAsyncWithHttpInfo () { @@ -648,7 +648,7 @@ public async System.Threading.Tasks.Task> NotificationsConne /// /// Close CometD notification subscriptions Close CometD notification subscriptions /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// public void NotificationsDisconnect () { @@ -658,7 +658,7 @@ public void NotificationsDisconnect () /// /// Close CometD notification subscriptions Close CometD notification subscriptions /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of Object(void) public ApiResponse NotificationsDisconnectWithHttpInfo () { @@ -708,7 +708,7 @@ public ApiResponse NotificationsDisconnectWithHttpInfo () /// /// Close CometD notification subscriptions Close CometD notification subscriptions /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of void public async System.Threading.Tasks.Task NotificationsDisconnectAsync () { @@ -719,7 +719,7 @@ public async System.Threading.Tasks.Task NotificationsDisconnectAsync () /// /// Close CometD notification subscriptions Close CometD notification subscriptions /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse public async System.Threading.Tasks.Task> NotificationsDisconnectAsyncWithHttpInfo () { @@ -769,7 +769,7 @@ public async System.Threading.Tasks.Task> NotificationsDisco /// /// Subscribes to CometD notifications Subscribes to CometD notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// public void NotificationsHandshake () { @@ -779,7 +779,7 @@ public void NotificationsHandshake () /// /// Subscribes to CometD notifications Subscribes to CometD notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of Object(void) public ApiResponse NotificationsHandshakeWithHttpInfo () { @@ -829,7 +829,7 @@ public ApiResponse NotificationsHandshakeWithHttpInfo () /// /// Subscribes to CometD notifications Subscribes to CometD notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of void public async System.Threading.Tasks.Task NotificationsHandshakeAsync () { @@ -840,7 +840,7 @@ public async System.Threading.Tasks.Task NotificationsHandshakeAsync () /// /// Subscribes to CometD notifications Subscribes to CometD notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse public async System.Threading.Tasks.Task> NotificationsHandshakeAsyncWithHttpInfo () { @@ -890,7 +890,7 @@ public async System.Threading.Tasks.Task> NotificationsHands /// /// Subscribes CometD channel notification Subscribes CometD channel notification.<br> <h5>The following channels are available right now:</h5> <ul> <li><b>/workspace/v3/initialization</b> Subscribe for initialization (login) event</li> <li><b>/workspace/v3/voice</b> Subscribe for call state change notification event</li> </ul> /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// public void NotificationsSubscribe () { @@ -900,7 +900,7 @@ public void NotificationsSubscribe () /// /// Subscribes CometD channel notification Subscribes CometD channel notification.<br> <h5>The following channels are available right now:</h5> <ul> <li><b>/workspace/v3/initialization</b> Subscribe for initialization (login) event</li> <li><b>/workspace/v3/voice</b> Subscribe for call state change notification event</li> </ul> /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of Object(void) public ApiResponse NotificationsSubscribeWithHttpInfo () { @@ -950,7 +950,7 @@ public ApiResponse NotificationsSubscribeWithHttpInfo () /// /// Subscribes CometD channel notification Subscribes CometD channel notification.<br> <h5>The following channels are available right now:</h5> <ul> <li><b>/workspace/v3/initialization</b> Subscribe for initialization (login) event</li> <li><b>/workspace/v3/voice</b> Subscribe for call state change notification event</li> </ul> /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of void public async System.Threading.Tasks.Task NotificationsSubscribeAsync () { @@ -961,7 +961,7 @@ public async System.Threading.Tasks.Task NotificationsSubscribeAsync () /// /// Subscribes CometD channel notification Subscribes CometD channel notification.<br> <h5>The following channels are available right now:</h5> <ul> <li><b>/workspace/v3/initialization</b> Subscribe for initialization (login) event</li> <li><b>/workspace/v3/voice</b> Subscribe for call state change notification event</li> </ul> /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse public async System.Threading.Tasks.Task> NotificationsSubscribeAsyncWithHttpInfo () { @@ -1011,7 +1011,7 @@ public async System.Threading.Tasks.Task> NotificationsSubsc /// /// Unsubscribes CometD channel notification Unsubscribes CometD channel notification /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// public void NotificationsUnsubscribe () { @@ -1021,7 +1021,7 @@ public void NotificationsUnsubscribe () /// /// Unsubscribes CometD channel notification Unsubscribes CometD channel notification /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of Object(void) public ApiResponse NotificationsUnsubscribeWithHttpInfo () { @@ -1071,7 +1071,7 @@ public ApiResponse NotificationsUnsubscribeWithHttpInfo () /// /// Unsubscribes CometD channel notification Unsubscribes CometD channel notification /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of void public async System.Threading.Tasks.Task NotificationsUnsubscribeAsync () { @@ -1082,7 +1082,7 @@ public async System.Threading.Tasks.Task NotificationsUnsubscribeAsync () /// /// Unsubscribes CometD channel notification Unsubscribes CometD channel notification /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse public async System.Threading.Tasks.Task> NotificationsUnsubscribeAsyncWithHttpInfo () { @@ -1132,7 +1132,7 @@ public async System.Threading.Tasks.Task> NotificationsUnsub /// /// Enables subscription to SocketIO notifications Enables subscription to SocketIO notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// public void Socketio () { @@ -1142,7 +1142,7 @@ public void Socketio () /// /// Enables subscription to SocketIO notifications Enables subscription to SocketIO notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of Object(void) public ApiResponse SocketioWithHttpInfo () { @@ -1192,7 +1192,7 @@ public ApiResponse SocketioWithHttpInfo () /// /// Enables subscription to SocketIO notifications Enables subscription to SocketIO notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of void public async System.Threading.Tasks.Task SocketioAsync () { @@ -1203,7 +1203,7 @@ public async System.Threading.Tasks.Task SocketioAsync () /// /// Enables subscription to SocketIO notifications Enables subscription to SocketIO notifications /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse public async System.Threading.Tasks.Task> SocketioAsyncWithHttpInfo () { diff --git a/src/Genesys.Workspace/Api/ReportingApi.cs b/src/Genesys.Workspace/Internal/Api/ReportingApi.cs similarity index 89% rename from src/Genesys.Workspace/Api/ReportingApi.cs rename to src/Genesys.Workspace/Internal/Api/ReportingApi.cs index b0e080a..9c45144 100644 --- a/src/Genesys.Workspace/Api/ReportingApi.cs +++ b/src/Genesys.Workspace/Internal/Api/ReportingApi.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -13,10 +13,10 @@ using System.Collections.ObjectModel; using System.Linq; using RestSharp; -using Genesys.Workspace.Client; -using Genesys.Workspace.Model; +using Genesys.Workspace.Internal.Client; +using Genesys.Workspace.Internal.Model; -namespace Genesys.Workspace.Api +namespace Genesys.Workspace.Internal.Api { /// /// Represents a collection of functions to interact with the API endpoints @@ -30,7 +30,7 @@ public interface IReportingApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the subscription /// InlineResponse2002 InlineResponse2002 Peek (string subscriptionId); @@ -41,7 +41,7 @@ public interface IReportingApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the subscription /// ApiResponse of InlineResponse2002 ApiResponse PeekWithHttpInfo (string subscriptionId); @@ -51,7 +51,7 @@ public interface IReportingApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Requested Statistics /// InlineResponse2001 InlineResponse2001 Register (StatisticsRegisterData statisticsRegisterData); @@ -62,7 +62,7 @@ public interface IReportingApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Requested Statistics /// ApiResponse of InlineResponse2001 ApiResponse RegisterWithHttpInfo (StatisticsRegisterData statisticsRegisterData); @@ -72,7 +72,7 @@ public interface IReportingApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Requested Statistics /// InlineResponse2001 InlineResponse2001 Subscribe (StatisticsSubscribeData statisticsSubscribeData); @@ -83,7 +83,7 @@ public interface IReportingApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Requested Statistics /// ApiResponse of InlineResponse2001 ApiResponse SubscribeWithHttpInfo (StatisticsSubscribeData statisticsSubscribeData); @@ -93,7 +93,7 @@ public interface IReportingApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// ApiSuccessResponse ApiSuccessResponse Unsubscribe (UnsubscribeData unsubscribeData); @@ -104,7 +104,7 @@ public interface IReportingApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// ApiResponse of ApiSuccessResponse ApiResponse UnsubscribeWithHttpInfo (UnsubscribeData unsubscribeData); @@ -116,7 +116,7 @@ public interface IReportingApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the subscription /// Task of InlineResponse2002 System.Threading.Tasks.Task PeekAsync (string subscriptionId); @@ -127,7 +127,7 @@ public interface IReportingApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the subscription /// Task of ApiResponse (InlineResponse2002) System.Threading.Tasks.Task> PeekAsyncWithHttpInfo (string subscriptionId); @@ -137,7 +137,7 @@ public interface IReportingApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Requested Statistics /// Task of InlineResponse2001 System.Threading.Tasks.Task RegisterAsync (StatisticsRegisterData statisticsRegisterData); @@ -148,7 +148,7 @@ public interface IReportingApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Requested Statistics /// Task of ApiResponse (InlineResponse2001) System.Threading.Tasks.Task> RegisterAsyncWithHttpInfo (StatisticsRegisterData statisticsRegisterData); @@ -158,7 +158,7 @@ public interface IReportingApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Requested Statistics /// Task of InlineResponse2001 System.Threading.Tasks.Task SubscribeAsync (StatisticsSubscribeData statisticsSubscribeData); @@ -169,7 +169,7 @@ public interface IReportingApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Requested Statistics /// Task of ApiResponse (InlineResponse2001) System.Threading.Tasks.Task> SubscribeAsyncWithHttpInfo (StatisticsSubscribeData statisticsSubscribeData); @@ -179,7 +179,7 @@ public interface IReportingApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// Task of ApiSuccessResponse System.Threading.Tasks.Task UnsubscribeAsync (UnsubscribeData unsubscribeData); @@ -190,7 +190,7 @@ public interface IReportingApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> UnsubscribeAsyncWithHttpInfo (UnsubscribeData unsubscribeData); @@ -202,7 +202,7 @@ public interface IReportingApi : IApiAccessor /// public partial class ReportingApi : IReportingApi { - private Genesys.Workspace.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + private Genesys.Workspace.Internal.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class. @@ -212,7 +212,7 @@ public ReportingApi(String basePath) { this.Configuration = new Configuration(new ApiClient(basePath)); - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -234,7 +234,7 @@ public ReportingApi(Configuration configuration = null) else this.Configuration = configuration; - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -271,7 +271,7 @@ public void SetBasePath(String basePath) /// /// Provides a factory method hook for the creation of exceptions. /// - public Genesys.Workspace.Client.ExceptionFactory ExceptionFactory + public Genesys.Workspace.Internal.Client.ExceptionFactory ExceptionFactory { get { @@ -309,7 +309,7 @@ public void AddDefaultHeader(string key, string value) /// /// Get peek values for subscriptionId /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the subscription /// InlineResponse2002 public InlineResponse2002 Peek (string subscriptionId) @@ -321,7 +321,7 @@ public InlineResponse2002 Peek (string subscriptionId) /// /// Get peek values for subscriptionId /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the subscription /// ApiResponse of InlineResponse2002 public ApiResponse< InlineResponse2002 > PeekWithHttpInfo (string subscriptionId) @@ -376,7 +376,7 @@ public ApiResponse< InlineResponse2002 > PeekWithHttpInfo (string subscriptionId /// /// Get peek values for subscriptionId /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the subscription /// Task of InlineResponse2002 public async System.Threading.Tasks.Task PeekAsync (string subscriptionId) @@ -389,7 +389,7 @@ public async System.Threading.Tasks.Task PeekAsync (string s /// /// Get peek values for subscriptionId /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the subscription /// Task of ApiResponse (InlineResponse2002) public async System.Threading.Tasks.Task> PeekAsyncWithHttpInfo (string subscriptionId) @@ -444,7 +444,7 @@ public async System.Threading.Tasks.Task> PeekAs /// /// Subscribe to Statistics and store values server side. Values will only be returned on GET /reporting/{subscriptionId} /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Requested Statistics /// InlineResponse2001 public InlineResponse2001 Register (StatisticsRegisterData statisticsRegisterData) @@ -456,7 +456,7 @@ public InlineResponse2001 Register (StatisticsRegisterData statisticsRegisterDat /// /// Subscribe to Statistics and store values server side. Values will only be returned on GET /reporting/{subscriptionId} /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Requested Statistics /// ApiResponse of InlineResponse2001 public ApiResponse< InlineResponse2001 > RegisterWithHttpInfo (StatisticsRegisterData statisticsRegisterData) @@ -518,7 +518,7 @@ public ApiResponse< InlineResponse2001 > RegisterWithHttpInfo (StatisticsRegiste /// /// Subscribe to Statistics and store values server side. Values will only be returned on GET /reporting/{subscriptionId} /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Requested Statistics /// Task of InlineResponse2001 public async System.Threading.Tasks.Task RegisterAsync (StatisticsRegisterData statisticsRegisterData) @@ -531,7 +531,7 @@ public async System.Threading.Tasks.Task RegisterAsync (Stat /// /// Subscribe to Statistics and store values server side. Values will only be returned on GET /reporting/{subscriptionId} /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Requested Statistics /// Task of ApiResponse (InlineResponse2001) public async System.Threading.Tasks.Task> RegisterAsyncWithHttpInfo (StatisticsRegisterData statisticsRegisterData) @@ -593,7 +593,7 @@ public async System.Threading.Tasks.Task> Regist /// /// Subscribe to Statistics /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Requested Statistics /// InlineResponse2001 public InlineResponse2001 Subscribe (StatisticsSubscribeData statisticsSubscribeData) @@ -605,7 +605,7 @@ public InlineResponse2001 Subscribe (StatisticsSubscribeData statisticsSubscribe /// /// Subscribe to Statistics /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Requested Statistics /// ApiResponse of InlineResponse2001 public ApiResponse< InlineResponse2001 > SubscribeWithHttpInfo (StatisticsSubscribeData statisticsSubscribeData) @@ -667,7 +667,7 @@ public ApiResponse< InlineResponse2001 > SubscribeWithHttpInfo (StatisticsSubscr /// /// Subscribe to Statistics /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Requested Statistics /// Task of InlineResponse2001 public async System.Threading.Tasks.Task SubscribeAsync (StatisticsSubscribeData statisticsSubscribeData) @@ -680,7 +680,7 @@ public async System.Threading.Tasks.Task SubscribeAsync (Sta /// /// Subscribe to Statistics /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Requested Statistics /// Task of ApiResponse (InlineResponse2001) public async System.Threading.Tasks.Task> SubscribeAsyncWithHttpInfo (StatisticsSubscribeData statisticsSubscribeData) @@ -742,7 +742,7 @@ public async System.Threading.Tasks.Task> Subscr /// /// Unsubscribe to availability notifications for previous search result /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// ApiSuccessResponse public ApiSuccessResponse Unsubscribe (UnsubscribeData unsubscribeData) @@ -754,7 +754,7 @@ public ApiSuccessResponse Unsubscribe (UnsubscribeData unsubscribeData) /// /// Unsubscribe to availability notifications for previous search result /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > UnsubscribeWithHttpInfo (UnsubscribeData unsubscribeData) @@ -816,7 +816,7 @@ public ApiResponse< ApiSuccessResponse > UnsubscribeWithHttpInfo (UnsubscribeDat /// /// Unsubscribe to availability notifications for previous search result /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task UnsubscribeAsync (UnsubscribeData unsubscribeData) @@ -829,7 +829,7 @@ public async System.Threading.Tasks.Task UnsubscribeAsync (U /// /// Unsubscribe to availability notifications for previous search result /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> UnsubscribeAsyncWithHttpInfo (UnsubscribeData unsubscribeData) diff --git a/src/Genesys.Workspace/Api/SessionApi.cs b/src/Genesys.Workspace/Internal/Api/SessionApi.cs similarity index 90% rename from src/Genesys.Workspace/Api/SessionApi.cs rename to src/Genesys.Workspace/Internal/Api/SessionApi.cs index d479c78..26debbc 100644 --- a/src/Genesys.Workspace/Api/SessionApi.cs +++ b/src/Genesys.Workspace/Internal/Api/SessionApi.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -13,10 +13,10 @@ using System.Collections.ObjectModel; using System.Linq; using RestSharp; -using Genesys.Workspace.Client; -using Genesys.Workspace.Model; +using Genesys.Workspace.Internal.Client; +using Genesys.Workspace.Internal.Model; -namespace Genesys.Workspace.Api +namespace Genesys.Workspace.Internal.Api { /// /// Represents a collection of functions to interact with the API endpoints @@ -30,7 +30,7 @@ public interface ISessionApi : IApiAccessor /// /// The activate-channels request is used to activate voice/media for the user by declaring the channels and resources that should be used. If the channels are is successfully activated, additional information about the state of active resources (dns, channels) will be received via events. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse ApiSuccessResponse ActivateChannels (ChannelsData channelsData); @@ -41,7 +41,7 @@ public interface ISessionApi : IApiAccessor /// /// The activate-channels request is used to activate voice/media for the user by declaring the channels and resources that should be used. If the channels are is successfully activated, additional information about the state of active resources (dns, channels) will be received via events. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse ApiResponse ActivateChannelsWithHttpInfo (ChannelsData channelsData); @@ -51,7 +51,7 @@ public interface ISessionApi : IApiAccessor /// /// Get the business attribute hierarchy /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the business attribute /// ApiSuccessResponse ApiSuccessResponse GetBusinessAttributeHierarchy (int? id); @@ -62,7 +62,7 @@ public interface ISessionApi : IApiAccessor /// /// Get the business attribute hierarchy /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the business attribute /// ApiResponse of ApiSuccessResponse ApiResponse GetBusinessAttributeHierarchyWithHttpInfo (int? id); @@ -72,7 +72,7 @@ public interface ISessionApi : IApiAccessor /// /// This request returns all necessary configuration items to be used by the UI. This includes action codes, business attributes, transactions and settings at the moment. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// A comma delimited list of types used to specify what content should be returned. If not specified the default is actionCodes, agentGroups, and settings. Valid values are actionCodes, agentGroups, settings, workspaceTransactions, and businessAttributes. (optional) /// ConfigResponse ConfigResponse GetConfiguration (string types = null); @@ -83,7 +83,7 @@ public interface ISessionApi : IApiAccessor /// /// This request returns all necessary configuration items to be used by the UI. This includes action codes, business attributes, transactions and settings at the moment. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// A comma delimited list of types used to specify what content should be returned. If not specified the default is actionCodes, agentGroups, and settings. Valid values are actionCodes, agentGroups, settings, workspaceTransactions, and businessAttributes. (optional) /// ApiResponse of ConfigResponse ApiResponse GetConfigurationWithHttpInfo (string types = null); @@ -93,7 +93,7 @@ public interface ISessionApi : IApiAccessor /// /// This request can be used to retrieve information about the current user. This can be done at startup to check for an existing session. The returned user information includes state recovery information about the active session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// CurrentSession CurrentSession GetCurrentSession (); @@ -103,7 +103,7 @@ public interface ISessionApi : IApiAccessor /// /// This request can be used to retrieve information about the current user. This can be done at startup to check for an existing session. The returned user information includes state recovery information about the active session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of CurrentSession ApiResponse GetCurrentSessionWithHttpInfo (); /// @@ -112,7 +112,7 @@ public interface ISessionApi : IApiAccessor /// /// This request can be used to retrieve information about the devices of a place. The returned devices are the devices attached to the place where the user logs in. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The name of the place /// Devices Devices GetDevicesForPlace (string placeName); @@ -123,7 +123,7 @@ public interface ISessionApi : IApiAccessor /// /// This request can be used to retrieve information about the devices of a place. The returned devices are the devices attached to the place where the user logs in. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The name of the place /// ApiResponse of Devices ApiResponse GetDevicesForPlaceWithHttpInfo (string placeName); @@ -133,7 +133,7 @@ public interface ISessionApi : IApiAccessor /// /// The initialize-workspace request retrieves the authorization token using the authorization code. The token is then registered and the user's environment is prepared. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// the authorization code (optional) /// the same redirect_uri used in the initial login step (optional) /// For OAuth resource owner password credentials grant should contains Bearer authorization. Example: 'Authorization: Bearer access_token' (optional) @@ -146,7 +146,7 @@ public interface ISessionApi : IApiAccessor /// /// The initialize-workspace request retrieves the authorization token using the authorization code. The token is then registered and the user's environment is prepared. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// the authorization code (optional) /// the same redirect_uri used in the initial login step (optional) /// For OAuth resource owner password credentials grant should contains Bearer authorization. Example: 'Authorization: Bearer access_token' (optional) @@ -158,7 +158,7 @@ public interface ISessionApi : IApiAccessor /// /// The login request authenticates the user and retrieves the authorization code. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// this the URI the AUTH service uses to redirect the user after authentication /// ApiSuccessResponse ApiSuccessResponse Login (string redirectUri); @@ -169,7 +169,7 @@ public interface ISessionApi : IApiAccessor /// /// The login request authenticates the user and retrieves the authorization code. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// this the URI the AUTH service uses to redirect the user after authentication /// ApiResponse of ApiSuccessResponse ApiResponse LoginWithHttpInfo (string redirectUri); @@ -179,7 +179,7 @@ public interface ISessionApi : IApiAccessor /// /// This request is used to end the user session. It will log the agent out for voice/channels, end the HTTP session and clean up related resources. The suggested shutdown sequence is to disconnect socket.io and then make this request. After ending the session the login request is required before making any new calls to the API. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse ApiSuccessResponse Logout (); @@ -189,7 +189,7 @@ public interface ISessionApi : IApiAccessor /// /// This request is used to end the user session. It will log the agent out for voice/channels, end the HTTP session and clean up related resources. The suggested shutdown sequence is to disconnect socket.io and then make this request. After ending the session the login request is required before making any new calls to the API. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse ApiResponse LogoutWithHttpInfo (); #endregion Synchronous Operations @@ -200,7 +200,7 @@ public interface ISessionApi : IApiAccessor /// /// The activate-channels request is used to activate voice/media for the user by declaring the channels and resources that should be used. If the channels are is successfully activated, additional information about the state of active resources (dns, channels) will be received via events. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse System.Threading.Tasks.Task ActivateChannelsAsync (ChannelsData channelsData); @@ -211,7 +211,7 @@ public interface ISessionApi : IApiAccessor /// /// The activate-channels request is used to activate voice/media for the user by declaring the channels and resources that should be used. If the channels are is successfully activated, additional information about the state of active resources (dns, channels) will be received via events. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> ActivateChannelsAsyncWithHttpInfo (ChannelsData channelsData); @@ -221,7 +221,7 @@ public interface ISessionApi : IApiAccessor /// /// Get the business attribute hierarchy /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the business attribute /// Task of ApiSuccessResponse System.Threading.Tasks.Task GetBusinessAttributeHierarchyAsync (int? id); @@ -232,7 +232,7 @@ public interface ISessionApi : IApiAccessor /// /// Get the business attribute hierarchy /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the business attribute /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> GetBusinessAttributeHierarchyAsyncWithHttpInfo (int? id); @@ -242,7 +242,7 @@ public interface ISessionApi : IApiAccessor /// /// This request returns all necessary configuration items to be used by the UI. This includes action codes, business attributes, transactions and settings at the moment. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// A comma delimited list of types used to specify what content should be returned. If not specified the default is actionCodes, agentGroups, and settings. Valid values are actionCodes, agentGroups, settings, workspaceTransactions, and businessAttributes. (optional) /// Task of ConfigResponse System.Threading.Tasks.Task GetConfigurationAsync (string types = null); @@ -253,7 +253,7 @@ public interface ISessionApi : IApiAccessor /// /// This request returns all necessary configuration items to be used by the UI. This includes action codes, business attributes, transactions and settings at the moment. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// A comma delimited list of types used to specify what content should be returned. If not specified the default is actionCodes, agentGroups, and settings. Valid values are actionCodes, agentGroups, settings, workspaceTransactions, and businessAttributes. (optional) /// Task of ApiResponse (ConfigResponse) System.Threading.Tasks.Task> GetConfigurationAsyncWithHttpInfo (string types = null); @@ -263,7 +263,7 @@ public interface ISessionApi : IApiAccessor /// /// This request can be used to retrieve information about the current user. This can be done at startup to check for an existing session. The returned user information includes state recovery information about the active session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of CurrentSession System.Threading.Tasks.Task GetCurrentSessionAsync (); @@ -273,7 +273,7 @@ public interface ISessionApi : IApiAccessor /// /// This request can be used to retrieve information about the current user. This can be done at startup to check for an existing session. The returned user information includes state recovery information about the active session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (CurrentSession) System.Threading.Tasks.Task> GetCurrentSessionAsyncWithHttpInfo (); /// @@ -282,7 +282,7 @@ public interface ISessionApi : IApiAccessor /// /// This request can be used to retrieve information about the devices of a place. The returned devices are the devices attached to the place where the user logs in. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The name of the place /// Task of Devices System.Threading.Tasks.Task GetDevicesForPlaceAsync (string placeName); @@ -293,7 +293,7 @@ public interface ISessionApi : IApiAccessor /// /// This request can be used to retrieve information about the devices of a place. The returned devices are the devices attached to the place where the user logs in. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The name of the place /// Task of ApiResponse (Devices) System.Threading.Tasks.Task> GetDevicesForPlaceAsyncWithHttpInfo (string placeName); @@ -303,7 +303,7 @@ public interface ISessionApi : IApiAccessor /// /// The initialize-workspace request retrieves the authorization token using the authorization code. The token is then registered and the user's environment is prepared. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// the authorization code (optional) /// the same redirect_uri used in the initial login step (optional) /// For OAuth resource owner password credentials grant should contains Bearer authorization. Example: 'Authorization: Bearer access_token' (optional) @@ -316,7 +316,7 @@ public interface ISessionApi : IApiAccessor /// /// The initialize-workspace request retrieves the authorization token using the authorization code. The token is then registered and the user's environment is prepared. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// the authorization code (optional) /// the same redirect_uri used in the initial login step (optional) /// For OAuth resource owner password credentials grant should contains Bearer authorization. Example: 'Authorization: Bearer access_token' (optional) @@ -328,7 +328,7 @@ public interface ISessionApi : IApiAccessor /// /// The login request authenticates the user and retrieves the authorization code. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// this the URI the AUTH service uses to redirect the user after authentication /// Task of ApiSuccessResponse System.Threading.Tasks.Task LoginAsync (string redirectUri); @@ -339,7 +339,7 @@ public interface ISessionApi : IApiAccessor /// /// The login request authenticates the user and retrieves the authorization code. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// this the URI the AUTH service uses to redirect the user after authentication /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> LoginAsyncWithHttpInfo (string redirectUri); @@ -349,7 +349,7 @@ public interface ISessionApi : IApiAccessor /// /// This request is used to end the user session. It will log the agent out for voice/channels, end the HTTP session and clean up related resources. The suggested shutdown sequence is to disconnect socket.io and then make this request. After ending the session the login request is required before making any new calls to the API. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse System.Threading.Tasks.Task LogoutAsync (); @@ -359,7 +359,7 @@ public interface ISessionApi : IApiAccessor /// /// This request is used to end the user session. It will log the agent out for voice/channels, end the HTTP session and clean up related resources. The suggested shutdown sequence is to disconnect socket.io and then make this request. After ending the session the login request is required before making any new calls to the API. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> LogoutAsyncWithHttpInfo (); #endregion Asynchronous Operations @@ -370,7 +370,7 @@ public interface ISessionApi : IApiAccessor /// public partial class SessionApi : ISessionApi { - private Genesys.Workspace.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + private Genesys.Workspace.Internal.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class. @@ -380,7 +380,7 @@ public SessionApi(String basePath) { this.Configuration = new Configuration(new ApiClient(basePath)); - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -402,7 +402,7 @@ public SessionApi(Configuration configuration = null) else this.Configuration = configuration; - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -439,7 +439,7 @@ public void SetBasePath(String basePath) /// /// Provides a factory method hook for the creation of exceptions. /// - public Genesys.Workspace.Client.ExceptionFactory ExceptionFactory + public Genesys.Workspace.Internal.Client.ExceptionFactory ExceptionFactory { get { @@ -477,7 +477,7 @@ public void AddDefaultHeader(string key, string value) /// /// Activate channels for the user with the specified resources The activate-channels request is used to activate voice/media for the user by declaring the channels and resources that should be used. If the channels are is successfully activated, additional information about the state of active resources (dns, channels) will be received via events. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse public ApiSuccessResponse ActivateChannels (ChannelsData channelsData) @@ -489,7 +489,7 @@ public ApiSuccessResponse ActivateChannels (ChannelsData channelsData) /// /// Activate channels for the user with the specified resources The activate-channels request is used to activate voice/media for the user by declaring the channels and resources that should be used. If the channels are is successfully activated, additional information about the state of active resources (dns, channels) will be received via events. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > ActivateChannelsWithHttpInfo (ChannelsData channelsData) @@ -551,7 +551,7 @@ public ApiResponse< ApiSuccessResponse > ActivateChannelsWithHttpInfo (ChannelsD /// /// Activate channels for the user with the specified resources The activate-channels request is used to activate voice/media for the user by declaring the channels and resources that should be used. If the channels are is successfully activated, additional information about the state of active resources (dns, channels) will be received via events. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task ActivateChannelsAsync (ChannelsData channelsData) @@ -564,7 +564,7 @@ public async System.Threading.Tasks.Task ActivateChannelsAsy /// /// Activate channels for the user with the specified resources The activate-channels request is used to activate voice/media for the user by declaring the channels and resources that should be used. If the channels are is successfully activated, additional information about the state of active resources (dns, channels) will be received via events. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> ActivateChannelsAsyncWithHttpInfo (ChannelsData channelsData) @@ -626,7 +626,7 @@ public async System.Threading.Tasks.Task> Activa /// /// Get the business attribute hierarchy Get the business attribute hierarchy /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the business attribute /// ApiSuccessResponse public ApiSuccessResponse GetBusinessAttributeHierarchy (int? id) @@ -638,7 +638,7 @@ public ApiSuccessResponse GetBusinessAttributeHierarchy (int? id) /// /// Get the business attribute hierarchy Get the business attribute hierarchy /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the business attribute /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > GetBusinessAttributeHierarchyWithHttpInfo (int? id) @@ -693,7 +693,7 @@ public ApiResponse< ApiSuccessResponse > GetBusinessAttributeHierarchyWithHttpIn /// /// Get the business attribute hierarchy Get the business attribute hierarchy /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the business attribute /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task GetBusinessAttributeHierarchyAsync (int? id) @@ -706,7 +706,7 @@ public async System.Threading.Tasks.Task GetBusinessAttribut /// /// Get the business attribute hierarchy Get the business attribute hierarchy /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the business attribute /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> GetBusinessAttributeHierarchyAsyncWithHttpInfo (int? id) @@ -761,7 +761,7 @@ public async System.Threading.Tasks.Task> GetBus /// /// Read settings, action codes, business attributes and other configuration. This request returns all necessary configuration items to be used by the UI. This includes action codes, business attributes, transactions and settings at the moment. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// A comma delimited list of types used to specify what content should be returned. If not specified the default is actionCodes, agentGroups, and settings. Valid values are actionCodes, agentGroups, settings, workspaceTransactions, and businessAttributes. (optional) /// ConfigResponse public ConfigResponse GetConfiguration (string types = null) @@ -773,7 +773,7 @@ public ConfigResponse GetConfiguration (string types = null) /// /// Read settings, action codes, business attributes and other configuration. This request returns all necessary configuration items to be used by the UI. This includes action codes, business attributes, transactions and settings at the moment. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// A comma delimited list of types used to specify what content should be returned. If not specified the default is actionCodes, agentGroups, and settings. Valid values are actionCodes, agentGroups, settings, workspaceTransactions, and businessAttributes. (optional) /// ApiResponse of ConfigResponse public ApiResponse< ConfigResponse > GetConfigurationWithHttpInfo (string types = null) @@ -825,7 +825,7 @@ public ApiResponse< ConfigResponse > GetConfigurationWithHttpInfo (string types /// /// Read settings, action codes, business attributes and other configuration. This request returns all necessary configuration items to be used by the UI. This includes action codes, business attributes, transactions and settings at the moment. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// A comma delimited list of types used to specify what content should be returned. If not specified the default is actionCodes, agentGroups, and settings. Valid values are actionCodes, agentGroups, settings, workspaceTransactions, and businessAttributes. (optional) /// Task of ConfigResponse public async System.Threading.Tasks.Task GetConfigurationAsync (string types = null) @@ -838,7 +838,7 @@ public async System.Threading.Tasks.Task GetConfigurationAsync ( /// /// Read settings, action codes, business attributes and other configuration. This request returns all necessary configuration items to be used by the UI. This includes action codes, business attributes, transactions and settings at the moment. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// A comma delimited list of types used to specify what content should be returned. If not specified the default is actionCodes, agentGroups, and settings. Valid values are actionCodes, agentGroups, settings, workspaceTransactions, and businessAttributes. (optional) /// Task of ApiResponse (ConfigResponse) public async System.Threading.Tasks.Task> GetConfigurationAsyncWithHttpInfo (string types = null) @@ -890,7 +890,7 @@ public async System.Threading.Tasks.Task> GetConfigu /// /// Read information about the logged in user including any existing media logins and calls This request can be used to retrieve information about the current user. This can be done at startup to check for an existing session. The returned user information includes state recovery information about the active session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// CurrentSession public CurrentSession GetCurrentSession () { @@ -901,7 +901,7 @@ public CurrentSession GetCurrentSession () /// /// Read information about the logged in user including any existing media logins and calls This request can be used to retrieve information about the current user. This can be done at startup to check for an existing session. The returned user information includes state recovery information about the active session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of CurrentSession public ApiResponse< CurrentSession > GetCurrentSessionWithHttpInfo () { @@ -951,7 +951,7 @@ public ApiResponse< CurrentSession > GetCurrentSessionWithHttpInfo () /// /// Read information about the logged in user including any existing media logins and calls This request can be used to retrieve information about the current user. This can be done at startup to check for an existing session. The returned user information includes state recovery information about the active session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of CurrentSession public async System.Threading.Tasks.Task GetCurrentSessionAsync () { @@ -963,7 +963,7 @@ public async System.Threading.Tasks.Task GetCurrentSessionAsync /// /// Read information about the logged in user including any existing media logins and calls This request can be used to retrieve information about the current user. This can be done at startup to check for an existing session. The returned user information includes state recovery information about the active session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (CurrentSession) public async System.Threading.Tasks.Task> GetCurrentSessionAsyncWithHttpInfo () { @@ -1013,7 +1013,7 @@ public async System.Threading.Tasks.Task> GetCurrent /// /// get devices from place This request can be used to retrieve information about the devices of a place. The returned devices are the devices attached to the place where the user logs in. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The name of the place /// Devices public Devices GetDevicesForPlace (string placeName) @@ -1025,7 +1025,7 @@ public Devices GetDevicesForPlace (string placeName) /// /// get devices from place This request can be used to retrieve information about the devices of a place. The returned devices are the devices attached to the place where the user logs in. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The name of the place /// ApiResponse of Devices public ApiResponse< Devices > GetDevicesForPlaceWithHttpInfo (string placeName) @@ -1080,7 +1080,7 @@ public ApiResponse< Devices > GetDevicesForPlaceWithHttpInfo (string placeName) /// /// get devices from place This request can be used to retrieve information about the devices of a place. The returned devices are the devices attached to the place where the user logs in. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The name of the place /// Task of Devices public async System.Threading.Tasks.Task GetDevicesForPlaceAsync (string placeName) @@ -1093,7 +1093,7 @@ public async System.Threading.Tasks.Task GetDevicesForPlaceAsync (strin /// /// get devices from place This request can be used to retrieve information about the devices of a place. The returned devices are the devices attached to the place where the user logs in. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The name of the place /// Task of ApiResponse (Devices) public async System.Threading.Tasks.Task> GetDevicesForPlaceAsyncWithHttpInfo (string placeName) @@ -1148,7 +1148,7 @@ public async System.Threading.Tasks.Task> GetDevicesForPlac /// /// Retrieves authorization token and registers it The initialize-workspace request retrieves the authorization token using the authorization code. The token is then registered and the user's environment is prepared. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// the authorization code (optional) /// the same redirect_uri used in the initial login step (optional) /// For OAuth resource owner password credentials grant should contains Bearer authorization. Example: 'Authorization: Bearer access_token' (optional) @@ -1162,7 +1162,7 @@ public ApiSuccessResponse InitializeWorkspace (string code = null, string redire /// /// Retrieves authorization token and registers it The initialize-workspace request retrieves the authorization token using the authorization code. The token is then registered and the user's environment is prepared. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// the authorization code (optional) /// the same redirect_uri used in the initial login step (optional) /// For OAuth resource owner password credentials grant should contains Bearer authorization. Example: 'Authorization: Bearer access_token' (optional) @@ -1218,7 +1218,7 @@ public ApiResponse< ApiSuccessResponse > InitializeWorkspaceWithHttpInfo (string /// /// Retrieves authorization token and registers it The initialize-workspace request retrieves the authorization token using the authorization code. The token is then registered and the user's environment is prepared. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// the authorization code (optional) /// the same redirect_uri used in the initial login step (optional) /// For OAuth resource owner password credentials grant should contains Bearer authorization. Example: 'Authorization: Bearer access_token' (optional) @@ -1233,7 +1233,7 @@ public async System.Threading.Tasks.Task InitializeWorkspace /// /// Retrieves authorization token and registers it The initialize-workspace request retrieves the authorization token using the authorization code. The token is then registered and the user's environment is prepared. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// the authorization code (optional) /// the same redirect_uri used in the initial login step (optional) /// For OAuth resource owner password credentials grant should contains Bearer authorization. Example: 'Authorization: Bearer access_token' (optional) @@ -1289,7 +1289,7 @@ public async System.Threading.Tasks.Task> Initia /// /// login the specified user (HTTP session only) The login request authenticates the user and retrieves the authorization code. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// this the URI the AUTH service uses to redirect the user after authentication /// ApiSuccessResponse public ApiSuccessResponse Login (string redirectUri) @@ -1301,7 +1301,7 @@ public ApiSuccessResponse Login (string redirectUri) /// /// login the specified user (HTTP session only) The login request authenticates the user and retrieves the authorization code. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// this the URI the AUTH service uses to redirect the user after authentication /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > LoginWithHttpInfo (string redirectUri) @@ -1356,7 +1356,7 @@ public ApiResponse< ApiSuccessResponse > LoginWithHttpInfo (string redirectUri) /// /// login the specified user (HTTP session only) The login request authenticates the user and retrieves the authorization code. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// this the URI the AUTH service uses to redirect the user after authentication /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task LoginAsync (string redirectUri) @@ -1369,7 +1369,7 @@ public async System.Threading.Tasks.Task LoginAsync (string /// /// login the specified user (HTTP session only) The login request authenticates the user and retrieves the authorization code. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// this the URI the AUTH service uses to redirect the user after authentication /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> LoginAsyncWithHttpInfo (string redirectUri) @@ -1424,7 +1424,7 @@ public async System.Threading.Tasks.Task> LoginA /// /// Logout of media and end the session This request is used to end the user session. It will log the agent out for voice/channels, end the HTTP session and clean up related resources. The suggested shutdown sequence is to disconnect socket.io and then make this request. After ending the session the login request is required before making any new calls to the API. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse public ApiSuccessResponse Logout () { @@ -1435,7 +1435,7 @@ public ApiSuccessResponse Logout () /// /// Logout of media and end the session This request is used to end the user session. It will log the agent out for voice/channels, end the HTTP session and clean up related resources. The suggested shutdown sequence is to disconnect socket.io and then make this request. After ending the session the login request is required before making any new calls to the API. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > LogoutWithHttpInfo () { @@ -1485,7 +1485,7 @@ public ApiResponse< ApiSuccessResponse > LogoutWithHttpInfo () /// /// Logout of media and end the session This request is used to end the user session. It will log the agent out for voice/channels, end the HTTP session and clean up related resources. The suggested shutdown sequence is to disconnect socket.io and then make this request. After ending the session the login request is required before making any new calls to the API. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task LogoutAsync () { @@ -1497,7 +1497,7 @@ public async System.Threading.Tasks.Task LogoutAsync () /// /// Logout of media and end the session This request is used to end the user session. It will log the agent out for voice/channels, end the HTTP session and clean up related resources. The suggested shutdown sequence is to disconnect socket.io and then make this request. After ending the session the login request is required before making any new calls to the API. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> LogoutAsyncWithHttpInfo () { diff --git a/src/Genesys.Workspace/Api/TargetsApi.cs b/src/Genesys.Workspace/Internal/Api/TargetsApi.cs similarity index 90% rename from src/Genesys.Workspace/Api/TargetsApi.cs rename to src/Genesys.Workspace/Internal/Api/TargetsApi.cs index 3d01b41..769e8e4 100644 --- a/src/Genesys.Workspace/Api/TargetsApi.cs +++ b/src/Genesys.Workspace/Internal/Api/TargetsApi.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -13,10 +13,10 @@ using System.Collections.ObjectModel; using System.Linq; using RestSharp; -using Genesys.Workspace.Client; -using Genesys.Workspace.Model; +using Genesys.Workspace.Internal.Client; +using Genesys.Workspace.Internal.Model; -namespace Genesys.Workspace.Api +namespace Genesys.Workspace.Internal.Api { /// /// Represents a collection of functions to interact with the API endpoints @@ -30,7 +30,7 @@ public interface ITargetsApi : IApiAccessor /// /// Ack the missed calls in recent target /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse ApiSuccessResponse AckRecentMissedCalls (); @@ -40,7 +40,7 @@ public interface ITargetsApi : IApiAccessor /// /// Ack the missed calls in recent target /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse ApiResponse AckRecentMissedCallsWithHttpInfo (); /// @@ -49,7 +49,7 @@ public interface ITargetsApi : IApiAccessor /// /// Add a recent target /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse ApiSuccessResponse AddRecentTarget (RecentTargetData recentTargetData); @@ -60,7 +60,7 @@ public interface ITargetsApi : IApiAccessor /// /// Add a recent target /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse ApiResponse AddRecentTargetWithHttpInfo (RecentTargetData recentTargetData); @@ -70,7 +70,7 @@ public interface ITargetsApi : IApiAccessor /// /// delete a personal favorite by type and id /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the target /// the type of the target /// ApiSuccessResponse @@ -82,7 +82,7 @@ public interface ITargetsApi : IApiAccessor /// /// delete a personal favorite by type and id /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the target /// the type of the target /// ApiResponse of ApiSuccessResponse @@ -93,7 +93,7 @@ public interface ITargetsApi : IApiAccessor /// /// Search for targets /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The text to search for /// The filter to specify on which fields the search is applied (optional) /// Comma separated list of types to include in the search. Valid values are acd-queue, agent-group, agent, route-point, skill and custom-contact. (optional) @@ -112,7 +112,7 @@ public interface ITargetsApi : IApiAccessor /// /// Search for targets /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The text to search for /// The filter to specify on which fields the search is applied (optional) /// Comma separated list of types to include in the search. Valid values are acd-queue, agent-group, agent, route-point, skill and custom-contact. (optional) @@ -130,7 +130,7 @@ public interface ITargetsApi : IApiAccessor /// /// Get personal favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Number of results. 50 if not specified. (optional) /// TargetsResponse TargetsResponse GetPersonalFavorites (decimal? limit = null); @@ -141,7 +141,7 @@ public interface ITargetsApi : IApiAccessor /// /// Get personal favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Number of results. 50 if not specified. (optional) /// ApiResponse of TargetsResponse ApiResponse GetPersonalFavoritesWithHttpInfo (decimal? limit = null); @@ -151,7 +151,7 @@ public interface ITargetsApi : IApiAccessor /// /// Get recent targets /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Number of results. 50 if not specified. (optional) /// TargetsResponse TargetsResponse GetRecentTargets (decimal? limit = null); @@ -162,7 +162,7 @@ public interface ITargetsApi : IApiAccessor /// /// Get recent targets /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Number of results. 50 if not specified. (optional) /// ApiResponse of TargetsResponse ApiResponse GetRecentTargetsWithHttpInfo (decimal? limit = null); @@ -172,7 +172,7 @@ public interface ITargetsApi : IApiAccessor /// /// Get a specific target by type and id /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the target /// the type of the target /// TargetsResponse @@ -184,7 +184,7 @@ public interface ITargetsApi : IApiAccessor /// /// Get a specific target by type and id /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the target /// the type of the target /// ApiResponse of TargetsResponse @@ -195,7 +195,7 @@ public interface ITargetsApi : IApiAccessor /// /// Save a personal favorite /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse ApiSuccessResponse SavePersonalFavorite (PersonalFavoriteData personalFavoriteData); @@ -206,7 +206,7 @@ public interface ITargetsApi : IApiAccessor /// /// Save a personal favorite /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse ApiResponse SavePersonalFavoriteWithHttpInfo (PersonalFavoriteData personalFavoriteData); @@ -218,7 +218,7 @@ public interface ITargetsApi : IApiAccessor /// /// Ack the missed calls in recent target /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse System.Threading.Tasks.Task AckRecentMissedCallsAsync (); @@ -228,7 +228,7 @@ public interface ITargetsApi : IApiAccessor /// /// Ack the missed calls in recent target /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> AckRecentMissedCallsAsyncWithHttpInfo (); /// @@ -237,7 +237,7 @@ public interface ITargetsApi : IApiAccessor /// /// Add a recent target /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse System.Threading.Tasks.Task AddRecentTargetAsync (RecentTargetData recentTargetData); @@ -248,7 +248,7 @@ public interface ITargetsApi : IApiAccessor /// /// Add a recent target /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> AddRecentTargetAsyncWithHttpInfo (RecentTargetData recentTargetData); @@ -258,7 +258,7 @@ public interface ITargetsApi : IApiAccessor /// /// delete a personal favorite by type and id /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the target /// the type of the target /// Task of ApiSuccessResponse @@ -270,7 +270,7 @@ public interface ITargetsApi : IApiAccessor /// /// delete a personal favorite by type and id /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the target /// the type of the target /// Task of ApiResponse (ApiSuccessResponse) @@ -281,7 +281,7 @@ public interface ITargetsApi : IApiAccessor /// /// Search for targets /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The text to search for /// The filter to specify on which fields the search is applied (optional) /// Comma separated list of types to include in the search. Valid values are acd-queue, agent-group, agent, route-point, skill and custom-contact. (optional) @@ -300,7 +300,7 @@ public interface ITargetsApi : IApiAccessor /// /// Search for targets /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The text to search for /// The filter to specify on which fields the search is applied (optional) /// Comma separated list of types to include in the search. Valid values are acd-queue, agent-group, agent, route-point, skill and custom-contact. (optional) @@ -318,7 +318,7 @@ public interface ITargetsApi : IApiAccessor /// /// Get personal favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Number of results. 50 if not specified. (optional) /// Task of TargetsResponse System.Threading.Tasks.Task GetPersonalFavoritesAsync (decimal? limit = null); @@ -329,7 +329,7 @@ public interface ITargetsApi : IApiAccessor /// /// Get personal favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Number of results. 50 if not specified. (optional) /// Task of ApiResponse (TargetsResponse) System.Threading.Tasks.Task> GetPersonalFavoritesAsyncWithHttpInfo (decimal? limit = null); @@ -339,7 +339,7 @@ public interface ITargetsApi : IApiAccessor /// /// Get recent targets /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Number of results. 50 if not specified. (optional) /// Task of TargetsResponse System.Threading.Tasks.Task GetRecentTargetsAsync (decimal? limit = null); @@ -350,7 +350,7 @@ public interface ITargetsApi : IApiAccessor /// /// Get recent targets /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Number of results. 50 if not specified. (optional) /// Task of ApiResponse (TargetsResponse) System.Threading.Tasks.Task> GetRecentTargetsAsyncWithHttpInfo (decimal? limit = null); @@ -360,7 +360,7 @@ public interface ITargetsApi : IApiAccessor /// /// Get a specific target by type and id /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the target /// the type of the target /// Task of TargetsResponse @@ -372,7 +372,7 @@ public interface ITargetsApi : IApiAccessor /// /// Get a specific target by type and id /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the target /// the type of the target /// Task of ApiResponse (TargetsResponse) @@ -383,7 +383,7 @@ public interface ITargetsApi : IApiAccessor /// /// Save a personal favorite /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse System.Threading.Tasks.Task SavePersonalFavoriteAsync (PersonalFavoriteData personalFavoriteData); @@ -394,7 +394,7 @@ public interface ITargetsApi : IApiAccessor /// /// Save a personal favorite /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> SavePersonalFavoriteAsyncWithHttpInfo (PersonalFavoriteData personalFavoriteData); @@ -406,7 +406,7 @@ public interface ITargetsApi : IApiAccessor /// public partial class TargetsApi : ITargetsApi { - private Genesys.Workspace.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + private Genesys.Workspace.Internal.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class. @@ -416,7 +416,7 @@ public TargetsApi(String basePath) { this.Configuration = new Configuration(new ApiClient(basePath)); - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -438,7 +438,7 @@ public TargetsApi(Configuration configuration = null) else this.Configuration = configuration; - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -475,7 +475,7 @@ public void SetBasePath(String basePath) /// /// Provides a factory method hook for the creation of exceptions. /// - public Genesys.Workspace.Client.ExceptionFactory ExceptionFactory + public Genesys.Workspace.Internal.Client.ExceptionFactory ExceptionFactory { get { @@ -513,7 +513,7 @@ public void AddDefaultHeader(string key, string value) /// /// Ack the missed calls in recent target Ack the missed calls in recent target /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse public ApiSuccessResponse AckRecentMissedCalls () { @@ -524,7 +524,7 @@ public ApiSuccessResponse AckRecentMissedCalls () /// /// Ack the missed calls in recent target Ack the missed calls in recent target /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > AckRecentMissedCallsWithHttpInfo () { @@ -574,7 +574,7 @@ public ApiResponse< ApiSuccessResponse > AckRecentMissedCallsWithHttpInfo () /// /// Ack the missed calls in recent target Ack the missed calls in recent target /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task AckRecentMissedCallsAsync () { @@ -586,7 +586,7 @@ public async System.Threading.Tasks.Task AckRecentMissedCall /// /// Ack the missed calls in recent target Ack the missed calls in recent target /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> AckRecentMissedCallsAsyncWithHttpInfo () { @@ -636,7 +636,7 @@ public async System.Threading.Tasks.Task> AckRec /// /// Add a recent target Add a recent target /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse public ApiSuccessResponse AddRecentTarget (RecentTargetData recentTargetData) @@ -648,7 +648,7 @@ public ApiSuccessResponse AddRecentTarget (RecentTargetData recentTargetData) /// /// Add a recent target Add a recent target /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > AddRecentTargetWithHttpInfo (RecentTargetData recentTargetData) @@ -710,7 +710,7 @@ public ApiResponse< ApiSuccessResponse > AddRecentTargetWithHttpInfo (RecentTarg /// /// Add a recent target Add a recent target /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task AddRecentTargetAsync (RecentTargetData recentTargetData) @@ -723,7 +723,7 @@ public async System.Threading.Tasks.Task AddRecentTargetAsyn /// /// Add a recent target Add a recent target /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> AddRecentTargetAsyncWithHttpInfo (RecentTargetData recentTargetData) @@ -785,7 +785,7 @@ public async System.Threading.Tasks.Task> AddRec /// /// delete a personal favorite delete a personal favorite by type and id /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the target /// the type of the target /// ApiSuccessResponse @@ -798,7 +798,7 @@ public ApiSuccessResponse DeletePersonalFavorite (string id, string type) /// /// delete a personal favorite delete a personal favorite by type and id /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the target /// the type of the target /// ApiResponse of ApiSuccessResponse @@ -858,7 +858,7 @@ public ApiResponse< ApiSuccessResponse > DeletePersonalFavoriteWithHttpInfo (str /// /// delete a personal favorite delete a personal favorite by type and id /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the target /// the type of the target /// Task of ApiSuccessResponse @@ -872,7 +872,7 @@ public async System.Threading.Tasks.Task DeletePersonalFavor /// /// delete a personal favorite delete a personal favorite by type and id /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the target /// the type of the target /// Task of ApiResponse (ApiSuccessResponse) @@ -932,7 +932,7 @@ public async System.Threading.Tasks.Task> Delete /// /// Search for targets Search for targets /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The text to search for /// The filter to specify on which fields the search is applied (optional) /// Comma separated list of types to include in the search. Valid values are acd-queue, agent-group, agent, route-point, skill and custom-contact. (optional) @@ -952,7 +952,7 @@ public TargetsResponse Get (string searchTerm, string filterName = null, string /// /// Search for targets Search for targets /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The text to search for /// The filter to specify on which fields the search is applied (optional) /// Comma separated list of types to include in the search. Valid values are acd-queue, agent-group, agent, route-point, skill and custom-contact. (optional) @@ -1023,7 +1023,7 @@ public ApiResponse< TargetsResponse > GetWithHttpInfo (string searchTerm, string /// /// Search for targets Search for targets /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The text to search for /// The filter to specify on which fields the search is applied (optional) /// Comma separated list of types to include in the search. Valid values are acd-queue, agent-group, agent, route-point, skill and custom-contact. (optional) @@ -1044,7 +1044,7 @@ public async System.Threading.Tasks.Task GetAsync (string searc /// /// Search for targets Search for targets /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The text to search for /// The filter to specify on which fields the search is applied (optional) /// Comma separated list of types to include in the search. Valid values are acd-queue, agent-group, agent, route-point, skill and custom-contact. (optional) @@ -1115,7 +1115,7 @@ public async System.Threading.Tasks.Task> GetAsyncW /// /// Get personal favorites Get personal favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Number of results. 50 if not specified. (optional) /// TargetsResponse public TargetsResponse GetPersonalFavorites (decimal? limit = null) @@ -1127,7 +1127,7 @@ public TargetsResponse GetPersonalFavorites (decimal? limit = null) /// /// Get personal favorites Get personal favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Number of results. 50 if not specified. (optional) /// ApiResponse of TargetsResponse public ApiResponse< TargetsResponse > GetPersonalFavoritesWithHttpInfo (decimal? limit = null) @@ -1179,7 +1179,7 @@ public ApiResponse< TargetsResponse > GetPersonalFavoritesWithHttpInfo (decimal? /// /// Get personal favorites Get personal favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Number of results. 50 if not specified. (optional) /// Task of TargetsResponse public async System.Threading.Tasks.Task GetPersonalFavoritesAsync (decimal? limit = null) @@ -1192,7 +1192,7 @@ public async System.Threading.Tasks.Task GetPersonalFavoritesAs /// /// Get personal favorites Get personal favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Number of results. 50 if not specified. (optional) /// Task of ApiResponse (TargetsResponse) public async System.Threading.Tasks.Task> GetPersonalFavoritesAsyncWithHttpInfo (decimal? limit = null) @@ -1244,7 +1244,7 @@ public async System.Threading.Tasks.Task> GetPerson /// /// Get recent targets Get recent targets /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Number of results. 50 if not specified. (optional) /// TargetsResponse public TargetsResponse GetRecentTargets (decimal? limit = null) @@ -1256,7 +1256,7 @@ public TargetsResponse GetRecentTargets (decimal? limit = null) /// /// Get recent targets Get recent targets /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Number of results. 50 if not specified. (optional) /// ApiResponse of TargetsResponse public ApiResponse< TargetsResponse > GetRecentTargetsWithHttpInfo (decimal? limit = null) @@ -1308,7 +1308,7 @@ public ApiResponse< TargetsResponse > GetRecentTargetsWithHttpInfo (decimal? lim /// /// Get recent targets Get recent targets /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Number of results. 50 if not specified. (optional) /// Task of TargetsResponse public async System.Threading.Tasks.Task GetRecentTargetsAsync (decimal? limit = null) @@ -1321,7 +1321,7 @@ public async System.Threading.Tasks.Task GetRecentTargetsAsync /// /// Get recent targets Get recent targets /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Number of results. 50 if not specified. (optional) /// Task of ApiResponse (TargetsResponse) public async System.Threading.Tasks.Task> GetRecentTargetsAsyncWithHttpInfo (decimal? limit = null) @@ -1373,7 +1373,7 @@ public async System.Threading.Tasks.Task> GetRecent /// /// Get a target Get a specific target by type and id /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the target /// the type of the target /// TargetsResponse @@ -1386,7 +1386,7 @@ public TargetsResponse GetTarget (decimal? id, string type) /// /// Get a target Get a specific target by type and id /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the target /// the type of the target /// ApiResponse of TargetsResponse @@ -1446,7 +1446,7 @@ public ApiResponse< TargetsResponse > GetTargetWithHttpInfo (decimal? id, string /// /// Get a target Get a specific target by type and id /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the target /// the type of the target /// Task of TargetsResponse @@ -1460,7 +1460,7 @@ public async System.Threading.Tasks.Task GetTargetAsync (decima /// /// Get a target Get a specific target by type and id /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the target /// the type of the target /// Task of ApiResponse (TargetsResponse) @@ -1520,7 +1520,7 @@ public async System.Threading.Tasks.Task> GetTarget /// /// Save a personal favorite Save a personal favorite /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse public ApiSuccessResponse SavePersonalFavorite (PersonalFavoriteData personalFavoriteData) @@ -1532,7 +1532,7 @@ public ApiSuccessResponse SavePersonalFavorite (PersonalFavoriteData personalFav /// /// Save a personal favorite Save a personal favorite /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > SavePersonalFavoriteWithHttpInfo (PersonalFavoriteData personalFavoriteData) @@ -1594,7 +1594,7 @@ public ApiResponse< ApiSuccessResponse > SavePersonalFavoriteWithHttpInfo (Perso /// /// Save a personal favorite Save a personal favorite /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task SavePersonalFavoriteAsync (PersonalFavoriteData personalFavoriteData) @@ -1607,7 +1607,7 @@ public async System.Threading.Tasks.Task SavePersonalFavorit /// /// Save a personal favorite Save a personal favorite /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> SavePersonalFavoriteAsyncWithHttpInfo (PersonalFavoriteData personalFavoriteData) diff --git a/src/Genesys.Workspace/Api/UcsApi.cs b/src/Genesys.Workspace/Internal/Api/UcsApi.cs similarity index 89% rename from src/Genesys.Workspace/Api/UcsApi.cs rename to src/Genesys.Workspace/Internal/Api/UcsApi.cs index 1115918..cd8e7fa 100644 --- a/src/Genesys.Workspace/Api/UcsApi.cs +++ b/src/Genesys.Workspace/Internal/Api/UcsApi.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -13,10 +13,10 @@ using System.Collections.ObjectModel; using System.Linq; using RestSharp; -using Genesys.Workspace.Client; -using Genesys.Workspace.Model; +using Genesys.Workspace.Internal.Client; +using Genesys.Workspace.Internal.Model; -namespace Genesys.Workspace.Api +namespace Genesys.Workspace.Internal.Api { /// /// Represents a collection of functions to interact with the API endpoints @@ -30,7 +30,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response to add to Favorites /// ApiSuccessResponse ApiSuccessResponse AddStandardResponseFavorite (string id); @@ -41,7 +41,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response to add to Favorites /// ApiResponse of ApiSuccessResponse ApiResponse AddStandardResponseFavoriteWithHttpInfo (string id); @@ -51,7 +51,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse ApiSuccessResponse AssignInteractionToContact (AssignInteractionToContactData assignInteractionToContactData); @@ -62,7 +62,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse ApiResponse AssignInteractionToContactWithHttpInfo (AssignInteractionToContactData assignInteractionToContactData); @@ -72,7 +72,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse ApiSuccessResponse CreateContact (); @@ -82,7 +82,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse ApiResponse CreateContactWithHttpInfo (); /// @@ -91,7 +91,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse ApiSuccessResponse DeleteContact (DeleteContactData deleteContactData); @@ -102,7 +102,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse ApiResponse DeleteContactWithHttpInfo (DeleteContactData deleteContactData); @@ -112,7 +112,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response to remove from Favorites /// ApiSuccessResponse ApiSuccessResponse DeleteStandardResponseFavorite (string id); @@ -123,7 +123,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response to remove from Favorites /// ApiResponse of ApiSuccessResponse ApiResponse DeleteStandardResponseFavoriteWithHttpInfo (string id); @@ -133,7 +133,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse ApiSuccessResponse FindOrCreatePhoneCall (PhoneCallData phoneCallData); @@ -144,7 +144,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse ApiResponse FindOrCreatePhoneCallWithHttpInfo (PhoneCallData phoneCallData); @@ -154,7 +154,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// ApiSuccessResponse ApiSuccessResponse GetAgentHistory (AgentHistoryData agentHistoryData = null); @@ -165,7 +165,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// ApiResponse of ApiSuccessResponse ApiResponse GetAgentHistoryWithHttpInfo (AgentHistoryData agentHistoryData = null); @@ -175,7 +175,7 @@ public interface IUcsApi : IApiAccessor /// /// Get details of a Category including category sub tree. Only 'id', 'standardResponseId', and 'name' attributes are returned for each Standard Response. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Category /// /// ApiSuccessResponse @@ -187,7 +187,7 @@ public interface IUcsApi : IApiAccessor /// /// Get details of a Category including category sub tree. Only 'id', 'standardResponseId', and 'name' attributes are returned for each Standard Response. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Category /// /// ApiResponse of ApiSuccessResponse @@ -198,7 +198,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse ApiSuccessResponse GetContactDetails (ContactDetailsData contactDetailsData); @@ -209,7 +209,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse ApiResponse GetContactDetailsWithHttpInfo (ContactDetailsData contactDetailsData); @@ -219,7 +219,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse ApiSuccessResponse GetContactHistory (ContactHistoryData contactHistoryData); @@ -230,7 +230,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse ApiResponse GetContactHistoryWithHttpInfo (ContactHistoryData contactHistoryData); @@ -240,7 +240,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse ApiSuccessResponse GetContacts (GetContactsData getContactsData); @@ -251,7 +251,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse ApiResponse GetContactsWithHttpInfo (GetContactsData getContactsData); @@ -261,7 +261,7 @@ public interface IUcsApi : IApiAccessor /// /// This request returns all the lucene indexes for contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ConfigResponse ConfigResponse GetIndexProperties (); @@ -271,7 +271,7 @@ public interface IUcsApi : IApiAccessor /// /// This request returns all the lucene indexes for contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ConfigResponse ApiResponse GetIndexPropertiesWithHttpInfo (); /// @@ -280,7 +280,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse ApiSuccessResponse GetInteractionContent (InteractionContentData interactionContentData); @@ -291,7 +291,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse ApiResponse GetInteractionContentWithHttpInfo (InteractionContentData interactionContentData); @@ -301,7 +301,7 @@ public interface IUcsApi : IApiAccessor /// /// Get all Root Categories information. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse ApiSuccessResponse GetRootCategories (); @@ -311,7 +311,7 @@ public interface IUcsApi : IApiAccessor /// /// Get all Root Categories information. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse ApiResponse GetRootCategoriesWithHttpInfo (); /// @@ -320,7 +320,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response /// /// ApiSuccessResponse @@ -332,7 +332,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response /// /// ApiResponse of ApiSuccessResponse @@ -343,7 +343,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse ApiSuccessResponse GetStandardResponseFavorites (); @@ -353,7 +353,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse ApiResponse GetStandardResponseFavoritesWithHttpInfo (); /// @@ -362,7 +362,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse ApiSuccessResponse IdentifyContact (IdentifyContactData identifyContactData); @@ -373,7 +373,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse ApiResponse IdentifyContactWithHttpInfo (IdentifyContactData identifyContactData); @@ -383,7 +383,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse ApiSuccessResponse LuceneSearch (LuceneSearchData luceneSearchData); @@ -394,7 +394,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse ApiResponse LuceneSearchWithHttpInfo (LuceneSearchData luceneSearchData); @@ -404,7 +404,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse ApiSuccessResponse LuceneSearchInteraction (LuceneSearchInteractionData luceneSearchInteractionData); @@ -415,7 +415,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse ApiResponse LuceneSearchInteractionWithHttpInfo (LuceneSearchInteractionData luceneSearchInteractionData); @@ -425,7 +425,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse ApiSuccessResponse SetCallCompleted (CallCompletedData callCompletedData); @@ -436,7 +436,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse ApiResponse SetCallCompletedWithHttpInfo (CallCompletedData callCompletedData); @@ -446,7 +446,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse ApiSuccessResponse SetCallNote (CallNoteData callNoteData); @@ -457,7 +457,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse ApiResponse SetCallNoteWithHttpInfo (CallNoteData callNoteData); @@ -467,7 +467,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse ApiSuccessResponse UpdateContact (UpdateContactData updateContactData); @@ -478,7 +478,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse ApiResponse UpdateContactWithHttpInfo (UpdateContactData updateContactData); @@ -490,7 +490,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response to add to Favorites /// Task of ApiSuccessResponse System.Threading.Tasks.Task AddStandardResponseFavoriteAsync (string id); @@ -501,7 +501,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response to add to Favorites /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> AddStandardResponseFavoriteAsyncWithHttpInfo (string id); @@ -511,7 +511,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse System.Threading.Tasks.Task AssignInteractionToContactAsync (AssignInteractionToContactData assignInteractionToContactData); @@ -522,7 +522,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> AssignInteractionToContactAsyncWithHttpInfo (AssignInteractionToContactData assignInteractionToContactData); @@ -532,7 +532,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse System.Threading.Tasks.Task CreateContactAsync (); @@ -542,7 +542,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> CreateContactAsyncWithHttpInfo (); /// @@ -551,7 +551,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse System.Threading.Tasks.Task DeleteContactAsync (DeleteContactData deleteContactData); @@ -562,7 +562,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> DeleteContactAsyncWithHttpInfo (DeleteContactData deleteContactData); @@ -572,7 +572,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response to remove from Favorites /// Task of ApiSuccessResponse System.Threading.Tasks.Task DeleteStandardResponseFavoriteAsync (string id); @@ -583,7 +583,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response to remove from Favorites /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> DeleteStandardResponseFavoriteAsyncWithHttpInfo (string id); @@ -593,7 +593,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse System.Threading.Tasks.Task FindOrCreatePhoneCallAsync (PhoneCallData phoneCallData); @@ -604,7 +604,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> FindOrCreatePhoneCallAsyncWithHttpInfo (PhoneCallData phoneCallData); @@ -614,7 +614,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// Task of ApiSuccessResponse System.Threading.Tasks.Task GetAgentHistoryAsync (AgentHistoryData agentHistoryData = null); @@ -625,7 +625,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> GetAgentHistoryAsyncWithHttpInfo (AgentHistoryData agentHistoryData = null); @@ -635,7 +635,7 @@ public interface IUcsApi : IApiAccessor /// /// Get details of a Category including category sub tree. Only 'id', 'standardResponseId', and 'name' attributes are returned for each Standard Response. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Category /// /// Task of ApiSuccessResponse @@ -647,7 +647,7 @@ public interface IUcsApi : IApiAccessor /// /// Get details of a Category including category sub tree. Only 'id', 'standardResponseId', and 'name' attributes are returned for each Standard Response. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Category /// /// Task of ApiResponse (ApiSuccessResponse) @@ -658,7 +658,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse System.Threading.Tasks.Task GetContactDetailsAsync (ContactDetailsData contactDetailsData); @@ -669,7 +669,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> GetContactDetailsAsyncWithHttpInfo (ContactDetailsData contactDetailsData); @@ -679,7 +679,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse System.Threading.Tasks.Task GetContactHistoryAsync (ContactHistoryData contactHistoryData); @@ -690,7 +690,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> GetContactHistoryAsyncWithHttpInfo (ContactHistoryData contactHistoryData); @@ -700,7 +700,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse System.Threading.Tasks.Task GetContactsAsync (GetContactsData getContactsData); @@ -711,7 +711,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> GetContactsAsyncWithHttpInfo (GetContactsData getContactsData); @@ -721,7 +721,7 @@ public interface IUcsApi : IApiAccessor /// /// This request returns all the lucene indexes for contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ConfigResponse System.Threading.Tasks.Task GetIndexPropertiesAsync (); @@ -731,7 +731,7 @@ public interface IUcsApi : IApiAccessor /// /// This request returns all the lucene indexes for contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ConfigResponse) System.Threading.Tasks.Task> GetIndexPropertiesAsyncWithHttpInfo (); /// @@ -740,7 +740,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse System.Threading.Tasks.Task GetInteractionContentAsync (InteractionContentData interactionContentData); @@ -751,7 +751,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> GetInteractionContentAsyncWithHttpInfo (InteractionContentData interactionContentData); @@ -761,7 +761,7 @@ public interface IUcsApi : IApiAccessor /// /// Get all Root Categories information. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse System.Threading.Tasks.Task GetRootCategoriesAsync (); @@ -771,7 +771,7 @@ public interface IUcsApi : IApiAccessor /// /// Get all Root Categories information. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> GetRootCategoriesAsyncWithHttpInfo (); /// @@ -780,7 +780,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response /// /// Task of ApiSuccessResponse @@ -792,7 +792,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response /// /// Task of ApiResponse (ApiSuccessResponse) @@ -803,7 +803,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse System.Threading.Tasks.Task GetStandardResponseFavoritesAsync (); @@ -813,7 +813,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> GetStandardResponseFavoritesAsyncWithHttpInfo (); /// @@ -822,7 +822,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse System.Threading.Tasks.Task IdentifyContactAsync (IdentifyContactData identifyContactData); @@ -833,7 +833,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> IdentifyContactAsyncWithHttpInfo (IdentifyContactData identifyContactData); @@ -843,7 +843,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse System.Threading.Tasks.Task LuceneSearchAsync (LuceneSearchData luceneSearchData); @@ -854,7 +854,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> LuceneSearchAsyncWithHttpInfo (LuceneSearchData luceneSearchData); @@ -864,7 +864,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse System.Threading.Tasks.Task LuceneSearchInteractionAsync (LuceneSearchInteractionData luceneSearchInteractionData); @@ -875,7 +875,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> LuceneSearchInteractionAsyncWithHttpInfo (LuceneSearchInteractionData luceneSearchInteractionData); @@ -885,7 +885,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse System.Threading.Tasks.Task SetCallCompletedAsync (CallCompletedData callCompletedData); @@ -896,7 +896,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> SetCallCompletedAsyncWithHttpInfo (CallCompletedData callCompletedData); @@ -906,7 +906,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse System.Threading.Tasks.Task SetCallNoteAsync (CallNoteData callNoteData); @@ -917,7 +917,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> SetCallNoteAsyncWithHttpInfo (CallNoteData callNoteData); @@ -927,7 +927,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse System.Threading.Tasks.Task UpdateContactAsync (UpdateContactData updateContactData); @@ -938,7 +938,7 @@ public interface IUcsApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> UpdateContactAsyncWithHttpInfo (UpdateContactData updateContactData); @@ -950,7 +950,7 @@ public interface IUcsApi : IApiAccessor /// public partial class UcsApi : IUcsApi { - private Genesys.Workspace.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + private Genesys.Workspace.Internal.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class. @@ -960,7 +960,7 @@ public UcsApi(String basePath) { this.Configuration = new Configuration(new ApiClient(basePath)); - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -982,7 +982,7 @@ public UcsApi(Configuration configuration = null) else this.Configuration = configuration; - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -1019,7 +1019,7 @@ public void SetBasePath(String basePath) /// /// Provides a factory method hook for the creation of exceptions. /// - public Genesys.Workspace.Client.ExceptionFactory ExceptionFactory + public Genesys.Workspace.Internal.Client.ExceptionFactory ExceptionFactory { get { @@ -1057,7 +1057,7 @@ public void AddDefaultHeader(string key, string value) /// /// Add a Standard Response to Favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response to add to Favorites /// ApiSuccessResponse public ApiSuccessResponse AddStandardResponseFavorite (string id) @@ -1069,7 +1069,7 @@ public ApiSuccessResponse AddStandardResponseFavorite (string id) /// /// Add a Standard Response to Favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response to add to Favorites /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > AddStandardResponseFavoriteWithHttpInfo (string id) @@ -1124,7 +1124,7 @@ public ApiResponse< ApiSuccessResponse > AddStandardResponseFavoriteWithHttpInfo /// /// Add a Standard Response to Favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response to add to Favorites /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task AddStandardResponseFavoriteAsync (string id) @@ -1137,7 +1137,7 @@ public async System.Threading.Tasks.Task AddStandardResponse /// /// Add a Standard Response to Favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response to add to Favorites /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> AddStandardResponseFavoriteAsyncWithHttpInfo (string id) @@ -1192,7 +1192,7 @@ public async System.Threading.Tasks.Task> AddSta /// /// Assign the interaction to a contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse public ApiSuccessResponse AssignInteractionToContact (AssignInteractionToContactData assignInteractionToContactData) @@ -1204,7 +1204,7 @@ public ApiSuccessResponse AssignInteractionToContact (AssignInteractionToContact /// /// Assign the interaction to a contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > AssignInteractionToContactWithHttpInfo (AssignInteractionToContactData assignInteractionToContactData) @@ -1266,7 +1266,7 @@ public ApiResponse< ApiSuccessResponse > AssignInteractionToContactWithHttpInfo /// /// Assign the interaction to a contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task AssignInteractionToContactAsync (AssignInteractionToContactData assignInteractionToContactData) @@ -1279,7 +1279,7 @@ public async System.Threading.Tasks.Task AssignInteractionTo /// /// Assign the interaction to a contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> AssignInteractionToContactAsyncWithHttpInfo (AssignInteractionToContactData assignInteractionToContactData) @@ -1341,7 +1341,7 @@ public async System.Threading.Tasks.Task> Assign /// /// Create a new contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse public ApiSuccessResponse CreateContact () { @@ -1352,7 +1352,7 @@ public ApiSuccessResponse CreateContact () /// /// Create a new contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > CreateContactWithHttpInfo () { @@ -1402,7 +1402,7 @@ public ApiResponse< ApiSuccessResponse > CreateContactWithHttpInfo () /// /// Create a new contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task CreateContactAsync () { @@ -1414,7 +1414,7 @@ public async System.Threading.Tasks.Task CreateContactAsync /// /// Create a new contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> CreateContactAsyncWithHttpInfo () { @@ -1464,7 +1464,7 @@ public async System.Threading.Tasks.Task> Create /// /// Delete an existing contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse public ApiSuccessResponse DeleteContact (DeleteContactData deleteContactData) @@ -1476,7 +1476,7 @@ public ApiSuccessResponse DeleteContact (DeleteContactData deleteContactData) /// /// Delete an existing contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > DeleteContactWithHttpInfo (DeleteContactData deleteContactData) @@ -1538,7 +1538,7 @@ public ApiResponse< ApiSuccessResponse > DeleteContactWithHttpInfo (DeleteContac /// /// Delete an existing contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task DeleteContactAsync (DeleteContactData deleteContactData) @@ -1551,7 +1551,7 @@ public async System.Threading.Tasks.Task DeleteContactAsync /// /// Delete an existing contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> DeleteContactAsyncWithHttpInfo (DeleteContactData deleteContactData) @@ -1613,7 +1613,7 @@ public async System.Threading.Tasks.Task> Delete /// /// Remove a Standard Response from Favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response to remove from Favorites /// ApiSuccessResponse public ApiSuccessResponse DeleteStandardResponseFavorite (string id) @@ -1625,7 +1625,7 @@ public ApiSuccessResponse DeleteStandardResponseFavorite (string id) /// /// Remove a Standard Response from Favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response to remove from Favorites /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > DeleteStandardResponseFavoriteWithHttpInfo (string id) @@ -1680,7 +1680,7 @@ public ApiResponse< ApiSuccessResponse > DeleteStandardResponseFavoriteWithHttpI /// /// Remove a Standard Response from Favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response to remove from Favorites /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task DeleteStandardResponseFavoriteAsync (string id) @@ -1693,7 +1693,7 @@ public async System.Threading.Tasks.Task DeleteStandardRespo /// /// Remove a Standard Response from Favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response to remove from Favorites /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> DeleteStandardResponseFavoriteAsyncWithHttpInfo (string id) @@ -1748,7 +1748,7 @@ public async System.Threading.Tasks.Task> Delete /// /// Find or create phone call in UCS /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse public ApiSuccessResponse FindOrCreatePhoneCall (PhoneCallData phoneCallData) @@ -1760,7 +1760,7 @@ public ApiSuccessResponse FindOrCreatePhoneCall (PhoneCallData phoneCallData) /// /// Find or create phone call in UCS /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > FindOrCreatePhoneCallWithHttpInfo (PhoneCallData phoneCallData) @@ -1822,7 +1822,7 @@ public ApiResponse< ApiSuccessResponse > FindOrCreatePhoneCallWithHttpInfo (Phon /// /// Find or create phone call in UCS /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task FindOrCreatePhoneCallAsync (PhoneCallData phoneCallData) @@ -1835,7 +1835,7 @@ public async System.Threading.Tasks.Task FindOrCreatePhoneCa /// /// Find or create phone call in UCS /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> FindOrCreatePhoneCallAsyncWithHttpInfo (PhoneCallData phoneCallData) @@ -1897,7 +1897,7 @@ public async System.Threading.Tasks.Task> FindOr /// /// Get the history of interactions for the agent /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// ApiSuccessResponse public ApiSuccessResponse GetAgentHistory (AgentHistoryData agentHistoryData = null) @@ -1909,7 +1909,7 @@ public ApiSuccessResponse GetAgentHistory (AgentHistoryData agentHistoryData = n /// /// Get the history of interactions for the agent /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > GetAgentHistoryWithHttpInfo (AgentHistoryData agentHistoryData = null) @@ -1968,7 +1968,7 @@ public ApiResponse< ApiSuccessResponse > GetAgentHistoryWithHttpInfo (AgentHisto /// /// Get the history of interactions for the agent /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task GetAgentHistoryAsync (AgentHistoryData agentHistoryData = null) @@ -1981,7 +1981,7 @@ public async System.Threading.Tasks.Task GetAgentHistoryAsyn /// /// Get the history of interactions for the agent /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> GetAgentHistoryAsyncWithHttpInfo (AgentHistoryData agentHistoryData = null) @@ -2040,7 +2040,7 @@ public async System.Threading.Tasks.Task> GetAge /// /// Get the details of a Category. Get details of a Category including category sub tree. Only 'id', 'standardResponseId', and 'name' attributes are returned for each Standard Response. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Category /// /// ApiSuccessResponse @@ -2053,7 +2053,7 @@ public ApiSuccessResponse GetCategory (string id, GetCategoryData getCategoryDat /// /// Get the details of a Category. Get details of a Category including category sub tree. Only 'id', 'standardResponseId', and 'name' attributes are returned for each Standard Response. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Category /// /// ApiResponse of ApiSuccessResponse @@ -2120,7 +2120,7 @@ public ApiResponse< ApiSuccessResponse > GetCategoryWithHttpInfo (string id, Get /// /// Get the details of a Category. Get details of a Category including category sub tree. Only 'id', 'standardResponseId', and 'name' attributes are returned for each Standard Response. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Category /// /// Task of ApiSuccessResponse @@ -2134,7 +2134,7 @@ public async System.Threading.Tasks.Task GetCategoryAsync (s /// /// Get the details of a Category. Get details of a Category including category sub tree. Only 'id', 'standardResponseId', and 'name' attributes are returned for each Standard Response. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Category /// /// Task of ApiResponse (ApiSuccessResponse) @@ -2201,7 +2201,7 @@ public async System.Threading.Tasks.Task> GetCat /// /// Get the details of a contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse public ApiSuccessResponse GetContactDetails (ContactDetailsData contactDetailsData) @@ -2213,7 +2213,7 @@ public ApiSuccessResponse GetContactDetails (ContactDetailsData contactDetailsDa /// /// Get the details of a contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > GetContactDetailsWithHttpInfo (ContactDetailsData contactDetailsData) @@ -2275,7 +2275,7 @@ public ApiResponse< ApiSuccessResponse > GetContactDetailsWithHttpInfo (ContactD /// /// Get the details of a contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task GetContactDetailsAsync (ContactDetailsData contactDetailsData) @@ -2288,7 +2288,7 @@ public async System.Threading.Tasks.Task GetContactDetailsAs /// /// Get the details of a contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> GetContactDetailsAsyncWithHttpInfo (ContactDetailsData contactDetailsData) @@ -2350,7 +2350,7 @@ public async System.Threading.Tasks.Task> GetCon /// /// Get the history of interactions for a contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse public ApiSuccessResponse GetContactHistory (ContactHistoryData contactHistoryData) @@ -2362,7 +2362,7 @@ public ApiSuccessResponse GetContactHistory (ContactHistoryData contactHistoryDa /// /// Get the history of interactions for a contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > GetContactHistoryWithHttpInfo (ContactHistoryData contactHistoryData) @@ -2424,7 +2424,7 @@ public ApiResponse< ApiSuccessResponse > GetContactHistoryWithHttpInfo (ContactH /// /// Get the history of interactions for a contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task GetContactHistoryAsync (ContactHistoryData contactHistoryData) @@ -2437,7 +2437,7 @@ public async System.Threading.Tasks.Task GetContactHistoryAs /// /// Get the history of interactions for a contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> GetContactHistoryAsyncWithHttpInfo (ContactHistoryData contactHistoryData) @@ -2499,7 +2499,7 @@ public async System.Threading.Tasks.Task> GetCon /// /// Get contacts based on search criteria. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse public ApiSuccessResponse GetContacts (GetContactsData getContactsData) @@ -2511,7 +2511,7 @@ public ApiSuccessResponse GetContacts (GetContactsData getContactsData) /// /// Get contacts based on search criteria. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > GetContactsWithHttpInfo (GetContactsData getContactsData) @@ -2573,7 +2573,7 @@ public ApiResponse< ApiSuccessResponse > GetContactsWithHttpInfo (GetContactsDat /// /// Get contacts based on search criteria. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task GetContactsAsync (GetContactsData getContactsData) @@ -2586,7 +2586,7 @@ public async System.Threading.Tasks.Task GetContactsAsync (G /// /// Get contacts based on search criteria. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> GetContactsAsyncWithHttpInfo (GetContactsData getContactsData) @@ -2648,7 +2648,7 @@ public async System.Threading.Tasks.Task> GetCon /// /// Get the lucene indexes for ucs This request returns all the lucene indexes for contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ConfigResponse public ConfigResponse GetIndexProperties () { @@ -2659,7 +2659,7 @@ public ConfigResponse GetIndexProperties () /// /// Get the lucene indexes for ucs This request returns all the lucene indexes for contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ConfigResponse public ApiResponse< ConfigResponse > GetIndexPropertiesWithHttpInfo () { @@ -2709,7 +2709,7 @@ public ApiResponse< ConfigResponse > GetIndexPropertiesWithHttpInfo () /// /// Get the lucene indexes for ucs This request returns all the lucene indexes for contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ConfigResponse public async System.Threading.Tasks.Task GetIndexPropertiesAsync () { @@ -2721,7 +2721,7 @@ public async System.Threading.Tasks.Task GetIndexPropertiesAsync /// /// Get the lucene indexes for ucs This request returns all the lucene indexes for contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ConfigResponse) public async System.Threading.Tasks.Task> GetIndexPropertiesAsyncWithHttpInfo () { @@ -2771,7 +2771,7 @@ public async System.Threading.Tasks.Task> GetIndexPr /// /// Get the content of the interaction /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse public ApiSuccessResponse GetInteractionContent (InteractionContentData interactionContentData) @@ -2783,7 +2783,7 @@ public ApiSuccessResponse GetInteractionContent (InteractionContentData interact /// /// Get the content of the interaction /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > GetInteractionContentWithHttpInfo (InteractionContentData interactionContentData) @@ -2845,7 +2845,7 @@ public ApiResponse< ApiSuccessResponse > GetInteractionContentWithHttpInfo (Inte /// /// Get the content of the interaction /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task GetInteractionContentAsync (InteractionContentData interactionContentData) @@ -2858,7 +2858,7 @@ public async System.Threading.Tasks.Task GetInteractionConte /// /// Get the content of the interaction /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> GetInteractionContentAsyncWithHttpInfo (InteractionContentData interactionContentData) @@ -2920,7 +2920,7 @@ public async System.Threading.Tasks.Task> GetInt /// /// Get all Root categories. Get all Root Categories information. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse public ApiSuccessResponse GetRootCategories () { @@ -2931,7 +2931,7 @@ public ApiSuccessResponse GetRootCategories () /// /// Get all Root categories. Get all Root Categories information. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > GetRootCategoriesWithHttpInfo () { @@ -2981,7 +2981,7 @@ public ApiResponse< ApiSuccessResponse > GetRootCategoriesWithHttpInfo () /// /// Get all Root categories. Get all Root Categories information. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task GetRootCategoriesAsync () { @@ -2993,7 +2993,7 @@ public async System.Threading.Tasks.Task GetRootCategoriesAs /// /// Get all Root categories. Get all Root Categories information. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> GetRootCategoriesAsyncWithHttpInfo () { @@ -3043,7 +3043,7 @@ public async System.Threading.Tasks.Task> GetRoo /// /// Get the details of a Standard Response. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response /// /// ApiSuccessResponse @@ -3056,7 +3056,7 @@ public ApiSuccessResponse GetStandardResponse (string id, GetStandardResponseDat /// /// Get the details of a Standard Response. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response /// /// ApiResponse of ApiSuccessResponse @@ -3123,7 +3123,7 @@ public ApiResponse< ApiSuccessResponse > GetStandardResponseWithHttpInfo (string /// /// Get the details of a Standard Response. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response /// /// Task of ApiSuccessResponse @@ -3137,7 +3137,7 @@ public async System.Threading.Tasks.Task GetStandardResponse /// /// Get the details of a Standard Response. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the Standard Response /// /// Task of ApiResponse (ApiSuccessResponse) @@ -3204,7 +3204,7 @@ public async System.Threading.Tasks.Task> GetSta /// /// Get Standard Response Favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse public ApiSuccessResponse GetStandardResponseFavorites () { @@ -3215,7 +3215,7 @@ public ApiSuccessResponse GetStandardResponseFavorites () /// /// Get Standard Response Favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > GetStandardResponseFavoritesWithHttpInfo () { @@ -3265,7 +3265,7 @@ public ApiResponse< ApiSuccessResponse > GetStandardResponseFavoritesWithHttpInf /// /// Get Standard Response Favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task GetStandardResponseFavoritesAsync () { @@ -3277,7 +3277,7 @@ public async System.Threading.Tasks.Task GetStandardResponse /// /// Get Standard Response Favorites /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> GetStandardResponseFavoritesAsyncWithHttpInfo () { @@ -3327,7 +3327,7 @@ public async System.Threading.Tasks.Task> GetSta /// /// Identify the contact for the interaction /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse public ApiSuccessResponse IdentifyContact (IdentifyContactData identifyContactData) @@ -3339,7 +3339,7 @@ public ApiSuccessResponse IdentifyContact (IdentifyContactData identifyContactDa /// /// Identify the contact for the interaction /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > IdentifyContactWithHttpInfo (IdentifyContactData identifyContactData) @@ -3401,7 +3401,7 @@ public ApiResponse< ApiSuccessResponse > IdentifyContactWithHttpInfo (IdentifyCo /// /// Identify the contact for the interaction /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task IdentifyContactAsync (IdentifyContactData identifyContactData) @@ -3414,7 +3414,7 @@ public async System.Threading.Tasks.Task IdentifyContactAsyn /// /// Identify the contact for the interaction /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> IdentifyContactAsyncWithHttpInfo (IdentifyContactData identifyContactData) @@ -3476,7 +3476,7 @@ public async System.Threading.Tasks.Task> Identi /// /// Search for contacts based on search query, using lucene search /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse public ApiSuccessResponse LuceneSearch (LuceneSearchData luceneSearchData) @@ -3488,7 +3488,7 @@ public ApiSuccessResponse LuceneSearch (LuceneSearchData luceneSearchData) /// /// Search for contacts based on search query, using lucene search /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > LuceneSearchWithHttpInfo (LuceneSearchData luceneSearchData) @@ -3550,7 +3550,7 @@ public ApiResponse< ApiSuccessResponse > LuceneSearchWithHttpInfo (LuceneSearchD /// /// Search for contacts based on search query, using lucene search /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task LuceneSearchAsync (LuceneSearchData luceneSearchData) @@ -3563,7 +3563,7 @@ public async System.Threading.Tasks.Task LuceneSearchAsync ( /// /// Search for contacts based on search query, using lucene search /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> LuceneSearchAsyncWithHttpInfo (LuceneSearchData luceneSearchData) @@ -3625,7 +3625,7 @@ public async System.Threading.Tasks.Task> Lucene /// /// Search for interactions based on search query, using lucene search /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse public ApiSuccessResponse LuceneSearchInteraction (LuceneSearchInteractionData luceneSearchInteractionData) @@ -3637,7 +3637,7 @@ public ApiSuccessResponse LuceneSearchInteraction (LuceneSearchInteractionData l /// /// Search for interactions based on search query, using lucene search /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > LuceneSearchInteractionWithHttpInfo (LuceneSearchInteractionData luceneSearchInteractionData) @@ -3699,7 +3699,7 @@ public ApiResponse< ApiSuccessResponse > LuceneSearchInteractionWithHttpInfo (Lu /// /// Search for interactions based on search query, using lucene search /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task LuceneSearchInteractionAsync (LuceneSearchInteractionData luceneSearchInteractionData) @@ -3712,7 +3712,7 @@ public async System.Threading.Tasks.Task LuceneSearchInterac /// /// Search for interactions based on search query, using lucene search /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> LuceneSearchInteractionAsyncWithHttpInfo (LuceneSearchInteractionData luceneSearchInteractionData) @@ -3774,7 +3774,7 @@ public async System.Threading.Tasks.Task> Lucene /// /// Set the call as being completed /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse public ApiSuccessResponse SetCallCompleted (CallCompletedData callCompletedData) @@ -3786,7 +3786,7 @@ public ApiSuccessResponse SetCallCompleted (CallCompletedData callCompletedData) /// /// Set the call as being completed /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > SetCallCompletedWithHttpInfo (CallCompletedData callCompletedData) @@ -3848,7 +3848,7 @@ public ApiResponse< ApiSuccessResponse > SetCallCompletedWithHttpInfo (CallCompl /// /// Set the call as being completed /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task SetCallCompletedAsync (CallCompletedData callCompletedData) @@ -3861,7 +3861,7 @@ public async System.Threading.Tasks.Task SetCallCompletedAsy /// /// Set the call as being completed /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> SetCallCompletedAsyncWithHttpInfo (CallCompletedData callCompletedData) @@ -3923,7 +3923,7 @@ public async System.Threading.Tasks.Task> SetCal /// /// Set the note for the call /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse public ApiSuccessResponse SetCallNote (CallNoteData callNoteData) @@ -3935,7 +3935,7 @@ public ApiSuccessResponse SetCallNote (CallNoteData callNoteData) /// /// Set the note for the call /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > SetCallNoteWithHttpInfo (CallNoteData callNoteData) @@ -3997,7 +3997,7 @@ public ApiResponse< ApiSuccessResponse > SetCallNoteWithHttpInfo (CallNoteData c /// /// Set the note for the call /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task SetCallNoteAsync (CallNoteData callNoteData) @@ -4010,7 +4010,7 @@ public async System.Threading.Tasks.Task SetCallNoteAsync (C /// /// Set the note for the call /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> SetCallNoteAsyncWithHttpInfo (CallNoteData callNoteData) @@ -4072,7 +4072,7 @@ public async System.Threading.Tasks.Task> SetCal /// /// Update attributes of an existing contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse public ApiSuccessResponse UpdateContact (UpdateContactData updateContactData) @@ -4084,7 +4084,7 @@ public ApiSuccessResponse UpdateContact (UpdateContactData updateContactData) /// /// Update attributes of an existing contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > UpdateContactWithHttpInfo (UpdateContactData updateContactData) @@ -4146,7 +4146,7 @@ public ApiResponse< ApiSuccessResponse > UpdateContactWithHttpInfo (UpdateContac /// /// Update attributes of an existing contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task UpdateContactAsync (UpdateContactData updateContactData) @@ -4159,7 +4159,7 @@ public async System.Threading.Tasks.Task UpdateContactAsync /// /// Update attributes of an existing contact /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> UpdateContactAsyncWithHttpInfo (UpdateContactData updateContactData) diff --git a/src/Genesys.Workspace/Api/UsersApi.cs b/src/Genesys.Workspace/Internal/Api/UsersApi.cs similarity index 91% rename from src/Genesys.Workspace/Api/UsersApi.cs rename to src/Genesys.Workspace/Internal/Api/UsersApi.cs index 320b20c..3dd3ca1 100644 --- a/src/Genesys.Workspace/Api/UsersApi.cs +++ b/src/Genesys.Workspace/Internal/Api/UsersApi.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -13,10 +13,10 @@ using System.Collections.ObjectModel; using System.Linq; using RestSharp; -using Genesys.Workspace.Client; -using Genesys.Workspace.Model; +using Genesys.Workspace.Internal.Client; +using Genesys.Workspace.Internal.Model; -namespace Genesys.Workspace.Api +namespace Genesys.Workspace.Internal.Api { /// /// Represents a collection of functions to interact with the API endpoints @@ -30,7 +30,7 @@ public interface IUsersApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the group to get users for /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) @@ -45,7 +45,7 @@ public interface IUsersApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the group to get users for /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) @@ -59,7 +59,7 @@ public interface IUsersApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) /// Number of results. 100 if not specified. (optional) @@ -73,7 +73,7 @@ public interface IUsersApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) /// Number of results. 100 if not specified. (optional) @@ -88,7 +88,7 @@ public interface IUsersApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the group to get users for /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) @@ -103,7 +103,7 @@ public interface IUsersApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the group to get users for /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) @@ -117,7 +117,7 @@ public interface IUsersApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) /// Number of results. 100 if not specified. (optional) @@ -131,7 +131,7 @@ public interface IUsersApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) /// Number of results. 100 if not specified. (optional) @@ -146,7 +146,7 @@ public interface IUsersApi : IApiAccessor /// public partial class UsersApi : IUsersApi { - private Genesys.Workspace.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + private Genesys.Workspace.Internal.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class. @@ -156,7 +156,7 @@ public UsersApi(String basePath) { this.Configuration = new Configuration(new ApiClient(basePath)); - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -178,7 +178,7 @@ public UsersApi(Configuration configuration = null) else this.Configuration = configuration; - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -215,7 +215,7 @@ public void SetBasePath(String basePath) /// /// Provides a factory method hook for the creation of exceptions. /// - public Genesys.Workspace.Client.ExceptionFactory ExceptionFactory + public Genesys.Workspace.Internal.Client.ExceptionFactory ExceptionFactory { get { @@ -253,7 +253,7 @@ public void AddDefaultHeader(string key, string value) /// /// Search for users by specific group ID /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the group to get users for /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) @@ -269,7 +269,7 @@ public ApiSuccessResponse GetGroupUsers (decimal? groupId, string searchTerm = n /// /// Search for users by specific group ID /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the group to get users for /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) @@ -332,7 +332,7 @@ public ApiResponse< ApiSuccessResponse > GetGroupUsersWithHttpInfo (decimal? gro /// /// Search for users by specific group ID /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the group to get users for /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) @@ -349,7 +349,7 @@ public async System.Threading.Tasks.Task GetGroupUsersAsync /// /// Search for users by specific group ID /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the group to get users for /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) @@ -412,7 +412,7 @@ public async System.Threading.Tasks.Task> GetGro /// /// Search for users /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) /// Number of results. 100 if not specified. (optional) @@ -427,7 +427,7 @@ public ApiSuccessResponse GetUsers (string searchTerm = null, string sort = null /// /// Search for users /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) /// Number of results. 100 if not specified. (optional) @@ -485,7 +485,7 @@ public ApiResponse< ApiSuccessResponse > GetUsersWithHttpInfo (string searchTerm /// /// Search for users /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) /// Number of results. 100 if not specified. (optional) @@ -501,7 +501,7 @@ public async System.Threading.Tasks.Task GetUsersAsync (stri /// /// Search for users /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The text to search for (optional) /// Desired sort order (asc or desc). asc if not specified (optional) /// Number of results. 100 if not specified. (optional) diff --git a/src/Genesys.Workspace/Api/VoiceApi.cs b/src/Genesys.Workspace/Internal/Api/VoiceApi.cs similarity index 90% rename from src/Genesys.Workspace/Api/VoiceApi.cs rename to src/Genesys.Workspace/Internal/Api/VoiceApi.cs index 5c7fb15..cd59394 100644 --- a/src/Genesys.Workspace/Api/VoiceApi.cs +++ b/src/Genesys.Workspace/Internal/Api/VoiceApi.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -13,10 +13,10 @@ using System.Collections.ObjectModel; using System.Linq; using RestSharp; -using Genesys.Workspace.Client; -using Genesys.Workspace.Model; +using Genesys.Workspace.Internal.Client; +using Genesys.Workspace.Internal.Model; -namespace Genesys.Workspace.Api +namespace Genesys.Workspace.Internal.Api { /// /// Represents a collection of functions to interact with the API endpoints @@ -30,7 +30,7 @@ public interface IVoiceApi : IApiAccessor /// /// Alternate between two calls when one call is held and the other is established. This is a quick way to put a call on hold and retrieve another held call in one step. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the active call that should be placed on hold /// /// ApiSuccessResponse @@ -42,7 +42,7 @@ public interface IVoiceApi : IApiAccessor /// /// Alternate between two calls when one call is held and the other is established. This is a quick way to put a call on hold and retrieve another held call in one step. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the active call that should be placed on hold /// /// ApiResponse of ApiSuccessResponse @@ -53,7 +53,7 @@ public interface IVoiceApi : IApiAccessor /// /// Answer the call specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to answer /// Request parameters. (optional) /// ApiSuccessResponse @@ -65,7 +65,7 @@ public interface IVoiceApi : IApiAccessor /// /// Answer the call specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to answer /// Request parameters. (optional) /// ApiResponse of ApiSuccessResponse @@ -76,7 +76,7 @@ public interface IVoiceApi : IApiAccessor /// /// Attach the provided key/value pairs to the call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs to attach. /// ApiSuccessResponse @@ -88,7 +88,7 @@ public interface IVoiceApi : IApiAccessor /// /// Attach the provided key/value pairs to the call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs to attach. /// ApiResponse of ApiSuccessResponse @@ -99,7 +99,7 @@ public interface IVoiceApi : IApiAccessor /// /// Cancel call forwardarding /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse ApiSuccessResponse CancelForward (); @@ -109,7 +109,7 @@ public interface IVoiceApi : IApiAccessor /// /// Cancel call forwardarding /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse ApiResponse CancelForwardWithHttpInfo (); /// @@ -118,7 +118,7 @@ public interface IVoiceApi : IApiAccessor /// /// Deletes all parties from the specified call and releases it. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to be cleared /// /// ApiSuccessResponse @@ -130,7 +130,7 @@ public interface IVoiceApi : IApiAccessor /// /// Deletes all parties from the specified call and releases it. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to be cleared /// /// ApiResponse of ApiSuccessResponse @@ -141,7 +141,7 @@ public interface IVoiceApi : IApiAccessor /// /// Complete and clean up the telephony object specified by the parameter conn_id. The userData parameter is sent throught the DistributeUserEvent operation. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs. /// ApiSuccessResponse @@ -153,7 +153,7 @@ public interface IVoiceApi : IApiAccessor /// /// Complete and clean up the telephony object specified by the parameter conn_id. The userData parameter is sent throught the DistributeUserEvent operation. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs. /// ApiResponse of ApiSuccessResponse @@ -164,7 +164,7 @@ public interface IVoiceApi : IApiAccessor /// /// Completes a previously initiated conference. Once completed, the two separate calls are brought together so that all three parties are participating in the same call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the active call /// /// ApiSuccessResponse @@ -176,7 +176,7 @@ public interface IVoiceApi : IApiAccessor /// /// Completes a previously initiated conference. Once completed, the two separate calls are brought together so that all three parties are participating in the same call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the active call /// /// ApiResponse of ApiSuccessResponse @@ -187,7 +187,7 @@ public interface IVoiceApi : IApiAccessor /// /// Completes a previously initiated two-step transfer. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the active call /// /// ApiSuccessResponse @@ -199,7 +199,7 @@ public interface IVoiceApi : IApiAccessor /// /// Completes a previously initiated two-step transfer. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the active call /// /// ApiResponse of ApiSuccessResponse @@ -210,7 +210,7 @@ public interface IVoiceApi : IApiAccessor /// /// Removes the specified participant from the conference call. This operation can only be performed by the owner of the conference call /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the conference call /// /// ApiSuccessResponse @@ -222,7 +222,7 @@ public interface IVoiceApi : IApiAccessor /// /// Removes the specified participant from the conference call. This operation can only be performed by the owner of the conference call /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the conference call /// /// ApiResponse of ApiSuccessResponse @@ -233,7 +233,7 @@ public interface IVoiceApi : IApiAccessor /// /// Deletes the specified key from the call data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// The key of the key/value pairs to delete. /// ApiSuccessResponse @@ -245,7 +245,7 @@ public interface IVoiceApi : IApiAccessor /// /// Deletes the specified key from the call data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// The key of the key/value pairs to delete. /// ApiResponse of ApiSuccessResponse @@ -256,7 +256,7 @@ public interface IVoiceApi : IApiAccessor /// /// Turn on call forwarding to the specified destination. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// ApiSuccessResponse ApiSuccessResponse Forward (ForwardData forwardData); @@ -267,7 +267,7 @@ public interface IVoiceApi : IApiAccessor /// /// Turn on call forwarding to the specified destination. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// ApiResponse of ApiSuccessResponse ApiResponse ForwardWithHttpInfo (ForwardData forwardData); @@ -277,7 +277,7 @@ public interface IVoiceApi : IApiAccessor /// /// Returns an array containing any active calls for the user. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// InlineResponse200 InlineResponse200 GetCalls (); @@ -287,7 +287,7 @@ public interface IVoiceApi : IApiAccessor /// /// Returns an array containing any active calls for the user. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of InlineResponse200 ApiResponse GetCallsWithHttpInfo (); /// @@ -296,7 +296,7 @@ public interface IVoiceApi : IApiAccessor /// /// Place the call specified by the id path parameter on hold. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// ApiSuccessResponse @@ -308,7 +308,7 @@ public interface IVoiceApi : IApiAccessor /// /// Place the call specified by the id path parameter on hold. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// ApiResponse of ApiSuccessResponse @@ -319,7 +319,7 @@ public interface IVoiceApi : IApiAccessor /// /// Initiates a two-step conference to the specified destination. This operation places the existing call on hold and creates a new call in the dialing state. After initiating the conference you can use /complete-conference to complete the conference and bring all parties into the same call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to initiate the conference from. This call will be placed on hold. /// /// ApiSuccessResponse @@ -331,7 +331,7 @@ public interface IVoiceApi : IApiAccessor /// /// Initiates a two-step conference to the specified destination. This operation places the existing call on hold and creates a new call in the dialing state. After initiating the conference you can use /complete-conference to complete the conference and bring all parties into the same call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to initiate the conference from. This call will be placed on hold. /// /// ApiResponse of ApiSuccessResponse @@ -342,7 +342,7 @@ public interface IVoiceApi : IApiAccessor /// /// Initiates a two-step transfer to the specified destination. After initiating the transfer, you can use complete-transfer to complete the transfer. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call that is requested to be placed on hold. /// /// ApiSuccessResponse @@ -354,7 +354,7 @@ public interface IVoiceApi : IApiAccessor /// /// Initiates a two-step transfer to the specified destination. After initiating the transfer, you can use complete-transfer to complete the transfer. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call that is requested to be placed on hold. /// /// ApiResponse of ApiSuccessResponse @@ -365,7 +365,7 @@ public interface IVoiceApi : IApiAccessor /// /// Login on the voice channel. This can be used to login the voice channel if it is logged out. (ex. after using /voice/logout). Together voice/logout and voice/login allow the agent to logout of the voice channel temporarily without having to logout the entire session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse ApiSuccessResponse LoginVoice (); @@ -375,7 +375,7 @@ public interface IVoiceApi : IApiAccessor /// /// Login on the voice channel. This can be used to login the voice channel if it is logged out. (ex. after using /voice/logout). Together voice/logout and voice/login allow the agent to logout of the voice channel temporarily without having to logout the entire session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse ApiResponse LoginVoiceWithHttpInfo (); /// @@ -384,7 +384,7 @@ public interface IVoiceApi : IApiAccessor /// /// Logout on the voice channel. Together voice/logout and voice/login allow the agent to logout of the voice channel temporarily without having to logout the entire session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse ApiSuccessResponse LogoutVoice (); @@ -394,7 +394,7 @@ public interface IVoiceApi : IApiAccessor /// /// Logout on the voice channel. Together voice/logout and voice/login allow the agent to logout of the voice channel temporarily without having to logout the entire session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse ApiResponse LogoutVoiceWithHttpInfo (); /// @@ -403,7 +403,7 @@ public interface IVoiceApi : IApiAccessor /// /// Make a new call to the specified destination /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// ApiSuccessResponse ApiSuccessResponse MakeCall (MakeCallData makeCallData); @@ -414,7 +414,7 @@ public interface IVoiceApi : IApiAccessor /// /// Make a new call to the specified destination /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// ApiResponse of ApiSuccessResponse ApiResponse MakeCallWithHttpInfo (MakeCallData makeCallData); @@ -424,7 +424,7 @@ public interface IVoiceApi : IApiAccessor /// /// Merge two calls /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the first call to be merged /// /// ApiSuccessResponse @@ -436,7 +436,7 @@ public interface IVoiceApi : IApiAccessor /// /// Merge two calls /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the first call to be merged /// /// ApiResponse of ApiSuccessResponse @@ -447,7 +447,7 @@ public interface IVoiceApi : IApiAccessor /// /// Pauses call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// ApiSuccessResponse ApiSuccessResponse PauseRecording (string id); @@ -458,7 +458,7 @@ public interface IVoiceApi : IApiAccessor /// /// Pauses call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// ApiResponse of ApiSuccessResponse ApiResponse PauseRecordingWithHttpInfo (string id); @@ -468,7 +468,7 @@ public interface IVoiceApi : IApiAccessor /// /// Release the active call and retrieve another call from hold. This is a quick way to to do /release and /retrieve in one step. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the active call /// /// ApiSuccessResponse @@ -480,7 +480,7 @@ public interface IVoiceApi : IApiAccessor /// /// Release the active call and retrieve another call from hold. This is a quick way to to do /release and /retrieve in one step. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the active call /// /// ApiResponse of ApiSuccessResponse @@ -491,7 +491,7 @@ public interface IVoiceApi : IApiAccessor /// /// Requests that the call be redirected, without an answer, from the party specified by the parameter dn to the party specified by the parameter dest_dn. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection ID of the current call handled by the DN. /// /// ApiSuccessResponse @@ -503,7 +503,7 @@ public interface IVoiceApi : IApiAccessor /// /// Requests that the call be redirected, without an answer, from the party specified by the parameter dn to the party specified by the parameter dest_dn. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection ID of the current call handled by the DN. /// /// ApiResponse of ApiSuccessResponse @@ -514,7 +514,7 @@ public interface IVoiceApi : IApiAccessor /// /// Release the call specified by the id path parameter. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// ApiSuccessResponse @@ -526,7 +526,7 @@ public interface IVoiceApi : IApiAccessor /// /// Release the call specified by the id path parameter. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// ApiResponse of ApiSuccessResponse @@ -537,7 +537,7 @@ public interface IVoiceApi : IApiAccessor /// /// Resumes call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// ApiSuccessResponse ApiSuccessResponse ResumeRecording (string id); @@ -548,7 +548,7 @@ public interface IVoiceApi : IApiAccessor /// /// Resumes call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// ApiResponse of ApiSuccessResponse ApiResponse ResumeRecordingWithHttpInfo (string id); @@ -558,7 +558,7 @@ public interface IVoiceApi : IApiAccessor /// /// Retrieve the held call specified by the id path parameter. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// ApiSuccessResponse @@ -570,7 +570,7 @@ public interface IVoiceApi : IApiAccessor /// /// Retrieve the held call specified by the id path parameter. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// ApiResponse of ApiSuccessResponse @@ -581,7 +581,7 @@ public interface IVoiceApi : IApiAccessor /// /// Sends the provided DTMF digits. You can send DTMF digits individually with multiple requests or together with multiple digits in one request. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the cal /// /// ApiSuccessResponse @@ -593,7 +593,7 @@ public interface IVoiceApi : IApiAccessor /// /// Sends the provided DTMF digits. You can send DTMF digits individually with multiple requests or together with multiple digits in one request. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the cal /// /// ApiResponse of ApiSuccessResponse @@ -604,7 +604,7 @@ public interface IVoiceApi : IApiAccessor /// /// Send a userEvent event to TServer with provided attached data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Data defining the user event to be distributed /// ApiSuccessResponse ApiSuccessResponse SendUserEvent (SendUserEventData userEventData); @@ -615,7 +615,7 @@ public interface IVoiceApi : IApiAccessor /// /// Send a userEvent event to TServer with provided attached data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Data defining the user event to be distributed /// ApiResponse of ApiSuccessResponse ApiResponse SendUserEventWithHttpInfo (SendUserEventData userEventData); @@ -625,7 +625,7 @@ public interface IVoiceApi : IApiAccessor /// /// Change to the not ready state for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// ApiSuccessResponse ApiSuccessResponse SetAgentStateNotReady (NotReadyData notReadyData = null); @@ -636,7 +636,7 @@ public interface IVoiceApi : IApiAccessor /// /// Change to the not ready state for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// ApiResponse of ApiSuccessResponse ApiResponse SetAgentStateNotReadyWithHttpInfo (NotReadyData notReadyData = null); @@ -646,7 +646,7 @@ public interface IVoiceApi : IApiAccessor /// /// Change to the ready state for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// ApiSuccessResponse ApiSuccessResponse SetAgentStateReady (ReadyData readyData = null); @@ -657,7 +657,7 @@ public interface IVoiceApi : IApiAccessor /// /// Change to the ready state for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// ApiResponse of ApiSuccessResponse ApiResponse SetAgentStateReadyWithHttpInfo (ReadyData readyData = null); @@ -667,7 +667,7 @@ public interface IVoiceApi : IApiAccessor /// /// Turn off do not disturb for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse ApiSuccessResponse SetDNDOff (); @@ -677,7 +677,7 @@ public interface IVoiceApi : IApiAccessor /// /// Turn off do not disturb for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse ApiResponse SetDNDOffWithHttpInfo (); /// @@ -686,7 +686,7 @@ public interface IVoiceApi : IApiAccessor /// /// Turn on do not disturb for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse ApiSuccessResponse SetDNDOn (); @@ -696,7 +696,7 @@ public interface IVoiceApi : IApiAccessor /// /// Turn on do not disturb for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse ApiResponse SetDNDOnWithHttpInfo (); /// @@ -705,7 +705,7 @@ public interface IVoiceApi : IApiAccessor /// /// Performs a single-step conference, adding the specified participant to the call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call that is requested to be conferenced. /// /// ApiSuccessResponse @@ -717,7 +717,7 @@ public interface IVoiceApi : IApiAccessor /// /// Performs a single-step conference, adding the specified participant to the call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call that is requested to be conferenced. /// /// ApiResponse of ApiSuccessResponse @@ -728,7 +728,7 @@ public interface IVoiceApi : IApiAccessor /// /// Performs a single-step transfer to the specified destination. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the call to be transferred. /// /// ApiSuccessResponse @@ -740,7 +740,7 @@ public interface IVoiceApi : IApiAccessor /// /// Performs a single-step transfer to the specified destination. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the call to be transferred. /// /// ApiResponse of ApiSuccessResponse @@ -751,7 +751,7 @@ public interface IVoiceApi : IApiAccessor /// /// Start the monitoring of an agent, providing monitoring information (phone number to be monitored, monitoringMode (Mute/Coach/Connect), monitoringNextCallType (OneCall/AllCalls), monitoringScope (Agent/Call)). /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse ApiSuccessResponse StartMonitoring (StartMonitoringData startMonitoringData); @@ -762,7 +762,7 @@ public interface IVoiceApi : IApiAccessor /// /// Start the monitoring of an agent, providing monitoring information (phone number to be monitored, monitoringMode (Mute/Coach/Connect), monitoringNextCallType (OneCall/AllCalls), monitoringScope (Agent/Call)). /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse ApiResponse StartMonitoringWithHttpInfo (StartMonitoringData startMonitoringData); @@ -772,7 +772,7 @@ public interface IVoiceApi : IApiAccessor /// /// Starts call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// ApiSuccessResponse ApiSuccessResponse StartRecording (string id); @@ -783,7 +783,7 @@ public interface IVoiceApi : IApiAccessor /// /// Starts call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// ApiResponse of ApiSuccessResponse ApiResponse StartRecordingWithHttpInfo (string id); @@ -793,7 +793,7 @@ public interface IVoiceApi : IApiAccessor /// /// Stop the monitoring of an agent, providing monitoring information (phoneNumber to be monitored). /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse ApiSuccessResponse StopMonitoring (StopMonitoringData stopMonitoringData); @@ -804,7 +804,7 @@ public interface IVoiceApi : IApiAccessor /// /// Stop the monitoring of an agent, providing monitoring information (phoneNumber to be monitored). /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse ApiResponse StopMonitoringWithHttpInfo (StopMonitoringData stopMonitoringData); @@ -814,7 +814,7 @@ public interface IVoiceApi : IApiAccessor /// /// Stops call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// ApiSuccessResponse ApiSuccessResponse StopRecording (string id); @@ -825,7 +825,7 @@ public interface IVoiceApi : IApiAccessor /// /// Stops call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// ApiResponse of ApiSuccessResponse ApiResponse StopRecordingWithHttpInfo (string id); @@ -835,7 +835,7 @@ public interface IVoiceApi : IApiAccessor /// /// Switch the currently monitored voice interaction to barge in mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// ApiSuccessResponse @@ -847,7 +847,7 @@ public interface IVoiceApi : IApiAccessor /// /// Switch the currently monitored voice interaction to barge in mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// ApiResponse of ApiSuccessResponse @@ -858,7 +858,7 @@ public interface IVoiceApi : IApiAccessor /// /// Switch the currently monitored voice interaction to coaching mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// ApiSuccessResponse @@ -870,7 +870,7 @@ public interface IVoiceApi : IApiAccessor /// /// Switch the currently monitored voice interaction to coaching mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// ApiResponse of ApiSuccessResponse @@ -881,7 +881,7 @@ public interface IVoiceApi : IApiAccessor /// /// Switch the currently monitored voice interaction to listen in mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// ApiSuccessResponse @@ -893,7 +893,7 @@ public interface IVoiceApi : IApiAccessor /// /// Switch the currently monitored voice interaction to listen in mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// ApiResponse of ApiSuccessResponse @@ -904,7 +904,7 @@ public interface IVoiceApi : IApiAccessor /// /// Update the call userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs. /// ApiSuccessResponse @@ -916,7 +916,7 @@ public interface IVoiceApi : IApiAccessor /// /// Update the call userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs. /// ApiResponse of ApiSuccessResponse @@ -929,7 +929,7 @@ public interface IVoiceApi : IApiAccessor /// /// Alternate between two calls when one call is held and the other is established. This is a quick way to put a call on hold and retrieve another held call in one step. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the active call that should be placed on hold /// /// Task of ApiSuccessResponse @@ -941,7 +941,7 @@ public interface IVoiceApi : IApiAccessor /// /// Alternate between two calls when one call is held and the other is established. This is a quick way to put a call on hold and retrieve another held call in one step. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the active call that should be placed on hold /// /// Task of ApiResponse (ApiSuccessResponse) @@ -952,7 +952,7 @@ public interface IVoiceApi : IApiAccessor /// /// Answer the call specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to answer /// Request parameters. (optional) /// Task of ApiSuccessResponse @@ -964,7 +964,7 @@ public interface IVoiceApi : IApiAccessor /// /// Answer the call specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to answer /// Request parameters. (optional) /// Task of ApiResponse (ApiSuccessResponse) @@ -975,7 +975,7 @@ public interface IVoiceApi : IApiAccessor /// /// Attach the provided key/value pairs to the call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs to attach. /// Task of ApiSuccessResponse @@ -987,7 +987,7 @@ public interface IVoiceApi : IApiAccessor /// /// Attach the provided key/value pairs to the call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs to attach. /// Task of ApiResponse (ApiSuccessResponse) @@ -998,7 +998,7 @@ public interface IVoiceApi : IApiAccessor /// /// Cancel call forwardarding /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse System.Threading.Tasks.Task CancelForwardAsync (); @@ -1008,7 +1008,7 @@ public interface IVoiceApi : IApiAccessor /// /// Cancel call forwardarding /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> CancelForwardAsyncWithHttpInfo (); /// @@ -1017,7 +1017,7 @@ public interface IVoiceApi : IApiAccessor /// /// Deletes all parties from the specified call and releases it. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to be cleared /// /// Task of ApiSuccessResponse @@ -1029,7 +1029,7 @@ public interface IVoiceApi : IApiAccessor /// /// Deletes all parties from the specified call and releases it. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to be cleared /// /// Task of ApiResponse (ApiSuccessResponse) @@ -1040,7 +1040,7 @@ public interface IVoiceApi : IApiAccessor /// /// Complete and clean up the telephony object specified by the parameter conn_id. The userData parameter is sent throught the DistributeUserEvent operation. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs. /// Task of ApiSuccessResponse @@ -1052,7 +1052,7 @@ public interface IVoiceApi : IApiAccessor /// /// Complete and clean up the telephony object specified by the parameter conn_id. The userData parameter is sent throught the DistributeUserEvent operation. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs. /// Task of ApiResponse (ApiSuccessResponse) @@ -1063,7 +1063,7 @@ public interface IVoiceApi : IApiAccessor /// /// Completes a previously initiated conference. Once completed, the two separate calls are brought together so that all three parties are participating in the same call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the active call /// /// Task of ApiSuccessResponse @@ -1075,7 +1075,7 @@ public interface IVoiceApi : IApiAccessor /// /// Completes a previously initiated conference. Once completed, the two separate calls are brought together so that all three parties are participating in the same call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the active call /// /// Task of ApiResponse (ApiSuccessResponse) @@ -1086,7 +1086,7 @@ public interface IVoiceApi : IApiAccessor /// /// Completes a previously initiated two-step transfer. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the active call /// /// Task of ApiSuccessResponse @@ -1098,7 +1098,7 @@ public interface IVoiceApi : IApiAccessor /// /// Completes a previously initiated two-step transfer. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the active call /// /// Task of ApiResponse (ApiSuccessResponse) @@ -1109,7 +1109,7 @@ public interface IVoiceApi : IApiAccessor /// /// Removes the specified participant from the conference call. This operation can only be performed by the owner of the conference call /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the conference call /// /// Task of ApiSuccessResponse @@ -1121,7 +1121,7 @@ public interface IVoiceApi : IApiAccessor /// /// Removes the specified participant from the conference call. This operation can only be performed by the owner of the conference call /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the conference call /// /// Task of ApiResponse (ApiSuccessResponse) @@ -1132,7 +1132,7 @@ public interface IVoiceApi : IApiAccessor /// /// Deletes the specified key from the call data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// The key of the key/value pairs to delete. /// Task of ApiSuccessResponse @@ -1144,7 +1144,7 @@ public interface IVoiceApi : IApiAccessor /// /// Deletes the specified key from the call data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// The key of the key/value pairs to delete. /// Task of ApiResponse (ApiSuccessResponse) @@ -1155,7 +1155,7 @@ public interface IVoiceApi : IApiAccessor /// /// Turn on call forwarding to the specified destination. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// Task of ApiSuccessResponse System.Threading.Tasks.Task ForwardAsync (ForwardData forwardData); @@ -1166,7 +1166,7 @@ public interface IVoiceApi : IApiAccessor /// /// Turn on call forwarding to the specified destination. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> ForwardAsyncWithHttpInfo (ForwardData forwardData); @@ -1176,7 +1176,7 @@ public interface IVoiceApi : IApiAccessor /// /// Returns an array containing any active calls for the user. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of InlineResponse200 System.Threading.Tasks.Task GetCallsAsync (); @@ -1186,7 +1186,7 @@ public interface IVoiceApi : IApiAccessor /// /// Returns an array containing any active calls for the user. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (InlineResponse200) System.Threading.Tasks.Task> GetCallsAsyncWithHttpInfo (); /// @@ -1195,7 +1195,7 @@ public interface IVoiceApi : IApiAccessor /// /// Place the call specified by the id path parameter on hold. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// Task of ApiSuccessResponse @@ -1207,7 +1207,7 @@ public interface IVoiceApi : IApiAccessor /// /// Place the call specified by the id path parameter on hold. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// Task of ApiResponse (ApiSuccessResponse) @@ -1218,7 +1218,7 @@ public interface IVoiceApi : IApiAccessor /// /// Initiates a two-step conference to the specified destination. This operation places the existing call on hold and creates a new call in the dialing state. After initiating the conference you can use /complete-conference to complete the conference and bring all parties into the same call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to initiate the conference from. This call will be placed on hold. /// /// Task of ApiSuccessResponse @@ -1230,7 +1230,7 @@ public interface IVoiceApi : IApiAccessor /// /// Initiates a two-step conference to the specified destination. This operation places the existing call on hold and creates a new call in the dialing state. After initiating the conference you can use /complete-conference to complete the conference and bring all parties into the same call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to initiate the conference from. This call will be placed on hold. /// /// Task of ApiResponse (ApiSuccessResponse) @@ -1241,7 +1241,7 @@ public interface IVoiceApi : IApiAccessor /// /// Initiates a two-step transfer to the specified destination. After initiating the transfer, you can use complete-transfer to complete the transfer. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call that is requested to be placed on hold. /// /// Task of ApiSuccessResponse @@ -1253,7 +1253,7 @@ public interface IVoiceApi : IApiAccessor /// /// Initiates a two-step transfer to the specified destination. After initiating the transfer, you can use complete-transfer to complete the transfer. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call that is requested to be placed on hold. /// /// Task of ApiResponse (ApiSuccessResponse) @@ -1264,7 +1264,7 @@ public interface IVoiceApi : IApiAccessor /// /// Login on the voice channel. This can be used to login the voice channel if it is logged out. (ex. after using /voice/logout). Together voice/logout and voice/login allow the agent to logout of the voice channel temporarily without having to logout the entire session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse System.Threading.Tasks.Task LoginVoiceAsync (); @@ -1274,7 +1274,7 @@ public interface IVoiceApi : IApiAccessor /// /// Login on the voice channel. This can be used to login the voice channel if it is logged out. (ex. after using /voice/logout). Together voice/logout and voice/login allow the agent to logout of the voice channel temporarily without having to logout the entire session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> LoginVoiceAsyncWithHttpInfo (); /// @@ -1283,7 +1283,7 @@ public interface IVoiceApi : IApiAccessor /// /// Logout on the voice channel. Together voice/logout and voice/login allow the agent to logout of the voice channel temporarily without having to logout the entire session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse System.Threading.Tasks.Task LogoutVoiceAsync (); @@ -1293,7 +1293,7 @@ public interface IVoiceApi : IApiAccessor /// /// Logout on the voice channel. Together voice/logout and voice/login allow the agent to logout of the voice channel temporarily without having to logout the entire session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> LogoutVoiceAsyncWithHttpInfo (); /// @@ -1302,7 +1302,7 @@ public interface IVoiceApi : IApiAccessor /// /// Make a new call to the specified destination /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// Task of ApiSuccessResponse System.Threading.Tasks.Task MakeCallAsync (MakeCallData makeCallData); @@ -1313,7 +1313,7 @@ public interface IVoiceApi : IApiAccessor /// /// Make a new call to the specified destination /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> MakeCallAsyncWithHttpInfo (MakeCallData makeCallData); @@ -1323,7 +1323,7 @@ public interface IVoiceApi : IApiAccessor /// /// Merge two calls /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the first call to be merged /// /// Task of ApiSuccessResponse @@ -1335,7 +1335,7 @@ public interface IVoiceApi : IApiAccessor /// /// Merge two calls /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the first call to be merged /// /// Task of ApiResponse (ApiSuccessResponse) @@ -1346,7 +1346,7 @@ public interface IVoiceApi : IApiAccessor /// /// Pauses call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Task of ApiSuccessResponse System.Threading.Tasks.Task PauseRecordingAsync (string id); @@ -1357,7 +1357,7 @@ public interface IVoiceApi : IApiAccessor /// /// Pauses call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> PauseRecordingAsyncWithHttpInfo (string id); @@ -1367,7 +1367,7 @@ public interface IVoiceApi : IApiAccessor /// /// Release the active call and retrieve another call from hold. This is a quick way to to do /release and /retrieve in one step. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the active call /// /// Task of ApiSuccessResponse @@ -1379,7 +1379,7 @@ public interface IVoiceApi : IApiAccessor /// /// Release the active call and retrieve another call from hold. This is a quick way to to do /release and /retrieve in one step. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the active call /// /// Task of ApiResponse (ApiSuccessResponse) @@ -1390,7 +1390,7 @@ public interface IVoiceApi : IApiAccessor /// /// Requests that the call be redirected, without an answer, from the party specified by the parameter dn to the party specified by the parameter dest_dn. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection ID of the current call handled by the DN. /// /// Task of ApiSuccessResponse @@ -1402,7 +1402,7 @@ public interface IVoiceApi : IApiAccessor /// /// Requests that the call be redirected, without an answer, from the party specified by the parameter dn to the party specified by the parameter dest_dn. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection ID of the current call handled by the DN. /// /// Task of ApiResponse (ApiSuccessResponse) @@ -1413,7 +1413,7 @@ public interface IVoiceApi : IApiAccessor /// /// Release the call specified by the id path parameter. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// Task of ApiSuccessResponse @@ -1425,7 +1425,7 @@ public interface IVoiceApi : IApiAccessor /// /// Release the call specified by the id path parameter. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// Task of ApiResponse (ApiSuccessResponse) @@ -1436,7 +1436,7 @@ public interface IVoiceApi : IApiAccessor /// /// Resumes call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Task of ApiSuccessResponse System.Threading.Tasks.Task ResumeRecordingAsync (string id); @@ -1447,7 +1447,7 @@ public interface IVoiceApi : IApiAccessor /// /// Resumes call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> ResumeRecordingAsyncWithHttpInfo (string id); @@ -1457,7 +1457,7 @@ public interface IVoiceApi : IApiAccessor /// /// Retrieve the held call specified by the id path parameter. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// Task of ApiSuccessResponse @@ -1469,7 +1469,7 @@ public interface IVoiceApi : IApiAccessor /// /// Retrieve the held call specified by the id path parameter. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// Task of ApiResponse (ApiSuccessResponse) @@ -1480,7 +1480,7 @@ public interface IVoiceApi : IApiAccessor /// /// Sends the provided DTMF digits. You can send DTMF digits individually with multiple requests or together with multiple digits in one request. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the cal /// /// Task of ApiSuccessResponse @@ -1492,7 +1492,7 @@ public interface IVoiceApi : IApiAccessor /// /// Sends the provided DTMF digits. You can send DTMF digits individually with multiple requests or together with multiple digits in one request. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the cal /// /// Task of ApiResponse (ApiSuccessResponse) @@ -1503,7 +1503,7 @@ public interface IVoiceApi : IApiAccessor /// /// Send a userEvent event to TServer with provided attached data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Data defining the user event to be distributed /// Task of ApiSuccessResponse System.Threading.Tasks.Task SendUserEventAsync (SendUserEventData userEventData); @@ -1514,7 +1514,7 @@ public interface IVoiceApi : IApiAccessor /// /// Send a userEvent event to TServer with provided attached data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Data defining the user event to be distributed /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> SendUserEventAsyncWithHttpInfo (SendUserEventData userEventData); @@ -1524,7 +1524,7 @@ public interface IVoiceApi : IApiAccessor /// /// Change to the not ready state for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// Task of ApiSuccessResponse System.Threading.Tasks.Task SetAgentStateNotReadyAsync (NotReadyData notReadyData = null); @@ -1535,7 +1535,7 @@ public interface IVoiceApi : IApiAccessor /// /// Change to the not ready state for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> SetAgentStateNotReadyAsyncWithHttpInfo (NotReadyData notReadyData = null); @@ -1545,7 +1545,7 @@ public interface IVoiceApi : IApiAccessor /// /// Change to the ready state for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// Task of ApiSuccessResponse System.Threading.Tasks.Task SetAgentStateReadyAsync (ReadyData readyData = null); @@ -1556,7 +1556,7 @@ public interface IVoiceApi : IApiAccessor /// /// Change to the ready state for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> SetAgentStateReadyAsyncWithHttpInfo (ReadyData readyData = null); @@ -1566,7 +1566,7 @@ public interface IVoiceApi : IApiAccessor /// /// Turn off do not disturb for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse System.Threading.Tasks.Task SetDNDOffAsync (); @@ -1576,7 +1576,7 @@ public interface IVoiceApi : IApiAccessor /// /// Turn off do not disturb for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> SetDNDOffAsyncWithHttpInfo (); /// @@ -1585,7 +1585,7 @@ public interface IVoiceApi : IApiAccessor /// /// Turn on do not disturb for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse System.Threading.Tasks.Task SetDNDOnAsync (); @@ -1595,7 +1595,7 @@ public interface IVoiceApi : IApiAccessor /// /// Turn on do not disturb for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> SetDNDOnAsyncWithHttpInfo (); /// @@ -1604,7 +1604,7 @@ public interface IVoiceApi : IApiAccessor /// /// Performs a single-step conference, adding the specified participant to the call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call that is requested to be conferenced. /// /// Task of ApiSuccessResponse @@ -1616,7 +1616,7 @@ public interface IVoiceApi : IApiAccessor /// /// Performs a single-step conference, adding the specified participant to the call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call that is requested to be conferenced. /// /// Task of ApiResponse (ApiSuccessResponse) @@ -1627,7 +1627,7 @@ public interface IVoiceApi : IApiAccessor /// /// Performs a single-step transfer to the specified destination. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the call to be transferred. /// /// Task of ApiSuccessResponse @@ -1639,7 +1639,7 @@ public interface IVoiceApi : IApiAccessor /// /// Performs a single-step transfer to the specified destination. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the call to be transferred. /// /// Task of ApiResponse (ApiSuccessResponse) @@ -1650,7 +1650,7 @@ public interface IVoiceApi : IApiAccessor /// /// Start the monitoring of an agent, providing monitoring information (phone number to be monitored, monitoringMode (Mute/Coach/Connect), monitoringNextCallType (OneCall/AllCalls), monitoringScope (Agent/Call)). /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse System.Threading.Tasks.Task StartMonitoringAsync (StartMonitoringData startMonitoringData); @@ -1661,7 +1661,7 @@ public interface IVoiceApi : IApiAccessor /// /// Start the monitoring of an agent, providing monitoring information (phone number to be monitored, monitoringMode (Mute/Coach/Connect), monitoringNextCallType (OneCall/AllCalls), monitoringScope (Agent/Call)). /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> StartMonitoringAsyncWithHttpInfo (StartMonitoringData startMonitoringData); @@ -1671,7 +1671,7 @@ public interface IVoiceApi : IApiAccessor /// /// Starts call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Task of ApiSuccessResponse System.Threading.Tasks.Task StartRecordingAsync (string id); @@ -1682,7 +1682,7 @@ public interface IVoiceApi : IApiAccessor /// /// Starts call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> StartRecordingAsyncWithHttpInfo (string id); @@ -1692,7 +1692,7 @@ public interface IVoiceApi : IApiAccessor /// /// Stop the monitoring of an agent, providing monitoring information (phoneNumber to be monitored). /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse System.Threading.Tasks.Task StopMonitoringAsync (StopMonitoringData stopMonitoringData); @@ -1703,7 +1703,7 @@ public interface IVoiceApi : IApiAccessor /// /// Stop the monitoring of an agent, providing monitoring information (phoneNumber to be monitored). /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> StopMonitoringAsyncWithHttpInfo (StopMonitoringData stopMonitoringData); @@ -1713,7 +1713,7 @@ public interface IVoiceApi : IApiAccessor /// /// Stops call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Task of ApiSuccessResponse System.Threading.Tasks.Task StopRecordingAsync (string id); @@ -1724,7 +1724,7 @@ public interface IVoiceApi : IApiAccessor /// /// Stops call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Task of ApiResponse (ApiSuccessResponse) System.Threading.Tasks.Task> StopRecordingAsyncWithHttpInfo (string id); @@ -1734,7 +1734,7 @@ public interface IVoiceApi : IApiAccessor /// /// Switch the currently monitored voice interaction to barge in mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// Task of ApiSuccessResponse @@ -1746,7 +1746,7 @@ public interface IVoiceApi : IApiAccessor /// /// Switch the currently monitored voice interaction to barge in mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// Task of ApiResponse (ApiSuccessResponse) @@ -1757,7 +1757,7 @@ public interface IVoiceApi : IApiAccessor /// /// Switch the currently monitored voice interaction to coaching mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// Task of ApiSuccessResponse @@ -1769,7 +1769,7 @@ public interface IVoiceApi : IApiAccessor /// /// Switch the currently monitored voice interaction to coaching mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// Task of ApiResponse (ApiSuccessResponse) @@ -1780,7 +1780,7 @@ public interface IVoiceApi : IApiAccessor /// /// Switch the currently monitored voice interaction to listen in mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// Task of ApiSuccessResponse @@ -1792,7 +1792,7 @@ public interface IVoiceApi : IApiAccessor /// /// Switch the currently monitored voice interaction to listen in mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// Task of ApiResponse (ApiSuccessResponse) @@ -1803,7 +1803,7 @@ public interface IVoiceApi : IApiAccessor /// /// Update the call userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs. /// Task of ApiSuccessResponse @@ -1815,7 +1815,7 @@ public interface IVoiceApi : IApiAccessor /// /// Update the call userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs. /// Task of ApiResponse (ApiSuccessResponse) @@ -1828,7 +1828,7 @@ public interface IVoiceApi : IApiAccessor /// public partial class VoiceApi : IVoiceApi { - private Genesys.Workspace.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + private Genesys.Workspace.Internal.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class. @@ -1838,7 +1838,7 @@ public VoiceApi(String basePath) { this.Configuration = new Configuration(new ApiClient(basePath)); - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -1860,7 +1860,7 @@ public VoiceApi(Configuration configuration = null) else this.Configuration = configuration; - ExceptionFactory = Genesys.Workspace.Client.Configuration.DefaultExceptionFactory; + ExceptionFactory = Genesys.Workspace.Internal.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) @@ -1897,7 +1897,7 @@ public void SetBasePath(String basePath) /// /// Provides a factory method hook for the creation of exceptions. /// - public Genesys.Workspace.Client.ExceptionFactory ExceptionFactory + public Genesys.Workspace.Internal.Client.ExceptionFactory ExceptionFactory { get { @@ -1935,7 +1935,7 @@ public void AddDefaultHeader(string key, string value) /// /// Alternate between calls Alternate between two calls when one call is held and the other is established. This is a quick way to put a call on hold and retrieve another held call in one step. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the active call that should be placed on hold /// /// ApiSuccessResponse @@ -1948,7 +1948,7 @@ public ApiSuccessResponse Alternate (string id, AlternateData alternateData) /// /// Alternate between calls Alternate between two calls when one call is held and the other is established. This is a quick way to put a call on hold and retrieve another held call in one step. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the active call that should be placed on hold /// /// ApiResponse of ApiSuccessResponse @@ -2015,7 +2015,7 @@ public ApiResponse< ApiSuccessResponse > AlternateWithHttpInfo (string id, Alter /// /// Alternate between calls Alternate between two calls when one call is held and the other is established. This is a quick way to put a call on hold and retrieve another held call in one step. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the active call that should be placed on hold /// /// Task of ApiSuccessResponse @@ -2029,7 +2029,7 @@ public async System.Threading.Tasks.Task AlternateAsync (str /// /// Alternate between calls Alternate between two calls when one call is held and the other is established. This is a quick way to put a call on hold and retrieve another held call in one step. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the active call that should be placed on hold /// /// Task of ApiResponse (ApiSuccessResponse) @@ -2096,7 +2096,7 @@ public async System.Threading.Tasks.Task> Altern /// /// Answer a call Answer the call specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to answer /// Request parameters. (optional) /// ApiSuccessResponse @@ -2109,7 +2109,7 @@ public ApiSuccessResponse Answer (string id, AnswerData answerData = null) /// /// Answer a call Answer the call specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to answer /// Request parameters. (optional) /// ApiResponse of ApiSuccessResponse @@ -2173,7 +2173,7 @@ public ApiResponse< ApiSuccessResponse > AnswerWithHttpInfo (string id, AnswerDa /// /// Answer a call Answer the call specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to answer /// Request parameters. (optional) /// Task of ApiSuccessResponse @@ -2187,7 +2187,7 @@ public async System.Threading.Tasks.Task AnswerAsync (string /// /// Answer a call Answer the call specified in the id path parameter /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to answer /// Request parameters. (optional) /// Task of ApiResponse (ApiSuccessResponse) @@ -2251,7 +2251,7 @@ public async System.Threading.Tasks.Task> Answer /// /// Attach user data to a call Attach the provided key/value pairs to the call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs to attach. /// ApiSuccessResponse @@ -2264,7 +2264,7 @@ public ApiSuccessResponse AttachUserData (string id, UserData userData) /// /// Attach user data to a call Attach the provided key/value pairs to the call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs to attach. /// ApiResponse of ApiSuccessResponse @@ -2331,7 +2331,7 @@ public ApiResponse< ApiSuccessResponse > AttachUserDataWithHttpInfo (string id, /// /// Attach user data to a call Attach the provided key/value pairs to the call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs to attach. /// Task of ApiSuccessResponse @@ -2345,7 +2345,7 @@ public async System.Threading.Tasks.Task AttachUserDataAsync /// /// Attach user data to a call Attach the provided key/value pairs to the call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs to attach. /// Task of ApiResponse (ApiSuccessResponse) @@ -2412,7 +2412,7 @@ public async System.Threading.Tasks.Task> Attach /// /// Cancel call forwardarding Cancel call forwardarding /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse public ApiSuccessResponse CancelForward () { @@ -2423,7 +2423,7 @@ public ApiSuccessResponse CancelForward () /// /// Cancel call forwardarding Cancel call forwardarding /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > CancelForwardWithHttpInfo () { @@ -2473,7 +2473,7 @@ public ApiResponse< ApiSuccessResponse > CancelForwardWithHttpInfo () /// /// Cancel call forwardarding Cancel call forwardarding /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task CancelForwardAsync () { @@ -2485,7 +2485,7 @@ public async System.Threading.Tasks.Task CancelForwardAsync /// /// Cancel call forwardarding Cancel call forwardarding /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> CancelForwardAsyncWithHttpInfo () { @@ -2535,7 +2535,7 @@ public async System.Threading.Tasks.Task> Cancel /// /// Clear all the parties in the call. Deletes all parties from the specified call and releases it. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to be cleared /// /// ApiSuccessResponse @@ -2548,7 +2548,7 @@ public ApiSuccessResponse Clear (string id, ClearData clearData) /// /// Clear all the parties in the call. Deletes all parties from the specified call and releases it. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to be cleared /// /// ApiResponse of ApiSuccessResponse @@ -2615,7 +2615,7 @@ public ApiResponse< ApiSuccessResponse > ClearWithHttpInfo (string id, ClearData /// /// Clear all the parties in the call. Deletes all parties from the specified call and releases it. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to be cleared /// /// Task of ApiSuccessResponse @@ -2629,7 +2629,7 @@ public async System.Threading.Tasks.Task ClearAsync (string /// /// Clear all the parties in the call. Deletes all parties from the specified call and releases it. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to be cleared /// /// Task of ApiResponse (ApiSuccessResponse) @@ -2696,7 +2696,7 @@ public async System.Threading.Tasks.Task> ClearA /// /// Complete a call Complete and clean up the telephony object specified by the parameter conn_id. The userData parameter is sent throught the DistributeUserEvent operation. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs. /// ApiSuccessResponse @@ -2709,7 +2709,7 @@ public ApiSuccessResponse CompleteCall (string id, UserData1 userData) /// /// Complete a call Complete and clean up the telephony object specified by the parameter conn_id. The userData parameter is sent throught the DistributeUserEvent operation. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs. /// ApiResponse of ApiSuccessResponse @@ -2776,7 +2776,7 @@ public ApiResponse< ApiSuccessResponse > CompleteCallWithHttpInfo (string id, Us /// /// Complete a call Complete and clean up the telephony object specified by the parameter conn_id. The userData parameter is sent throught the DistributeUserEvent operation. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs. /// Task of ApiSuccessResponse @@ -2790,7 +2790,7 @@ public async System.Threading.Tasks.Task CompleteCallAsync ( /// /// Complete a call Complete and clean up the telephony object specified by the parameter conn_id. The userData parameter is sent throught the DistributeUserEvent operation. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs. /// Task of ApiResponse (ApiSuccessResponse) @@ -2857,7 +2857,7 @@ public async System.Threading.Tasks.Task> Comple /// /// Complete a conference Completes a previously initiated conference. Once completed, the two separate calls are brought together so that all three parties are participating in the same call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the active call /// /// ApiSuccessResponse @@ -2870,7 +2870,7 @@ public ApiSuccessResponse CompleteConference (string id, CompleteConferenceData /// /// Complete a conference Completes a previously initiated conference. Once completed, the two separate calls are brought together so that all three parties are participating in the same call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the active call /// /// ApiResponse of ApiSuccessResponse @@ -2937,7 +2937,7 @@ public ApiResponse< ApiSuccessResponse > CompleteConferenceWithHttpInfo (string /// /// Complete a conference Completes a previously initiated conference. Once completed, the two separate calls are brought together so that all three parties are participating in the same call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the active call /// /// Task of ApiSuccessResponse @@ -2951,7 +2951,7 @@ public async System.Threading.Tasks.Task CompleteConferenceA /// /// Complete a conference Completes a previously initiated conference. Once completed, the two separate calls are brought together so that all three parties are participating in the same call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the active call /// /// Task of ApiResponse (ApiSuccessResponse) @@ -3018,7 +3018,7 @@ public async System.Threading.Tasks.Task> Comple /// /// Complete a transfer Completes a previously initiated two-step transfer. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the active call /// /// ApiSuccessResponse @@ -3031,7 +3031,7 @@ public ApiSuccessResponse CompleteTransfer (string id, CompleteTransferData comp /// /// Complete a transfer Completes a previously initiated two-step transfer. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the active call /// /// ApiResponse of ApiSuccessResponse @@ -3098,7 +3098,7 @@ public ApiResponse< ApiSuccessResponse > CompleteTransferWithHttpInfo (string id /// /// Complete a transfer Completes a previously initiated two-step transfer. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the active call /// /// Task of ApiSuccessResponse @@ -3112,7 +3112,7 @@ public async System.Threading.Tasks.Task CompleteTransferAsy /// /// Complete a transfer Completes a previously initiated two-step transfer. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the active call /// /// Task of ApiResponse (ApiSuccessResponse) @@ -3179,7 +3179,7 @@ public async System.Threading.Tasks.Task> Comple /// /// Delete a party from a conference call Removes the specified participant from the conference call. This operation can only be performed by the owner of the conference call /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the conference call /// /// ApiSuccessResponse @@ -3192,7 +3192,7 @@ public ApiSuccessResponse DeleteFromConference (string id, DeleteFromConferenceD /// /// Delete a party from a conference call Removes the specified participant from the conference call. This operation can only be performed by the owner of the conference call /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the conference call /// /// ApiResponse of ApiSuccessResponse @@ -3259,7 +3259,7 @@ public ApiResponse< ApiSuccessResponse > DeleteFromConferenceWithHttpInfo (strin /// /// Delete a party from a conference call Removes the specified participant from the conference call. This operation can only be performed by the owner of the conference call /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the conference call /// /// Task of ApiSuccessResponse @@ -3273,7 +3273,7 @@ public async System.Threading.Tasks.Task DeleteFromConferenc /// /// Delete a party from a conference call Removes the specified participant from the conference call. This operation can only be performed by the owner of the conference call /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the conference call /// /// Task of ApiResponse (ApiSuccessResponse) @@ -3340,7 +3340,7 @@ public async System.Threading.Tasks.Task> Delete /// /// Remove key/value pair from user data Deletes the specified key from the call data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// The key of the key/value pairs to delete. /// ApiSuccessResponse @@ -3353,7 +3353,7 @@ public ApiSuccessResponse DeleteUserDataPair (string id, KeyData keyData) /// /// Remove key/value pair from user data Deletes the specified key from the call data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// The key of the key/value pairs to delete. /// ApiResponse of ApiSuccessResponse @@ -3420,7 +3420,7 @@ public ApiResponse< ApiSuccessResponse > DeleteUserDataPairWithHttpInfo (string /// /// Remove key/value pair from user data Deletes the specified key from the call data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// The key of the key/value pairs to delete. /// Task of ApiSuccessResponse @@ -3434,7 +3434,7 @@ public async System.Threading.Tasks.Task DeleteUserDataPairA /// /// Remove key/value pair from user data Deletes the specified key from the call data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// The key of the key/value pairs to delete. /// Task of ApiResponse (ApiSuccessResponse) @@ -3501,7 +3501,7 @@ public async System.Threading.Tasks.Task> Delete /// /// Fordward calls Turn on call forwarding to the specified destination. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// ApiSuccessResponse public ApiSuccessResponse Forward (ForwardData forwardData) @@ -3513,7 +3513,7 @@ public ApiSuccessResponse Forward (ForwardData forwardData) /// /// Fordward calls Turn on call forwarding to the specified destination. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > ForwardWithHttpInfo (ForwardData forwardData) @@ -3575,7 +3575,7 @@ public ApiResponse< ApiSuccessResponse > ForwardWithHttpInfo (ForwardData forwar /// /// Fordward calls Turn on call forwarding to the specified destination. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task ForwardAsync (ForwardData forwardData) @@ -3588,7 +3588,7 @@ public async System.Threading.Tasks.Task ForwardAsync (Forwa /// /// Fordward calls Turn on call forwarding to the specified destination. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> ForwardAsyncWithHttpInfo (ForwardData forwardData) @@ -3650,7 +3650,7 @@ public async System.Threading.Tasks.Task> Forwar /// /// Get all the calls Returns an array containing any active calls for the user. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// InlineResponse200 public InlineResponse200 GetCalls () { @@ -3661,7 +3661,7 @@ public InlineResponse200 GetCalls () /// /// Get all the calls Returns an array containing any active calls for the user. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of InlineResponse200 public ApiResponse< InlineResponse200 > GetCallsWithHttpInfo () { @@ -3711,7 +3711,7 @@ public ApiResponse< InlineResponse200 > GetCallsWithHttpInfo () /// /// Get all the calls Returns an array containing any active calls for the user. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of InlineResponse200 public async System.Threading.Tasks.Task GetCallsAsync () { @@ -3723,7 +3723,7 @@ public async System.Threading.Tasks.Task GetCallsAsync () /// /// Get all the calls Returns an array containing any active calls for the user. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (InlineResponse200) public async System.Threading.Tasks.Task> GetCallsAsyncWithHttpInfo () { @@ -3773,7 +3773,7 @@ public async System.Threading.Tasks.Task> GetCall /// /// Place a call on hold Place the call specified by the id path parameter on hold. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// ApiSuccessResponse @@ -3786,7 +3786,7 @@ public ApiSuccessResponse Hold (string id, HoldData holdData = null) /// /// Place a call on hold Place the call specified by the id path parameter on hold. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// ApiResponse of ApiSuccessResponse @@ -3850,7 +3850,7 @@ public ApiResponse< ApiSuccessResponse > HoldWithHttpInfo (string id, HoldData h /// /// Place a call on hold Place the call specified by the id path parameter on hold. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// Task of ApiSuccessResponse @@ -3864,7 +3864,7 @@ public async System.Threading.Tasks.Task HoldAsync (string i /// /// Place a call on hold Place the call specified by the id path parameter on hold. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// Task of ApiResponse (ApiSuccessResponse) @@ -3928,7 +3928,7 @@ public async System.Threading.Tasks.Task> HoldAs /// /// Initiate a conference Initiates a two-step conference to the specified destination. This operation places the existing call on hold and creates a new call in the dialing state. After initiating the conference you can use /complete-conference to complete the conference and bring all parties into the same call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to initiate the conference from. This call will be placed on hold. /// /// ApiSuccessResponse @@ -3941,7 +3941,7 @@ public ApiSuccessResponse InitiateConference (string id, InitiateConferenceData /// /// Initiate a conference Initiates a two-step conference to the specified destination. This operation places the existing call on hold and creates a new call in the dialing state. After initiating the conference you can use /complete-conference to complete the conference and bring all parties into the same call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to initiate the conference from. This call will be placed on hold. /// /// ApiResponse of ApiSuccessResponse @@ -4008,7 +4008,7 @@ public ApiResponse< ApiSuccessResponse > InitiateConferenceWithHttpInfo (string /// /// Initiate a conference Initiates a two-step conference to the specified destination. This operation places the existing call on hold and creates a new call in the dialing state. After initiating the conference you can use /complete-conference to complete the conference and bring all parties into the same call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to initiate the conference from. This call will be placed on hold. /// /// Task of ApiSuccessResponse @@ -4022,7 +4022,7 @@ public async System.Threading.Tasks.Task InitiateConferenceA /// /// Initiate a conference Initiates a two-step conference to the specified destination. This operation places the existing call on hold and creates a new call in the dialing state. After initiating the conference you can use /complete-conference to complete the conference and bring all parties into the same call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call to initiate the conference from. This call will be placed on hold. /// /// Task of ApiResponse (ApiSuccessResponse) @@ -4089,7 +4089,7 @@ public async System.Threading.Tasks.Task> Initia /// /// Initiate a transfer Initiates a two-step transfer to the specified destination. After initiating the transfer, you can use complete-transfer to complete the transfer. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call that is requested to be placed on hold. /// /// ApiSuccessResponse @@ -4102,7 +4102,7 @@ public ApiSuccessResponse InitiateTransfer (string id, InitiateTransferData init /// /// Initiate a transfer Initiates a two-step transfer to the specified destination. After initiating the transfer, you can use complete-transfer to complete the transfer. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call that is requested to be placed on hold. /// /// ApiResponse of ApiSuccessResponse @@ -4169,7 +4169,7 @@ public ApiResponse< ApiSuccessResponse > InitiateTransferWithHttpInfo (string id /// /// Initiate a transfer Initiates a two-step transfer to the specified destination. After initiating the transfer, you can use complete-transfer to complete the transfer. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call that is requested to be placed on hold. /// /// Task of ApiSuccessResponse @@ -4183,7 +4183,7 @@ public async System.Threading.Tasks.Task InitiateTransferAsy /// /// Initiate a transfer Initiates a two-step transfer to the specified destination. After initiating the transfer, you can use complete-transfer to complete the transfer. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call that is requested to be placed on hold. /// /// Task of ApiResponse (ApiSuccessResponse) @@ -4250,7 +4250,7 @@ public async System.Threading.Tasks.Task> Initia /// /// Login the media voice Login on the voice channel. This can be used to login the voice channel if it is logged out. (ex. after using /voice/logout). Together voice/logout and voice/login allow the agent to logout of the voice channel temporarily without having to logout the entire session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse public ApiSuccessResponse LoginVoice () { @@ -4261,7 +4261,7 @@ public ApiSuccessResponse LoginVoice () /// /// Login the media voice Login on the voice channel. This can be used to login the voice channel if it is logged out. (ex. after using /voice/logout). Together voice/logout and voice/login allow the agent to logout of the voice channel temporarily without having to logout the entire session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > LoginVoiceWithHttpInfo () { @@ -4311,7 +4311,7 @@ public ApiResponse< ApiSuccessResponse > LoginVoiceWithHttpInfo () /// /// Login the media voice Login on the voice channel. This can be used to login the voice channel if it is logged out. (ex. after using /voice/logout). Together voice/logout and voice/login allow the agent to logout of the voice channel temporarily without having to logout the entire session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task LoginVoiceAsync () { @@ -4323,7 +4323,7 @@ public async System.Threading.Tasks.Task LoginVoiceAsync () /// /// Login the media voice Login on the voice channel. This can be used to login the voice channel if it is logged out. (ex. after using /voice/logout). Together voice/logout and voice/login allow the agent to logout of the voice channel temporarily without having to logout the entire session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> LoginVoiceAsyncWithHttpInfo () { @@ -4373,7 +4373,7 @@ public async System.Threading.Tasks.Task> LoginV /// /// Logout the media voice Logout on the voice channel. Together voice/logout and voice/login allow the agent to logout of the voice channel temporarily without having to logout the entire session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse public ApiSuccessResponse LogoutVoice () { @@ -4384,7 +4384,7 @@ public ApiSuccessResponse LogoutVoice () /// /// Logout the media voice Logout on the voice channel. Together voice/logout and voice/login allow the agent to logout of the voice channel temporarily without having to logout the entire session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > LogoutVoiceWithHttpInfo () { @@ -4434,7 +4434,7 @@ public ApiResponse< ApiSuccessResponse > LogoutVoiceWithHttpInfo () /// /// Logout the media voice Logout on the voice channel. Together voice/logout and voice/login allow the agent to logout of the voice channel temporarily without having to logout the entire session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task LogoutVoiceAsync () { @@ -4446,7 +4446,7 @@ public async System.Threading.Tasks.Task LogoutVoiceAsync () /// /// Logout the media voice Logout on the voice channel. Together voice/logout and voice/login allow the agent to logout of the voice channel temporarily without having to logout the entire session. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> LogoutVoiceAsyncWithHttpInfo () { @@ -4496,7 +4496,7 @@ public async System.Threading.Tasks.Task> Logout /// /// Make a new call to the specified destination Make a new call to the specified destination /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// ApiSuccessResponse public ApiSuccessResponse MakeCall (MakeCallData makeCallData) @@ -4508,7 +4508,7 @@ public ApiSuccessResponse MakeCall (MakeCallData makeCallData) /// /// Make a new call to the specified destination Make a new call to the specified destination /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > MakeCallWithHttpInfo (MakeCallData makeCallData) @@ -4570,7 +4570,7 @@ public ApiResponse< ApiSuccessResponse > MakeCallWithHttpInfo (MakeCallData make /// /// Make a new call to the specified destination Make a new call to the specified destination /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task MakeCallAsync (MakeCallData makeCallData) @@ -4583,7 +4583,7 @@ public async System.Threading.Tasks.Task MakeCallAsync (Make /// /// Make a new call to the specified destination Make a new call to the specified destination /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Request parameters. /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> MakeCallAsyncWithHttpInfo (MakeCallData makeCallData) @@ -4645,7 +4645,7 @@ public async System.Threading.Tasks.Task> MakeCa /// /// Merge two calls Merge two calls /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the first call to be merged /// /// ApiSuccessResponse @@ -4658,7 +4658,7 @@ public ApiSuccessResponse Merge (string id, MergeData mergeData) /// /// Merge two calls Merge two calls /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the first call to be merged /// /// ApiResponse of ApiSuccessResponse @@ -4725,7 +4725,7 @@ public ApiResponse< ApiSuccessResponse > MergeWithHttpInfo (string id, MergeData /// /// Merge two calls Merge two calls /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the first call to be merged /// /// Task of ApiSuccessResponse @@ -4739,7 +4739,7 @@ public async System.Threading.Tasks.Task MergeAsync (string /// /// Merge two calls Merge two calls /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the first call to be merged /// /// Task of ApiResponse (ApiSuccessResponse) @@ -4806,7 +4806,7 @@ public async System.Threading.Tasks.Task> MergeA /// /// Pauses call recording. Pauses call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// ApiSuccessResponse public ApiSuccessResponse PauseRecording (string id) @@ -4818,7 +4818,7 @@ public ApiSuccessResponse PauseRecording (string id) /// /// Pauses call recording. Pauses call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > PauseRecordingWithHttpInfo (string id) @@ -4873,7 +4873,7 @@ public ApiResponse< ApiSuccessResponse > PauseRecordingWithHttpInfo (string id) /// /// Pauses call recording. Pauses call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task PauseRecordingAsync (string id) @@ -4886,7 +4886,7 @@ public async System.Threading.Tasks.Task PauseRecordingAsync /// /// Pauses call recording. Pauses call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> PauseRecordingAsyncWithHttpInfo (string id) @@ -4941,7 +4941,7 @@ public async System.Threading.Tasks.Task> PauseR /// /// Reconnect a call Release the active call and retrieve another call from hold. This is a quick way to to do /release and /retrieve in one step. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the active call /// /// ApiSuccessResponse @@ -4954,7 +4954,7 @@ public ApiSuccessResponse Reconnect (string id, ReconnectData reconnectData) /// /// Reconnect a call Release the active call and retrieve another call from hold. This is a quick way to to do /release and /retrieve in one step. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the active call /// /// ApiResponse of ApiSuccessResponse @@ -5021,7 +5021,7 @@ public ApiResponse< ApiSuccessResponse > ReconnectWithHttpInfo (string id, Recon /// /// Reconnect a call Release the active call and retrieve another call from hold. This is a quick way to to do /release and /retrieve in one step. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the active call /// /// Task of ApiSuccessResponse @@ -5035,7 +5035,7 @@ public async System.Threading.Tasks.Task ReconnectAsync (str /// /// Reconnect a call Release the active call and retrieve another call from hold. This is a quick way to to do /release and /retrieve in one step. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the active call /// /// Task of ApiResponse (ApiSuccessResponse) @@ -5102,7 +5102,7 @@ public async System.Threading.Tasks.Task> Reconn /// /// Redirect the call. Requests that the call be redirected, without an answer, from the party specified by the parameter dn to the party specified by the parameter dest_dn. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection ID of the current call handled by the DN. /// /// ApiSuccessResponse @@ -5115,7 +5115,7 @@ public ApiSuccessResponse Redirect (string id, RedirectData redirectData) /// /// Redirect the call. Requests that the call be redirected, without an answer, from the party specified by the parameter dn to the party specified by the parameter dest_dn. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection ID of the current call handled by the DN. /// /// ApiResponse of ApiSuccessResponse @@ -5182,7 +5182,7 @@ public ApiResponse< ApiSuccessResponse > RedirectWithHttpInfo (string id, Redire /// /// Redirect the call. Requests that the call be redirected, without an answer, from the party specified by the parameter dn to the party specified by the parameter dest_dn. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection ID of the current call handled by the DN. /// /// Task of ApiSuccessResponse @@ -5196,7 +5196,7 @@ public async System.Threading.Tasks.Task RedirectAsync (stri /// /// Redirect the call. Requests that the call be redirected, without an answer, from the party specified by the parameter dn to the party specified by the parameter dest_dn. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection ID of the current call handled by the DN. /// /// Task of ApiResponse (ApiSuccessResponse) @@ -5263,7 +5263,7 @@ public async System.Threading.Tasks.Task> Redire /// /// Release a call Release the call specified by the id path parameter. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// ApiSuccessResponse @@ -5276,7 +5276,7 @@ public ApiSuccessResponse Release (string id, ReleaseData releaseData = null) /// /// Release a call Release the call specified by the id path parameter. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// ApiResponse of ApiSuccessResponse @@ -5340,7 +5340,7 @@ public ApiResponse< ApiSuccessResponse > ReleaseWithHttpInfo (string id, Release /// /// Release a call Release the call specified by the id path parameter. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// Task of ApiSuccessResponse @@ -5354,7 +5354,7 @@ public async System.Threading.Tasks.Task ReleaseAsync (strin /// /// Release a call Release the call specified by the id path parameter. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// Task of ApiResponse (ApiSuccessResponse) @@ -5418,7 +5418,7 @@ public async System.Threading.Tasks.Task> Releas /// /// Resumes call recording. Resumes call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// ApiSuccessResponse public ApiSuccessResponse ResumeRecording (string id) @@ -5430,7 +5430,7 @@ public ApiSuccessResponse ResumeRecording (string id) /// /// Resumes call recording. Resumes call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > ResumeRecordingWithHttpInfo (string id) @@ -5485,7 +5485,7 @@ public ApiResponse< ApiSuccessResponse > ResumeRecordingWithHttpInfo (string id) /// /// Resumes call recording. Resumes call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task ResumeRecordingAsync (string id) @@ -5498,7 +5498,7 @@ public async System.Threading.Tasks.Task ResumeRecordingAsyn /// /// Resumes call recording. Resumes call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> ResumeRecordingAsyncWithHttpInfo (string id) @@ -5553,7 +5553,7 @@ public async System.Threading.Tasks.Task> Resume /// /// Retrieve a held call Retrieve the held call specified by the id path parameter. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// ApiSuccessResponse @@ -5566,7 +5566,7 @@ public ApiSuccessResponse Retrieve (string id, RetrieveData retrieveData = null) /// /// Retrieve a held call Retrieve the held call specified by the id path parameter. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// ApiResponse of ApiSuccessResponse @@ -5630,7 +5630,7 @@ public ApiResponse< ApiSuccessResponse > RetrieveWithHttpInfo (string id, Retrie /// /// Retrieve a held call Retrieve the held call specified by the id path parameter. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// Task of ApiSuccessResponse @@ -5644,7 +5644,7 @@ public async System.Threading.Tasks.Task RetrieveAsync (stri /// /// Retrieve a held call Retrieve the held call specified by the id path parameter. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Request parameters. (optional) /// Task of ApiResponse (ApiSuccessResponse) @@ -5708,7 +5708,7 @@ public async System.Threading.Tasks.Task> Retrie /// /// Send digits as DTMF. Sends the provided DTMF digits. You can send DTMF digits individually with multiple requests or together with multiple digits in one request. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the cal /// /// ApiSuccessResponse @@ -5721,7 +5721,7 @@ public ApiSuccessResponse SendDTMF (string id, SendDTMFData sendDTMFData) /// /// Send digits as DTMF. Sends the provided DTMF digits. You can send DTMF digits individually with multiple requests or together with multiple digits in one request. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the cal /// /// ApiResponse of ApiSuccessResponse @@ -5788,7 +5788,7 @@ public ApiResponse< ApiSuccessResponse > SendDTMFWithHttpInfo (string id, SendDT /// /// Send digits as DTMF. Sends the provided DTMF digits. You can send DTMF digits individually with multiple requests or together with multiple digits in one request. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the cal /// /// Task of ApiSuccessResponse @@ -5802,7 +5802,7 @@ public async System.Threading.Tasks.Task SendDTMFAsync (stri /// /// Send digits as DTMF. Sends the provided DTMF digits. You can send DTMF digits individually with multiple requests or together with multiple digits in one request. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Id of the cal /// /// Task of ApiResponse (ApiSuccessResponse) @@ -5869,7 +5869,7 @@ public async System.Threading.Tasks.Task> SendDT /// /// Send a userEvent event to TServer with provided attached data. Send a userEvent event to TServer with provided attached data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Data defining the user event to be distributed /// ApiSuccessResponse public ApiSuccessResponse SendUserEvent (SendUserEventData userEventData) @@ -5881,7 +5881,7 @@ public ApiSuccessResponse SendUserEvent (SendUserEventData userEventData) /// /// Send a userEvent event to TServer with provided attached data. Send a userEvent event to TServer with provided attached data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Data defining the user event to be distributed /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > SendUserEventWithHttpInfo (SendUserEventData userEventData) @@ -5943,7 +5943,7 @@ public ApiResponse< ApiSuccessResponse > SendUserEventWithHttpInfo (SendUserEven /// /// Send a userEvent event to TServer with provided attached data. Send a userEvent event to TServer with provided attached data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Data defining the user event to be distributed /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task SendUserEventAsync (SendUserEventData userEventData) @@ -5956,7 +5956,7 @@ public async System.Threading.Tasks.Task SendUserEventAsync /// /// Send a userEvent event to TServer with provided attached data. Send a userEvent event to TServer with provided attached data. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Data defining the user event to be distributed /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> SendUserEventAsyncWithHttpInfo (SendUserEventData userEventData) @@ -6018,7 +6018,7 @@ public async System.Threading.Tasks.Task> SendUs /// /// Change to the not ready state for voice Change to the not ready state for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// ApiSuccessResponse public ApiSuccessResponse SetAgentStateNotReady (NotReadyData notReadyData = null) @@ -6030,7 +6030,7 @@ public ApiSuccessResponse SetAgentStateNotReady (NotReadyData notReadyData = nul /// /// Change to the not ready state for voice Change to the not ready state for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > SetAgentStateNotReadyWithHttpInfo (NotReadyData notReadyData = null) @@ -6089,7 +6089,7 @@ public ApiResponse< ApiSuccessResponse > SetAgentStateNotReadyWithHttpInfo (NotR /// /// Change to the not ready state for voice Change to the not ready state for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task SetAgentStateNotReadyAsync (NotReadyData notReadyData = null) @@ -6102,7 +6102,7 @@ public async System.Threading.Tasks.Task SetAgentStateNotRea /// /// Change to the not ready state for voice Change to the not ready state for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> SetAgentStateNotReadyAsyncWithHttpInfo (NotReadyData notReadyData = null) @@ -6161,7 +6161,7 @@ public async System.Threading.Tasks.Task> SetAge /// /// Change to the ready state for voice Change to the ready state for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// ApiSuccessResponse public ApiSuccessResponse SetAgentStateReady (ReadyData readyData = null) @@ -6173,7 +6173,7 @@ public ApiSuccessResponse SetAgentStateReady (ReadyData readyData = null) /// /// Change to the ready state for voice Change to the ready state for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > SetAgentStateReadyWithHttpInfo (ReadyData readyData = null) @@ -6232,7 +6232,7 @@ public ApiResponse< ApiSuccessResponse > SetAgentStateReadyWithHttpInfo (ReadyDa /// /// Change to the ready state for voice Change to the ready state for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task SetAgentStateReadyAsync (ReadyData readyData = null) @@ -6245,7 +6245,7 @@ public async System.Threading.Tasks.Task SetAgentStateReadyA /// /// Change to the ready state for voice Change to the ready state for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> SetAgentStateReadyAsyncWithHttpInfo (ReadyData readyData = null) @@ -6304,7 +6304,7 @@ public async System.Threading.Tasks.Task> SetAge /// /// Turn off do not disturb for voice Turn off do not disturb for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse public ApiSuccessResponse SetDNDOff () { @@ -6315,7 +6315,7 @@ public ApiSuccessResponse SetDNDOff () /// /// Turn off do not disturb for voice Turn off do not disturb for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > SetDNDOffWithHttpInfo () { @@ -6365,7 +6365,7 @@ public ApiResponse< ApiSuccessResponse > SetDNDOffWithHttpInfo () /// /// Turn off do not disturb for voice Turn off do not disturb for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task SetDNDOffAsync () { @@ -6377,7 +6377,7 @@ public async System.Threading.Tasks.Task SetDNDOffAsync () /// /// Turn off do not disturb for voice Turn off do not disturb for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> SetDNDOffAsyncWithHttpInfo () { @@ -6427,7 +6427,7 @@ public async System.Threading.Tasks.Task> SetDND /// /// Turn on do not disturb for voice Turn on do not disturb for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiSuccessResponse public ApiSuccessResponse SetDNDOn () { @@ -6438,7 +6438,7 @@ public ApiSuccessResponse SetDNDOn () /// /// Turn on do not disturb for voice Turn on do not disturb for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > SetDNDOnWithHttpInfo () { @@ -6488,7 +6488,7 @@ public ApiResponse< ApiSuccessResponse > SetDNDOnWithHttpInfo () /// /// Turn on do not disturb for voice Turn on do not disturb for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task SetDNDOnAsync () { @@ -6500,7 +6500,7 @@ public async System.Threading.Tasks.Task SetDNDOnAsync () /// /// Turn on do not disturb for voice Turn on do not disturb for voice /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> SetDNDOnAsyncWithHttpInfo () { @@ -6550,7 +6550,7 @@ public async System.Threading.Tasks.Task> SetDND /// /// Create a conference in a single step Performs a single-step conference, adding the specified participant to the call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call that is requested to be conferenced. /// /// ApiSuccessResponse @@ -6563,7 +6563,7 @@ public ApiSuccessResponse SingleStepConference (string id, SingleStepConferenceD /// /// Create a conference in a single step Performs a single-step conference, adding the specified participant to the call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call that is requested to be conferenced. /// /// ApiResponse of ApiSuccessResponse @@ -6630,7 +6630,7 @@ public ApiResponse< ApiSuccessResponse > SingleStepConferenceWithHttpInfo (strin /// /// Create a conference in a single step Performs a single-step conference, adding the specified participant to the call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call that is requested to be conferenced. /// /// Task of ApiSuccessResponse @@ -6644,7 +6644,7 @@ public async System.Threading.Tasks.Task SingleStepConferenc /// /// Create a conference in a single step Performs a single-step conference, adding the specified participant to the call. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call that is requested to be conferenced. /// /// Task of ApiResponse (ApiSuccessResponse) @@ -6711,7 +6711,7 @@ public async System.Threading.Tasks.Task> Single /// /// Transfer a call in a single step Performs a single-step transfer to the specified destination. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the call to be transferred. /// /// ApiSuccessResponse @@ -6724,7 +6724,7 @@ public ApiSuccessResponse SingleStepTransfer (string id, SingleStepTransferData /// /// Transfer a call in a single step Performs a single-step transfer to the specified destination. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the call to be transferred. /// /// ApiResponse of ApiSuccessResponse @@ -6791,7 +6791,7 @@ public ApiResponse< ApiSuccessResponse > SingleStepTransferWithHttpInfo (string /// /// Transfer a call in a single step Performs a single-step transfer to the specified destination. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the call to be transferred. /// /// Task of ApiSuccessResponse @@ -6805,7 +6805,7 @@ public async System.Threading.Tasks.Task SingleStepTransferA /// /// Transfer a call in a single step Performs a single-step transfer to the specified destination. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// The id of the call to be transferred. /// /// Task of ApiResponse (ApiSuccessResponse) @@ -6872,7 +6872,7 @@ public async System.Threading.Tasks.Task> Single /// /// Start the monitoring of an agent. Start the monitoring of an agent, providing monitoring information (phone number to be monitored, monitoringMode (Mute/Coach/Connect), monitoringNextCallType (OneCall/AllCalls), monitoringScope (Agent/Call)). /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse public ApiSuccessResponse StartMonitoring (StartMonitoringData startMonitoringData) @@ -6884,7 +6884,7 @@ public ApiSuccessResponse StartMonitoring (StartMonitoringData startMonitoringDa /// /// Start the monitoring of an agent. Start the monitoring of an agent, providing monitoring information (phone number to be monitored, monitoringMode (Mute/Coach/Connect), monitoringNextCallType (OneCall/AllCalls), monitoringScope (Agent/Call)). /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > StartMonitoringWithHttpInfo (StartMonitoringData startMonitoringData) @@ -6946,7 +6946,7 @@ public ApiResponse< ApiSuccessResponse > StartMonitoringWithHttpInfo (StartMonit /// /// Start the monitoring of an agent. Start the monitoring of an agent, providing monitoring information (phone number to be monitored, monitoringMode (Mute/Coach/Connect), monitoringNextCallType (OneCall/AllCalls), monitoringScope (Agent/Call)). /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task StartMonitoringAsync (StartMonitoringData startMonitoringData) @@ -6959,7 +6959,7 @@ public async System.Threading.Tasks.Task StartMonitoringAsyn /// /// Start the monitoring of an agent. Start the monitoring of an agent, providing monitoring information (phone number to be monitored, monitoringMode (Mute/Coach/Connect), monitoringNextCallType (OneCall/AllCalls), monitoringScope (Agent/Call)). /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> StartMonitoringAsyncWithHttpInfo (StartMonitoringData startMonitoringData) @@ -7021,7 +7021,7 @@ public async System.Threading.Tasks.Task> StartM /// /// Starts call recording. Starts call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// ApiSuccessResponse public ApiSuccessResponse StartRecording (string id) @@ -7033,7 +7033,7 @@ public ApiSuccessResponse StartRecording (string id) /// /// Starts call recording. Starts call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > StartRecordingWithHttpInfo (string id) @@ -7088,7 +7088,7 @@ public ApiResponse< ApiSuccessResponse > StartRecordingWithHttpInfo (string id) /// /// Starts call recording. Starts call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task StartRecordingAsync (string id) @@ -7101,7 +7101,7 @@ public async System.Threading.Tasks.Task StartRecordingAsync /// /// Starts call recording. Starts call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> StartRecordingAsyncWithHttpInfo (string id) @@ -7156,7 +7156,7 @@ public async System.Threading.Tasks.Task> StartR /// /// Stop the monitoring of an agent. Stop the monitoring of an agent, providing monitoring information (phoneNumber to be monitored). /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiSuccessResponse public ApiSuccessResponse StopMonitoring (StopMonitoringData stopMonitoringData) @@ -7168,7 +7168,7 @@ public ApiSuccessResponse StopMonitoring (StopMonitoringData stopMonitoringData) /// /// Stop the monitoring of an agent. Stop the monitoring of an agent, providing monitoring information (phoneNumber to be monitored). /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > StopMonitoringWithHttpInfo (StopMonitoringData stopMonitoringData) @@ -7230,7 +7230,7 @@ public ApiResponse< ApiSuccessResponse > StopMonitoringWithHttpInfo (StopMonitor /// /// Stop the monitoring of an agent. Stop the monitoring of an agent, providing monitoring information (phoneNumber to be monitored). /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task StopMonitoringAsync (StopMonitoringData stopMonitoringData) @@ -7243,7 +7243,7 @@ public async System.Threading.Tasks.Task StopMonitoringAsync /// /// Stop the monitoring of an agent. Stop the monitoring of an agent, providing monitoring information (phoneNumber to be monitored). /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> StopMonitoringAsyncWithHttpInfo (StopMonitoringData stopMonitoringData) @@ -7305,7 +7305,7 @@ public async System.Threading.Tasks.Task> StopMo /// /// Stops call recording. Stops call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// ApiSuccessResponse public ApiSuccessResponse StopRecording (string id) @@ -7317,7 +7317,7 @@ public ApiSuccessResponse StopRecording (string id) /// /// Stops call recording. Stops call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// ApiResponse of ApiSuccessResponse public ApiResponse< ApiSuccessResponse > StopRecordingWithHttpInfo (string id) @@ -7372,7 +7372,7 @@ public ApiResponse< ApiSuccessResponse > StopRecordingWithHttpInfo (string id) /// /// Stops call recording. Stops call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Task of ApiSuccessResponse public async System.Threading.Tasks.Task StopRecordingAsync (string id) @@ -7385,7 +7385,7 @@ public async System.Threading.Tasks.Task StopRecordingAsync /// /// Stops call recording. Stops call recording. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// Task of ApiResponse (ApiSuccessResponse) public async System.Threading.Tasks.Task> StopRecordingAsyncWithHttpInfo (string id) @@ -7440,7 +7440,7 @@ public async System.Threading.Tasks.Task> StopRe /// /// Switch to barge in monitoring mode. Switch the currently monitored voice interaction to barge in mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// ApiSuccessResponse @@ -7453,7 +7453,7 @@ public ApiSuccessResponse SwitchToBargeIn (string id, MonitoringScopeData monito /// /// Switch to barge in monitoring mode. Switch the currently monitored voice interaction to barge in mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// ApiResponse of ApiSuccessResponse @@ -7517,7 +7517,7 @@ public ApiResponse< ApiSuccessResponse > SwitchToBargeInWithHttpInfo (string id, /// /// Switch to barge in monitoring mode. Switch the currently monitored voice interaction to barge in mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// Task of ApiSuccessResponse @@ -7531,7 +7531,7 @@ public async System.Threading.Tasks.Task SwitchToBargeInAsyn /// /// Switch to barge in monitoring mode. Switch the currently monitored voice interaction to barge in mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// Task of ApiResponse (ApiSuccessResponse) @@ -7595,7 +7595,7 @@ public async System.Threading.Tasks.Task> Switch /// /// Switch to coaching monitoring mode. Switch the currently monitored voice interaction to coaching mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// ApiSuccessResponse @@ -7608,7 +7608,7 @@ public ApiSuccessResponse SwitchToCoaching (string id, MonitoringScopeData monit /// /// Switch to coaching monitoring mode. Switch the currently monitored voice interaction to coaching mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// ApiResponse of ApiSuccessResponse @@ -7672,7 +7672,7 @@ public ApiResponse< ApiSuccessResponse > SwitchToCoachingWithHttpInfo (string id /// /// Switch to coaching monitoring mode. Switch the currently monitored voice interaction to coaching mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// Task of ApiSuccessResponse @@ -7686,7 +7686,7 @@ public async System.Threading.Tasks.Task SwitchToCoachingAsy /// /// Switch to coaching monitoring mode. Switch the currently monitored voice interaction to coaching mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// Task of ApiResponse (ApiSuccessResponse) @@ -7750,7 +7750,7 @@ public async System.Threading.Tasks.Task> Switch /// /// Switch to listen in monitoring mode. Switch the currently monitored voice interaction to listen in mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// ApiSuccessResponse @@ -7763,7 +7763,7 @@ public ApiSuccessResponse SwitchToListenIn (string id, MonitoringScopeData monit /// /// Switch to listen in monitoring mode. Switch the currently monitored voice interaction to listen in mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// ApiResponse of ApiSuccessResponse @@ -7827,7 +7827,7 @@ public ApiResponse< ApiSuccessResponse > SwitchToListenInWithHttpInfo (string id /// /// Switch to listen in monitoring mode. Switch the currently monitored voice interaction to listen in mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// Task of ApiSuccessResponse @@ -7841,7 +7841,7 @@ public async System.Threading.Tasks.Task SwitchToListenInAsy /// /// Switch to listen in monitoring mode. Switch the currently monitored voice interaction to listen in mode /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Connection identifier of the call in question. /// (optional) /// Task of ApiResponse (ApiSuccessResponse) @@ -7905,7 +7905,7 @@ public async System.Threading.Tasks.Task> Switch /// /// Update user data to a call Update the call userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs. /// ApiSuccessResponse @@ -7918,7 +7918,7 @@ public ApiSuccessResponse UpdateUserData (string id, UserData userData) /// /// Update user data to a call Update the call userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs. /// ApiResponse of ApiSuccessResponse @@ -7985,7 +7985,7 @@ public ApiResponse< ApiSuccessResponse > UpdateUserDataWithHttpInfo (string id, /// /// Update user data to a call Update the call userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs. /// Task of ApiSuccessResponse @@ -7999,7 +7999,7 @@ public async System.Threading.Tasks.Task UpdateUserDataAsync /// /// Update user data to a call Update the call userdata with the provided key/value pairs. /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// id of the call /// An array of key/value pairs. /// Task of ApiResponse (ApiSuccessResponse) diff --git a/src/Genesys.Workspace/Client/ApiClient.cs b/src/Genesys.Workspace/Internal/Client/ApiClient.cs similarity index 99% rename from src/Genesys.Workspace/Client/ApiClient.cs rename to src/Genesys.Workspace/Internal/Client/ApiClient.cs index e5b9e0f..14496ad 100644 --- a/src/Genesys.Workspace/Client/ApiClient.cs +++ b/src/Genesys.Workspace/Internal/Client/ApiClient.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -21,7 +21,7 @@ using Newtonsoft.Json; using RestSharp; -namespace Genesys.Workspace.Client +namespace Genesys.Workspace.Internal.Client { /// /// API client is mainly responsible for making the HTTP call to the API backend. diff --git a/src/Genesys.Workspace/Client/ApiException.cs b/src/Genesys.Workspace/Internal/Client/ApiException.cs similarity index 97% rename from src/Genesys.Workspace/Client/ApiException.cs rename to src/Genesys.Workspace/Internal/Client/ApiException.cs index 7dd884c..18806dc 100644 --- a/src/Genesys.Workspace/Client/ApiException.cs +++ b/src/Genesys.Workspace/Internal/Client/ApiException.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -10,7 +10,7 @@ using System; -namespace Genesys.Workspace.Client +namespace Genesys.Workspace.Internal.Client { /// /// API Exception diff --git a/src/Genesys.Workspace/Client/ApiResponse.cs b/src/Genesys.Workspace/Internal/Client/ApiResponse.cs similarity index 96% rename from src/Genesys.Workspace/Client/ApiResponse.cs rename to src/Genesys.Workspace/Internal/Client/ApiResponse.cs index 4c170fe..80913d5 100644 --- a/src/Genesys.Workspace/Client/ApiResponse.cs +++ b/src/Genesys.Workspace/Internal/Client/ApiResponse.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -11,7 +11,7 @@ using System; using System.Collections.Generic; -namespace Genesys.Workspace.Client +namespace Genesys.Workspace.Internal.Client { /// /// API Response diff --git a/src/Genesys.Workspace/Client/Configuration.cs b/src/Genesys.Workspace/Internal/Client/Configuration.cs similarity index 99% rename from src/Genesys.Workspace/Client/Configuration.cs rename to src/Genesys.Workspace/Internal/Client/Configuration.cs index 545e0a2..b53558f 100644 --- a/src/Genesys.Workspace/Client/Configuration.cs +++ b/src/Genesys.Workspace/Internal/Client/Configuration.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -15,7 +15,7 @@ using System.Linq; using System.Text; -namespace Genesys.Workspace.Client +namespace Genesys.Workspace.Internal.Client { /// /// Represents a set of configuration settings diff --git a/src/Genesys.Workspace/Client/ExceptionFactory.cs b/src/Genesys.Workspace/Internal/Client/ExceptionFactory.cs similarity index 90% rename from src/Genesys.Workspace/Client/ExceptionFactory.cs rename to src/Genesys.Workspace/Internal/Client/ExceptionFactory.cs index 112d79b..c070ced 100644 --- a/src/Genesys.Workspace/Client/ExceptionFactory.cs +++ b/src/Genesys.Workspace/Internal/Client/ExceptionFactory.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -12,7 +12,7 @@ using System; using RestSharp; -namespace Genesys.Workspace.Client +namespace Genesys.Workspace.Internal.Client { /// /// A delegate to ExceptionFactory method diff --git a/src/Genesys.Workspace/Client/IApiAccessor.cs b/src/Genesys.Workspace/Internal/Client/IApiAccessor.cs similarity index 95% rename from src/Genesys.Workspace/Client/IApiAccessor.cs rename to src/Genesys.Workspace/Internal/Client/IApiAccessor.cs index 892dcb7..1740929 100644 --- a/src/Genesys.Workspace/Client/IApiAccessor.cs +++ b/src/Genesys.Workspace/Internal/Client/IApiAccessor.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -15,7 +15,7 @@ using System.Linq; using RestSharp; -namespace Genesys.Workspace.Client +namespace Genesys.Workspace.Internal.Client { /// /// Represents configuration aspects required to interact with the API endpoints. diff --git a/src/Genesys.Workspace/Client/SwaggerDateConverter.cs b/src/Genesys.Workspace/Internal/Client/SwaggerDateConverter.cs similarity index 93% rename from src/Genesys.Workspace/Client/SwaggerDateConverter.cs rename to src/Genesys.Workspace/Internal/Client/SwaggerDateConverter.cs index fe4fc3b..0b60de7 100644 --- a/src/Genesys.Workspace/Client/SwaggerDateConverter.cs +++ b/src/Genesys.Workspace/Internal/Client/SwaggerDateConverter.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -10,7 +10,7 @@ using Newtonsoft.Json.Converters; -namespace Genesys.Workspace.Client +namespace Genesys.Workspace.Internal.Client { /// /// Formatter for 'date' swagger formats ss defined by full-date - RFC3339 diff --git a/src/Genesys.Workspace/Model/AcceptData.cs b/src/Genesys.Workspace/Internal/Model/AcceptData.cs similarity index 96% rename from src/Genesys.Workspace/Model/AcceptData.cs rename to src/Genesys.Workspace/Internal/Model/AcceptData.cs index 30cb2ce..052fe73 100644 --- a/src/Genesys.Workspace/Model/AcceptData.cs +++ b/src/Genesys.Workspace/Internal/Model/AcceptData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// AcceptData diff --git a/src/Genesys.Workspace/Model/AcceptData1.cs b/src/Genesys.Workspace/Internal/Model/AcceptData1.cs similarity index 96% rename from src/Genesys.Workspace/Model/AcceptData1.cs rename to src/Genesys.Workspace/Internal/Model/AcceptData1.cs index beb9a0d..938d9d9 100644 --- a/src/Genesys.Workspace/Model/AcceptData1.cs +++ b/src/Genesys.Workspace/Internal/Model/AcceptData1.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// AcceptData1 diff --git a/src/Genesys.Workspace/Model/ActivatechannelsData.cs b/src/Genesys.Workspace/Internal/Model/ActivatechannelsData.cs similarity index 98% rename from src/Genesys.Workspace/Model/ActivatechannelsData.cs rename to src/Genesys.Workspace/Internal/Model/ActivatechannelsData.cs index 8bae398..dff277a 100644 --- a/src/Genesys.Workspace/Model/ActivatechannelsData.cs +++ b/src/Genesys.Workspace/Internal/Model/ActivatechannelsData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ActivatechannelsData diff --git a/src/Genesys.Workspace/Model/AddCommentData.cs b/src/Genesys.Workspace/Internal/Model/AddCommentData.cs similarity index 96% rename from src/Genesys.Workspace/Model/AddCommentData.cs rename to src/Genesys.Workspace/Internal/Model/AddCommentData.cs index 63e9126..211b56b 100644 --- a/src/Genesys.Workspace/Model/AddCommentData.cs +++ b/src/Genesys.Workspace/Internal/Model/AddCommentData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// AddCommentData diff --git a/src/Genesys.Workspace/Model/AddContentData.cs b/src/Genesys.Workspace/Internal/Model/AddContentData.cs similarity index 96% rename from src/Genesys.Workspace/Model/AddContentData.cs rename to src/Genesys.Workspace/Internal/Model/AddContentData.cs index 67040b4..a2e459b 100644 --- a/src/Genesys.Workspace/Model/AddContentData.cs +++ b/src/Genesys.Workspace/Internal/Model/AddContentData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// AddContentData diff --git a/src/Genesys.Workspace/Model/AgentHistoryData.cs b/src/Genesys.Workspace/Internal/Model/AgentHistoryData.cs similarity index 96% rename from src/Genesys.Workspace/Model/AgentHistoryData.cs rename to src/Genesys.Workspace/Internal/Model/AgentHistoryData.cs index b7074df..493f6cf 100644 --- a/src/Genesys.Workspace/Model/AgentHistoryData.cs +++ b/src/Genesys.Workspace/Internal/Model/AgentHistoryData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// AgentHistoryData diff --git a/src/Genesys.Workspace/Model/AlternateData.cs b/src/Genesys.Workspace/Internal/Model/AlternateData.cs similarity index 96% rename from src/Genesys.Workspace/Model/AlternateData.cs rename to src/Genesys.Workspace/Internal/Model/AlternateData.cs index 08dfc03..051bbf3 100644 --- a/src/Genesys.Workspace/Model/AlternateData.cs +++ b/src/Genesys.Workspace/Internal/Model/AlternateData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// AlternateData diff --git a/src/Genesys.Workspace/Model/AnswerData.cs b/src/Genesys.Workspace/Internal/Model/AnswerData.cs similarity index 96% rename from src/Genesys.Workspace/Model/AnswerData.cs rename to src/Genesys.Workspace/Internal/Model/AnswerData.cs index 92a7c51..a00ab84 100644 --- a/src/Genesys.Workspace/Model/AnswerData.cs +++ b/src/Genesys.Workspace/Internal/Model/AnswerData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// AnswerData diff --git a/src/Genesys.Workspace/Model/ApiErrorResponse.cs b/src/Genesys.Workspace/Internal/Model/ApiErrorResponse.cs similarity index 96% rename from src/Genesys.Workspace/Model/ApiErrorResponse.cs rename to src/Genesys.Workspace/Internal/Model/ApiErrorResponse.cs index c9efeb5..8ac9b7c 100644 --- a/src/Genesys.Workspace/Model/ApiErrorResponse.cs +++ b/src/Genesys.Workspace/Internal/Model/ApiErrorResponse.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ApiErrorResponse diff --git a/src/Genesys.Workspace/Model/ApiSuccessResponse.cs b/src/Genesys.Workspace/Internal/Model/ApiSuccessResponse.cs similarity index 96% rename from src/Genesys.Workspace/Model/ApiSuccessResponse.cs rename to src/Genesys.Workspace/Internal/Model/ApiSuccessResponse.cs index 4dfac02..e1552f7 100644 --- a/src/Genesys.Workspace/Model/ApiSuccessResponse.cs +++ b/src/Genesys.Workspace/Internal/Model/ApiSuccessResponse.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ApiSuccessResponse diff --git a/src/Genesys.Workspace/Model/AssignInteractionToContactData.cs b/src/Genesys.Workspace/Internal/Model/AssignInteractionToContactData.cs similarity index 96% rename from src/Genesys.Workspace/Model/AssignInteractionToContactData.cs rename to src/Genesys.Workspace/Internal/Model/AssignInteractionToContactData.cs index d0a30a0..1898471 100644 --- a/src/Genesys.Workspace/Model/AssignInteractionToContactData.cs +++ b/src/Genesys.Workspace/Internal/Model/AssignInteractionToContactData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// AssignInteractionToContactData diff --git a/src/Genesys.Workspace/Internal/Model/Call.cs b/src/Genesys.Workspace/Internal/Model/Call.cs new file mode 100644 index 0000000..2afc0c0 --- /dev/null +++ b/src/Genesys.Workspace/Internal/Model/Call.cs @@ -0,0 +1,370 @@ +/* + * Workspace API + * + * Agent API + * + * OpenAPI spec version: 1.0.0 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; + +namespace Genesys.Workspace.Internal.Model +{ + /// + /// Call + /// + [DataContract] + public partial class Call : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Type. + /// Id. + /// PreviousConnId. + /// ParentConnId. + /// PhoneNumber. + /// ConnId. + /// CallUuid. + /// CallType. + /// State. + /// Capabilities. + /// Participants. + /// Dnis. + /// Ani. + /// RecordingState. + /// A key/value pairs list of a data structure that provides additional information associated with this action.. + /// A key/value pairs list of a data structure that provides additional information associated with this action.. + public Call(string Type = default(string), string Id = default(string), string PreviousConnId = default(string), string ParentConnId = default(string), string PhoneNumber = default(string), string ConnId = default(string), string CallUuid = default(string), string CallType = default(string), string State = default(string), List Capabilities = default(List), List Participants = default(List), string Dnis = default(string), string Ani = default(string), string RecordingState = default(string), List UserData = default(List), List Extensions = default(List)) + { + this.Type = Type; + this.Id = Id; + this.PreviousConnId = PreviousConnId; + this.ParentConnId = ParentConnId; + this.PhoneNumber = PhoneNumber; + this.ConnId = ConnId; + this.CallUuid = CallUuid; + this.CallType = CallType; + this.State = State; + this.Capabilities = Capabilities; + this.Participants = Participants; + this.Dnis = Dnis; + this.Ani = Ani; + this.RecordingState = RecordingState; + this.UserData = UserData; + this.Extensions = Extensions; + } + + /// + /// Gets or Sets Type + /// + [DataMember(Name="type", EmitDefaultValue=false)] + public string Type { get; set; } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + public string Id { get; set; } + + /// + /// Gets or Sets PreviousConnId + /// + [DataMember(Name="previousConnId", EmitDefaultValue=false)] + public string PreviousConnId { get; set; } + + /// + /// Gets or Sets ParentConnId + /// + [DataMember(Name="parentConnId", EmitDefaultValue=false)] + public string ParentConnId { get; set; } + + /// + /// Gets or Sets PhoneNumber + /// + [DataMember(Name="phoneNumber", EmitDefaultValue=false)] + public string PhoneNumber { get; set; } + + /// + /// Gets or Sets ConnId + /// + [DataMember(Name="connId", EmitDefaultValue=false)] + public string ConnId { get; set; } + + /// + /// Gets or Sets CallUuid + /// + [DataMember(Name="callUuid", EmitDefaultValue=false)] + public string CallUuid { get; set; } + + /// + /// Gets or Sets CallType + /// + [DataMember(Name="callType", EmitDefaultValue=false)] + public string CallType { get; set; } + + /// + /// Gets or Sets State + /// + [DataMember(Name="state", EmitDefaultValue=false)] + public string State { get; set; } + + /// + /// Gets or Sets Capabilities + /// + [DataMember(Name="capabilities", EmitDefaultValue=false)] + public List Capabilities { get; set; } + + /// + /// Gets or Sets Participants + /// + [DataMember(Name="participants", EmitDefaultValue=false)] + public List Participants { get; set; } + + /// + /// Gets or Sets Dnis + /// + [DataMember(Name="dnis", EmitDefaultValue=false)] + public string Dnis { get; set; } + + /// + /// Gets or Sets Ani + /// + [DataMember(Name="ani", EmitDefaultValue=false)] + public string Ani { get; set; } + + /// + /// Gets or Sets RecordingState + /// + [DataMember(Name="recordingState", EmitDefaultValue=false)] + public string RecordingState { get; set; } + + /// + /// A key/value pairs list of a data structure that provides additional information associated with this action. + /// + /// A key/value pairs list of a data structure that provides additional information associated with this action. + [DataMember(Name="userData", EmitDefaultValue=false)] + public List UserData { get; set; } + + /// + /// A key/value pairs list of a data structure that provides additional information associated with this action. + /// + /// A key/value pairs list of a data structure that provides additional information associated with this action. + [DataMember(Name="extensions", EmitDefaultValue=false)] + public List Extensions { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Call {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" PreviousConnId: ").Append(PreviousConnId).Append("\n"); + sb.Append(" ParentConnId: ").Append(ParentConnId).Append("\n"); + sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); + sb.Append(" ConnId: ").Append(ConnId).Append("\n"); + sb.Append(" CallUuid: ").Append(CallUuid).Append("\n"); + sb.Append(" CallType: ").Append(CallType).Append("\n"); + sb.Append(" State: ").Append(State).Append("\n"); + sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); + sb.Append(" Participants: ").Append(Participants).Append("\n"); + sb.Append(" Dnis: ").Append(Dnis).Append("\n"); + sb.Append(" Ani: ").Append(Ani).Append("\n"); + sb.Append(" RecordingState: ").Append(RecordingState).Append("\n"); + sb.Append(" UserData: ").Append(UserData).Append("\n"); + sb.Append(" Extensions: ").Append(Extensions).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Call); + } + + /// + /// Returns true if Call instances are equal + /// + /// Instance of Call to be compared + /// Boolean + public bool Equals(Call other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Type == other.Type || + this.Type != null && + this.Type.Equals(other.Type) + ) && + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.PreviousConnId == other.PreviousConnId || + this.PreviousConnId != null && + this.PreviousConnId.Equals(other.PreviousConnId) + ) && + ( + this.ParentConnId == other.ParentConnId || + this.ParentConnId != null && + this.ParentConnId.Equals(other.ParentConnId) + ) && + ( + this.PhoneNumber == other.PhoneNumber || + this.PhoneNumber != null && + this.PhoneNumber.Equals(other.PhoneNumber) + ) && + ( + this.ConnId == other.ConnId || + this.ConnId != null && + this.ConnId.Equals(other.ConnId) + ) && + ( + this.CallUuid == other.CallUuid || + this.CallUuid != null && + this.CallUuid.Equals(other.CallUuid) + ) && + ( + this.CallType == other.CallType || + this.CallType != null && + this.CallType.Equals(other.CallType) + ) && + ( + this.State == other.State || + this.State != null && + this.State.Equals(other.State) + ) && + ( + this.Capabilities == other.Capabilities || + this.Capabilities != null && + this.Capabilities.SequenceEqual(other.Capabilities) + ) && + ( + this.Participants == other.Participants || + this.Participants != null && + this.Participants.SequenceEqual(other.Participants) + ) && + ( + this.Dnis == other.Dnis || + this.Dnis != null && + this.Dnis.Equals(other.Dnis) + ) && + ( + this.Ani == other.Ani || + this.Ani != null && + this.Ani.Equals(other.Ani) + ) && + ( + this.RecordingState == other.RecordingState || + this.RecordingState != null && + this.RecordingState.Equals(other.RecordingState) + ) && + ( + this.UserData == other.UserData || + this.UserData != null && + this.UserData.SequenceEqual(other.UserData) + ) && + ( + this.Extensions == other.Extensions || + this.Extensions != null && + this.Extensions.SequenceEqual(other.Extensions) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.Type != null) + hash = hash * 59 + this.Type.GetHashCode(); + if (this.Id != null) + hash = hash * 59 + this.Id.GetHashCode(); + if (this.PreviousConnId != null) + hash = hash * 59 + this.PreviousConnId.GetHashCode(); + if (this.ParentConnId != null) + hash = hash * 59 + this.ParentConnId.GetHashCode(); + if (this.PhoneNumber != null) + hash = hash * 59 + this.PhoneNumber.GetHashCode(); + if (this.ConnId != null) + hash = hash * 59 + this.ConnId.GetHashCode(); + if (this.CallUuid != null) + hash = hash * 59 + this.CallUuid.GetHashCode(); + if (this.CallType != null) + hash = hash * 59 + this.CallType.GetHashCode(); + if (this.State != null) + hash = hash * 59 + this.State.GetHashCode(); + if (this.Capabilities != null) + hash = hash * 59 + this.Capabilities.GetHashCode(); + if (this.Participants != null) + hash = hash * 59 + this.Participants.GetHashCode(); + if (this.Dnis != null) + hash = hash * 59 + this.Dnis.GetHashCode(); + if (this.Ani != null) + hash = hash * 59 + this.Ani.GetHashCode(); + if (this.RecordingState != null) + hash = hash * 59 + this.RecordingState.GetHashCode(); + if (this.UserData != null) + hash = hash * 59 + this.UserData.GetHashCode(); + if (this.Extensions != null) + hash = hash * 59 + this.Extensions.GetHashCode(); + return hash; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Genesys.Workspace/Model/CallCompletedData.cs b/src/Genesys.Workspace/Internal/Model/CallCompletedData.cs similarity index 96% rename from src/Genesys.Workspace/Model/CallCompletedData.cs rename to src/Genesys.Workspace/Internal/Model/CallCompletedData.cs index d6c2928..66ed5cc 100644 --- a/src/Genesys.Workspace/Model/CallCompletedData.cs +++ b/src/Genesys.Workspace/Internal/Model/CallCompletedData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// CallCompletedData diff --git a/src/Genesys.Workspace/Model/CallNoteData.cs b/src/Genesys.Workspace/Internal/Model/CallNoteData.cs similarity index 96% rename from src/Genesys.Workspace/Model/CallNoteData.cs rename to src/Genesys.Workspace/Internal/Model/CallNoteData.cs index 662286f..1ecbdfe 100644 --- a/src/Genesys.Workspace/Model/CallNoteData.cs +++ b/src/Genesys.Workspace/Internal/Model/CallNoteData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// CallNoteData diff --git a/src/Genesys.Workspace/Model/CallParticipants.cs b/src/Genesys.Workspace/Internal/Model/CallParticipants.cs similarity index 97% rename from src/Genesys.Workspace/Model/CallParticipants.cs rename to src/Genesys.Workspace/Internal/Model/CallParticipants.cs index e5efa1a..690e23c 100644 --- a/src/Genesys.Workspace/Model/CallParticipants.cs +++ b/src/Genesys.Workspace/Internal/Model/CallParticipants.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// CallParticipants diff --git a/src/Genesys.Workspace/Model/ChannelsData.cs b/src/Genesys.Workspace/Internal/Model/ChannelsData.cs similarity index 96% rename from src/Genesys.Workspace/Model/ChannelsData.cs rename to src/Genesys.Workspace/Internal/Model/ChannelsData.cs index 330672d..17130a6 100644 --- a/src/Genesys.Workspace/Model/ChannelsData.cs +++ b/src/Genesys.Workspace/Internal/Model/ChannelsData.cs @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ChannelsData diff --git a/src/Genesys.Workspace/Model/ClearData.cs b/src/Genesys.Workspace/Internal/Model/ClearData.cs similarity index 96% rename from src/Genesys.Workspace/Model/ClearData.cs rename to src/Genesys.Workspace/Internal/Model/ClearData.cs index 4f07d16..4ce7def 100644 --- a/src/Genesys.Workspace/Model/ClearData.cs +++ b/src/Genesys.Workspace/Internal/Model/ClearData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ClearData diff --git a/src/Genesys.Workspace/Model/CompleteConferenceData.cs b/src/Genesys.Workspace/Internal/Model/CompleteConferenceData.cs similarity index 96% rename from src/Genesys.Workspace/Model/CompleteConferenceData.cs rename to src/Genesys.Workspace/Internal/Model/CompleteConferenceData.cs index b9508f7..67dc122 100644 --- a/src/Genesys.Workspace/Model/CompleteConferenceData.cs +++ b/src/Genesys.Workspace/Internal/Model/CompleteConferenceData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// CompleteConferenceData diff --git a/src/Genesys.Workspace/Model/CompleteTransferData.cs b/src/Genesys.Workspace/Internal/Model/CompleteTransferData.cs similarity index 96% rename from src/Genesys.Workspace/Model/CompleteTransferData.cs rename to src/Genesys.Workspace/Internal/Model/CompleteTransferData.cs index 28dae2c..3c18293 100644 --- a/src/Genesys.Workspace/Model/CompleteTransferData.cs +++ b/src/Genesys.Workspace/Internal/Model/CompleteTransferData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// CompleteTransferData diff --git a/src/Genesys.Workspace/Model/ConfigResponse.cs b/src/Genesys.Workspace/Internal/Model/ConfigResponse.cs similarity index 97% rename from src/Genesys.Workspace/Model/ConfigResponse.cs rename to src/Genesys.Workspace/Internal/Model/ConfigResponse.cs index 596112d..6c209d6 100644 --- a/src/Genesys.Workspace/Model/ConfigResponse.cs +++ b/src/Genesys.Workspace/Internal/Model/ConfigResponse.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ConfigResponse diff --git a/src/Genesys.Workspace/Model/ConfigResponseData.cs b/src/Genesys.Workspace/Internal/Model/ConfigResponseData.cs similarity index 97% rename from src/Genesys.Workspace/Model/ConfigResponseData.cs rename to src/Genesys.Workspace/Internal/Model/ConfigResponseData.cs index cbefe03..5fbc818 100644 --- a/src/Genesys.Workspace/Model/ConfigResponseData.cs +++ b/src/Genesys.Workspace/Internal/Model/ConfigResponseData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ConfigResponseData diff --git a/src/Genesys.Workspace/Model/ConfigResponseDataActionCodes.cs b/src/Genesys.Workspace/Internal/Model/ConfigResponseDataActionCodes.cs similarity index 97% rename from src/Genesys.Workspace/Model/ConfigResponseDataActionCodes.cs rename to src/Genesys.Workspace/Internal/Model/ConfigResponseDataActionCodes.cs index 8d26841..f2e85b3 100644 --- a/src/Genesys.Workspace/Model/ConfigResponseDataActionCodes.cs +++ b/src/Genesys.Workspace/Internal/Model/ConfigResponseDataActionCodes.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ConfigResponseDataActionCodes diff --git a/src/Genesys.Workspace/Model/ConfigResponseDataBusinessAttributes.cs b/src/Genesys.Workspace/Internal/Model/ConfigResponseDataBusinessAttributes.cs similarity index 98% rename from src/Genesys.Workspace/Model/ConfigResponseDataBusinessAttributes.cs rename to src/Genesys.Workspace/Internal/Model/ConfigResponseDataBusinessAttributes.cs index f81dbc1..0942315 100644 --- a/src/Genesys.Workspace/Model/ConfigResponseDataBusinessAttributes.cs +++ b/src/Genesys.Workspace/Internal/Model/ConfigResponseDataBusinessAttributes.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ConfigResponseDataBusinessAttributes diff --git a/src/Genesys.Workspace/Model/ConfigResponseDataTransactions.cs b/src/Genesys.Workspace/Internal/Model/ConfigResponseDataTransactions.cs similarity index 97% rename from src/Genesys.Workspace/Model/ConfigResponseDataTransactions.cs rename to src/Genesys.Workspace/Internal/Model/ConfigResponseDataTransactions.cs index bfe650a..eb3c3fc 100644 --- a/src/Genesys.Workspace/Model/ConfigResponseDataTransactions.cs +++ b/src/Genesys.Workspace/Internal/Model/ConfigResponseDataTransactions.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ConfigResponseDataTransactions diff --git a/src/Genesys.Workspace/Model/ConfigResponseDataValues.cs b/src/Genesys.Workspace/Internal/Model/ConfigResponseDataValues.cs similarity index 98% rename from src/Genesys.Workspace/Model/ConfigResponseDataValues.cs rename to src/Genesys.Workspace/Internal/Model/ConfigResponseDataValues.cs index 32c3d19..29a3b68 100644 --- a/src/Genesys.Workspace/Model/ConfigResponseDataValues.cs +++ b/src/Genesys.Workspace/Internal/Model/ConfigResponseDataValues.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ConfigResponseDataValues diff --git a/src/Genesys.Workspace/Model/ContactDetailsData.cs b/src/Genesys.Workspace/Internal/Model/ContactDetailsData.cs similarity index 96% rename from src/Genesys.Workspace/Model/ContactDetailsData.cs rename to src/Genesys.Workspace/Internal/Model/ContactDetailsData.cs index cbad84e..896a182 100644 --- a/src/Genesys.Workspace/Model/ContactDetailsData.cs +++ b/src/Genesys.Workspace/Internal/Model/ContactDetailsData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ContactDetailsData diff --git a/src/Genesys.Workspace/Model/ContactHistoryData.cs b/src/Genesys.Workspace/Internal/Model/ContactHistoryData.cs similarity index 96% rename from src/Genesys.Workspace/Model/ContactHistoryData.cs rename to src/Genesys.Workspace/Internal/Model/ContactHistoryData.cs index 02b9629..3b2725e 100644 --- a/src/Genesys.Workspace/Model/ContactHistoryData.cs +++ b/src/Genesys.Workspace/Internal/Model/ContactHistoryData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ContactHistoryData diff --git a/src/Genesys.Workspace/Model/CurrentSession.cs b/src/Genesys.Workspace/Internal/Model/CurrentSession.cs similarity index 97% rename from src/Genesys.Workspace/Model/CurrentSession.cs rename to src/Genesys.Workspace/Internal/Model/CurrentSession.cs index fcef51c..a3b6815 100644 --- a/src/Genesys.Workspace/Model/CurrentSession.cs +++ b/src/Genesys.Workspace/Internal/Model/CurrentSession.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// CurrentSession diff --git a/src/Genesys.Workspace/Model/CurrentSessionData.cs b/src/Genesys.Workspace/Internal/Model/CurrentSessionData.cs similarity index 97% rename from src/Genesys.Workspace/Model/CurrentSessionData.cs rename to src/Genesys.Workspace/Internal/Model/CurrentSessionData.cs index 3832df1..854ea16 100644 --- a/src/Genesys.Workspace/Model/CurrentSessionData.cs +++ b/src/Genesys.Workspace/Internal/Model/CurrentSessionData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// CurrentSessionData diff --git a/src/Genesys.Workspace/Model/CurrentSessionDataPendingloginasync.cs b/src/Genesys.Workspace/Internal/Model/CurrentSessionDataPendingloginasync.cs similarity index 98% rename from src/Genesys.Workspace/Model/CurrentSessionDataPendingloginasync.cs rename to src/Genesys.Workspace/Internal/Model/CurrentSessionDataPendingloginasync.cs index 3a3d512..194f7d2 100644 --- a/src/Genesys.Workspace/Model/CurrentSessionDataPendingloginasync.cs +++ b/src/Genesys.Workspace/Internal/Model/CurrentSessionDataPendingloginasync.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// CurrentSessionDataPendingloginasync diff --git a/src/Genesys.Workspace/Model/CurrentSessionDataUser.cs b/src/Genesys.Workspace/Internal/Model/CurrentSessionDataUser.cs similarity index 98% rename from src/Genesys.Workspace/Model/CurrentSessionDataUser.cs rename to src/Genesys.Workspace/Internal/Model/CurrentSessionDataUser.cs index 2c5517f..3bdec6a 100644 --- a/src/Genesys.Workspace/Model/CurrentSessionDataUser.cs +++ b/src/Genesys.Workspace/Internal/Model/CurrentSessionDataUser.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// CurrentSessionDataUser diff --git a/src/Genesys.Workspace/Model/CurrentSessionDataUserActiveSession.cs b/src/Genesys.Workspace/Internal/Model/CurrentSessionDataUserActiveSession.cs similarity index 98% rename from src/Genesys.Workspace/Model/CurrentSessionDataUserActiveSession.cs rename to src/Genesys.Workspace/Internal/Model/CurrentSessionDataUserActiveSession.cs index dd390a2..dd994b9 100644 --- a/src/Genesys.Workspace/Model/CurrentSessionDataUserActiveSession.cs +++ b/src/Genesys.Workspace/Internal/Model/CurrentSessionDataUserActiveSession.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// CurrentSessionDataUserActiveSession diff --git a/src/Genesys.Workspace/Model/CurrentSessionStatus.cs b/src/Genesys.Workspace/Internal/Model/CurrentSessionStatus.cs similarity index 97% rename from src/Genesys.Workspace/Model/CurrentSessionStatus.cs rename to src/Genesys.Workspace/Internal/Model/CurrentSessionStatus.cs index 05d42ee..b048dae 100644 --- a/src/Genesys.Workspace/Model/CurrentSessionStatus.cs +++ b/src/Genesys.Workspace/Internal/Model/CurrentSessionStatus.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// CurrentSessionStatus diff --git a/src/Genesys.Workspace/Model/DeleteContactData.cs b/src/Genesys.Workspace/Internal/Model/DeleteContactData.cs similarity index 96% rename from src/Genesys.Workspace/Model/DeleteContactData.cs rename to src/Genesys.Workspace/Internal/Model/DeleteContactData.cs index 4c5b918..aa3cf94 100644 --- a/src/Genesys.Workspace/Model/DeleteContactData.cs +++ b/src/Genesys.Workspace/Internal/Model/DeleteContactData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// DeleteContactData diff --git a/src/Genesys.Workspace/Model/DeleteFromConferenceData.cs b/src/Genesys.Workspace/Internal/Model/DeleteFromConferenceData.cs similarity index 96% rename from src/Genesys.Workspace/Model/DeleteFromConferenceData.cs rename to src/Genesys.Workspace/Internal/Model/DeleteFromConferenceData.cs index e258604..a45456c 100644 --- a/src/Genesys.Workspace/Model/DeleteFromConferenceData.cs +++ b/src/Genesys.Workspace/Internal/Model/DeleteFromConferenceData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// DeleteFromConferenceData diff --git a/src/Genesys.Workspace/Model/Devices.cs b/src/Genesys.Workspace/Internal/Model/Devices.cs similarity index 97% rename from src/Genesys.Workspace/Model/Devices.cs rename to src/Genesys.Workspace/Internal/Model/Devices.cs index d6510a0..e8f7ca1 100644 --- a/src/Genesys.Workspace/Model/Devices.cs +++ b/src/Genesys.Workspace/Internal/Model/Devices.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// Devices diff --git a/src/Genesys.Workspace/Model/DevicesData.cs b/src/Genesys.Workspace/Internal/Model/DevicesData.cs similarity index 96% rename from src/Genesys.Workspace/Model/DevicesData.cs rename to src/Genesys.Workspace/Internal/Model/DevicesData.cs index 83e0df7..13d8b38 100644 --- a/src/Genesys.Workspace/Model/DevicesData.cs +++ b/src/Genesys.Workspace/Internal/Model/DevicesData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// DevicesData diff --git a/src/Genesys.Workspace/Internal/Model/Dn.cs b/src/Genesys.Workspace/Internal/Model/Dn.cs new file mode 100644 index 0000000..267df24 --- /dev/null +++ b/src/Genesys.Workspace/Internal/Model/Dn.cs @@ -0,0 +1,176 @@ +/* + * Workspace API + * + * Agent API + * + * OpenAPI spec version: 1.0.0 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; + +namespace Genesys.Workspace.Internal.Model +{ + /// + /// Dn + /// + [DataContract] + public partial class Dn : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Number. + /// AgentId. + /// AgentState. + /// AgentWorkMode. + public Dn(string Number = default(string), string AgentId = default(string), string AgentState = default(string), string AgentWorkMode = default(string)) + { + this.Number = Number; + this.AgentId = AgentId; + this.AgentState = AgentState; + this.AgentWorkMode = AgentWorkMode; + } + + /// + /// Gets or Sets Number + /// + [DataMember(Name="number", EmitDefaultValue=false)] + public string Number { get; set; } + + /// + /// Gets or Sets AgentId + /// + [DataMember(Name="agentId", EmitDefaultValue=false)] + public string AgentId { get; set; } + + /// + /// Gets or Sets AgentState + /// + [DataMember(Name="agentState", EmitDefaultValue=false)] + public string AgentState { get; set; } + + /// + /// Gets or Sets AgentWorkMode + /// + [DataMember(Name="agentWorkMode", EmitDefaultValue=false)] + public string AgentWorkMode { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Dn {\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" AgentId: ").Append(AgentId).Append("\n"); + sb.Append(" AgentState: ").Append(AgentState).Append("\n"); + sb.Append(" AgentWorkMode: ").Append(AgentWorkMode).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Dn); + } + + /// + /// Returns true if Dn instances are equal + /// + /// Instance of Dn to be compared + /// Boolean + public bool Equals(Dn other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Number == other.Number || + this.Number != null && + this.Number.Equals(other.Number) + ) && + ( + this.AgentId == other.AgentId || + this.AgentId != null && + this.AgentId.Equals(other.AgentId) + ) && + ( + this.AgentState == other.AgentState || + this.AgentState != null && + this.AgentState.Equals(other.AgentState) + ) && + ( + this.AgentWorkMode == other.AgentWorkMode || + this.AgentWorkMode != null && + this.AgentWorkMode.Equals(other.AgentWorkMode) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.Number != null) + hash = hash * 59 + this.Number.GetHashCode(); + if (this.AgentId != null) + hash = hash * 59 + this.AgentId.GetHashCode(); + if (this.AgentState != null) + hash = hash * 59 + this.AgentState.GetHashCode(); + if (this.AgentWorkMode != null) + hash = hash * 59 + this.AgentWorkMode.GetHashCode(); + return hash; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Genesys.Workspace/Model/ForwardData.cs b/src/Genesys.Workspace/Internal/Model/ForwardData.cs similarity index 96% rename from src/Genesys.Workspace/Model/ForwardData.cs rename to src/Genesys.Workspace/Internal/Model/ForwardData.cs index d136850..19f3563 100644 --- a/src/Genesys.Workspace/Model/ForwardData.cs +++ b/src/Genesys.Workspace/Internal/Model/ForwardData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ForwardData diff --git a/src/Genesys.Workspace/Model/GetCategoryData.cs b/src/Genesys.Workspace/Internal/Model/GetCategoryData.cs similarity index 96% rename from src/Genesys.Workspace/Model/GetCategoryData.cs rename to src/Genesys.Workspace/Internal/Model/GetCategoryData.cs index 37a25f2..07fbe80 100644 --- a/src/Genesys.Workspace/Model/GetCategoryData.cs +++ b/src/Genesys.Workspace/Internal/Model/GetCategoryData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// GetCategoryData diff --git a/src/Genesys.Workspace/Model/GetContactsData.cs b/src/Genesys.Workspace/Internal/Model/GetContactsData.cs similarity index 96% rename from src/Genesys.Workspace/Model/GetContactsData.cs rename to src/Genesys.Workspace/Internal/Model/GetContactsData.cs index 8bf5295..3fbedc0 100644 --- a/src/Genesys.Workspace/Model/GetContactsData.cs +++ b/src/Genesys.Workspace/Internal/Model/GetContactsData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// GetContactsData diff --git a/src/Genesys.Workspace/Model/GetStandardResponseData.cs b/src/Genesys.Workspace/Internal/Model/GetStandardResponseData.cs similarity index 96% rename from src/Genesys.Workspace/Model/GetStandardResponseData.cs rename to src/Genesys.Workspace/Internal/Model/GetStandardResponseData.cs index cee343b..642c1bc 100644 --- a/src/Genesys.Workspace/Model/GetStandardResponseData.cs +++ b/src/Genesys.Workspace/Internal/Model/GetStandardResponseData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// GetStandardResponseData diff --git a/src/Genesys.Workspace/Model/HoldData.cs b/src/Genesys.Workspace/Internal/Model/HoldData.cs similarity index 96% rename from src/Genesys.Workspace/Model/HoldData.cs rename to src/Genesys.Workspace/Internal/Model/HoldData.cs index b1af241..ba27be4 100644 --- a/src/Genesys.Workspace/Model/HoldData.cs +++ b/src/Genesys.Workspace/Internal/Model/HoldData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// HoldData diff --git a/src/Genesys.Workspace/Model/IdentifyContactData.cs b/src/Genesys.Workspace/Internal/Model/IdentifyContactData.cs similarity index 96% rename from src/Genesys.Workspace/Model/IdentifyContactData.cs rename to src/Genesys.Workspace/Internal/Model/IdentifyContactData.cs index fbe54ac..5375cd2 100644 --- a/src/Genesys.Workspace/Model/IdentifyContactData.cs +++ b/src/Genesys.Workspace/Internal/Model/IdentifyContactData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// IdentifyContactData diff --git a/src/Genesys.Workspace/Model/InitiateConferenceData.cs b/src/Genesys.Workspace/Internal/Model/InitiateConferenceData.cs similarity index 96% rename from src/Genesys.Workspace/Model/InitiateConferenceData.cs rename to src/Genesys.Workspace/Internal/Model/InitiateConferenceData.cs index a427a3c..2fd57b0 100644 --- a/src/Genesys.Workspace/Model/InitiateConferenceData.cs +++ b/src/Genesys.Workspace/Internal/Model/InitiateConferenceData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// InitiateConferenceData diff --git a/src/Genesys.Workspace/Model/InitiateTransferData.cs b/src/Genesys.Workspace/Internal/Model/InitiateTransferData.cs similarity index 96% rename from src/Genesys.Workspace/Model/InitiateTransferData.cs rename to src/Genesys.Workspace/Internal/Model/InitiateTransferData.cs index fe07f96..2d8af90 100644 --- a/src/Genesys.Workspace/Model/InitiateTransferData.cs +++ b/src/Genesys.Workspace/Internal/Model/InitiateTransferData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// InitiateTransferData diff --git a/src/Genesys.Workspace/Model/InlineResponse200.cs b/src/Genesys.Workspace/Internal/Model/InlineResponse200.cs similarity index 97% rename from src/Genesys.Workspace/Model/InlineResponse200.cs rename to src/Genesys.Workspace/Internal/Model/InlineResponse200.cs index 7be99ce..37d56d7 100644 --- a/src/Genesys.Workspace/Model/InlineResponse200.cs +++ b/src/Genesys.Workspace/Internal/Model/InlineResponse200.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// InlineResponse200 diff --git a/src/Genesys.Workspace/Model/InlineResponse2001.cs b/src/Genesys.Workspace/Internal/Model/InlineResponse2001.cs similarity index 97% rename from src/Genesys.Workspace/Model/InlineResponse2001.cs rename to src/Genesys.Workspace/Internal/Model/InlineResponse2001.cs index 8569c58..1422f46 100644 --- a/src/Genesys.Workspace/Model/InlineResponse2001.cs +++ b/src/Genesys.Workspace/Internal/Model/InlineResponse2001.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// InlineResponse2001 diff --git a/src/Genesys.Workspace/Model/InlineResponse2001Data.cs b/src/Genesys.Workspace/Internal/Model/InlineResponse2001Data.cs similarity index 97% rename from src/Genesys.Workspace/Model/InlineResponse2001Data.cs rename to src/Genesys.Workspace/Internal/Model/InlineResponse2001Data.cs index 82602fa..a4bdff0 100644 --- a/src/Genesys.Workspace/Model/InlineResponse2001Data.cs +++ b/src/Genesys.Workspace/Internal/Model/InlineResponse2001Data.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// InlineResponse2001Data diff --git a/src/Genesys.Workspace/Model/InlineResponse2002.cs b/src/Genesys.Workspace/Internal/Model/InlineResponse2002.cs similarity index 97% rename from src/Genesys.Workspace/Model/InlineResponse2002.cs rename to src/Genesys.Workspace/Internal/Model/InlineResponse2002.cs index 4fb2981..8d2a859 100644 --- a/src/Genesys.Workspace/Model/InlineResponse2002.cs +++ b/src/Genesys.Workspace/Internal/Model/InlineResponse2002.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// InlineResponse2002 diff --git a/src/Genesys.Workspace/Model/InlineResponse2002Data.cs b/src/Genesys.Workspace/Internal/Model/InlineResponse2002Data.cs similarity index 97% rename from src/Genesys.Workspace/Model/InlineResponse2002Data.cs rename to src/Genesys.Workspace/Internal/Model/InlineResponse2002Data.cs index 24edd6a..a909f84 100644 --- a/src/Genesys.Workspace/Model/InlineResponse2002Data.cs +++ b/src/Genesys.Workspace/Internal/Model/InlineResponse2002Data.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// InlineResponse2002Data diff --git a/src/Genesys.Workspace/Model/InlineResponse2002DataStatistics.cs b/src/Genesys.Workspace/Internal/Model/InlineResponse2002DataStatistics.cs similarity index 97% rename from src/Genesys.Workspace/Model/InlineResponse2002DataStatistics.cs rename to src/Genesys.Workspace/Internal/Model/InlineResponse2002DataStatistics.cs index 5772fa9..8c313f2 100644 --- a/src/Genesys.Workspace/Model/InlineResponse2002DataStatistics.cs +++ b/src/Genesys.Workspace/Internal/Model/InlineResponse2002DataStatistics.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// The list of all the statitstics in given subscription as kvp. diff --git a/src/Genesys.Workspace/Model/InlineResponse200Data.cs b/src/Genesys.Workspace/Internal/Model/InlineResponse200Data.cs similarity index 97% rename from src/Genesys.Workspace/Model/InlineResponse200Data.cs rename to src/Genesys.Workspace/Internal/Model/InlineResponse200Data.cs index 1f42406..a06ef23 100644 --- a/src/Genesys.Workspace/Model/InlineResponse200Data.cs +++ b/src/Genesys.Workspace/Internal/Model/InlineResponse200Data.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// InlineResponse200Data diff --git a/src/Genesys.Workspace/Model/InlineResponse200Status.cs b/src/Genesys.Workspace/Internal/Model/InlineResponse200Status.cs similarity index 97% rename from src/Genesys.Workspace/Model/InlineResponse200Status.cs rename to src/Genesys.Workspace/Internal/Model/InlineResponse200Status.cs index a977249..5ce7bf3 100644 --- a/src/Genesys.Workspace/Model/InlineResponse200Status.cs +++ b/src/Genesys.Workspace/Internal/Model/InlineResponse200Status.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// InlineResponse200Status diff --git a/src/Genesys.Workspace/Model/InteractionContentData.cs b/src/Genesys.Workspace/Internal/Model/InteractionContentData.cs similarity index 96% rename from src/Genesys.Workspace/Model/InteractionContentData.cs rename to src/Genesys.Workspace/Internal/Model/InteractionContentData.cs index ac29129..69bd83f 100644 --- a/src/Genesys.Workspace/Model/InteractionContentData.cs +++ b/src/Genesys.Workspace/Internal/Model/InteractionContentData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// InteractionContentData diff --git a/src/Genesys.Workspace/Model/IxnReasonCode.cs b/src/Genesys.Workspace/Internal/Model/IxnReasonCode.cs similarity index 97% rename from src/Genesys.Workspace/Model/IxnReasonCode.cs rename to src/Genesys.Workspace/Internal/Model/IxnReasonCode.cs index 90c1869..0c971be 100644 --- a/src/Genesys.Workspace/Model/IxnReasonCode.cs +++ b/src/Genesys.Workspace/Internal/Model/IxnReasonCode.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// IxnReasonCode diff --git a/src/Genesys.Workspace/Model/KeyData.cs b/src/Genesys.Workspace/Internal/Model/KeyData.cs similarity index 96% rename from src/Genesys.Workspace/Model/KeyData.cs rename to src/Genesys.Workspace/Internal/Model/KeyData.cs index 4d2bbf6..a204726 100644 --- a/src/Genesys.Workspace/Model/KeyData.cs +++ b/src/Genesys.Workspace/Internal/Model/KeyData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// KeyData diff --git a/src/Genesys.Workspace/Model/Kvpair.cs b/src/Genesys.Workspace/Internal/Model/Kvpair.cs similarity index 97% rename from src/Genesys.Workspace/Model/Kvpair.cs rename to src/Genesys.Workspace/Internal/Model/Kvpair.cs index 23771f6..e64396c 100644 --- a/src/Genesys.Workspace/Model/Kvpair.cs +++ b/src/Genesys.Workspace/Internal/Model/Kvpair.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// Kvpair diff --git a/src/Genesys.Workspace/Model/LogoutMediaData.cs b/src/Genesys.Workspace/Internal/Model/LogoutMediaData.cs similarity index 96% rename from src/Genesys.Workspace/Model/LogoutMediaData.cs rename to src/Genesys.Workspace/Internal/Model/LogoutMediaData.cs index 60fc8b5..96ae66f 100644 --- a/src/Genesys.Workspace/Model/LogoutMediaData.cs +++ b/src/Genesys.Workspace/Internal/Model/LogoutMediaData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// LogoutMediaData diff --git a/src/Genesys.Workspace/Model/LuceneSearchData.cs b/src/Genesys.Workspace/Internal/Model/LuceneSearchData.cs similarity index 96% rename from src/Genesys.Workspace/Model/LuceneSearchData.cs rename to src/Genesys.Workspace/Internal/Model/LuceneSearchData.cs index 0cc9780..b4ecd9c 100644 --- a/src/Genesys.Workspace/Model/LuceneSearchData.cs +++ b/src/Genesys.Workspace/Internal/Model/LuceneSearchData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// LuceneSearchData diff --git a/src/Genesys.Workspace/Model/LuceneSearchInteractionData.cs b/src/Genesys.Workspace/Internal/Model/LuceneSearchInteractionData.cs similarity index 96% rename from src/Genesys.Workspace/Model/LuceneSearchInteractionData.cs rename to src/Genesys.Workspace/Internal/Model/LuceneSearchInteractionData.cs index 4f9a1e1..3d0a649 100644 --- a/src/Genesys.Workspace/Model/LuceneSearchInteractionData.cs +++ b/src/Genesys.Workspace/Internal/Model/LuceneSearchInteractionData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// LuceneSearchInteractionData diff --git a/src/Genesys.Workspace/Model/MakeCallData.cs b/src/Genesys.Workspace/Internal/Model/MakeCallData.cs similarity index 96% rename from src/Genesys.Workspace/Model/MakeCallData.cs rename to src/Genesys.Workspace/Internal/Model/MakeCallData.cs index ed8335f..6adcbc0 100644 --- a/src/Genesys.Workspace/Model/MakeCallData.cs +++ b/src/Genesys.Workspace/Internal/Model/MakeCallData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// MakeCallData diff --git a/src/Genesys.Workspace/Model/Media.cs b/src/Genesys.Workspace/Internal/Model/Media.cs similarity index 96% rename from src/Genesys.Workspace/Model/Media.cs rename to src/Genesys.Workspace/Internal/Model/Media.cs index a9d96de..85d13af 100644 --- a/src/Genesys.Workspace/Model/Media.cs +++ b/src/Genesys.Workspace/Internal/Model/Media.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// Media diff --git a/src/Genesys.Workspace/Model/MediamediatypeinteractionsidacceptData.cs b/src/Genesys.Workspace/Internal/Model/MediamediatypeinteractionsidacceptData.cs similarity index 96% rename from src/Genesys.Workspace/Model/MediamediatypeinteractionsidacceptData.cs rename to src/Genesys.Workspace/Internal/Model/MediamediatypeinteractionsidacceptData.cs index ef59e85..a4c362a 100644 --- a/src/Genesys.Workspace/Model/MediamediatypeinteractionsidacceptData.cs +++ b/src/Genesys.Workspace/Internal/Model/MediamediatypeinteractionsidacceptData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// MediamediatypeinteractionsidacceptData diff --git a/src/Genesys.Workspace/Model/MediamediatypeinteractionsidaddcommentData.cs b/src/Genesys.Workspace/Internal/Model/MediamediatypeinteractionsidaddcommentData.cs similarity index 97% rename from src/Genesys.Workspace/Model/MediamediatypeinteractionsidaddcommentData.cs rename to src/Genesys.Workspace/Internal/Model/MediamediatypeinteractionsidaddcommentData.cs index 4ffd2ec..d0e6f0c 100644 --- a/src/Genesys.Workspace/Model/MediamediatypeinteractionsidaddcommentData.cs +++ b/src/Genesys.Workspace/Internal/Model/MediamediatypeinteractionsidaddcommentData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// MediamediatypeinteractionsidaddcommentData diff --git a/src/Genesys.Workspace/Model/MediamediatypeinteractionsidaddcontentData.cs b/src/Genesys.Workspace/Internal/Model/MediamediatypeinteractionsidaddcontentData.cs similarity index 96% rename from src/Genesys.Workspace/Model/MediamediatypeinteractionsidaddcontentData.cs rename to src/Genesys.Workspace/Internal/Model/MediamediatypeinteractionsidaddcontentData.cs index e9ee5ed..a571d2e 100644 --- a/src/Genesys.Workspace/Model/MediamediatypeinteractionsidaddcontentData.cs +++ b/src/Genesys.Workspace/Internal/Model/MediamediatypeinteractionsidaddcontentData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// MediamediatypeinteractionsidaddcontentData diff --git a/src/Genesys.Workspace/Model/MediamediatypeinteractionsiddeleteuserdataData.cs b/src/Genesys.Workspace/Internal/Model/MediamediatypeinteractionsiddeleteuserdataData.cs similarity index 97% rename from src/Genesys.Workspace/Model/MediamediatypeinteractionsiddeleteuserdataData.cs rename to src/Genesys.Workspace/Internal/Model/MediamediatypeinteractionsiddeleteuserdataData.cs index a793499..65de809 100644 --- a/src/Genesys.Workspace/Model/MediamediatypeinteractionsiddeleteuserdataData.cs +++ b/src/Genesys.Workspace/Internal/Model/MediamediatypeinteractionsiddeleteuserdataData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// MediamediatypeinteractionsiddeleteuserdataData diff --git a/src/Genesys.Workspace/Model/MediamediatypeinteractionsidplaceinqueueData.cs b/src/Genesys.Workspace/Internal/Model/MediamediatypeinteractionsidplaceinqueueData.cs similarity index 98% rename from src/Genesys.Workspace/Model/MediamediatypeinteractionsidplaceinqueueData.cs rename to src/Genesys.Workspace/Internal/Model/MediamediatypeinteractionsidplaceinqueueData.cs index f9d3040..f09c6cb 100644 --- a/src/Genesys.Workspace/Model/MediamediatypeinteractionsidplaceinqueueData.cs +++ b/src/Genesys.Workspace/Internal/Model/MediamediatypeinteractionsidplaceinqueueData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// MediamediatypeinteractionsidplaceinqueueData diff --git a/src/Genesys.Workspace/Model/MediamediatypelogoutData.cs b/src/Genesys.Workspace/Internal/Model/MediamediatypelogoutData.cs similarity index 97% rename from src/Genesys.Workspace/Model/MediamediatypelogoutData.cs rename to src/Genesys.Workspace/Internal/Model/MediamediatypelogoutData.cs index 3f8accf..e3cb451 100644 --- a/src/Genesys.Workspace/Model/MediamediatypelogoutData.cs +++ b/src/Genesys.Workspace/Internal/Model/MediamediatypelogoutData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// MediamediatypelogoutData diff --git a/src/Genesys.Workspace/Model/MediamediatypenotreadyData.cs b/src/Genesys.Workspace/Internal/Model/MediamediatypenotreadyData.cs similarity index 97% rename from src/Genesys.Workspace/Model/MediamediatypenotreadyData.cs rename to src/Genesys.Workspace/Internal/Model/MediamediatypenotreadyData.cs index 72e065c..ee6005b 100644 --- a/src/Genesys.Workspace/Model/MediamediatypenotreadyData.cs +++ b/src/Genesys.Workspace/Internal/Model/MediamediatypenotreadyData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// MediamediatypenotreadyData diff --git a/src/Genesys.Workspace/Model/MergeData.cs b/src/Genesys.Workspace/Internal/Model/MergeData.cs similarity index 96% rename from src/Genesys.Workspace/Model/MergeData.cs rename to src/Genesys.Workspace/Internal/Model/MergeData.cs index d73ee75..3fe7003 100644 --- a/src/Genesys.Workspace/Model/MergeData.cs +++ b/src/Genesys.Workspace/Internal/Model/MergeData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// MergeData diff --git a/src/Genesys.Workspace/Model/MonitoringScopeData.cs b/src/Genesys.Workspace/Internal/Model/MonitoringScopeData.cs similarity index 96% rename from src/Genesys.Workspace/Model/MonitoringScopeData.cs rename to src/Genesys.Workspace/Internal/Model/MonitoringScopeData.cs index 73286fa..4001155 100644 --- a/src/Genesys.Workspace/Model/MonitoringScopeData.cs +++ b/src/Genesys.Workspace/Internal/Model/MonitoringScopeData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// MonitoringScopeData diff --git a/src/Genesys.Workspace/Model/MonitoringScopeDataData.cs b/src/Genesys.Workspace/Internal/Model/MonitoringScopeDataData.cs similarity index 97% rename from src/Genesys.Workspace/Model/MonitoringScopeDataData.cs rename to src/Genesys.Workspace/Internal/Model/MonitoringScopeDataData.cs index 68d439b..2b29b56 100644 --- a/src/Genesys.Workspace/Model/MonitoringScopeDataData.cs +++ b/src/Genesys.Workspace/Internal/Model/MonitoringScopeDataData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// MonitoringScopeDataData diff --git a/src/Genesys.Workspace/Model/NotReadyData.cs b/src/Genesys.Workspace/Internal/Model/NotReadyData.cs similarity index 96% rename from src/Genesys.Workspace/Model/NotReadyData.cs rename to src/Genesys.Workspace/Internal/Model/NotReadyData.cs index e9251bd..de4ca6e 100644 --- a/src/Genesys.Workspace/Model/NotReadyData.cs +++ b/src/Genesys.Workspace/Internal/Model/NotReadyData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// NotReadyData diff --git a/src/Genesys.Workspace/Model/NotReadyForMediaData.cs b/src/Genesys.Workspace/Internal/Model/NotReadyForMediaData.cs similarity index 96% rename from src/Genesys.Workspace/Model/NotReadyForMediaData.cs rename to src/Genesys.Workspace/Internal/Model/NotReadyForMediaData.cs index 705cb82..7e3aeef 100644 --- a/src/Genesys.Workspace/Model/NotReadyForMediaData.cs +++ b/src/Genesys.Workspace/Internal/Model/NotReadyForMediaData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// NotReadyForMediaData diff --git a/src/Genesys.Workspace/Model/OpenMediaChannel.cs b/src/Genesys.Workspace/Internal/Model/OpenMediaChannel.cs similarity index 98% rename from src/Genesys.Workspace/Model/OpenMediaChannel.cs rename to src/Genesys.Workspace/Internal/Model/OpenMediaChannel.cs index 00fd0e3..3de45eb 100644 --- a/src/Genesys.Workspace/Model/OpenMediaChannel.cs +++ b/src/Genesys.Workspace/Internal/Model/OpenMediaChannel.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// OpenMediaChannel diff --git a/src/Genesys.Workspace/Model/PersonalFavoriteData.cs b/src/Genesys.Workspace/Internal/Model/PersonalFavoriteData.cs similarity index 96% rename from src/Genesys.Workspace/Model/PersonalFavoriteData.cs rename to src/Genesys.Workspace/Internal/Model/PersonalFavoriteData.cs index a2183d1..fae965e 100644 --- a/src/Genesys.Workspace/Model/PersonalFavoriteData.cs +++ b/src/Genesys.Workspace/Internal/Model/PersonalFavoriteData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// PersonalFavoriteData diff --git a/src/Genesys.Workspace/Model/PhoneCallData.cs b/src/Genesys.Workspace/Internal/Model/PhoneCallData.cs similarity index 96% rename from src/Genesys.Workspace/Model/PhoneCallData.cs rename to src/Genesys.Workspace/Internal/Model/PhoneCallData.cs index a31c5f2..0c03125 100644 --- a/src/Genesys.Workspace/Model/PhoneCallData.cs +++ b/src/Genesys.Workspace/Internal/Model/PhoneCallData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// PhoneCallData diff --git a/src/Genesys.Workspace/Model/PlaceInQueueData.cs b/src/Genesys.Workspace/Internal/Model/PlaceInQueueData.cs similarity index 96% rename from src/Genesys.Workspace/Model/PlaceInQueueData.cs rename to src/Genesys.Workspace/Internal/Model/PlaceInQueueData.cs index 15b76fd..1bb8c07 100644 --- a/src/Genesys.Workspace/Model/PlaceInQueueData.cs +++ b/src/Genesys.Workspace/Internal/Model/PlaceInQueueData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// PlaceInQueueData diff --git a/src/Genesys.Workspace/Model/ReadyData.cs b/src/Genesys.Workspace/Internal/Model/ReadyData.cs similarity index 96% rename from src/Genesys.Workspace/Model/ReadyData.cs rename to src/Genesys.Workspace/Internal/Model/ReadyData.cs index 3e677f1..e490a88 100644 --- a/src/Genesys.Workspace/Model/ReadyData.cs +++ b/src/Genesys.Workspace/Internal/Model/ReadyData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ReadyData diff --git a/src/Genesys.Workspace/Model/ReadyForMediaData.cs b/src/Genesys.Workspace/Internal/Model/ReadyForMediaData.cs similarity index 96% rename from src/Genesys.Workspace/Model/ReadyForMediaData.cs rename to src/Genesys.Workspace/Internal/Model/ReadyForMediaData.cs index 1f63fe0..38ac0a5 100644 --- a/src/Genesys.Workspace/Model/ReadyForMediaData.cs +++ b/src/Genesys.Workspace/Internal/Model/ReadyForMediaData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ReadyForMediaData diff --git a/src/Genesys.Workspace/Model/RecentData.cs b/src/Genesys.Workspace/Internal/Model/RecentData.cs similarity index 97% rename from src/Genesys.Workspace/Model/RecentData.cs rename to src/Genesys.Workspace/Internal/Model/RecentData.cs index 3340df1..9699da1 100644 --- a/src/Genesys.Workspace/Model/RecentData.cs +++ b/src/Genesys.Workspace/Internal/Model/RecentData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// RecentData diff --git a/src/Genesys.Workspace/Model/RecentTargetData.cs b/src/Genesys.Workspace/Internal/Model/RecentTargetData.cs similarity index 96% rename from src/Genesys.Workspace/Model/RecentTargetData.cs rename to src/Genesys.Workspace/Internal/Model/RecentTargetData.cs index 7dfd24c..bddebd3 100644 --- a/src/Genesys.Workspace/Model/RecentTargetData.cs +++ b/src/Genesys.Workspace/Internal/Model/RecentTargetData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// RecentTargetData diff --git a/src/Genesys.Workspace/Model/ReconnectData.cs b/src/Genesys.Workspace/Internal/Model/ReconnectData.cs similarity index 96% rename from src/Genesys.Workspace/Model/ReconnectData.cs rename to src/Genesys.Workspace/Internal/Model/ReconnectData.cs index 20bb26f..295bac7 100644 --- a/src/Genesys.Workspace/Model/ReconnectData.cs +++ b/src/Genesys.Workspace/Internal/Model/ReconnectData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ReconnectData diff --git a/src/Genesys.Workspace/Model/RedirectData.cs b/src/Genesys.Workspace/Internal/Model/RedirectData.cs similarity index 96% rename from src/Genesys.Workspace/Model/RedirectData.cs rename to src/Genesys.Workspace/Internal/Model/RedirectData.cs index bd42f05..306457b 100644 --- a/src/Genesys.Workspace/Model/RedirectData.cs +++ b/src/Genesys.Workspace/Internal/Model/RedirectData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// RedirectData diff --git a/src/Genesys.Workspace/Model/ReleaseData.cs b/src/Genesys.Workspace/Internal/Model/ReleaseData.cs similarity index 96% rename from src/Genesys.Workspace/Model/ReleaseData.cs rename to src/Genesys.Workspace/Internal/Model/ReleaseData.cs index a057ba5..d5841fa 100644 --- a/src/Genesys.Workspace/Model/ReleaseData.cs +++ b/src/Genesys.Workspace/Internal/Model/ReleaseData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ReleaseData diff --git a/src/Genesys.Workspace/Model/ReportingunsubscribeData.cs b/src/Genesys.Workspace/Internal/Model/ReportingunsubscribeData.cs similarity index 97% rename from src/Genesys.Workspace/Model/ReportingunsubscribeData.cs rename to src/Genesys.Workspace/Internal/Model/ReportingunsubscribeData.cs index 38d2e6d..ed133a6 100644 --- a/src/Genesys.Workspace/Model/ReportingunsubscribeData.cs +++ b/src/Genesys.Workspace/Internal/Model/ReportingunsubscribeData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// ReportingunsubscribeData diff --git a/src/Genesys.Workspace/Model/RetrieveData.cs b/src/Genesys.Workspace/Internal/Model/RetrieveData.cs similarity index 96% rename from src/Genesys.Workspace/Model/RetrieveData.cs rename to src/Genesys.Workspace/Internal/Model/RetrieveData.cs index 234fb5a..abb777a 100644 --- a/src/Genesys.Workspace/Model/RetrieveData.cs +++ b/src/Genesys.Workspace/Internal/Model/RetrieveData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// RetrieveData diff --git a/src/Genesys.Workspace/Model/SendDTMFData.cs b/src/Genesys.Workspace/Internal/Model/SendDTMFData.cs similarity index 96% rename from src/Genesys.Workspace/Model/SendDTMFData.cs rename to src/Genesys.Workspace/Internal/Model/SendDTMFData.cs index b2ba03a..b460ffc 100644 --- a/src/Genesys.Workspace/Model/SendDTMFData.cs +++ b/src/Genesys.Workspace/Internal/Model/SendDTMFData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// SendDTMFData diff --git a/src/Genesys.Workspace/Model/SendUserEventData.cs b/src/Genesys.Workspace/Internal/Model/SendUserEventData.cs similarity index 96% rename from src/Genesys.Workspace/Model/SendUserEventData.cs rename to src/Genesys.Workspace/Internal/Model/SendUserEventData.cs index cf2f440..74d6ed5 100644 --- a/src/Genesys.Workspace/Model/SendUserEventData.cs +++ b/src/Genesys.Workspace/Internal/Model/SendUserEventData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// SendUserEventData diff --git a/src/Genesys.Workspace/Model/SendUserEventDataData.cs b/src/Genesys.Workspace/Internal/Model/SendUserEventDataData.cs similarity index 97% rename from src/Genesys.Workspace/Model/SendUserEventDataData.cs rename to src/Genesys.Workspace/Internal/Model/SendUserEventDataData.cs index 77c8006..bbd9e90 100644 --- a/src/Genesys.Workspace/Model/SendUserEventDataData.cs +++ b/src/Genesys.Workspace/Internal/Model/SendUserEventDataData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// SendUserEventDataData diff --git a/src/Genesys.Workspace/Model/SingleStepConferenceData.cs b/src/Genesys.Workspace/Internal/Model/SingleStepConferenceData.cs similarity index 96% rename from src/Genesys.Workspace/Model/SingleStepConferenceData.cs rename to src/Genesys.Workspace/Internal/Model/SingleStepConferenceData.cs index d04bd8a..ac69e84 100644 --- a/src/Genesys.Workspace/Model/SingleStepConferenceData.cs +++ b/src/Genesys.Workspace/Internal/Model/SingleStepConferenceData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// SingleStepConferenceData diff --git a/src/Genesys.Workspace/Model/SingleStepTransferData.cs b/src/Genesys.Workspace/Internal/Model/SingleStepTransferData.cs similarity index 96% rename from src/Genesys.Workspace/Model/SingleStepTransferData.cs rename to src/Genesys.Workspace/Internal/Model/SingleStepTransferData.cs index 58022fd..2bf60fe 100644 --- a/src/Genesys.Workspace/Model/SingleStepTransferData.cs +++ b/src/Genesys.Workspace/Internal/Model/SingleStepTransferData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// SingleStepTransferData diff --git a/src/Genesys.Workspace/Model/StartMonitoringData.cs b/src/Genesys.Workspace/Internal/Model/StartMonitoringData.cs similarity index 96% rename from src/Genesys.Workspace/Model/StartMonitoringData.cs rename to src/Genesys.Workspace/Internal/Model/StartMonitoringData.cs index 5819db9..d93e744 100644 --- a/src/Genesys.Workspace/Model/StartMonitoringData.cs +++ b/src/Genesys.Workspace/Internal/Model/StartMonitoringData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// StartMonitoringData diff --git a/src/Genesys.Workspace/Model/StatisticValue.cs b/src/Genesys.Workspace/Internal/Model/StatisticValue.cs similarity index 97% rename from src/Genesys.Workspace/Model/StatisticValue.cs rename to src/Genesys.Workspace/Internal/Model/StatisticValue.cs index 894caa7..5485b6b 100644 --- a/src/Genesys.Workspace/Model/StatisticValue.cs +++ b/src/Genesys.Workspace/Internal/Model/StatisticValue.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// StatisticValue diff --git a/src/Genesys.Workspace/Model/StatisticValueForPeekResponse.cs b/src/Genesys.Workspace/Internal/Model/StatisticValueForPeekResponse.cs similarity index 98% rename from src/Genesys.Workspace/Model/StatisticValueForPeekResponse.cs rename to src/Genesys.Workspace/Internal/Model/StatisticValueForPeekResponse.cs index 3b0ca27..6b94a14 100644 --- a/src/Genesys.Workspace/Model/StatisticValueForPeekResponse.cs +++ b/src/Genesys.Workspace/Internal/Model/StatisticValueForPeekResponse.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// StatisticValueForPeekResponse diff --git a/src/Genesys.Workspace/Model/StatisticValueForRegister.cs b/src/Genesys.Workspace/Internal/Model/StatisticValueForRegister.cs similarity index 98% rename from src/Genesys.Workspace/Model/StatisticValueForRegister.cs rename to src/Genesys.Workspace/Internal/Model/StatisticValueForRegister.cs index 4c51bae..b1bbc18 100644 --- a/src/Genesys.Workspace/Model/StatisticValueForRegister.cs +++ b/src/Genesys.Workspace/Internal/Model/StatisticValueForRegister.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// StatisticValueForRegister diff --git a/src/Genesys.Workspace/Model/StatisticValueForRegisterResponse.cs b/src/Genesys.Workspace/Internal/Model/StatisticValueForRegisterResponse.cs similarity index 98% rename from src/Genesys.Workspace/Model/StatisticValueForRegisterResponse.cs rename to src/Genesys.Workspace/Internal/Model/StatisticValueForRegisterResponse.cs index f49a1cd..64d1442 100644 --- a/src/Genesys.Workspace/Model/StatisticValueForRegisterResponse.cs +++ b/src/Genesys.Workspace/Internal/Model/StatisticValueForRegisterResponse.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// StatisticValueForRegisterResponse diff --git a/src/Genesys.Workspace/Model/StatisticsRegisterData.cs b/src/Genesys.Workspace/Internal/Model/StatisticsRegisterData.cs similarity index 96% rename from src/Genesys.Workspace/Model/StatisticsRegisterData.cs rename to src/Genesys.Workspace/Internal/Model/StatisticsRegisterData.cs index a8e8417..59fbf35 100644 --- a/src/Genesys.Workspace/Model/StatisticsRegisterData.cs +++ b/src/Genesys.Workspace/Internal/Model/StatisticsRegisterData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// StatisticsRegisterData diff --git a/src/Genesys.Workspace/Model/StatisticsRegisterDataData.cs b/src/Genesys.Workspace/Internal/Model/StatisticsRegisterDataData.cs similarity index 97% rename from src/Genesys.Workspace/Model/StatisticsRegisterDataData.cs rename to src/Genesys.Workspace/Internal/Model/StatisticsRegisterDataData.cs index 240e6a9..48de04d 100644 --- a/src/Genesys.Workspace/Model/StatisticsRegisterDataData.cs +++ b/src/Genesys.Workspace/Internal/Model/StatisticsRegisterDataData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// StatisticsRegisterDataData diff --git a/src/Genesys.Workspace/Model/StatisticsSubscribeData.cs b/src/Genesys.Workspace/Internal/Model/StatisticsSubscribeData.cs similarity index 96% rename from src/Genesys.Workspace/Model/StatisticsSubscribeData.cs rename to src/Genesys.Workspace/Internal/Model/StatisticsSubscribeData.cs index 65c8e16..edd3c20 100644 --- a/src/Genesys.Workspace/Model/StatisticsSubscribeData.cs +++ b/src/Genesys.Workspace/Internal/Model/StatisticsSubscribeData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// StatisticsSubscribeData diff --git a/src/Genesys.Workspace/Model/StatisticsSubscribeDataData.cs b/src/Genesys.Workspace/Internal/Model/StatisticsSubscribeDataData.cs similarity index 97% rename from src/Genesys.Workspace/Model/StatisticsSubscribeDataData.cs rename to src/Genesys.Workspace/Internal/Model/StatisticsSubscribeDataData.cs index be80709..8084c86 100644 --- a/src/Genesys.Workspace/Model/StatisticsSubscribeDataData.cs +++ b/src/Genesys.Workspace/Internal/Model/StatisticsSubscribeDataData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// StatisticsSubscribeDataData diff --git a/src/Genesys.Workspace/Model/StopMonitoringData.cs b/src/Genesys.Workspace/Internal/Model/StopMonitoringData.cs similarity index 96% rename from src/Genesys.Workspace/Model/StopMonitoringData.cs rename to src/Genesys.Workspace/Internal/Model/StopMonitoringData.cs index e872090..7051151 100644 --- a/src/Genesys.Workspace/Model/StopMonitoringData.cs +++ b/src/Genesys.Workspace/Internal/Model/StopMonitoringData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// StopMonitoringData diff --git a/src/Genesys.Workspace/Internal/Model/Target.cs b/src/Genesys.Workspace/Internal/Model/Target.cs new file mode 100644 index 0000000..ad25d36 --- /dev/null +++ b/src/Genesys.Workspace/Internal/Model/Target.cs @@ -0,0 +1,333 @@ +/* + * Workspace API + * + * Agent API + * + * OpenAPI spec version: 1.0.0 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; + +namespace Genesys.Workspace.Internal.Model +{ + /// + /// Target + /// + [DataContract] + public partial class Target : IEquatable, IValidatableObject + { + /// + /// The type of the target - agent, agent-group, acd-queue, route-point, skill, custom-contact or contact. + /// + /// The type of the target - agent, agent-group, acd-queue, route-point, skill, custom-contact or contact. + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + + /// + /// Enum Agent for "agent" + /// + [EnumMember(Value = "agent")] + Agent, + + /// + /// Enum Agentgroup for "agent-group" + /// + [EnumMember(Value = "agent-group")] + Agentgroup, + + /// + /// Enum Acdqueue for "acd-queue" + /// + [EnumMember(Value = "acd-queue")] + Acdqueue, + + /// + /// Enum Routepoint for "route-point" + /// + [EnumMember(Value = "route-point")] + Routepoint, + + /// + /// Enum Skill for "skill" + /// + [EnumMember(Value = "skill")] + Skill, + + /// + /// Enum Customcontact for "custom-contact" + /// + [EnumMember(Value = "custom-contact")] + Customcontact, + + /// + /// Enum Contact for "contact" + /// + [EnumMember(Value = "contact")] + Contact + } + + /// + /// The type of the target - agent, agent-group, acd-queue, route-point, skill, custom-contact or contact. + /// + /// The type of the target - agent, agent-group, acd-queue, route-point, skill, custom-contact or contact. + [DataMember(Name="type", EmitDefaultValue=false)] + public TypeEnum? Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// DBID of the object. + /// For agents firstname and lastname (or username if neither is defined), for other types the name field is used.. + /// The type of the target - agent, agent-group, acd-queue, route-point, skill, custom-contact or contact.. + /// First name - only applicable to agents.. + /// Last name - only applicable to agents.. + /// Employee id - only applicable to agents.. + /// Username - only applicable to agents.. + /// Only applicable to acd-queue and route-point. + /// Only applicable to acd-queue and route-point. + /// The structure depends on the target type. For agents, availability includes channel details. For acd-queues and route-points, waiting calls. For agent-groups, the number of ready agents.. + public Target(int? DBID = default(int?), string Name = default(string), TypeEnum? Type = default(TypeEnum?), string FirstName = default(string), string LastName = default(string), string EmployeeId = default(string), string UserName = default(string), string Number = default(string), string SwitchName = default(string), Object Availability = default(Object)) + { + this.DBID = DBID; + this.Name = Name; + this.Type = Type; + this.FirstName = FirstName; + this.LastName = LastName; + this.EmployeeId = EmployeeId; + this.UserName = UserName; + this.Number = Number; + this.SwitchName = SwitchName; + this.Availability = Availability; + } + + /// + /// DBID of the object + /// + /// DBID of the object + [DataMember(Name="DBID", EmitDefaultValue=false)] + public int? DBID { get; set; } + + /// + /// For agents firstname and lastname (or username if neither is defined), for other types the name field is used. + /// + /// For agents firstname and lastname (or username if neither is defined), for other types the name field is used. + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + + /// + /// First name - only applicable to agents. + /// + /// First name - only applicable to agents. + [DataMember(Name="firstName", EmitDefaultValue=false)] + public string FirstName { get; set; } + + /// + /// Last name - only applicable to agents. + /// + /// Last name - only applicable to agents. + [DataMember(Name="lastName", EmitDefaultValue=false)] + public string LastName { get; set; } + + /// + /// Employee id - only applicable to agents. + /// + /// Employee id - only applicable to agents. + [DataMember(Name="employeeId", EmitDefaultValue=false)] + public string EmployeeId { get; set; } + + /// + /// Username - only applicable to agents. + /// + /// Username - only applicable to agents. + [DataMember(Name="userName", EmitDefaultValue=false)] + public string UserName { get; set; } + + /// + /// Only applicable to acd-queue and route-point + /// + /// Only applicable to acd-queue and route-point + [DataMember(Name="number", EmitDefaultValue=false)] + public string Number { get; set; } + + /// + /// Only applicable to acd-queue and route-point + /// + /// Only applicable to acd-queue and route-point + [DataMember(Name="switchName", EmitDefaultValue=false)] + public string SwitchName { get; set; } + + /// + /// The structure depends on the target type. For agents, availability includes channel details. For acd-queues and route-points, waiting calls. For agent-groups, the number of ready agents. + /// + /// The structure depends on the target type. For agents, availability includes channel details. For acd-queues and route-points, waiting calls. For agent-groups, the number of ready agents. + [DataMember(Name="availability", EmitDefaultValue=false)] + public Object Availability { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Target {\n"); + sb.Append(" DBID: ").Append(DBID).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" EmployeeId: ").Append(EmployeeId).Append("\n"); + sb.Append(" UserName: ").Append(UserName).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" SwitchName: ").Append(SwitchName).Append("\n"); + sb.Append(" Availability: ").Append(Availability).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Target); + } + + /// + /// Returns true if Target instances are equal + /// + /// Instance of Target to be compared + /// Boolean + public bool Equals(Target other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.DBID == other.DBID || + this.DBID != null && + this.DBID.Equals(other.DBID) + ) && + ( + this.Name == other.Name || + this.Name != null && + this.Name.Equals(other.Name) + ) && + ( + this.Type == other.Type || + this.Type != null && + this.Type.Equals(other.Type) + ) && + ( + this.FirstName == other.FirstName || + this.FirstName != null && + this.FirstName.Equals(other.FirstName) + ) && + ( + this.LastName == other.LastName || + this.LastName != null && + this.LastName.Equals(other.LastName) + ) && + ( + this.EmployeeId == other.EmployeeId || + this.EmployeeId != null && + this.EmployeeId.Equals(other.EmployeeId) + ) && + ( + this.UserName == other.UserName || + this.UserName != null && + this.UserName.Equals(other.UserName) + ) && + ( + this.Number == other.Number || + this.Number != null && + this.Number.Equals(other.Number) + ) && + ( + this.SwitchName == other.SwitchName || + this.SwitchName != null && + this.SwitchName.Equals(other.SwitchName) + ) && + ( + this.Availability == other.Availability || + this.Availability != null && + this.Availability.Equals(other.Availability) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.DBID != null) + hash = hash * 59 + this.DBID.GetHashCode(); + if (this.Name != null) + hash = hash * 59 + this.Name.GetHashCode(); + if (this.Type != null) + hash = hash * 59 + this.Type.GetHashCode(); + if (this.FirstName != null) + hash = hash * 59 + this.FirstName.GetHashCode(); + if (this.LastName != null) + hash = hash * 59 + this.LastName.GetHashCode(); + if (this.EmployeeId != null) + hash = hash * 59 + this.EmployeeId.GetHashCode(); + if (this.UserName != null) + hash = hash * 59 + this.UserName.GetHashCode(); + if (this.Number != null) + hash = hash * 59 + this.Number.GetHashCode(); + if (this.SwitchName != null) + hash = hash * 59 + this.SwitchName.GetHashCode(); + if (this.Availability != null) + hash = hash * 59 + this.Availability.GetHashCode(); + return hash; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Genesys.Workspace/Model/TargetInformation.cs b/src/Genesys.Workspace/Internal/Model/TargetInformation.cs similarity index 98% rename from src/Genesys.Workspace/Model/TargetInformation.cs rename to src/Genesys.Workspace/Internal/Model/TargetInformation.cs index 42c481f..882b474 100644 --- a/src/Genesys.Workspace/Model/TargetInformation.cs +++ b/src/Genesys.Workspace/Internal/Model/TargetInformation.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// TargetInformation diff --git a/src/Genesys.Workspace/Model/TargetsResponse.cs b/src/Genesys.Workspace/Internal/Model/TargetsResponse.cs similarity index 97% rename from src/Genesys.Workspace/Model/TargetsResponse.cs rename to src/Genesys.Workspace/Internal/Model/TargetsResponse.cs index 9a1b498..5cbb8a1 100644 --- a/src/Genesys.Workspace/Model/TargetsResponse.cs +++ b/src/Genesys.Workspace/Internal/Model/TargetsResponse.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// TargetsResponse diff --git a/src/Genesys.Workspace/Model/TargetsResponseData.cs b/src/Genesys.Workspace/Internal/Model/TargetsResponseData.cs similarity index 97% rename from src/Genesys.Workspace/Model/TargetsResponseData.cs rename to src/Genesys.Workspace/Internal/Model/TargetsResponseData.cs index 9fbad09..59c9179 100644 --- a/src/Genesys.Workspace/Model/TargetsResponseData.cs +++ b/src/Genesys.Workspace/Internal/Model/TargetsResponseData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// TargetsResponseData diff --git a/src/Genesys.Workspace/Model/TargetspersonalfavoritessaveData.cs b/src/Genesys.Workspace/Internal/Model/TargetspersonalfavoritessaveData.cs similarity index 97% rename from src/Genesys.Workspace/Model/TargetspersonalfavoritessaveData.cs rename to src/Genesys.Workspace/Internal/Model/TargetspersonalfavoritessaveData.cs index 0bf2789..00cb3ed 100644 --- a/src/Genesys.Workspace/Model/TargetspersonalfavoritessaveData.cs +++ b/src/Genesys.Workspace/Internal/Model/TargetspersonalfavoritessaveData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// TargetspersonalfavoritessaveData diff --git a/src/Genesys.Workspace/Model/TargetsrecentsaddData.cs b/src/Genesys.Workspace/Internal/Model/TargetsrecentsaddData.cs similarity index 97% rename from src/Genesys.Workspace/Model/TargetsrecentsaddData.cs rename to src/Genesys.Workspace/Internal/Model/TargetsrecentsaddData.cs index 887b060..1c6c8ed 100644 --- a/src/Genesys.Workspace/Model/TargetsrecentsaddData.cs +++ b/src/Genesys.Workspace/Internal/Model/TargetsrecentsaddData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// TargetsrecentsaddData diff --git a/src/Genesys.Workspace/Model/UcsassigninteractiontocontactData.cs b/src/Genesys.Workspace/Internal/Model/UcsassigninteractiontocontactData.cs similarity index 97% rename from src/Genesys.Workspace/Model/UcsassigninteractiontocontactData.cs rename to src/Genesys.Workspace/Internal/Model/UcsassigninteractiontocontactData.cs index 3e47ae8..137cfde 100644 --- a/src/Genesys.Workspace/Model/UcsassigninteractiontocontactData.cs +++ b/src/Genesys.Workspace/Internal/Model/UcsassigninteractiontocontactData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UcsassigninteractiontocontactData diff --git a/src/Genesys.Workspace/Model/UcsdeletecontactData.cs b/src/Genesys.Workspace/Internal/Model/UcsdeletecontactData.cs similarity index 97% rename from src/Genesys.Workspace/Model/UcsdeletecontactData.cs rename to src/Genesys.Workspace/Internal/Model/UcsdeletecontactData.cs index 8ef7269..e5d802e 100644 --- a/src/Genesys.Workspace/Model/UcsdeletecontactData.cs +++ b/src/Genesys.Workspace/Internal/Model/UcsdeletecontactData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UcsdeletecontactData diff --git a/src/Genesys.Workspace/Model/UcsfindorcreatephonecallData.cs b/src/Genesys.Workspace/Internal/Model/UcsfindorcreatephonecallData.cs similarity index 98% rename from src/Genesys.Workspace/Model/UcsfindorcreatephonecallData.cs rename to src/Genesys.Workspace/Internal/Model/UcsfindorcreatephonecallData.cs index f869802..acd52ce 100644 --- a/src/Genesys.Workspace/Model/UcsfindorcreatephonecallData.cs +++ b/src/Genesys.Workspace/Internal/Model/UcsfindorcreatephonecallData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UcsfindorcreatephonecallData diff --git a/src/Genesys.Workspace/Model/UcsgetagenthistoryData.cs b/src/Genesys.Workspace/Internal/Model/UcsgetagenthistoryData.cs similarity index 98% rename from src/Genesys.Workspace/Model/UcsgetagenthistoryData.cs rename to src/Genesys.Workspace/Internal/Model/UcsgetagenthistoryData.cs index 6025f8c..a8ea325 100644 --- a/src/Genesys.Workspace/Model/UcsgetagenthistoryData.cs +++ b/src/Genesys.Workspace/Internal/Model/UcsgetagenthistoryData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UcsgetagenthistoryData diff --git a/src/Genesys.Workspace/Model/UcsgetcontactdetailsData.cs b/src/Genesys.Workspace/Internal/Model/UcsgetcontactdetailsData.cs similarity index 97% rename from src/Genesys.Workspace/Model/UcsgetcontactdetailsData.cs rename to src/Genesys.Workspace/Internal/Model/UcsgetcontactdetailsData.cs index 194f055..b02f8b6 100644 --- a/src/Genesys.Workspace/Model/UcsgetcontactdetailsData.cs +++ b/src/Genesys.Workspace/Internal/Model/UcsgetcontactdetailsData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UcsgetcontactdetailsData diff --git a/src/Genesys.Workspace/Model/UcsgetcontacthistoryData.cs b/src/Genesys.Workspace/Internal/Model/UcsgetcontacthistoryData.cs similarity index 98% rename from src/Genesys.Workspace/Model/UcsgetcontacthistoryData.cs rename to src/Genesys.Workspace/Internal/Model/UcsgetcontacthistoryData.cs index a02a880..411e193 100644 --- a/src/Genesys.Workspace/Model/UcsgetcontacthistoryData.cs +++ b/src/Genesys.Workspace/Internal/Model/UcsgetcontacthistoryData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UcsgetcontacthistoryData diff --git a/src/Genesys.Workspace/Model/UcsgetcontactsData.cs b/src/Genesys.Workspace/Internal/Model/UcsgetcontactsData.cs similarity index 98% rename from src/Genesys.Workspace/Model/UcsgetcontactsData.cs rename to src/Genesys.Workspace/Internal/Model/UcsgetcontactsData.cs index 749ae3b..bbc4a52 100644 --- a/src/Genesys.Workspace/Model/UcsgetcontactsData.cs +++ b/src/Genesys.Workspace/Internal/Model/UcsgetcontactsData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UcsgetcontactsData diff --git a/src/Genesys.Workspace/Model/UcsgetinteractioncontentData.cs b/src/Genesys.Workspace/Internal/Model/UcsgetinteractioncontentData.cs similarity index 97% rename from src/Genesys.Workspace/Model/UcsgetinteractioncontentData.cs rename to src/Genesys.Workspace/Internal/Model/UcsgetinteractioncontentData.cs index abf1827..98a8030 100644 --- a/src/Genesys.Workspace/Model/UcsgetinteractioncontentData.cs +++ b/src/Genesys.Workspace/Internal/Model/UcsgetinteractioncontentData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UcsgetinteractioncontentData diff --git a/src/Genesys.Workspace/Model/UcsidentifycontactData.cs b/src/Genesys.Workspace/Internal/Model/UcsidentifycontactData.cs similarity index 98% rename from src/Genesys.Workspace/Model/UcsidentifycontactData.cs rename to src/Genesys.Workspace/Internal/Model/UcsidentifycontactData.cs index cc4064f..c49d5d8 100644 --- a/src/Genesys.Workspace/Model/UcsidentifycontactData.cs +++ b/src/Genesys.Workspace/Internal/Model/UcsidentifycontactData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UcsidentifycontactData diff --git a/src/Genesys.Workspace/Model/UcslucenesearchData.cs b/src/Genesys.Workspace/Internal/Model/UcslucenesearchData.cs similarity index 97% rename from src/Genesys.Workspace/Model/UcslucenesearchData.cs rename to src/Genesys.Workspace/Internal/Model/UcslucenesearchData.cs index 8368cbd..a0d5dd1 100644 --- a/src/Genesys.Workspace/Model/UcslucenesearchData.cs +++ b/src/Genesys.Workspace/Internal/Model/UcslucenesearchData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UcslucenesearchData diff --git a/src/Genesys.Workspace/Model/UcslucenesearchinteractionData.cs b/src/Genesys.Workspace/Internal/Model/UcslucenesearchinteractionData.cs similarity index 98% rename from src/Genesys.Workspace/Model/UcslucenesearchinteractionData.cs rename to src/Genesys.Workspace/Internal/Model/UcslucenesearchinteractionData.cs index 63faf1e..c8c0e3e 100644 --- a/src/Genesys.Workspace/Model/UcslucenesearchinteractionData.cs +++ b/src/Genesys.Workspace/Internal/Model/UcslucenesearchinteractionData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UcslucenesearchinteractionData diff --git a/src/Genesys.Workspace/Model/UcsresponsescategoriesidgetdetailsData.cs b/src/Genesys.Workspace/Internal/Model/UcsresponsescategoriesidgetdetailsData.cs similarity index 97% rename from src/Genesys.Workspace/Model/UcsresponsescategoriesidgetdetailsData.cs rename to src/Genesys.Workspace/Internal/Model/UcsresponsescategoriesidgetdetailsData.cs index 7b99ab5..23684f4 100644 --- a/src/Genesys.Workspace/Model/UcsresponsescategoriesidgetdetailsData.cs +++ b/src/Genesys.Workspace/Internal/Model/UcsresponsescategoriesidgetdetailsData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UcsresponsescategoriesidgetdetailsData diff --git a/src/Genesys.Workspace/Model/UcsresponsesidgetdetailsData.cs b/src/Genesys.Workspace/Internal/Model/UcsresponsesidgetdetailsData.cs similarity index 97% rename from src/Genesys.Workspace/Model/UcsresponsesidgetdetailsData.cs rename to src/Genesys.Workspace/Internal/Model/UcsresponsesidgetdetailsData.cs index 2b7ca41..f295ee0 100644 --- a/src/Genesys.Workspace/Model/UcsresponsesidgetdetailsData.cs +++ b/src/Genesys.Workspace/Internal/Model/UcsresponsesidgetdetailsData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UcsresponsesidgetdetailsData diff --git a/src/Genesys.Workspace/Model/UcssetcallcompletedData.cs b/src/Genesys.Workspace/Internal/Model/UcssetcallcompletedData.cs similarity index 98% rename from src/Genesys.Workspace/Model/UcssetcallcompletedData.cs rename to src/Genesys.Workspace/Internal/Model/UcssetcallcompletedData.cs index d1e8868..0b842c2 100644 --- a/src/Genesys.Workspace/Model/UcssetcallcompletedData.cs +++ b/src/Genesys.Workspace/Internal/Model/UcssetcallcompletedData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UcssetcallcompletedData diff --git a/src/Genesys.Workspace/Model/UcssetcallnoteData.cs b/src/Genesys.Workspace/Internal/Model/UcssetcallnoteData.cs similarity index 97% rename from src/Genesys.Workspace/Model/UcssetcallnoteData.cs rename to src/Genesys.Workspace/Internal/Model/UcssetcallnoteData.cs index 6949810..a9d8eb1 100644 --- a/src/Genesys.Workspace/Model/UcssetcallnoteData.cs +++ b/src/Genesys.Workspace/Internal/Model/UcssetcallnoteData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UcssetcallnoteData diff --git a/src/Genesys.Workspace/Model/UcsupdatecontactData.cs b/src/Genesys.Workspace/Internal/Model/UcsupdatecontactData.cs similarity index 98% rename from src/Genesys.Workspace/Model/UcsupdatecontactData.cs rename to src/Genesys.Workspace/Internal/Model/UcsupdatecontactData.cs index bce8e28..fd80653 100644 --- a/src/Genesys.Workspace/Model/UcsupdatecontactData.cs +++ b/src/Genesys.Workspace/Internal/Model/UcsupdatecontactData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UcsupdatecontactData diff --git a/src/Genesys.Workspace/Model/UnsubscribeData.cs b/src/Genesys.Workspace/Internal/Model/UnsubscribeData.cs similarity index 96% rename from src/Genesys.Workspace/Model/UnsubscribeData.cs rename to src/Genesys.Workspace/Internal/Model/UnsubscribeData.cs index 2c04277..9599ac7 100644 --- a/src/Genesys.Workspace/Model/UnsubscribeData.cs +++ b/src/Genesys.Workspace/Internal/Model/UnsubscribeData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UnsubscribeData diff --git a/src/Genesys.Workspace/Model/UpdateContactData.cs b/src/Genesys.Workspace/Internal/Model/UpdateContactData.cs similarity index 96% rename from src/Genesys.Workspace/Model/UpdateContactData.cs rename to src/Genesys.Workspace/Internal/Model/UpdateContactData.cs index e0131c1..12a2f10 100644 --- a/src/Genesys.Workspace/Model/UpdateContactData.cs +++ b/src/Genesys.Workspace/Internal/Model/UpdateContactData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UpdateContactData diff --git a/src/Genesys.Workspace/Model/UserData.cs b/src/Genesys.Workspace/Internal/Model/UserData.cs similarity index 96% rename from src/Genesys.Workspace/Model/UserData.cs rename to src/Genesys.Workspace/Internal/Model/UserData.cs index b59ea94..e6eac66 100644 --- a/src/Genesys.Workspace/Model/UserData.cs +++ b/src/Genesys.Workspace/Internal/Model/UserData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UserData diff --git a/src/Genesys.Workspace/Model/UserData1.cs b/src/Genesys.Workspace/Internal/Model/UserData1.cs similarity index 96% rename from src/Genesys.Workspace/Model/UserData1.cs rename to src/Genesys.Workspace/Internal/Model/UserData1.cs index 5bff481..80a22c0 100644 --- a/src/Genesys.Workspace/Model/UserData1.cs +++ b/src/Genesys.Workspace/Internal/Model/UserData1.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UserData1 diff --git a/src/Genesys.Workspace/Model/UserData2.cs b/src/Genesys.Workspace/Internal/Model/UserData2.cs similarity index 96% rename from src/Genesys.Workspace/Model/UserData2.cs rename to src/Genesys.Workspace/Internal/Model/UserData2.cs index 21fc195..9ee4934 100644 --- a/src/Genesys.Workspace/Model/UserData2.cs +++ b/src/Genesys.Workspace/Internal/Model/UserData2.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// UserData2 diff --git a/src/Genesys.Workspace/Model/VoicecallsidalternateData.cs b/src/Genesys.Workspace/Internal/Model/VoicecallsidalternateData.cs similarity index 98% rename from src/Genesys.Workspace/Model/VoicecallsidalternateData.cs rename to src/Genesys.Workspace/Internal/Model/VoicecallsidalternateData.cs index 1cb347c..a6af0e8 100644 --- a/src/Genesys.Workspace/Model/VoicecallsidalternateData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicecallsidalternateData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicecallsidalternateData diff --git a/src/Genesys.Workspace/Model/VoicecallsidcompleteData.cs b/src/Genesys.Workspace/Internal/Model/VoicecallsidcompleteData.cs similarity index 97% rename from src/Genesys.Workspace/Model/VoicecallsidcompleteData.cs rename to src/Genesys.Workspace/Internal/Model/VoicecallsidcompleteData.cs index 4ab6196..9fd94f8 100644 --- a/src/Genesys.Workspace/Model/VoicecallsidcompleteData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicecallsidcompleteData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicecallsidcompleteData diff --git a/src/Genesys.Workspace/Model/VoicecallsidcompletetransferData.cs b/src/Genesys.Workspace/Internal/Model/VoicecallsidcompletetransferData.cs similarity index 97% rename from src/Genesys.Workspace/Model/VoicecallsidcompletetransferData.cs rename to src/Genesys.Workspace/Internal/Model/VoicecallsidcompletetransferData.cs index 3f4361d..0591759 100644 --- a/src/Genesys.Workspace/Model/VoicecallsidcompletetransferData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicecallsidcompletetransferData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicecallsidcompletetransferData diff --git a/src/Genesys.Workspace/Model/VoicecallsiddeletefromconferenceData.cs b/src/Genesys.Workspace/Internal/Model/VoicecallsiddeletefromconferenceData.cs similarity index 98% rename from src/Genesys.Workspace/Model/VoicecallsiddeletefromconferenceData.cs rename to src/Genesys.Workspace/Internal/Model/VoicecallsiddeletefromconferenceData.cs index 187bbd2..9e7f2e9 100644 --- a/src/Genesys.Workspace/Model/VoicecallsiddeletefromconferenceData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicecallsiddeletefromconferenceData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicecallsiddeletefromconferenceData diff --git a/src/Genesys.Workspace/Model/VoicecallsiddeleteuserdatapairData.cs b/src/Genesys.Workspace/Internal/Model/VoicecallsiddeleteuserdatapairData.cs similarity index 97% rename from src/Genesys.Workspace/Model/VoicecallsiddeleteuserdatapairData.cs rename to src/Genesys.Workspace/Internal/Model/VoicecallsiddeleteuserdatapairData.cs index 464bc4f..441b4a5 100644 --- a/src/Genesys.Workspace/Model/VoicecallsiddeleteuserdatapairData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicecallsiddeleteuserdatapairData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicecallsiddeleteuserdatapairData diff --git a/src/Genesys.Workspace/Model/VoicecallsidinitiateconferenceData.cs b/src/Genesys.Workspace/Internal/Model/VoicecallsidinitiateconferenceData.cs similarity index 98% rename from src/Genesys.Workspace/Model/VoicecallsidinitiateconferenceData.cs rename to src/Genesys.Workspace/Internal/Model/VoicecallsidinitiateconferenceData.cs index e25bad7..d4d6421 100644 --- a/src/Genesys.Workspace/Model/VoicecallsidinitiateconferenceData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicecallsidinitiateconferenceData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicecallsidinitiateconferenceData diff --git a/src/Genesys.Workspace/Model/VoicecallsidinitiatetransferData.cs b/src/Genesys.Workspace/Internal/Model/VoicecallsidinitiatetransferData.cs similarity index 98% rename from src/Genesys.Workspace/Model/VoicecallsidinitiatetransferData.cs rename to src/Genesys.Workspace/Internal/Model/VoicecallsidinitiatetransferData.cs index c582242..3a08c88 100644 --- a/src/Genesys.Workspace/Model/VoicecallsidinitiatetransferData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicecallsidinitiatetransferData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicecallsidinitiatetransferData diff --git a/src/Genesys.Workspace/Model/VoicecallsidmergeData.cs b/src/Genesys.Workspace/Internal/Model/VoicecallsidmergeData.cs similarity index 97% rename from src/Genesys.Workspace/Model/VoicecallsidmergeData.cs rename to src/Genesys.Workspace/Internal/Model/VoicecallsidmergeData.cs index 7f491c2..2693c9e 100644 --- a/src/Genesys.Workspace/Model/VoicecallsidmergeData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicecallsidmergeData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicecallsidmergeData diff --git a/src/Genesys.Workspace/Model/VoicecallsidreconnectData.cs b/src/Genesys.Workspace/Internal/Model/VoicecallsidreconnectData.cs similarity index 98% rename from src/Genesys.Workspace/Model/VoicecallsidreconnectData.cs rename to src/Genesys.Workspace/Internal/Model/VoicecallsidreconnectData.cs index aefa0d7..01780f8 100644 --- a/src/Genesys.Workspace/Model/VoicecallsidreconnectData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicecallsidreconnectData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicecallsidreconnectData diff --git a/src/Genesys.Workspace/Model/VoicecallsidredirectData.cs b/src/Genesys.Workspace/Internal/Model/VoicecallsidredirectData.cs similarity index 98% rename from src/Genesys.Workspace/Model/VoicecallsidredirectData.cs rename to src/Genesys.Workspace/Internal/Model/VoicecallsidredirectData.cs index ff523bd..3abd9bb 100644 --- a/src/Genesys.Workspace/Model/VoicecallsidredirectData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicecallsidredirectData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicecallsidredirectData diff --git a/src/Genesys.Workspace/Model/VoicecallsidsenddtmfData.cs b/src/Genesys.Workspace/Internal/Model/VoicecallsidsenddtmfData.cs similarity index 97% rename from src/Genesys.Workspace/Model/VoicecallsidsenddtmfData.cs rename to src/Genesys.Workspace/Internal/Model/VoicecallsidsenddtmfData.cs index 273d31e..9ff1681 100644 --- a/src/Genesys.Workspace/Model/VoicecallsidsenddtmfData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicecallsidsenddtmfData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicecallsidsenddtmfData diff --git a/src/Genesys.Workspace/Model/VoicecallsidsinglestepconferenceData.cs b/src/Genesys.Workspace/Internal/Model/VoicecallsidsinglestepconferenceData.cs similarity index 98% rename from src/Genesys.Workspace/Model/VoicecallsidsinglestepconferenceData.cs rename to src/Genesys.Workspace/Internal/Model/VoicecallsidsinglestepconferenceData.cs index 9a5c907..e8bf887 100644 --- a/src/Genesys.Workspace/Model/VoicecallsidsinglestepconferenceData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicecallsidsinglestepconferenceData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicecallsidsinglestepconferenceData diff --git a/src/Genesys.Workspace/Model/VoicecallsidsinglesteptransferData.cs b/src/Genesys.Workspace/Internal/Model/VoicecallsidsinglesteptransferData.cs similarity index 98% rename from src/Genesys.Workspace/Model/VoicecallsidsinglesteptransferData.cs rename to src/Genesys.Workspace/Internal/Model/VoicecallsidsinglesteptransferData.cs index 8965c6d..c767ae7 100644 --- a/src/Genesys.Workspace/Model/VoicecallsidsinglesteptransferData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicecallsidsinglesteptransferData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicecallsidsinglesteptransferData diff --git a/src/Genesys.Workspace/Model/VoicemakecallData.cs b/src/Genesys.Workspace/Internal/Model/VoicemakecallData.cs similarity index 98% rename from src/Genesys.Workspace/Model/VoicemakecallData.cs rename to src/Genesys.Workspace/Internal/Model/VoicemakecallData.cs index e7fc954..38e73ab 100644 --- a/src/Genesys.Workspace/Model/VoicemakecallData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicemakecallData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicemakecallData diff --git a/src/Genesys.Workspace/Model/VoicenotreadyData.cs b/src/Genesys.Workspace/Internal/Model/VoicenotreadyData.cs similarity index 98% rename from src/Genesys.Workspace/Model/VoicenotreadyData.cs rename to src/Genesys.Workspace/Internal/Model/VoicenotreadyData.cs index 4afd374..08eb6ef 100644 --- a/src/Genesys.Workspace/Model/VoicenotreadyData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicenotreadyData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicenotreadyData diff --git a/src/Genesys.Workspace/Model/VoicereadyData.cs b/src/Genesys.Workspace/Internal/Model/VoicereadyData.cs similarity index 97% rename from src/Genesys.Workspace/Model/VoicereadyData.cs rename to src/Genesys.Workspace/Internal/Model/VoicereadyData.cs index 6f54196..9ca2657 100644 --- a/src/Genesys.Workspace/Model/VoicereadyData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicereadyData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicereadyData diff --git a/src/Genesys.Workspace/Model/VoicesetforwardData.cs b/src/Genesys.Workspace/Internal/Model/VoicesetforwardData.cs similarity index 97% rename from src/Genesys.Workspace/Model/VoicesetforwardData.cs rename to src/Genesys.Workspace/Internal/Model/VoicesetforwardData.cs index 71f9015..bc3fbbc 100644 --- a/src/Genesys.Workspace/Model/VoicesetforwardData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicesetforwardData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicesetforwardData diff --git a/src/Genesys.Workspace/Model/VoicestartmonitoringData.cs b/src/Genesys.Workspace/Internal/Model/VoicestartmonitoringData.cs similarity index 98% rename from src/Genesys.Workspace/Model/VoicestartmonitoringData.cs rename to src/Genesys.Workspace/Internal/Model/VoicestartmonitoringData.cs index e88871b..3a38ab7 100644 --- a/src/Genesys.Workspace/Model/VoicestartmonitoringData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicestartmonitoringData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicestartmonitoringData diff --git a/src/Genesys.Workspace/Model/VoicestopmonitoringData.cs b/src/Genesys.Workspace/Internal/Model/VoicestopmonitoringData.cs similarity index 97% rename from src/Genesys.Workspace/Model/VoicestopmonitoringData.cs rename to src/Genesys.Workspace/Internal/Model/VoicestopmonitoringData.cs index 26a0cdd..ac9ceb4 100644 --- a/src/Genesys.Workspace/Model/VoicestopmonitoringData.cs +++ b/src/Genesys.Workspace/Internal/Model/VoicestopmonitoringData.cs @@ -1,4 +1,4 @@ -/* +/* * Workspace API * * Agent API @@ -20,9 +20,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using SwaggerDateConverter = Genesys.Workspace.Internal.Client.SwaggerDateConverter; -namespace Genesys.Workspace.Model +namespace Genesys.Workspace.Internal.Model { /// /// VoicestopmonitoringData diff --git a/src/Genesys.Workspace/Model/ActionCode.cs b/src/Genesys.Workspace/Model/ActionCode.cs new file mode 100644 index 0000000..7f41208 --- /dev/null +++ b/src/Genesys.Workspace/Model/ActionCode.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using Genesys.Workspace.Common; +using Genesys.Workspace.Model; + +namespace Genesys.Workspace.Model +{ + public class ActionCode + { + public string name { get; set; } + public string code { get; set; } + public ActionCodeType type { get; set; } + public List subCodes { get; set; } + public KeyValueCollection userProperties { get; set; } + + public ActionCode() { } + + public override string ToString() + { + return string.Format("[ActionCode: name={0}, code={1}, type={2}, subCodes={3}, userProperties={4}]", name, code, type, subCodes, userProperties); + } + } +} diff --git a/src/Genesys.Workspace/Model/AgentGroup.cs b/src/Genesys.Workspace/Model/AgentGroup.cs new file mode 100644 index 0000000..c61b0a5 --- /dev/null +++ b/src/Genesys.Workspace/Model/AgentGroup.cs @@ -0,0 +1,17 @@ +using System; +using Genesys.Workspace.Model; + +namespace Genesys.Workspace.Model +{ + public class AgentGroup + { + public int dbid { get; set; } + public string name { get; set; } + public KeyValueCollection userProperties { get; set; } + + public override string ToString() + { + return string.Format("[AgentGroup: name={0}, dbid={1}, userProperties={2}]", name, dbid, userProperties); + } + } +} diff --git a/src/Genesys.Workspace/Model/BusinessAttribute.cs b/src/Genesys.Workspace/Model/BusinessAttribute.cs new file mode 100644 index 0000000..d2238a1 --- /dev/null +++ b/src/Genesys.Workspace/Model/BusinessAttribute.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; + +namespace Genesys.Workspace.Model +{ + public class BusinessAttribute + { + public int dbid { get; set; } + public string name { get; set; } + public string displayName { get; set; } + public string description { get; set; } + public List values { get; set; } + + public override string ToString() + { + return string.Format("[BusinessAttribute: dbid={0}, name={1}, displayName={2}, description={3}, values={4}]", dbid, name, displayName, description, ValuesAsString(values)); + } + + public string ValuesAsString(List values) + { + string response = "[\n"; + + foreach(var value in values) + { + response += value.ToString() + "\n"; + } + + response += "]"; + + return response; + } + } +} diff --git a/src/Genesys.Workspace/Model/BusinessAttributeValue.cs b/src/Genesys.Workspace/Model/BusinessAttributeValue.cs new file mode 100644 index 0000000..1364fb0 --- /dev/null +++ b/src/Genesys.Workspace/Model/BusinessAttributeValue.cs @@ -0,0 +1,17 @@ +using System; +namespace Genesys.Workspace.Model +{ + public class BusinessAttributeValue + { + public long dbid { get; set; } + public String name { get; set; } + public String displayName { get; set; } + public String description { get; set; } + public Object defaultValue { get; set; } + + public override string ToString() + { + return string.Format("[BusinessAttributeValue: dbid={0}, name={1}, displayName={2}, description={3}, defaultValue={4}]", dbid, name, displayName, description, defaultValue); + } + } +} diff --git a/src/Genesys.Workspace/Model/Call.cs b/src/Genesys.Workspace/Model/Call.cs index a597f73..9d510dd 100644 --- a/src/Genesys.Workspace/Model/Call.cs +++ b/src/Genesys.Workspace/Model/Call.cs @@ -1,370 +1,55 @@ -/* - * Workspace API - * - * Agent API - * - * OpenAPI spec version: 1.0.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; +using System; using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using Genesys.Workspace.Common; +using Genesys.Workspace.Model; namespace Genesys.Workspace.Model { - /// - /// Call - /// - [DataContract] - public partial class Call : IEquatable, IValidatableObject + public class Call { - /// - /// Initializes a new instance of the class. - /// - /// Type. - /// Id. - /// PreviousConnId. - /// ParentConnId. - /// PhoneNumber. - /// ConnId. - /// CallUuid. - /// CallType. - /// State. - /// Capabilities. - /// Participants. - /// Dnis. - /// Ani. - /// RecordingState. - /// A key/value pairs list of a data structure that provides additional information associated with this action.. - /// A key/value pairs list of a data structure that provides additional information associated with this action.. - public Call(string Type = default(string), string Id = default(string), string PreviousConnId = default(string), string ParentConnId = default(string), string PhoneNumber = default(string), string ConnId = default(string), string CallUuid = default(string), string CallType = default(string), string State = default(string), List Capabilities = default(List), List Participants = default(List), string Dnis = default(string), string Ani = default(string), string RecordingState = default(string), List UserData = default(List), List Extensions = default(List)) - { - this.Type = Type; - this.Id = Id; - this.PreviousConnId = PreviousConnId; - this.ParentConnId = ParentConnId; - this.PhoneNumber = PhoneNumber; - this.ConnId = ConnId; - this.CallUuid = CallUuid; - this.CallType = CallType; - this.State = State; - this.Capabilities = Capabilities; - this.Participants = Participants; - this.Dnis = Dnis; - this.Ani = Ani; - this.RecordingState = RecordingState; - this.UserData = UserData; - this.Extensions = Extensions; - } - - /// - /// Gets or Sets Type - /// - [DataMember(Name="type", EmitDefaultValue=false)] - public string Type { get; set; } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public string Id { get; set; } - - /// - /// Gets or Sets PreviousConnId - /// - [DataMember(Name="previousConnId", EmitDefaultValue=false)] - public string PreviousConnId { get; set; } - - /// - /// Gets or Sets ParentConnId - /// - [DataMember(Name="parentConnId", EmitDefaultValue=false)] - public string ParentConnId { get; set; } - - /// - /// Gets or Sets PhoneNumber - /// - [DataMember(Name="phoneNumber", EmitDefaultValue=false)] - public string PhoneNumber { get; set; } - - /// - /// Gets or Sets ConnId - /// - [DataMember(Name="connId", EmitDefaultValue=false)] - public string ConnId { get; set; } - - /// - /// Gets or Sets CallUuid - /// - [DataMember(Name="callUuid", EmitDefaultValue=false)] - public string CallUuid { get; set; } - - /// - /// Gets or Sets CallType - /// - [DataMember(Name="callType", EmitDefaultValue=false)] - public string CallType { get; set; } - - /// - /// Gets or Sets State - /// - [DataMember(Name="state", EmitDefaultValue=false)] - public string State { get; set; } - - /// - /// Gets or Sets Capabilities - /// - [DataMember(Name="capabilities", EmitDefaultValue=false)] - public List Capabilities { get; set; } - - /// - /// Gets or Sets Participants - /// - [DataMember(Name="participants", EmitDefaultValue=false)] - public List Participants { get; set; } - - /// - /// Gets or Sets Dnis - /// - [DataMember(Name="dnis", EmitDefaultValue=false)] - public string Dnis { get; set; } + public string id { get; set; } + public string callUuid { get; set; } + public CallState state { get; set; } + public string parentConnId { get; set; } + public string previousConnId { get; set; } + public string callType { get; set; } + public string ani { get; set; } + public string dnis { get; set; } + public string recordingState { get; set; } + public string[] participants { get; set; } + public KeyValueCollection userData { get; set; } + public CallCapability[] capabilities { get; set; } - /// - /// Gets or Sets Ani - /// - [DataMember(Name="ani", EmitDefaultValue=false)] - public string Ani { get; set; } - - /// - /// Gets or Sets RecordingState - /// - [DataMember(Name="recordingState", EmitDefaultValue=false)] - public string RecordingState { get; set; } - - /// - /// A key/value pairs list of a data structure that provides additional information associated with this action. - /// - /// A key/value pairs list of a data structure that provides additional information associated with this action. - [DataMember(Name="userData", EmitDefaultValue=false)] - public List UserData { get; set; } - - /// - /// A key/value pairs list of a data structure that provides additional information associated with this action. - /// - /// A key/value pairs list of a data structure that provides additional information associated with this action. - [DataMember(Name="extensions", EmitDefaultValue=false)] - public List Extensions { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class Call {\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PreviousConnId: ").Append(PreviousConnId).Append("\n"); - sb.Append(" ParentConnId: ").Append(ParentConnId).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" ConnId: ").Append(ConnId).Append("\n"); - sb.Append(" CallUuid: ").Append(CallUuid).Append("\n"); - sb.Append(" CallType: ").Append(CallType).Append("\n"); - sb.Append(" State: ").Append(State).Append("\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" Participants: ").Append(Participants).Append("\n"); - sb.Append(" Dnis: ").Append(Dnis).Append("\n"); - sb.Append(" Ani: ").Append(Ani).Append("\n"); - sb.Append(" RecordingState: ").Append(RecordingState).Append("\n"); - sb.Append(" UserData: ").Append(UserData).Append("\n"); - sb.Append(" Extensions: ").Append(Extensions).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return string.Format("[Call: id={0}, callUuid={1}, state={2}, parentConnId={3}, previousConnId={4}, callType={5}, ani={6}, dnis={7}, recordingState={8}, participants={9}, userData={10}, capabilities={11}]", id, callUuid, state, parentConnId, previousConnId, callType, ani, dnis, recordingState, this.ParticipantsAsString(participants), userData, this.CapabilitiesAsString(capabilities)); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) + public string ParticipantsAsString(string[] participants) { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as Call); - } + String temp = ""; - /// - /// Returns true if Call instances are equal - /// - /// Instance of Call to be compared - /// Boolean - public bool Equals(Call other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; + if (participants != null) + { + temp = String.Join(",", participants); + } - return - ( - this.Type == other.Type || - this.Type != null && - this.Type.Equals(other.Type) - ) && - ( - this.Id == other.Id || - this.Id != null && - this.Id.Equals(other.Id) - ) && - ( - this.PreviousConnId == other.PreviousConnId || - this.PreviousConnId != null && - this.PreviousConnId.Equals(other.PreviousConnId) - ) && - ( - this.ParentConnId == other.ParentConnId || - this.ParentConnId != null && - this.ParentConnId.Equals(other.ParentConnId) - ) && - ( - this.PhoneNumber == other.PhoneNumber || - this.PhoneNumber != null && - this.PhoneNumber.Equals(other.PhoneNumber) - ) && - ( - this.ConnId == other.ConnId || - this.ConnId != null && - this.ConnId.Equals(other.ConnId) - ) && - ( - this.CallUuid == other.CallUuid || - this.CallUuid != null && - this.CallUuid.Equals(other.CallUuid) - ) && - ( - this.CallType == other.CallType || - this.CallType != null && - this.CallType.Equals(other.CallType) - ) && - ( - this.State == other.State || - this.State != null && - this.State.Equals(other.State) - ) && - ( - this.Capabilities == other.Capabilities || - this.Capabilities != null && - this.Capabilities.SequenceEqual(other.Capabilities) - ) && - ( - this.Participants == other.Participants || - this.Participants != null && - this.Participants.SequenceEqual(other.Participants) - ) && - ( - this.Dnis == other.Dnis || - this.Dnis != null && - this.Dnis.Equals(other.Dnis) - ) && - ( - this.Ani == other.Ani || - this.Ani != null && - this.Ani.Equals(other.Ani) - ) && - ( - this.RecordingState == other.RecordingState || - this.RecordingState != null && - this.RecordingState.Equals(other.RecordingState) - ) && - ( - this.UserData == other.UserData || - this.UserData != null && - this.UserData.SequenceEqual(other.UserData) - ) && - ( - this.Extensions == other.Extensions || - this.Extensions != null && - this.Extensions.SequenceEqual(other.Extensions) - ); + return "[" + temp + "]"; } - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() + public string CapabilitiesAsString(CallCapability[] caps) { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap + List capabilities = new List(); + + if (caps != null) { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.Type != null) - hash = hash * 59 + this.Type.GetHashCode(); - if (this.Id != null) - hash = hash * 59 + this.Id.GetHashCode(); - if (this.PreviousConnId != null) - hash = hash * 59 + this.PreviousConnId.GetHashCode(); - if (this.ParentConnId != null) - hash = hash * 59 + this.ParentConnId.GetHashCode(); - if (this.PhoneNumber != null) - hash = hash * 59 + this.PhoneNumber.GetHashCode(); - if (this.ConnId != null) - hash = hash * 59 + this.ConnId.GetHashCode(); - if (this.CallUuid != null) - hash = hash * 59 + this.CallUuid.GetHashCode(); - if (this.CallType != null) - hash = hash * 59 + this.CallType.GetHashCode(); - if (this.State != null) - hash = hash * 59 + this.State.GetHashCode(); - if (this.Capabilities != null) - hash = hash * 59 + this.Capabilities.GetHashCode(); - if (this.Participants != null) - hash = hash * 59 + this.Participants.GetHashCode(); - if (this.Dnis != null) - hash = hash * 59 + this.Dnis.GetHashCode(); - if (this.Ani != null) - hash = hash * 59 + this.Ani.GetHashCode(); - if (this.RecordingState != null) - hash = hash * 59 + this.RecordingState.GetHashCode(); - if (this.UserData != null) - hash = hash * 59 + this.UserData.GetHashCode(); - if (this.Extensions != null) - hash = hash * 59 + this.Extensions.GetHashCode(); - return hash; + foreach (CallCapability c in caps) + { + capabilities.Add(c.ToString()); + } } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; + return "[" + String.Join(",", capabilities) + "]"; } } - } diff --git a/src/Genesys.Workspace/Model/Dn.cs b/src/Genesys.Workspace/Model/Dn.cs index f50a913..e1be887 100644 --- a/src/Genesys.Workspace/Model/Dn.cs +++ b/src/Genesys.Workspace/Model/Dn.cs @@ -1,175 +1,40 @@ -/* - * Workspace API - * - * Agent API - * - * OpenAPI spec version: 1.0.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; +using System; using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using Genesys.Workspace.Common; namespace Genesys.Workspace.Model { - /// - /// Dn - /// - [DataContract] - public partial class Dn : IEquatable, IValidatableObject + public class Dn { - /// - /// Initializes a new instance of the class. - /// - /// Number. - /// AgentId. - /// AgentState. - /// AgentWorkMode. - public Dn(string Number = default(string), string AgentId = default(string), string AgentState = default(string), string AgentWorkMode = default(string)) - { - this.Number = Number; - this.AgentId = AgentId; - this.AgentState = AgentState; - this.AgentWorkMode = AgentWorkMode; - } - - /// - /// Gets or Sets Number - /// - [DataMember(Name="number", EmitDefaultValue=false)] - public string Number { get; set; } - - /// - /// Gets or Sets AgentId - /// - [DataMember(Name="agentId", EmitDefaultValue=false)] - public string AgentId { get; set; } + public string number { get; set; } + public string switchName { get; set; } + public string agentId { get; set; } + public string telephonyNetwork { get; set; } + public AgentState agentState { get; set; } + public AgentWorkMode workMode { get; set; } + public KeyValueCollection reasons { get; set; } + public string forwardTo { get; set; } + public bool dnd { get; set; } + public DnCapability[] capabilities { get; set; } - /// - /// Gets or Sets AgentState - /// - [DataMember(Name="agentState", EmitDefaultValue=false)] - public string AgentState { get; set; } - - /// - /// Gets or Sets AgentWorkMode - /// - [DataMember(Name="agentWorkMode", EmitDefaultValue=false)] - public string AgentWorkMode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class Dn {\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" AgentId: ").Append(AgentId).Append("\n"); - sb.Append(" AgentState: ").Append(AgentState).Append("\n"); - sb.Append(" AgentWorkMode: ").Append(AgentWorkMode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); + return string.Format("[Dn: number={0}, switchName={1}, agentId={2}, telephonyNetwork={3}, agentState={4}, workMode={5}, reasons={6}, forwardTo={7}, dnd={8}, capabilities={9}]", number, switchName, agentId, telephonyNetwork, agentState, workMode, reasons, forwardTo, dnd, CapabilitiesAsString(capabilities)); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) + public string CapabilitiesAsString(DnCapability[] caps) { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as Dn); - } - - /// - /// Returns true if Dn instances are equal - /// - /// Instance of Dn to be compared - /// Boolean - public bool Equals(Dn other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.Number == other.Number || - this.Number != null && - this.Number.Equals(other.Number) - ) && - ( - this.AgentId == other.AgentId || - this.AgentId != null && - this.AgentId.Equals(other.AgentId) - ) && - ( - this.AgentState == other.AgentState || - this.AgentState != null && - this.AgentState.Equals(other.AgentState) - ) && - ( - this.AgentWorkMode == other.AgentWorkMode || - this.AgentWorkMode != null && - this.AgentWorkMode.Equals(other.AgentWorkMode) - ); - } + List capabilities = new List(); - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap + if (caps != null) { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.Number != null) - hash = hash * 59 + this.Number.GetHashCode(); - if (this.AgentId != null) - hash = hash * 59 + this.AgentId.GetHashCode(); - if (this.AgentState != null) - hash = hash * 59 + this.AgentState.GetHashCode(); - if (this.AgentWorkMode != null) - hash = hash * 59 + this.AgentWorkMode.GetHashCode(); - return hash; + foreach (DnCapability c in caps) + { + capabilities.Add(c.ToString()); + } } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; + return "[" + String.Join(",", capabilities) + "]"; } } diff --git a/src/Genesys.Workspace/Model/KeyValueCollection.cs b/src/Genesys.Workspace/Model/KeyValueCollection.cs new file mode 100644 index 0000000..9561be5 --- /dev/null +++ b/src/Genesys.Workspace/Model/KeyValueCollection.cs @@ -0,0 +1,133 @@ +using System; +using System.Collections.Generic; +using Genesys.Workspace.Internal.Model; + +namespace Genesys.Workspace.Model +{ + public class KeyValueCollection + { + private Dictionary data; + private Dictionary typeMap = new Dictionary() + { + {ValueType.STRING, "str"}, + {ValueType.INT, "int"}, + {ValueType.LIST, "kvlist"} + }; + + public KeyValueCollection() + { + this.data = new Dictionary(); + } + + public void addString(String key, String value) + { + this.data.Add(key, new KeyValuePair(key, value)); + } + + public void addInt(String key, int value) + { + this.data.Add(key, new KeyValuePair(key, value)); + } + + public void addList(String key, KeyValueCollection value) + { + this.data.Add(key, new KeyValuePair(key, value)); + } + + public String getString(String key) + { + KeyValuePair pair = this.data[key]; + if (pair == null || pair.getValueType() != ValueType.STRING || pair.getValue() == null) + { + return null; + } + + return (String)pair.getValue(); + } + + public void getKeyValuePairs() + { + this.data.Values.GetEnumerator(); + } + + public IEnumerator iterator() + { + return this.data.Values.GetEnumerator(); + } + + public int? getInt(String key) + { + KeyValuePair pair = this.data[key]; + if (pair == null || pair.getValueType() != ValueType.INT || pair.getValue() == null) + { + return null; + } + + return (int)pair.getValue(); + } + + public KeyValueCollection getList(String key) + { + KeyValuePair pair = this.data[key]; + if (pair == null || pair.getValueType() != ValueType.LIST || pair.getValue() == null) + { + return null; + } + + return (KeyValueCollection)pair.getValue(); + } + + public List ToListKvpair() + { + List list = new List(); + + foreach (KeyValuePair pair in this.data.Values) + { + //string valueType = "str"; + //switch(pair.getValueType()) + //{ + // case ValueType.STRING: + // valueType = "str"; + // break; + + // case ValueType.INT: + // valueType = "int"; + // break; + + // case ValueType.LIST: + // valueType = "kvlist"; + // break; + //} + + list.Add(new Kvpair(pair.getKey(), typeMap[pair.getValueType()], pair.getValue())); + } + + return list; + } + + override public String ToString() + { + String str = "[\n"; + foreach (KeyValuePair pair in this.data.Values) + { + switch (pair.getValueType()) + { + case ValueType.STRING: + str += "[STRING: " + pair.getKey() + "=" + pair.getStringValue() + "]\n"; + break; + + case ValueType.INT: + str += "[INT: " + pair.getKey() + "=" + pair.getIntValue() + "]\n"; + break; + + case ValueType.LIST: + str += "[LIST: " + pair.getKey() + "=" + pair.getListValue() + "]\n"; + break; + } + } + + str += "]"; + return str; + } + } +} diff --git a/src/Genesys.Workspace/Model/KeyValuePair.cs b/src/Genesys.Workspace/Model/KeyValuePair.cs new file mode 100644 index 0000000..c7fc1fc --- /dev/null +++ b/src/Genesys.Workspace/Model/KeyValuePair.cs @@ -0,0 +1,73 @@ +using System; + +namespace Genesys.Workspace.Model +{ + public enum ValueType + { + STRING, + INT, + LIST + } + + public class KeyValuePair + { + private String key; + private Object value; + private ValueType type; + + public KeyValuePair(String key, String value) + { + this.key = key; + this.value = value; + this.type = ValueType.STRING; + } + + public KeyValuePair(String key, KeyValueCollection value) + { + this.key = key; + this.value = value; + this.type = ValueType.LIST; + } + + public KeyValuePair(String key, int value) + { + this.key = key; + this.value = value; + this.type = ValueType.INT; + } + + public String getKey() + { + return this.key; + } + + public ValueType getValueType() + { + return this.type; + } + + + public String getStringValue() + { + return (this.type == ValueType.STRING) ? (String)this.value : null; + } + + public int? getIntValue() + { + if (this.type == ValueType.INT) + return (int)this.value; + + return null; + } + + public KeyValueCollection getListValue() + { + return (this.type == ValueType.LIST) ? (KeyValueCollection)this.value : null; + } + + public Object getValue() + { + return this.value; + } + } +} diff --git a/src/Genesys.Workspace/Model/SubCode.cs b/src/Genesys.Workspace/Model/SubCode.cs new file mode 100644 index 0000000..ea51d9b --- /dev/null +++ b/src/Genesys.Workspace/Model/SubCode.cs @@ -0,0 +1,14 @@ +using System; +namespace Genesys.Workspace.Model +{ + public class SubCode + { + public string name { get; set; } + public string code { get; set; } + + public override string ToString() + { + return string.Format("[SubCode: name={0}, code={1}]", name, code); + } + } +} diff --git a/src/Genesys.Workspace/Model/Target.cs b/src/Genesys.Workspace/Model/Target.cs index 8cb9cea..0f66bb3 100644 --- a/src/Genesys.Workspace/Model/Target.cs +++ b/src/Genesys.Workspace/Model/Target.cs @@ -1,332 +1,168 @@ -/* - * Workspace API - * - * Agent API - * - * OpenAPI spec version: 1.0.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Genesys.Workspace.Client.SwaggerDateConverter; +using System; +using Genesys.Workspace.Common; namespace Genesys.Workspace.Model { - /// - /// Target - /// - [DataContract] - public partial class Target : IEquatable, IValidatableObject + public class Target { - /// - /// The type of the target - agent, agent-group, acd-queue, route-point, skill, custom-contact or contact. - /// - /// The type of the target - agent, agent-group, acd-queue, route-point, skill, custom-contact or contact. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - - /// - /// Enum Agent for "agent" - /// - [EnumMember(Value = "agent")] - Agent, - - /// - /// Enum Agentgroup for "agent-group" - /// - [EnumMember(Value = "agent-group")] - Agentgroup, - - /// - /// Enum Acdqueue for "acd-queue" - /// - [EnumMember(Value = "acd-queue")] - Acdqueue, - - /// - /// Enum Routepoint for "route-point" - /// - [EnumMember(Value = "route-point")] - Routepoint, - - /// - /// Enum Skill for "skill" - /// - [EnumMember(Value = "skill")] - Skill, - - /// - /// Enum Customcontact for "custom-contact" - /// - [EnumMember(Value = "custom-contact")] - Customcontact, - - /// - /// Enum Contact for "contact" - /// - [EnumMember(Value = "contact")] - Contact - } + public string Name { get; protected set; } + public string Number { get; protected set; } + public TargetType Type { get; protected set; } + public object availability { get; protected set; } - /// - /// The type of the target - agent, agent-group, acd-queue, route-point, skill, custom-contact or contact. - /// - /// The type of the target - agent, agent-group, acd-queue, route-point, skill, custom-contact or contact. - [DataMember(Name="type", EmitDefaultValue=false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// DBID of the object. - /// For agents firstname and lastname (or username if neither is defined), for other types the name field is used.. - /// The type of the target - agent, agent-group, acd-queue, route-point, skill, custom-contact or contact.. - /// First name - only applicable to agents.. - /// Last name - only applicable to agents.. - /// Employee id - only applicable to agents.. - /// Username - only applicable to agents.. - /// Only applicable to acd-queue and route-point. - /// Only applicable to acd-queue and route-point. - /// The structure depends on the target type. For agents, availability includes channel details. For acd-queues and route-points, waiting calls. For agent-groups, the number of ready agents.. - public Target(int? DBID = default(int?), string Name = default(string), TypeEnum? Type = default(TypeEnum?), string FirstName = default(string), string LastName = default(string), string EmployeeId = default(string), string UserName = default(string), string Number = default(string), string SwitchName = default(string), Object Availability = default(Object)) + public Target(Internal.Model.Target target) { - this.DBID = DBID; - this.Name = Name; - this.Type = Type; - this.FirstName = FirstName; - this.LastName = LastName; - this.EmployeeId = EmployeeId; - this.UserName = UserName; - this.Number = Number; - this.SwitchName = SwitchName; - this.Availability = Availability; + this.Name = target.Name; + this.Number = target.Number; + switch (target.Type) + { + case Internal.Model.Target.TypeEnum.Agent: + this.Type = TargetType.AGENT; + this.extractAgentAvailability(target); + break; + + case Internal.Model.Target.TypeEnum.Acdqueue: + this.Type = TargetType.ACD_QUEUE; + this.extractDNAvailability(target); + break; + + case Internal.Model.Target.TypeEnum.Agentgroup: + this.Type = TargetType.AGENT_GROUP; + this.extractAgentGroupAvailability(target); + break; + + case Internal.Model.Target.TypeEnum.Routepoint: + this.Type = TargetType.ROUTE_POINT; + this.extractDNAvailability(target); + break; + + case Internal.Model.Target.TypeEnum.Skill: + this.Type = TargetType.SKILL; + break; + + case Internal.Model.Target.TypeEnum.Customcontact: + this.Type = TargetType.CUSTOM_CONTACT; + break; + } } - - /// - /// DBID of the object - /// - /// DBID of the object - [DataMember(Name="DBID", EmitDefaultValue=false)] - public int? DBID { get; set; } - /// - /// For agents firstname and lastname (or username if neither is defined), for other types the name field is used. - /// - /// For agents firstname and lastname (or username if neither is defined), for other types the name field is used. - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - - /// - /// First name - only applicable to agents. - /// - /// First name - only applicable to agents. - [DataMember(Name="firstName", EmitDefaultValue=false)] - public string FirstName { get; set; } + private void extractAgentAvailability(Genesys.Workspace.Internal.Model.Target target) + { + var availabilityData = target.Availability; + if (availabilityData == null) + { + return; + } - /// - /// Last name - only applicable to agents. - /// - /// Last name - only applicable to agents. - [DataMember(Name="lastName", EmitDefaultValue=false)] - public string LastName { get; set; } + //List channelsData = (List)availabilityData.get("channels"); + //List channels = new ArrayList<>(); - /// - /// Employee id - only applicable to agents. - /// - /// Employee id - only applicable to agents. - [DataMember(Name="employeeId", EmitDefaultValue=false)] - public string EmployeeId { get; set; } + //if (channelsData != null && !channelsData.isEmpty()) + //{ + // channelsData.forEach(o-> { + // LinkedTreeMap channelData = (LinkedTreeMap)o; - /// - /// Username - only applicable to agents. - /// - /// Username - only applicable to agents. - [DataMember(Name="userName", EmitDefaultValue=false)] - public string UserName { get; set; } + // String channelName = (String)channelData.get("name"); + // boolean available = (Boolean)channelData.get("available"); + // LinkedTreeMap userStateData = (LinkedTreeMap)channelData.get("userState"); - /// - /// Only applicable to acd-queue and route-point - /// - /// Only applicable to acd-queue and route-point - [DataMember(Name="number", EmitDefaultValue=false)] - public string Number { get; set; } + // AgentState agentState = Util.parseAgentState((String)userStateData.get("state")); + // AgentWorkMode workMode = Util.parseAgentWorkMode((String)userStateData.get("workMode")); + // String reason = (String)userStateData.get("reason"); - /// - /// Only applicable to acd-queue and route-point - /// - /// Only applicable to acd-queue and route-point - [DataMember(Name="switchName", EmitDefaultValue=false)] - public string SwitchName { get; set; } + // String phoneNumber = (String)channelData.get("phoneNumber"); + // String switchName = (String)channelData.get("switchName"); + // AgentActivity activity = Util.parseAgentActivity((String)channelData.get("activity")); - /// - /// The structure depends on the target type. For agents, availability includes channel details. For acd-queues and route-points, waiting calls. For agent-groups, the number of ready agents. - /// - /// The structure depends on the target type. For agents, availability includes channel details. For acd-queues and route-points, waiting calls. For agent-groups, the number of ready agents. - [DataMember(Name="availability", EmitDefaultValue=false)] - public Object Availability { get; set; } + // channels.add(new ChannelAvailability(channelName, available, agentState, workMode, reason, phoneNumber, switchName, activity)); + // }); + //} - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Target {\n"); - sb.Append(" DBID: ").Append(DBID).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" EmployeeId: ").Append(EmployeeId).Append("\n"); - sb.Append(" UserName: ").Append(UserName).Append("\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" SwitchName: ").Append(SwitchName).Append("\n"); - sb.Append(" Availability: ").Append(Availability).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); + //this.availability = new AgentAvailability(channels); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) + private void extractAgentGroupAvailability(Genesys.Workspace.Internal.Model.Target target) { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as Target); + //LinkedTreeMap availabilityData = (LinkedTreeMap)target.getAvailability(); + //if (availabilityData == null) + //{ + // return; + //} + + //Integer readyAgents = ((Double)availabilityData.get("readyAgents")).intValue(); + //this.availability = new AgentGroupAvailability(readyAgents); } - /// - /// Returns true if Target instances are equal - /// - /// Instance of Target to be compared - /// Boolean - public bool Equals(Target other) + private void extractDNAvailability(Genesys.Workspace.Internal.Model.Target target) { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.DBID == other.DBID || - this.DBID != null && - this.DBID.Equals(other.DBID) - ) && - ( - this.Name == other.Name || - this.Name != null && - this.Name.Equals(other.Name) - ) && - ( - this.Type == other.Type || - this.Type != null && - this.Type.Equals(other.Type) - ) && - ( - this.FirstName == other.FirstName || - this.FirstName != null && - this.FirstName.Equals(other.FirstName) - ) && - ( - this.LastName == other.LastName || - this.LastName != null && - this.LastName.Equals(other.LastName) - ) && - ( - this.EmployeeId == other.EmployeeId || - this.EmployeeId != null && - this.EmployeeId.Equals(other.EmployeeId) - ) && - ( - this.UserName == other.UserName || - this.UserName != null && - this.UserName.Equals(other.UserName) - ) && - ( - this.Number == other.Number || - this.Number != null && - this.Number.Equals(other.Number) - ) && - ( - this.SwitchName == other.SwitchName || - this.SwitchName != null && - this.SwitchName.Equals(other.SwitchName) - ) && - ( - this.Availability == other.Availability || - this.Availability != null && - this.Availability.Equals(other.Availability) - ); + //LinkedTreeMap availabilityData = (LinkedTreeMap)target.getAvailability(); + //if (availabilityData == null) + //{ + // return; + //} + + //Integer waitingCalls = ((Double)availabilityData.get("waitingCalls")).intValue(); + //if (this.type == TargetType.ACD_QUEUE) + //{ + // this.availability = new ACDQueueAvailability(waitingCalls); + //} + //else + //{ + // this.availability = new RoutePointAvailability(waitingCalls); + //} } - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.DBID != null) - hash = hash * 59 + this.DBID.GetHashCode(); - if (this.Name != null) - hash = hash * 59 + this.Name.GetHashCode(); - if (this.Type != null) - hash = hash * 59 + this.Type.GetHashCode(); - if (this.FirstName != null) - hash = hash * 59 + this.FirstName.GetHashCode(); - if (this.LastName != null) - hash = hash * 59 + this.LastName.GetHashCode(); - if (this.EmployeeId != null) - hash = hash * 59 + this.EmployeeId.GetHashCode(); - if (this.UserName != null) - hash = hash * 59 + this.UserName.GetHashCode(); - if (this.Number != null) - hash = hash * 59 + this.Number.GetHashCode(); - if (this.SwitchName != null) - hash = hash * 59 + this.SwitchName.GetHashCode(); - if (this.Availability != null) - hash = hash * 59 + this.Availability.GetHashCode(); - return hash; - } - } + //public AgentAvailability getAgentAvailability() + //{ + // //if (this.type != TargetType.AGENT || this.availability == null) + // //{ + // // return null; + // //} + // //else + // //{ + // // return (AgentAvailability)this.availability; + // //} + //} + + //public AgentGroupAvailability getAgentGroupAvailability() + //{ + // //if (this.type != TargetType.AGENT_GROUP || this.availability == null) + // //{ + // // return null; + // //} + // //else + // //{ + // // return (AgentGroupAvailability)this.availability; + // //} + //} + + //public RoutePointAvailability getRoutePointAvailability() + //{ + // //if (this.type != TargetType.ROUTE_POINT || this.availability == null) + // //{ + // // return null; + // //} + // //else + // //{ + // // return (RoutePointAvailability)this.availability; + // //} + //} + + //public ACDQueueAvailability getACDQueueAvailability() + //{ + // //if (this.type != TargetType.ACD_QUEUE || this.availability == null) + // //{ + // // return null; + // //} + // //else + // //{ + // // return (ACDQueueAvailability)this.availability; + // //} + //} - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + public override string ToString() { - yield break; + return string.Format("[Target: Name={0}, Number={1}, Type={2}]", Name, Number, Type); } } diff --git a/src/Genesys.Workspace/Model/TargetSearchResult.cs b/src/Genesys.Workspace/Model/TargetSearchResult.cs new file mode 100644 index 0000000..a72aabc --- /dev/null +++ b/src/Genesys.Workspace/Model/TargetSearchResult.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace Genesys.Workspace.Model +{ + public class TargetSearchResult + { + public long TotalMatches { get; protected set; } + public List Targets { get; protected set; } + + public TargetSearchResult(long totalMatches, List targets) + { + this.TotalMatches = totalMatches; + this.Targets = targets; + } + } +} diff --git a/src/Genesys.Workspace/Model/TargetsSearchOptions.cs b/src/Genesys.Workspace/Model/TargetsSearchOptions.cs new file mode 100644 index 0000000..bf03080 --- /dev/null +++ b/src/Genesys.Workspace/Model/TargetsSearchOptions.cs @@ -0,0 +1,14 @@ +using System; +using Genesys.Workspace.Common; + +namespace Genesys.Workspace.Model +{ + public class TargetsSearchOptions + { + public string FilterName { get; set; } + public TargetType[] Types { get; set; } + public bool Desc { get; set; } + public int? Limit { get; set; } + public bool Exact { get; set; } + } +} diff --git a/src/Genesys.Workspace/Model/Transaction.cs b/src/Genesys.Workspace/Model/Transaction.cs new file mode 100644 index 0000000..d9bb993 --- /dev/null +++ b/src/Genesys.Workspace/Model/Transaction.cs @@ -0,0 +1,17 @@ +using System; +using Genesys.Workspace.Model; + +namespace Genesys.Workspace.Model +{ + public class Transaction + { + public string name { get; set; } + public string alias { get; set; } + public KeyValueCollection userProperties { get; set; } + + public override string ToString() + { + return string.Format("[Transaction: name={0}, alias={1}, userProperties={2}]", name, alias, userProperties); + } + } +} diff --git a/src/Genesys.Workspace/Model/User.cs b/src/Genesys.Workspace/Model/User.cs new file mode 100644 index 0000000..e5c931a --- /dev/null +++ b/src/Genesys.Workspace/Model/User.cs @@ -0,0 +1,23 @@ +using System; +using Genesys.Workspace.Model; + +namespace Genesys.Workspace.Model +{ + public class User + { + public int dbid { get; set; } + public string firstName { get; set; } + public string lastName { get; set; } + public string userName { get; set; } + public string employeeId { get; set; } + public string agentId { get; set; } + public string defaultPlace { get; set; } + public int tenantDBID { get; set; } + public KeyValueCollection userProperties { get; set; } + + public override string ToString() + { + return string.Format("[User: dbid={0}, firstName={1}, lastName={2}, userName={3}, employeeId={4}, agentId={5}, defaultPlace={6}, tenantDBID={7}, userProperties={8}]", dbid, firstName, lastName, userName, employeeId, agentId, defaultPlace, tenantDBID, userProperties); + } + } +} diff --git a/src/Genesys.Workspace/Notifications.cs b/src/Genesys.Workspace/Notifications.cs new file mode 100644 index 0000000..6400e01 --- /dev/null +++ b/src/Genesys.Workspace/Notifications.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using CometD.Bayeux; +using CometD.Bayeux.Client; +using CometD.Client; +using Genesys.Workspace.Common; +using Genesys.Workspace.Internal.Client; + +namespace Genesys.Workspace +{ + public class Notifications + { + private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + + public delegate void CometDEventHandler(IClientSessionChannel channel, IMessage message, BayeuxClient client); + + private BayeuxClient bayeuxClient; + private Dictionary subscriptions; + + public Notifications() + { + subscriptions = new Dictionary(); + } + + public void Initialize(ApiClient apiClient) + { + var options = new Dictionary(StringComparer.OrdinalIgnoreCase); + + foreach(string key in apiClient.Configuration.DefaultHeader.Keys) + { + switch(key) + { + case "x-api-key": + case "Cookie": + options.Add(key, apiClient.Configuration.DefaultHeader[key]); + break; + } + } + + /** + * GWS currently only supports LongPolling as a method to receive events. + * So tell the CometD library to negotiate a handshake with GWS and setup a LongPolling session. + */ + ClientTransport transport = new ClientTransport(options, apiClient.RestClient.CookieContainer.GetCookies(new Uri(apiClient.RestClient.BaseUrl.ToString() + "/notifications"))); + + bayeuxClient = new BayeuxClient(apiClient.RestClient.BaseUrl.ToString() + "/notifications", transport); + + if (bayeuxClient.Handshake(null, 30000)) + { + foreach(string channelName in subscriptions.Keys ) + { + IClientSessionChannel channel = bayeuxClient.GetChannel(channelName); + channel.Subscribe(new CallbackMessageListener(OnMessageReceived, bayeuxClient)); + } + } + else + { + throw new Exception("CometD handshake failed"); + } + } + + public void subscribe(String channelName, CometDEventHandler eventHandler) + { + subscriptions.Add(channelName, eventHandler); + } + + public void Disconnect() + { + if (bayeuxClient != null && bayeuxClient.IsConnected) + { + bayeuxClient.Disconnect(); + } + } + + public void OnMessageReceived(IClientSessionChannel channel, IMessage message, BayeuxClient client) + { + try + { + subscriptions[message.Channel](channel, message, client); + } + catch(Exception exc) + { + log.Error("Execption handling OnMessageReceived for " + message.Channel, exc); + } + } + + } +} diff --git a/src/Genesys.Workspace/SessionApi.cs b/src/Genesys.Workspace/SessionApi.cs new file mode 100644 index 0000000..6ff2d82 --- /dev/null +++ b/src/Genesys.Workspace/SessionApi.cs @@ -0,0 +1,35 @@ +using System; +using Genesys.Workspace.Internal.Client; +using Genesys.Workspace.Internal.Model; + +namespace Genesys.Workspace +{ + public class SessionApi + { + private Genesys.Workspace.Internal.Api.SessionApi sessionApi; + + public SessionApi() + { + } + + public void Initialize(ApiClient apiClient) + { + this.sessionApi = new Internal.Api.SessionApi(apiClient.Configuration); + } + + public ApiResponse InitializeWorkspaceWithHttpInfo(string authCode, string redirectUri, string authorization) + { + return this.sessionApi.InitializeWorkspaceWithHttpInfo(authCode, redirectUri, authorization); + } + + public ApiSuccessResponse ActivateChannels(ChannelsData channelsData) + { + return sessionApi.ActivateChannels(channelsData); + } + + public ApiSuccessResponse Logout() + { + return sessionApi.Logout(); + } + } +} diff --git a/src/Genesys.Workspace/TargetsApi.cs b/src/Genesys.Workspace/TargetsApi.cs new file mode 100644 index 0000000..2f31af4 --- /dev/null +++ b/src/Genesys.Workspace/TargetsApi.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using Genesys.Workspace.Common; +using Genesys.Workspace.Internal.Client; +using Genesys.Workspace.Internal.Model; +using Genesys.Workspace.Model; + +namespace Genesys.Workspace +{ + public class TargetsApi + { + private Genesys.Workspace.Internal.Api.TargetsApi targetsApi; + + public TargetsApi() + { + } + + public void Initialize(ApiClient apiClient) + { + this.targetsApi = new Internal.Api.TargetsApi(apiClient.RestClient.BaseUrl.ToString()); + targetsApi.Configuration.ApiClient = apiClient; + } + + public TargetSearchResult search(String searchTerm) + { + return search(searchTerm, new TargetsSearchOptions()); + } + + public TargetSearchResult search(String searchTerm, TargetsSearchOptions options) + { + try + { + TargetsResponse response = this.targetsApi.Get(searchTerm); + + TargetsResponseData data = response.Data; + + List targets = new List(); + if (data.Targets != null) + { + foreach (Genesys.Workspace.Internal.Model.Target t in data.Targets) + { + targets.Add(new Genesys.Workspace.Model.Target(t)); + } + } + return new TargetSearchResult((long)data.TotalMatches, targets); + + } + catch (ApiException e) + { + throw new WorkspaceApiException("searchTargets failed.", e); + } + } + } +} diff --git a/src/Genesys.Workspace/VoiceApi.cs b/src/Genesys.Workspace/VoiceApi.cs new file mode 100755 index 0000000..f67b9f9 --- /dev/null +++ b/src/Genesys.Workspace/VoiceApi.cs @@ -0,0 +1,1499 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using CometD.Bayeux; +using CometD.Bayeux.Client; +using CometD.Client; +using Genesys.Workspace.Common; +using Genesys.Workspace.Internal.Client; +using Genesys.Workspace.Internal.Model; +using Genesys.Workspace.Model; + +namespace Genesys.Workspace +{ + public class VoiceApi + { + private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + + public delegate void DnStateChangedEventHandler(Genesys.Workspace.Model.Dn dn, IMessage message); + public event DnStateChangedEventHandler DnStateChanged; + + public delegate void CallStateChangedEventHandler(Genesys.Workspace.Model.Call call, IMessage message); + public event CallStateChangedEventHandler CallStateChanged; + + public delegate void VoiceErrorEventHandler(string msg, string code, IMessage message); + public event VoiceErrorEventHandler VoiceErrorReceived; + + private Genesys.Workspace.Internal.Api.VoiceApi voiceApi; + public Genesys.Workspace.Model.Dn Dn { get; protected set; } + public Dictionary Calls { get; protected set; } + + public VoiceApi() + { + Calls = new Dictionary(); + } + + public void Initialize(ApiClient apiClient) + { + this.voiceApi = new Internal.Api.VoiceApi(apiClient.RestClient.BaseUrl.ToString()); + voiceApi.Configuration.ApiClient = apiClient; + } + + public void OnVoiceMessage(IClientSessionChannel channel, IMessage message, BayeuxClient client) + { + try + { + IDictionary data = message.DataAsDictionary; + + string messageType = (string)data.GetValue("messageType"); + + switch (messageType) + { + case "DnStateChanged": + this.onDnStateChanged(channel, message, client); + break; + + case "CallStateChanged": + this.onCallStateChanged(channel, message, client); + break; + + case "EventError": + this.onEventError(channel, message, client); + break; + + default: + log.Debug("Unexpected messageType: " + messageType); + break; + } + } + catch(Exception exc) + { + log.Error("Error handling OnVoiceMessage", exc); + } + } + + public void onDnStateChanged(IClientSessionChannel channel, IMessage message, BayeuxClient client) + { + if (this.Dn == null) + { + this.Dn = new Genesys.Workspace.Model.Dn(); + } + + IDictionary data = message.DataAsDictionary; + + Dictionary dnData = (Dictionary)data.GetValue("dn"); + + this.Dn.number = (string)dnData.GetValue("number"); + this.Dn.switchName = (string)dnData.GetValue("switchName"); + this.Dn.agentId = (string)dnData.GetValue("agentId"); + + AgentState agentState; + agentState = (Enum.TryParse((string)dnData.GetValue("agentState"), out agentState) == true) ? agentState : AgentState.Unknown; + this.Dn.agentState = agentState; + + AgentWorkMode workMode; + workMode = (Enum.TryParse((string)dnData.GetValue("agentWorkMode"), out workMode) == true) ? workMode: AgentWorkMode.Unknown; + this.Dn.workMode = workMode; + + this.Dn.telephonyNetwork = (string)dnData.GetValue("telephonyNetwork"); + + this.Dn.forwardTo = (string)dnData.GetValue("forwardTo"); + this.Dn.dnd = "on".Equals((string)dnData.GetValue("dnd")); + + var reasonsData = dnData.GetValue("reasons"); + this.Dn.reasons = new KeyValueCollection(); + Util.extractKeyValueData(this.Dn.reasons, reasonsData); + + ArrayList capabilities = dnData.GetAsArrayList("capabilities"); + List caps = new List(); + + foreach (string c in capabilities) + { + DnCapability cap; + + if ( Enum.TryParse(c.Replace('-', '_'), out cap) ) + { + caps.Add(cap); + } + } + this.Dn.capabilities = caps.ToArray(); + + log.Debug("Dn updated: " + Dn.ToString()); + + // JC: Use the longer form of obj?.Invoke() so it will work on older .NET Framework releases + if ( DnStateChanged != null ) + DnStateChanged.Invoke(this.Dn, message); + } + + private void onCallStateChanged(IClientSessionChannel channel, IMessage message, BayeuxClient client) + { + IDictionary data = message.DataAsDictionary; + + Dictionary callData = (Dictionary)data.GetValue("call"); + NotificationType notificationType = Util.parseNotificationType((string)data.GetValue("notificationType")); + + string id = (string)callData.GetValue("id"); + string callUuid = (string)callData.GetValue("callUuid"); + CallState state = Util.parseCallState((string)callData.GetValue("state")); + string parentConnId = (string)callData.GetValue("parentConnId"); + string previousConnId = (string)callData.GetValue("previousConnId"); + string ani = (string)callData.GetValue("ani"); + string dnis = (string)callData.GetValue("dnis"); + + var userPropertyData = callData.GetValue("userData"); + KeyValueCollection userData = new KeyValueCollection(); + Util.extractKeyValueData(userData, userPropertyData); + + var participantsData = callData.GetValue("participants"); + String[] participants = Util.extractParticipants(participantsData); + + bool connIdChanged = false; + String callType = (string)callData.GetValue("callType"); + + Model.Call call; + if (this.Calls.ContainsKey(id)) + { + call = this.Calls[id]; + } + else + { + call = new Model.Call() + { + id = id, + callType = callType, + parentConnId = parentConnId + }; + + this.Calls.Add(id, call); + log.Debug("Added call: " + call.ToString()); + } + + if (previousConnId != null && this.Calls.ContainsKey(previousConnId)) + { + call = this.Calls[previousConnId]; + this.Calls.Remove(previousConnId); + call.id = id; + call.previousConnId = previousConnId; + this.Calls.Add(id, call); + connIdChanged = true; + } + else if (state == CallState.RELEASED) + { + this.Calls.Remove(id); + log.Debug("Removed call " + id + "(" + state + ")"); + } + + call.state = state; + call.ani = ani; + call.dnis = dnis; + call.callUuid = callUuid; + call.participants = participants; + call.userData = userData; + + ArrayList capabilities = callData.GetAsArrayList("capabilities"); + List caps = new List(); + + foreach (string c in capabilities) + { + CallCapability cap; + + if (Enum.TryParse(c.Replace('-', '_'), out cap)) + { + caps.Add(cap); + } + } + call.capabilities = caps.ToArray(); + + // JC: Use the longer form of obj?.Invoke() so it will work on older .NET Framework releases + if ( CallStateChanged != null ) + CallStateChanged.Invoke(call, message); + } + + private void onEventError(IClientSessionChannel channel, IMessage message, BayeuxClient client) + { + IDictionary data = message.DataAsDictionary; + + Dictionary errorDetails = (Dictionary)data.GetValue("error"); + string msg = (string)errorDetails.GetValue("errorMessage"); + string code = errorDetails.GetValue("errorCode") == null ? "" : errorDetails.GetValue("errorCode").ToString(); + + // JC: Use the longer form of obj?.Invoke() so it will work on older .NET Framework releases + if ( VoiceErrorReceived != null ) + VoiceErrorReceived.Invoke(msg, code, message); + } + + /** + * Set the agent state to ready. + */ + public void SetAgentReady() + { + this.SetAgentReady(null, null); + } + + /** + * Set the agent state to ready. + * @param reasons reasons + * @param extensions extensions + */ + public void SetAgentReady( + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + try + { + VoicereadyData readyData = new VoicereadyData( + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null + ); + ReadyData data = new ReadyData + { + Data = readyData + }; + + ApiSuccessResponse response = this.voiceApi.SetAgentStateReady(data); + Util.ThrowIfNotOk("SetAgentReady", response); + } catch (ApiException e) { + throw new WorkspaceApiException("SetAgentReady failed.", e); + } + } + + /** + * Set the agent state to not ready. + */ + public void SetAgentNotReady() + { + this.SetAgentNotReady(null, null, null, null); + } + + /** + * Set the agent state to not ready. + * @param workMode optional workMode to use in the request. + * @param reasonCode optional reasonCode to use in the request. + */ + public void SetAgentNotReady(String workMode, String reasonCode) + { + this.SetAgentNotReady(workMode, reasonCode, null, null); + } + + /** + * Set the agent state to not ready. + * @param workMode optional workMode to use in the request. + * @param reasonCode optional reasonCode to use in the request. + * @param reasons reasons + * @param extensions extensions + */ + public void SetAgentNotReady( + String workMode, + String reasonCode, + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + try + { + VoicenotreadyData notReadyData = new VoicenotreadyData( + reasonCode, + ((workMode != null) ? (VoicenotreadyData.AgentWorkModeEnum)Enum.Parse(typeof(VoicenotreadyData.AgentWorkModeEnum), workMode) : (VoicenotreadyData.AgentWorkModeEnum?)null), + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null + ); + NotReadyData data = new NotReadyData + { + Data = notReadyData + }; + + ApiSuccessResponse response = this.voiceApi.SetAgentStateNotReady(data); + Util.ThrowIfNotOk("SetAgentNotReady", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("SetAgentReady failed.", e); + } + } + + /** + * Set do-not-disturb on for voice. + */ + public void DndOn() + { + try + { + ApiSuccessResponse response = this.voiceApi.SetDNDOn(); + Util.ThrowIfNotOk("DndOn", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("DndOn failed.", e); + } + } + + /** + * Set do-not-disturb off for voice. + */ + public void DndOff() + { + try + { + ApiSuccessResponse response = this.voiceApi.SetDNDOff(); + Util.ThrowIfNotOk("DndOff", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("DndOff failed.", e); + } + } + + /** + * Login the voice channel. + */ + public void Login() + { + try + { + ApiSuccessResponse response = this.voiceApi.LoginVoice(); + Util.ThrowIfNotOk("VoiceLogin", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("VoiceLogin failed", e); + } + } + + /** + * Logout the voice channel. + */ + public void Logout() + { + try + { + ApiSuccessResponse response = this.voiceApi.LogoutVoice(); + Util.ThrowIfNotOk("VoiceLogout", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("VoiceLogout failed", e); + } + } + + /** + * Set call forwarding to the specififed destination. + * @param destination - destination to forward calls to. + */ + public void SetForward(String destination) + { + try + { + VoicesetforwardData forwardData = new VoicesetforwardData(destination); + ForwardData data = new ForwardData + { + Data = forwardData + }; + + ApiSuccessResponse response = this.voiceApi.Forward(data); + Util.ThrowIfNotOk("SetForward", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("SetForward failed.", e); + } + } + + /** + * Cancel call forwarding. + */ + public void CancelForward() + { + try + { + ApiSuccessResponse response = this.voiceApi.CancelForward(); + Util.ThrowIfNotOk("CancelForward", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("CancelForward failed.", e); + } + } + + /** + * Make a new call to the specified destination. + * @param destination The destination to call + */ + public void MakeCall(String destination) + { + this.MakeCall(destination, null, null, null, null, null); + } + + /** + * Make a new call to the specified destination. + * @param destination The destination to call + * @param userData userData to be included with the new call + */ + public void MakeCall( + String destination, + KeyValueCollection userData + ) + { + this.MakeCall(destination, null, userData, null, null, null); + } + + /** + * Make a new call to the specified destination. + * @param destination The destination to call + * @param userData userData to be included with the new call + * @param reasons reasons + * @param extensions extensions + */ + public void MakeCall( + string destination, + string location, + KeyValueCollection userData, + KeyValueCollection reasons, + KeyValueCollection extensions, + string outboundCallerId + ) + { + try + { + VoicemakecallData data = new VoicemakecallData( + destination, + location, + (userData != null) ? userData.ToListKvpair() : null, + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null, + outboundCallerId + ); + MakeCallData makeCallData = new MakeCallData(data); + + ApiSuccessResponse response = this.voiceApi.MakeCall(makeCallData); + Util.ThrowIfNotOk("MakeCall", response); + + } + catch (ApiException e) + { + throw new WorkspaceApiException("MakeCall failed.", e); + } + } + + /** + * Answer call. + * @param connId The connId of the call to answer. + */ + public void AnswerCall(String connId) + { + this.AnswerCall(connId, null, null); + } + + /** + * Answer call. + * @param connId The connId of the call to answer. + * @param reasons reasons + * @param extensions extensions + */ + public void AnswerCall( + String connId, + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + try + { + VoicereadyData answerData = new VoicereadyData( + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null + ); + AnswerData data = new AnswerData + { + Data = answerData + }; + + ApiSuccessResponse response = this.voiceApi.Answer(connId, data); + Util.ThrowIfNotOk("AnswerCall", response); + + } + catch (ApiException e) + { + throw new WorkspaceApiException("AnswerCall failed.", e); + } + } + + /** + * Place call on hold. + * @param connId The connId of the call to place on hold. + */ + public void HoldCall(String connId) + { + this.HoldCall(connId, null, null); + } + + /** + * Place call on hold. + * @param connId The connId of the call to place on hold. + * @param reasons reasons + * @param extensions extensions + */ + public void HoldCall( + String connId, + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + try { + VoicereadyData holdData = new VoicereadyData( + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null + ); + HoldData data = new HoldData + { + Data = holdData + }; + + ApiSuccessResponse response = this.voiceApi.Hold(connId, data); + Util.ThrowIfNotOk("HoldCall", response); + + } + catch (ApiException e) + { + throw new WorkspaceApiException("HoldCall failed.", e); + } + } + + /** + * Retrieve call from hold. + * @param connId The connId of the call to retrieve. + */ + public void RetrieveCall(String connId) + { + this.RetrieveCall(connId, null, null); + } + + /** + * Retrieve call from hold. + * @param connId The connId of the call to retrieve. + * @param reasons reasons + * @param extensions extensions + */ + public void RetrieveCall( + String connId, + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + try + { + VoicereadyData retrieveData = new VoicereadyData( + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null + ); + RetrieveData data = new RetrieveData + { + Data = retrieveData + }; + ApiSuccessResponse response = this.voiceApi.Retrieve(connId, data); + Util.ThrowIfNotOk("RetrieveCall", response); + + } + catch (ApiException e) + { + throw new WorkspaceApiException("RetrieveCall failed.", e); + } + } + + /** + * Release call. + * @param connId The connId of the call to release + */ + public void ReleaseCall(String connId) + { + this.ReleaseCall(connId, null, null); + } + + /** + * Release call. + * @param connId The connId of the call to release + * @param reasons reasons + * @param extensions extensions + */ + public void ReleaseCall( + String connId, + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + + try + { + VoicereadyData releaseData = new VoicereadyData( + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null + ); + ReleaseData data = new ReleaseData + { + Data = releaseData + }; + + ApiSuccessResponse response = this.voiceApi.Release(connId, data); + Util.ThrowIfNotOk("ReleaseCall", response); + + } + catch (ApiException e) + { + throw new WorkspaceApiException("ReleaseCall failed.", e); + } + } + + /** + * Initiate a conference to the specified destination. + * @param connId The connId of the call to start the conference from. + * @param destination The destination + */ + public void InitiateConference(String connId, String destination) + { + this.InitiateConference(connId, destination, null, null, null, null, null); + } + + /** + * Initiate a conference to the specified destination. + * @param connId The connId of the call to start the conference from. + * @param destination The destination + * @param userData userdata to be used for the new consult call. + */ + public void InitiateConference( + String connId, + String destination, + KeyValueCollection userData + ) + { + this.InitiateConference(connId, destination, null, null, userData, null, null); + } + + /** + * Initiate a conference to the specified destination. + * @param connId The connId of the call to start the conference from. + * @param destination The destination + * @param location + * @param outboundCallerId + * @param userData userdata to be used for the new consult call. + * @param reasons reasons + * @param extensions extensions + */ + public void InitiateConference( + String connId, + String destination, + String location, + String outboundCallerId, + KeyValueCollection userData, + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + try + { + VoicecallsidinitiateconferenceData initData = new VoicecallsidinitiateconferenceData( + destination, + location, + (userData != null) ? userData.ToListKvpair() : null, + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null, + outboundCallerId + ); + InitiateConferenceData data = new InitiateConferenceData + { + Data = initData + }; + + ApiSuccessResponse response = this.voiceApi.InitiateConference(connId, data); + Util.ThrowIfNotOk("InitiateConference", response); + + } + catch (ApiException e) + { + throw new WorkspaceApiException("InitiateConference failed.", e); + } + } + + /** + * Complete a previously initiated conference identified by the provided ids. + * @param connId The id of the consule call (established) + * @param parentConnId The id of the parent call (held). + */ + public void CompleteConference(String connId, String parentConnId) + { + this.CompleteConference(connId, parentConnId, null, null); + } + + /** + * Complete a previously initiated conference identified by the provided ids. + * @param connId The id of the consule call (established) + * @param parentConnId The id of the parent call (held). + * @param reasons reasons + * @param extensions extensions + */ + public void CompleteConference( + String connId, + String parentConnId, + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + try + { + VoicecallsidcompletetransferData completeData = new VoicecallsidcompletetransferData( + parentConnId, + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null + ); + CompleteConferenceData data = new CompleteConferenceData + { + Data = completeData + }; + + ApiSuccessResponse response = this.voiceApi.CompleteConference(connId, data); + Util.ThrowIfNotOk("CompleteConference", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("CompleteConference failed.", e); + } + } + + /** + * Initiate a transfer to the specified destination. + * @param connId The connId of the call to be transferred. + * @param destination The destination of the transfer. + */ + public void InitiateTransfer(String connId, String destination) + { + this.InitiateTransfer(connId, destination, null, null, null, null, null); + } + + /** + * Initiate a transfer to the specified destination. + * @param connId The connId of the call to be transferred. + * @param destination The destination of the transfer. + * @param userData userdata to be included with the new consult call + */ + public void InitiateTransfer( + String connId, + String destination, + KeyValueCollection userData + ) + { + this.InitiateTransfer(connId, destination, null, null, userData, null, null); + } + + /** + * Initiate a transfer to the specified destination. + * @param connId The connId of the call to be transferred. + * @param destination The destination + * @param location + * @param outboundCallerId + * @param userData userdata to be used for the new consult call. + * @param reasons reasons + * @param extensions extensions + */ + public void InitiateTransfer( + String connId, + String destination, + String location, + String outboundCallerId, + KeyValueCollection userData, + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + try + { + VoicecallsidinitiatetransferData data = new VoicecallsidinitiatetransferData( + destination, + location, + (userData != null) ? userData.ToListKvpair() : null, + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null, + outboundCallerId + ); + InitiateTransferData initData = new InitiateTransferData + { + Data = data + }; + + ApiSuccessResponse response = this.voiceApi.InitiateTransfer(connId, initData); + Util.ThrowIfNotOk("InitiateTransfer", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("InitiateTransfer failed.", e); + } + } + + /** + * Complete a previously initiated transfer using the provided ids. + * @param connId The id of the consult call (established) + * @param parentConnId The id of the parent call (held) + */ + public void CompleteTransfer(String connId, String parentConnId) + { + this.CompleteTransfer(connId, parentConnId, null, null); + } + + /** + * Complete a previously initiated transfer using the provided ids. + * @param connId The id of the consult call (established) + * @param parentConnId The id of the parent call (held) + * @param reasons reasons + * @param extensions extensions + */ + public void CompleteTransfer( + String connId, + String parentConnId, + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + try + { + VoicecallsidcompletetransferData completeData = new VoicecallsidcompletetransferData( + parentConnId, + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null + ); + CompleteTransferData data = new CompleteTransferData + { + Data = completeData + }; + + ApiSuccessResponse response = this.voiceApi.CompleteTransfer(connId, data); + Util.ThrowIfNotOk("CompleteTransfer", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("CompleteTransfer failed.", e); + } + } + + /** + * Alternate two calls retrieving the held call and placing the established call on hold. This is a + * shortcut for doing hold and retrieve separately. + * @param connId The id of the established call. + * @param heldConnId The id of the held call. + */ + public void AlternateCalls(String connId, String heldConnId) + { + this.AlternateCalls(connId, heldConnId, null, null); + } + + /** + * Alternate two calls retrieving the held call and placing the established call on hold. This is a + * shortcut for doing hold and retrieve separately. + * @param connId The id of the established call. + * @param heldConnId The id of the held call. + * @param reasons reasons + * @param extensions extensions + */ + public void AlternateCalls( + String connId, + String heldConnId, + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + try + { + VoicecallsidalternateData alternateData = new VoicecallsidalternateData( + heldConnId, + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null + ); + AlternateData data = new AlternateData + { + Data = alternateData + }; + + ApiSuccessResponse response = this.voiceApi.Alternate(connId, data); + Util.ThrowIfNotOk("AlternateCalls", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("AlternateCalls failed.", e); + } + } + + /** + * Delete a dn from a conference call + * @param connId The connId of the conference + * @param dnToDrop The dn number to drop from the conference. + */ + public void DeleteFromConference(String connId, String dnToDrop) + { + this.DeleteFromConference(connId, dnToDrop, null, null); + } + + /** + * Delete a dn from a conference call + * @param connId The connId of the conference + * @param dnToDrop The dn number to drop from the conference. + * @param reasons reasons + * @param extensions extensions + */ + public void DeleteFromConference( + String connId, + String dnToDrop, + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + try + { + VoicecallsiddeletefromconferenceData deleteData = new VoicecallsiddeletefromconferenceData( + dnToDrop, + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null + ); + DeleteFromConferenceData data = new DeleteFromConferenceData + { + Data = deleteData + }; + + ApiSuccessResponse response = this.voiceApi.DeleteFromConference(connId, data); + Util.ThrowIfNotOk("DeleteFromConference", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("DeleteFromConference failed", e); + } + } + + /** + * Perform a single-step transfer to the specified destination. + * @param connId The id of the call to transfer. + * @param destination The destination to transfer the call to. + */ + public void SingleStepTransfer(String connId, String destination) + { + this.SingleStepTransfer(connId, destination, null, null, null, null); + } + + /** + * Perform a single-step transfer to the specified destination. + * @param connId The id of the call to transfer. + * @param destination The destination to transfer the call to. + * @param userData userdata to be included on the transfer + */ + public void SingleStepTransfer( + String connId, + String destination, + KeyValueCollection userData + ) + { + this.SingleStepTransfer(connId, destination, null, userData, null, null); + } + + /** + * Perform a single-step transfer to the specified destination. + * @param connId The id of the call to transfer. + * @param destination The destination to transfer the call to. + * @param location + * @param userData userdata to be used for the new consult call. + * @param reasons reasons + * @param extensions extensions + */ + public void SingleStepTransfer( + String connId, + String destination, + String location, + KeyValueCollection userData, + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + try + { + VoicecallsidsinglesteptransferData transferData = new VoicecallsidsinglesteptransferData( + destination, + location, + (userData != null) ? userData.ToListKvpair() : null, + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null + ); + SingleStepTransferData data = new SingleStepTransferData + { + Data = transferData + }; + + ApiSuccessResponse response = this.voiceApi.SingleStepTransfer(connId, data); + Util.ThrowIfNotOk("SingleStepTransfer", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("SingleStepTransfer failed", e); + } + } + + /** + * Perform a single-step conference to the specififed destination. This will effectively add the + * destination to the existing call, creating a conference if necessary. + * @param connId The id of the call to conference. + * @param destination The destination to be added to the call. + */ + public void SingleStepConference(String connId, String destination) + { + this.SingleStepConference(connId, destination, null, null, null, null); + + } + + /** + * Perform a single-step conference to the specififed destination. This will effectively add the + * destination to the existing call, creating a conference if necessary. + * @param connId The id of the call to conference. + * @param destination The destination to be added to the call. + * @param userData userdata to be included with the request + * + */ + public void SingleStepConference( + String connId, + String destination, + KeyValueCollection userData + ) + { + this.SingleStepConference(connId, destination, null, userData, null, null); + } + + /** + * Perform a single-step conference to the specififed destination. This will effectively add the + * destination to the existing call, creating a conference if necessary. + * @param connId The id of the call to conference. + * @param destination The destination to be added to the call. + * @param location + * @param userData userdata to be included with the request + * @param reasons reasons + * @param extensions extensions + */ + public void SingleStepConference( + String connId, + String destination, + String location, + KeyValueCollection userData, + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + try + { + VoicecallsidsinglestepconferenceData confData = new VoicecallsidsinglestepconferenceData( + destination, + location, + (userData != null) ? userData.ToListKvpair() : null, + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null + ); + SingleStepConferenceData data = new SingleStepConferenceData + { + Data = confData + }; + + ApiSuccessResponse response = this.voiceApi.SingleStepConference(connId, data); + Util.ThrowIfNotOk("SingleStepConference", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("SingleStepConference failed", e); + } + } + + /** + * Attach the provided data to the call. This adds the data to the call even if data already exists + * with the provided keys. + * @param connId The id of the call to attach data to. + * @param userData The data to attach to the call. This is an array of objects with the properties key, type, and value. + */ + public void AttachUserData(String connId, KeyValueCollection userData) + { + try + { + VoicecallsidcompleteData completeData = new VoicecallsidcompleteData(userData.ToListKvpair()); + UserData data = new UserData(completeData); + + ApiSuccessResponse response = this.voiceApi.AttachUserData(connId, data); + Util.ThrowIfNotOk("AttachUserData", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("AttachUserData failed.", e); + } + } + + /** + * Update call data with the provided key/value pairs. This will replace any existing kvpairs with the same keys. + * @param connId The id of the call to update data for. + * @param userData The data to update. This is an array of objecvts with the properties key, type, and value. + */ + public void UpdateUserData(String connId, KeyValueCollection userData) + { + try + { + VoicecallsidcompleteData completeData = new VoicecallsidcompleteData(userData.ToListKvpair()); + UserData data = new UserData(completeData); + + ApiSuccessResponse response = this.voiceApi.UpdateUserData(connId, data); + Util.ThrowIfNotOk("UpdateUserData", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("UpdateUserData failed.", e); + } + } + + /** + * Delete data with the specified key from the call. + * @param connId The call to remove data from. + * @param key The key to remove. + */ + public void DeleteUserDataPair(String connId, String key) + { + try + { + VoicecallsiddeleteuserdatapairData deletePairData = new VoicecallsiddeleteuserdatapairData(key); + KeyData data = new KeyData(deletePairData); + + ApiSuccessResponse response = this.voiceApi.DeleteUserDataPair(connId, data); + Util.ThrowIfNotOk("DeleteUserDataPair", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("DeleteUserDataPair failed.", e); + } + } + + /** + * Send DTMF digits to the specififed call. + * @param connId The call to send DTMF digits to. + * @param digits The DTMF digits to send. + */ + public void SendDTMF(String connId, String digits) + { + this.SendDTMF(connId, digits, null, null); + } + + /** + * Send DTMF digits to the specififed call. + * @param connId The call to send DTMF digits to. + * @param digits The DTMF digits to send. + * @param reasons reasons + * @param extensions extensions + */ + public void SendDTMF( + String connId, + String digits, + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + try + { + VoicecallsidsenddtmfData dtmfData = new VoicecallsidsenddtmfData( + digits, + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null + ); + SendDTMFData data = new SendDTMFData + { + Data = dtmfData + }; + + ApiSuccessResponse response = this.voiceApi.SendDTMF(connId, data); + Util.ThrowIfNotOk("SendDTMF", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("SendDTMF failed", e); + } + } + + /** + * Send EventUserEvent with the provided data. + * @param userData The data to be sent. This is an array of objects with the properties key, type, and value. + */ + public void SendUserEvent(KeyValueCollection userData) + { + this.SendUserEvent(userData, null); + } + + /** + * Send EventUserEvent with the provided data. + * @param userData The data to be sent. This is an array of objects with the properties key, type, and value. + * @param callUuid The callUuid that the event will be associated with. + */ + public void SendUserEvent(KeyValueCollection userData, String callUuid) + { + try + { + SendUserEventDataData sendUserEventData = new SendUserEventDataData( + (userData != null) ? userData.ToListKvpair() : null, + callUuid + ); + SendUserEventData data = new SendUserEventData + { + Data = sendUserEventData + }; + + ApiSuccessResponse response = this.voiceApi.SendUserEvent(data); + Util.ThrowIfNotOk("SendUserEvent", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("SendUserEvent failed.", e); + } + } + + /** + * Redirect call to the specified destination + * @param connId The connId of the call to redirect. + * @param destination The destination to redirect the call to. + */ + public void RedirectCall(String connId, String destination) + { + this.RedirectCall(connId, destination, null, null); + } + + /** + * Redirect call to the specified destination + * @param connId The connId of the call to redirect. + * @param destination The destination to redirect the call to. + * @param reasons reasons + * @param extensions extensions + */ + public void RedirectCall( + String connId, + String destination, + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + try + { + VoicecallsidredirectData redirectData = new VoicecallsidredirectData( + destination, + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null + ); + RedirectData data = new RedirectData + { + Data = redirectData + }; + + ApiSuccessResponse response = this.voiceApi.Redirect(connId, data); + Util.ThrowIfNotOk("RedirectCall", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("RedirectCall failed.", e); + } + } + + /** + * Merge the two specified calls. + * @param connId The id of the first call to be merged. + * @param otherConnId The id of the second call to be merged. + */ + public void MergeCalls(String connId, String otherConnId) + { + this.MergeCalls(connId, otherConnId, null, null); + } + + /** + * Merge the two specified calls. + * @param connId The id of the first call to be merged. + * @param otherConnId The id of the second call to be merged. + * @param reasons reasons + * @param extensions extensions + */ + public void MergeCalls( + String connId, + String otherConnId, + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + try + { + VoicecallsidmergeData mergeData = new VoicecallsidmergeData( + otherConnId, + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null + ); + MergeData data = new MergeData + { + Data = mergeData + }; + + ApiSuccessResponse response = this.voiceApi.Merge(connId, data); + Util.ThrowIfNotOk("MergeCalls", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("MergeCalls failed.", e); + } + } + + /** + * Reconnect the specified call. Reconnect releases the established call and retrieves the held call + * in one step. + * @param connId The id of the established call (will be released) + * @param heldConnId The id of the held call (will be retrieved) + */ + public void ReconnectCall(String connId, String heldConnId) + { + this.ReconnectCall(connId, heldConnId, null, null); + } + + /** + * Reconnect the specified call. Reconnect releases the established call and retrieves the held call + * in one step. + * @param connId The id of the established call (will be released) + * @param heldConnId The id of the held call (will be retrieved) + * @param reasons reasons + * @param extensions extensions + */ + public void ReconnectCall( + String connId, + String heldConnId, + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + try + { + VoicecallsidreconnectData reconnectData = new VoicecallsidreconnectData( + heldConnId, + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null + ); + ReconnectData data = new ReconnectData + { + Data = reconnectData + }; + + ApiSuccessResponse response = this.voiceApi.Reconnect(connId, data); + Util.ThrowIfNotOk("ReconnectCall", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("ReconnectCall failed.", e); + } + } + + /** + * Clear call. + * @param connId The connId of the call to clear + */ + public void ClearCall(String connId) + { + this.ClearCall(connId, null, null); + } + + /** + * Clear call. + * @param connId The connId of the call to clear + * @param reasons reasons + * @param extensions extensions + */ + public void ClearCall( + String connId, + KeyValueCollection reasons, + KeyValueCollection extensions + ) + { + try + { + VoicereadyData clearData = new VoicereadyData( + (reasons != null) ? reasons.ToListKvpair() : null, + (extensions != null) ? extensions.ToListKvpair() : null + ); + ClearData data = new ClearData + { + Data = clearData + }; + + ApiSuccessResponse response = this.voiceApi.Clear(connId, data); + Util.ThrowIfNotOk("ClearCall", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("ClearCall failed.", e); + } + } + + /** + * Start call recording + * @param connId The id of the call to start recording. + */ + public void StartRecording(String connId) + { + try + { + ApiSuccessResponse response = this.voiceApi.StartRecording(connId); + Util.ThrowIfNotOk("StartRecording", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("StartRecording failed.", e); + } + } + + /** + * Pause call recording. + * @param connId The id of the call to pause recording on. + */ + public void PauseRecording(String connId) + { + try + { + ApiSuccessResponse response = this.voiceApi.PauseRecording(connId); + Util.ThrowIfNotOk("PauseRecording", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("PauseRecording failed.", e); + } + } + + /** + * Resume call recording. + * @param connId The id of the call to resume recording. + */ + public void ResumeRecording(String connId) + { + try + { + ApiSuccessResponse response = this.voiceApi.ResumeRecording(connId); + Util.ThrowIfNotOk("ResumeRecording", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("ResumeRecording failed.", e); + } + } + + /** + * Stop call recording + * @param connId The id of the call to stop recording. + */ + public void StopRecording(String connId) + { + try + { + ApiSuccessResponse response = this.voiceApi.StopRecording(connId); + Util.ThrowIfNotOk("StopRecording", response); + } + catch (ApiException e) + { + throw new WorkspaceApiException("StopRecording failed.", e); + } + } + + void setVoiceApi(Genesys.Workspace.Internal.Api.VoiceApi api) + { + voiceApi = api; + } + } +} diff --git a/src/Genesys.Workspace/WorkspaceApi.cs b/src/Genesys.Workspace/WorkspaceApi.cs new file mode 100755 index 0000000..82f516c --- /dev/null +++ b/src/Genesys.Workspace/WorkspaceApi.cs @@ -0,0 +1,491 @@ +using System; +using System.Collections.Generic; +using System.Net; +using RestSharp; +using CometD.Client; +using System.Collections; +using Genesys.Workspace.Internal.Client; +using Genesys.Workspace.Internal.Model; +using Genesys.Workspace.Model; +using Genesys.Workspace.Common; +using System.Threading.Tasks; + +namespace Genesys.Workspace +{ + public class WorkspaceApi + { + private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + + public delegate void WorkspaceInitializationEventHandler(bool complete, CometD.Bayeux.IMessage message); + public event WorkspaceInitializationEventHandler InitializationChanged; + + public static String SESSION_COOKIE = "WORKSPACE_SESSIONID"; + + TaskCompletionSource tcsInitialize; + + private ApiClient apiClient; + private VoiceApi voiceApi; + private TargetsApi targetsApi; + private SessionApi sessionApi; + private Notifications notifications; + + private CookieContainer cookieContainer; + private string workspaceSessionId; + private bool workspaceInitialized = false; + + public User User { get; protected set; } + public KeyValueCollection Settings { get; protected set; } + public List ActionCodes { get; protected set; } + public List BusinessAttributes { get; protected set; } + public List Transactions { get; protected set; } + public List AgentGroups { get; protected set; } + + public bool DebugEnabled { get; set; } + + public WorkspaceApi(String apiKey, String baseUrl) : this(apiKey, baseUrl, new VoiceApi(), new TargetsApi(), new SessionApi(), new Notifications()) + { + } + + private WorkspaceApi(String apiKey, String baseUrl, VoiceApi voiceApi, TargetsApi targetsApi, SessionApi sessionApi, Notifications notifications) { + cookieContainer = new CookieContainer(); + tcsInitialize = new TaskCompletionSource(); + + apiClient = new ApiClient(baseUrl + "/workspace/v3"); + apiClient.Configuration.ApiClient = apiClient; // circular reference?!? + apiClient.Configuration.AddApiKey("x-api-key", apiKey); + apiClient.Configuration.DefaultHeader.Add("x-api-key", apiKey); + apiClient.RestClient.CookieContainer = cookieContainer; + apiClient.RestClient.AddDefaultHeader("x-api-key", apiKey); + + //this.apiKey = apiKey; + //this.baseUrl = baseUrl; + //this.workspaceUrl = this.baseUrl + "/workspace/v3"; + + this.voiceApi = voiceApi; + this.targetsApi = targetsApi; + this.sessionApi = sessionApi; + this.notifications = notifications; + + this.sessionApi.Initialize(apiClient); + this.voiceApi.Initialize(apiClient); + this.targetsApi.Initialize(apiClient); + } + + private String extractSessionCookie(ApiResponse response) + { + log.Debug("Extracting session cookie..."); + string sessionId = null; + + foreach (string key in response.Headers.Keys) + { + if (key.Equals("set-cookie")) + { + string cookie = response.Headers[key]; + sessionId = cookie.Split(';')[0].Split('=')[1]; + apiClient.Configuration.DefaultHeader.Add("Cookie", String.Format("{0}={1}", SESSION_COOKIE, sessionId)); + apiClient.RestClient.AddDefaultHeader("Cookie", String.Format("{0}={1}", SESSION_COOKIE, sessionId)); + break; + } + } + + log.Debug("WORKSPACE_SESSIONID is " + sessionId); + + return sessionId; + } + + void OnInitMessage(CometD.Bayeux.Client.IClientSessionChannel channel, CometD.Bayeux.IMessage message, BayeuxClient client) + { + bool complete = false; + + try + { + IDictionary data = message.DataAsDictionary; + + string messageType = (string)data.GetValue("messageType"); + + if ("WorkspaceInitializationComplete".Equals(messageType)) + { + string state = (string)data.GetValue("state"); + if ("Complete".Equals(state)) + { + IDictionary initData = (IDictionary)data.GetValue("data"); + IDictionary userData = (IDictionary)initData.GetValue("user"); + + var annexData = userData.GetValue("userdata"); + KeyValueCollection userProperties = new KeyValueCollection(); + Util.extractKeyValueData(userProperties, annexData); + + if (User == null) + { + User = new User() + { + dbid = (int)userData.GetValue("dbid"), + firstName = (string)userData.GetValue("firstName"), + lastName = (string)userData.GetValue("lastName"), + userName = (string)userData.GetValue("userName"), + employeeId = (string)userData.GetValue("employeeId"), + agentId = (string)userData.GetValue("agentLogin"), + defaultPlace = (string)userData.GetValue("defaultPlace"), + tenantDBID = (int)userData.GetValue("tenantDBID"), + userProperties = userProperties + }; + } + + ExtractConfiguration((IDictionary)initData.GetValue("configuration")); + + this.workspaceInitialized = true; + log.Debug("Initialization complete"); + log.Debug(User.ToString()); + + complete = true; + + tcsInitialize.SetResult(User); + } + else if ("Failed".Equals(state)) + { + log.Debug("Workspace initialization failed!"); + tcsInitialize.SetException(new WorkspaceApiException("Workspace initialization failed")); + } + } + } + catch(Exception exc) + { + log.Error("Error handling OnInitMessage", exc); + } + + if (InitializationChanged != null) + InitializationChanged.Invoke(complete, message); + } + + private void ExtractConfiguration(IDictionary configData) + { + try + { + //log.Debug("Processing Action Codes"); + + ArrayList actionCodesData = (ArrayList)configData.GetValue("actionCodes"); + this.ActionCodes = new List(); + if (actionCodesData != null) + { + //log.Debug(String.Format("Processing {0} Action Codes", actionCodesData.Count)); + + foreach (Dictionary actionCode in actionCodesData) + { + //log.Debug("Action Code: " + actionCode.ToDebugString()); + + var userPropertyData = actionCode.GetValue("userProperties"); + KeyValueCollection userProperties = new KeyValueCollection(); + Util.extractKeyValueData(userProperties, userPropertyData); + + + ArrayList subCodesData = (ArrayList)actionCode.GetValue("subCodes"); + List subCodes = new List(); + if (subCodesData != null) + { + foreach (Dictionary subCode in subCodesData) + { + //log.Debug("Action SubCode: " + subCode.ToDebugString()); + + subCodes.Add(new SubCode() + { + name = (string)subCode.GetValue("name"), + code = (String)subCode.GetValue("code") + }); + } + } + + this.ActionCodes.Add(new ActionCode() + { + name = (string)actionCode.GetValue("name"), + code = (string)actionCode.GetValue("code"), + type = Util.parseActionCodeType((String)actionCode.GetValue("type")), + subCodes = subCodes + }); + } + } + else + { + //log.Debug("No Action Codes to process"); + } + } + catch(Exception exc) + { + //log.Error("Exception parsing Action Codes", exc); + } + + try + { + //log.Debug("Processing Settings"); + + var settingsData = configData.GetValue("settings"); + this.Settings = new KeyValueCollection(); + Util.extractKeyValueData(this.Settings, settingsData); + } + catch(Exception exc) + { + //log.Error("Exception parsing Settings", exc); + } + + try + { + //log.Debug("Processing Business Attributes"); + + ArrayList businessAttributesData = (ArrayList)configData.GetValue("businessAttributes"); + if (businessAttributesData != null) + { + //log.Debug(String.Format("Processing {0} Business Attributes", businessAttributesData.Count)); + + this.BusinessAttributes = new List(); + + foreach (Dictionary businessAttribute in businessAttributesData) + { + //log.Debug("Business Attribute: " + businessAttribute.ToDebugString()); + + ArrayList businessAttributeValues = (ArrayList)businessAttribute.GetValue("values"); + + List values = new List(); + + if (businessAttributeValues != null) + { + foreach (Dictionary businessAttributeValue in businessAttributeValues) + { + //log.Debug("Business Attribute Value: " + businessAttributeValue.ToDebugString()); + + values.Add(new BusinessAttributeValue() + { + dbid = (int)businessAttributeValue.GetValue("id"), + name = (string)businessAttributeValue.GetValue("name"), + displayName = (string)businessAttributeValue.GetValue("displayName"), + description = (string)businessAttributeValue.GetValue("description"), + defaultValue = businessAttributeValue.GetValue("default") + }); + } + } + + this.BusinessAttributes.Add(new BusinessAttribute() + { + dbid = (int)businessAttribute.GetValue("id"), + name = (string)businessAttribute.GetValue("name"), + displayName = (string)businessAttribute.GetValue("displayName"), + description = (string)businessAttribute.GetValue("description"), + values = values + }); + } + } + else + { + //log.Debug("No Business Attributes to process"); + } + } + catch(Exception exc) + { + //log.Error("Exception parsing Business Attributes", exc); + } + + try + { + //log.Debug("Processing Transactions"); + + ArrayList transactionsData = (ArrayList)configData.GetValue("transactions"); + if (transactionsData != null) + { + //log.Debug(String.Format("Processing {0} Transactions", transactionsData.Count)); + + this.Transactions = new List(); + foreach (Dictionary transaction in transactionsData) + { + //log.Debug("Transaction: " + transaction.ToDebugString()); + + var userPropertyData = transaction.GetValue("userProperties"); + KeyValueCollection userProperties = new KeyValueCollection(); + Util.extractKeyValueData(userProperties, userPropertyData); + + this.Transactions.Add(new Transaction() + { + name = (string)transaction.GetValue("name"), + alias = (string)transaction.GetValue("alias"), + userProperties = userProperties + }); + } + } + else + { + //log.Debug("No Transactions to process"); + } + } + catch(Exception exc) + { + //log.Error("Exception parsing Transactions", exc); + } + + try + { + //log.Debug("Processing Agent Groups"); + + ArrayList agentGroupsData = (ArrayList)configData.GetValue("agentGroups"); + if (agentGroupsData != null) + { + //log.Debug(String.Format("Processing {0} Agent Groups", agentGroupsData.Count)); + + this.AgentGroups = new List(); + foreach (Dictionary agentGroup in agentGroupsData) + { + //log.Debug("Agent Group: " + agentGroup.ToDebugString()); + + KeyValueCollection userProperties = new KeyValueCollection(); + Dictionary agentGroupSettingsData = (Dictionary)agentGroup.GetValue("settings"); + if (agentGroupSettingsData != null && !(agentGroupSettingsData.Count == 0)) + { + // Top level will be sections + foreach (string sectionName in agentGroupSettingsData.Keys) + { + Dictionary sectionData = (Dictionary)agentGroupSettingsData[sectionName]; + KeyValueCollection section = new KeyValueCollection(); + if (sectionData != null && !(sectionData.Count == 0)) + { + foreach (string optionName in sectionData.Keys) + { + section.addString(optionName, (String)sectionData[optionName]); + } + } + + userProperties.addList(sectionName, section); + } + } + + this.AgentGroups.Add(new AgentGroup() + { + dbid = (int)agentGroup.GetValue("DBID"), + name = (string)agentGroup.GetValue("name"), + userProperties = userProperties + }); + } + } + else + { + //log.Debug("No Agent Groups to process"); + } + } + catch(Exception exc) + { + //log.Error("Exception parsing Agent Groups", exc); + } + } + + public VoiceApi Voice() + { + return this.voiceApi; + } + + public TargetsApi Targets() + { + return this.targetsApi; + } + + public Task Initialize(string token) + { + return Initialize(null, null, token); + } + + public Task Initialize(string authCode, string redirectUri, string token) + { + try + { + ApiResponse response = sessionApi.InitializeWorkspaceWithHttpInfo(authCode, redirectUri, "bearer " + token); + + log.Debug("SessionApi.InitializeWorkspace Response: " + response.Data.ToJson()); + workspaceSessionId = extractSessionCookie(response); + + notifications.subscribe("/workspace/v3/initialization", OnInitMessage); + notifications.subscribe("/workspace/v3/voice", this.voiceApi.OnVoiceMessage); + notifications.Initialize(apiClient); + } + catch(Exception exc) + { + log.Error("Failed to initialize workspace", exc); + tcsInitialize.SetException(exc); + } + + return tcsInitialize.Task; + } + + public void Destroy() + { + try { + if (this.workspaceInitialized) + { + notifications.Disconnect(); + sessionApi.Logout(); + } + } catch (Exception e) { + throw new WorkspaceApiException("destroy failed.", e); + } finally { + this.workspaceInitialized = false; + } + } + + /** + * Initializes the voice channel using the specified resources. + * @param agentId agentId to be used for login + * @param placeName name of the place to use for login + */ + public void ActivateChannels( + string agentId, + string placeName) + { + this.ActivateChannels(agentId, null, placeName, null, ActivatechannelsData.AgentWorkModeEnum.ManualIn); + } + + /** + * Initializes the voice channel using the specified resources. + * @param agentId agentId to be used for login + * @param dn DN to be used for login. Provide only one of dn or placeName + * @param placeName name of the place to use for login. Provide only one of placeName or dn + * @param queueName name of the queue to be used for login. (optional) + */ + public void ActivateChannels( + string agentId, + string dn, + string placeName, + string queueName, + ActivatechannelsData.AgentWorkModeEnum? agentWorkMode + ) + { + try { + string msg = "Activating channels with agentId [" + agentId + "] "; + ActivatechannelsData data = new ActivatechannelsData(); + data.AgentId = agentId; + data.AgentWorkMode = agentWorkMode; + + if (placeName != null) + { + data.PlaceName = placeName; + msg += "place [" + placeName + "]"; + } + else + { + data.Dn = dn; + msg += "dn [" + dn + "]"; + } + + if (queueName != null) + { + data.QueueName = queueName; + msg += " queueName [" + queueName + "]"; + } + + ChannelsData channelsData = new ChannelsData(); + channelsData.Data = data; + + log.Debug(msg + "..."); + ApiSuccessResponse response = this.sessionApi.ActivateChannels(channelsData); + if (response.Status.Code != 0) + { + throw new WorkspaceApiException( "activateChannels failed with code: " + response.Status.Code + " - " + response.Status.Message ); + } + } catch (ApiException e) { + throw new WorkspaceApiException("activateChannels failed.", e); + } + } + } +} diff --git a/src/Genesys.Workspace/packages.config b/src/Genesys.Workspace/packages.config index 351ef13..d079b7a 100644 --- a/src/Genesys.Workspace/packages.config +++ b/src/Genesys.Workspace/packages.config @@ -1,5 +1,6 @@ - + - + - + + \ No newline at end of file