Last active
October 5, 2017 04:12
-
-
Save xtellurian/06d8f8e12b24dcb78914f41d7623e7aa to your computer and use it in GitHub Desktop.
A C# Bot Framework Direct Line Client, Generated by NSwagStudio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//---------------------- | |
// <auto-generated> | |
// Generated using the NSwag toolchain v11.9.0.0 (NJsonSchema v9.7.1.0 (Newtonsoft.Json v9.0.0.0)) (http://NSwag.org) | |
// </auto-generated> | |
//---------------------- | |
// https://docs.botframework.com/en-us/restapi/directline3/swagger.json | |
namespace Microsoft.BotFramework.DirectLine | |
{ | |
#pragma warning disable // Disable all warnings | |
[System.CodeDom.Compiler.GeneratedCode("NSwag", "11.9.0.0")] | |
public partial class ConversationsClient | |
{ | |
private System.Lazy<Newtonsoft.Json.JsonSerializerSettings> _settings; | |
private string _baseUrl = "https://directline.botframework.com"; | |
private System.Net.Http.HttpClient _httpClient; | |
public ConversationsClient(System.Net.Http.HttpClient httpClient) | |
{ | |
_httpClient = httpClient; | |
_settings = new System.Lazy<Newtonsoft.Json.JsonSerializerSettings>(() => | |
{ | |
var settings = new Newtonsoft.Json.JsonSerializerSettings(); | |
UpdateJsonSerializerSettings(settings); | |
return settings; | |
}); | |
} | |
public string BaseUrl | |
{ | |
get { return _baseUrl; } | |
set { _baseUrl = value; } | |
} | |
partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); | |
partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); | |
partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); | |
partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); | |
/// <summary>Start a new conversation</summary> | |
/// <returns>The conversation was successfully created, updated, or retrieved.</returns> | |
/// <exception cref="DirectLineException">A server side error occurred.</exception> | |
public System.Threading.Tasks.Task<Conversation> StartConversationAsync() | |
{ | |
return StartConversationAsync(System.Threading.CancellationToken.None); | |
} | |
/// <summary>Start a new conversation</summary> | |
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> | |
/// <returns>The conversation was successfully created, updated, or retrieved.</returns> | |
/// <exception cref="DirectLineException">A server side error occurred.</exception> | |
public async System.Threading.Tasks.Task<Conversation> StartConversationAsync(System.Threading.CancellationToken cancellationToken) | |
{ | |
var urlBuilder_ = new System.Text.StringBuilder(); | |
urlBuilder_.Append(BaseUrl).Append("/v3/directline/conversations"); | |
var client_ = _httpClient; | |
try | |
{ | |
using (var request_ = new System.Net.Http.HttpRequestMessage()) | |
{ | |
var content_ = new System.Net.Http.StringContent(string.Empty); | |
request_.Content = content_; | |
request_.Method = new System.Net.Http.HttpMethod("POST"); | |
request_.Headers.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); | |
PrepareRequest(client_, request_, urlBuilder_); | |
var url_ = urlBuilder_.ToString(); | |
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); | |
PrepareRequest(client_, request_, url_); | |
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); | |
try | |
{ | |
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); | |
foreach (var item_ in response_.Content.Headers) | |
headers_[item_.Key] = item_.Value; | |
ProcessResponse(client_, response_); | |
var status_ = ((int)response_.StatusCode).ToString(); | |
if (status_ == "200") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
var result_ = default(Conversation); | |
try | |
{ | |
result_ = Newtonsoft.Json.JsonConvert.DeserializeObject<Conversation>(responseData_, _settings.Value); | |
return result_; | |
} | |
catch (System.Exception exception) | |
{ | |
throw new DirectLineException("Could not deserialize the response body.", status_, responseData_, headers_, exception); | |
} | |
} | |
else | |
if (status_ == "201") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
var result_ = default(Conversation); | |
try | |
{ | |
result_ = Newtonsoft.Json.JsonConvert.DeserializeObject<Conversation>(responseData_, _settings.Value); | |
return result_; | |
} | |
catch (System.Exception exception) | |
{ | |
throw new DirectLineException("Could not deserialize the response body.", status_, responseData_, headers_, exception); | |
} | |
} | |
else | |
if (status_ == "401") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The operation included an invalid or missing Authorization header.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "403") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("You are forbidden from performing this action because your token or secret is invalid.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "404") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The requested resource was not found.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "409") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The object you are trying to create already exists.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ != "200" && status_ != "204") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", status_, responseData_, headers_, null); | |
} | |
return default(Conversation); | |
} | |
finally | |
{ | |
if (response_ != null) | |
response_.Dispose(); | |
} | |
} | |
} | |
finally | |
{ | |
} | |
} | |
/// <summary>Get information about an existing conversation</summary> | |
/// <returns>The conversation was successfully created, updated, or retrieved.</returns> | |
/// <exception cref="DirectLineException">A server side error occurred.</exception> | |
public System.Threading.Tasks.Task<Conversation> ReconnectToConversationAsync(string conversationId, string watermark) | |
{ | |
return ReconnectToConversationAsync(conversationId, watermark, System.Threading.CancellationToken.None); | |
} | |
/// <summary>Get information about an existing conversation</summary> | |
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> | |
/// <returns>The conversation was successfully created, updated, or retrieved.</returns> | |
/// <exception cref="DirectLineException">A server side error occurred.</exception> | |
public async System.Threading.Tasks.Task<Conversation> ReconnectToConversationAsync(string conversationId, string watermark, System.Threading.CancellationToken cancellationToken) | |
{ | |
if (conversationId == null) | |
throw new System.ArgumentNullException("conversationId"); | |
var urlBuilder_ = new System.Text.StringBuilder(); | |
urlBuilder_.Append(BaseUrl).Append("/v3/directline/conversations/{conversationId}?"); | |
urlBuilder_.Replace("{conversationId}", System.Uri.EscapeDataString(System.Convert.ToString(conversationId, System.Globalization.CultureInfo.InvariantCulture))); | |
if (watermark != null) urlBuilder_.Append("watermark=").Append(System.Uri.EscapeDataString(System.Convert.ToString(watermark, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); | |
urlBuilder_.Length--; | |
var client_ = _httpClient; | |
try | |
{ | |
using (var request_ = new System.Net.Http.HttpRequestMessage()) | |
{ | |
request_.Method = new System.Net.Http.HttpMethod("GET"); | |
request_.Headers.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); | |
PrepareRequest(client_, request_, urlBuilder_); | |
var url_ = urlBuilder_.ToString(); | |
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); | |
PrepareRequest(client_, request_, url_); | |
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); | |
try | |
{ | |
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); | |
foreach (var item_ in response_.Content.Headers) | |
headers_[item_.Key] = item_.Value; | |
ProcessResponse(client_, response_); | |
var status_ = ((int)response_.StatusCode).ToString(); | |
if (status_ == "200") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
var result_ = default(Conversation); | |
try | |
{ | |
result_ = Newtonsoft.Json.JsonConvert.DeserializeObject<Conversation>(responseData_, _settings.Value); | |
return result_; | |
} | |
catch (System.Exception exception) | |
{ | |
throw new DirectLineException("Could not deserialize the response body.", status_, responseData_, headers_, exception); | |
} | |
} | |
else | |
if (status_ == "401") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The operation included an invalid or missing Authorization header.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "403") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("You are forbidden from performing this action because your token or secret is invalid.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "404") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The requested resource was not found.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ != "200" && status_ != "204") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", status_, responseData_, headers_, null); | |
} | |
return default(Conversation); | |
} | |
finally | |
{ | |
if (response_ != null) | |
response_.Dispose(); | |
} | |
} | |
} | |
finally | |
{ | |
} | |
} | |
/// <summary>Get activities in this conversation. This method is paged with the 'watermark' parameter.</summary> | |
/// <param name="conversationId">Conversation ID</param> | |
/// <param name="watermark">(Optional) only returns activities newer than this watermark</param> | |
/// <returns>A set of activities and a watermark are returned.</returns> | |
/// <exception cref="DirectLineException">A server side error occurred.</exception> | |
public System.Threading.Tasks.Task<ActivitySet> GetActivitiesAsync(string conversationId, string watermark) | |
{ | |
return GetActivitiesAsync(conversationId, watermark, System.Threading.CancellationToken.None); | |
} | |
/// <summary>Get activities in this conversation. This method is paged with the 'watermark' parameter.</summary> | |
/// <param name="conversationId">Conversation ID</param> | |
/// <param name="watermark">(Optional) only returns activities newer than this watermark</param> | |
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> | |
/// <returns>A set of activities and a watermark are returned.</returns> | |
/// <exception cref="DirectLineException">A server side error occurred.</exception> | |
public async System.Threading.Tasks.Task<ActivitySet> GetActivitiesAsync(string conversationId, string watermark, System.Threading.CancellationToken cancellationToken) | |
{ | |
if (conversationId == null) | |
throw new System.ArgumentNullException("conversationId"); | |
var urlBuilder_ = new System.Text.StringBuilder(); | |
urlBuilder_.Append(BaseUrl).Append("/v3/directline/conversations/{conversationId}/activities?"); | |
urlBuilder_.Replace("{conversationId}", System.Uri.EscapeDataString(System.Convert.ToString(conversationId, System.Globalization.CultureInfo.InvariantCulture))); | |
if (watermark != null) urlBuilder_.Append("watermark=").Append(System.Uri.EscapeDataString(System.Convert.ToString(watermark, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); | |
urlBuilder_.Length--; | |
var client_ = _httpClient; | |
try | |
{ | |
using (var request_ = new System.Net.Http.HttpRequestMessage()) | |
{ | |
request_.Method = new System.Net.Http.HttpMethod("GET"); | |
request_.Headers.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); | |
PrepareRequest(client_, request_, urlBuilder_); | |
var url_ = urlBuilder_.ToString(); | |
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); | |
PrepareRequest(client_, request_, url_); | |
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); | |
try | |
{ | |
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); | |
foreach (var item_ in response_.Content.Headers) | |
headers_[item_.Key] = item_.Value; | |
ProcessResponse(client_, response_); | |
var status_ = ((int)response_.StatusCode).ToString(); | |
if (status_ == "200") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
var result_ = default(ActivitySet); | |
try | |
{ | |
result_ = Newtonsoft.Json.JsonConvert.DeserializeObject<ActivitySet>(responseData_, _settings.Value); | |
return result_; | |
} | |
catch (System.Exception exception) | |
{ | |
throw new DirectLineException("Could not deserialize the response body.", status_, responseData_, headers_, exception); | |
} | |
} | |
else | |
if (status_ == "401") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The operation included an invalid or missing Authorization header.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "403") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("You are forbidden from performing this action because your token or secret is invalid.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "404") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The requested resource was not found.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ != "200" && status_ != "204") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", status_, responseData_, headers_, null); | |
} | |
return default(ActivitySet); | |
} | |
finally | |
{ | |
if (response_ != null) | |
response_.Dispose(); | |
} | |
} | |
} | |
finally | |
{ | |
} | |
} | |
/// <summary>Send an activity</summary> | |
/// <param name="conversationId">Conversation ID</param> | |
/// <param name="activity">Activity to send</param> | |
/// <returns>The operation succeeded.</returns> | |
/// <exception cref="DirectLineException">A server side error occurred.</exception> | |
public System.Threading.Tasks.Task<ResourceResponse> PostActivityAsync(string conversationId, Activity activity) | |
{ | |
return PostActivityAsync(conversationId, activity, System.Threading.CancellationToken.None); | |
} | |
/// <summary>Send an activity</summary> | |
/// <param name="conversationId">Conversation ID</param> | |
/// <param name="activity">Activity to send</param> | |
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> | |
/// <returns>The operation succeeded.</returns> | |
/// <exception cref="DirectLineException">A server side error occurred.</exception> | |
public async System.Threading.Tasks.Task<ResourceResponse> PostActivityAsync(string conversationId, Activity activity, System.Threading.CancellationToken cancellationToken) | |
{ | |
if (conversationId == null) | |
throw new System.ArgumentNullException("conversationId"); | |
var urlBuilder_ = new System.Text.StringBuilder(); | |
urlBuilder_.Append(BaseUrl).Append("/v3/directline/conversations/{conversationId}/activities"); | |
urlBuilder_.Replace("{conversationId}", System.Uri.EscapeDataString(System.Convert.ToString(conversationId, System.Globalization.CultureInfo.InvariantCulture))); | |
var client_ = _httpClient; | |
try | |
{ | |
using (var request_ = new System.Net.Http.HttpRequestMessage()) | |
{ | |
var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(activity, _settings.Value)); | |
content_.Headers.ContentType.MediaType = "application/json"; | |
request_.Content = content_; | |
request_.Method = new System.Net.Http.HttpMethod("POST"); | |
request_.Headers.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); | |
PrepareRequest(client_, request_, urlBuilder_); | |
var url_ = urlBuilder_.ToString(); | |
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); | |
PrepareRequest(client_, request_, url_); | |
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); | |
try | |
{ | |
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); | |
foreach (var item_ in response_.Content.Headers) | |
headers_[item_.Key] = item_.Value; | |
ProcessResponse(client_, response_); | |
var status_ = ((int)response_.StatusCode).ToString(); | |
if (status_ == "200") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
var result_ = default(ResourceResponse); | |
try | |
{ | |
result_ = Newtonsoft.Json.JsonConvert.DeserializeObject<ResourceResponse>(responseData_, _settings.Value); | |
return result_; | |
} | |
catch (System.Exception exception) | |
{ | |
throw new DirectLineException("Could not deserialize the response body.", status_, responseData_, headers_, exception); | |
} | |
} | |
else | |
if (status_ == "204") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The operation succeeded. No content was returned.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "400") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The URL, body, or headers in the request are malformed or invalid.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "401") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The operation included an invalid or missing Authorization header.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "403") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("You are forbidden from performing this action because your token or secret is invalid.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "404") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The requested resource was not found.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "500") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("An internal server error has occurred.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "502") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The bot is unavailable or returned an error.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ != "200" && status_ != "204") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", status_, responseData_, headers_, null); | |
} | |
return default(ResourceResponse); | |
} | |
finally | |
{ | |
if (response_ != null) | |
response_.Dispose(); | |
} | |
} | |
} | |
finally | |
{ | |
} | |
} | |
/// <summary>Upload file(s) and send as attachment(s)</summary> | |
/// <returns>The operation succeeded.</returns> | |
/// <exception cref="DirectLineException">A server side error occurred.</exception> | |
public System.Threading.Tasks.Task<ResourceResponse> UploadAsync(string conversationId, string userId, FileParameter file) | |
{ | |
return UploadAsync(conversationId, userId, file, System.Threading.CancellationToken.None); | |
} | |
/// <summary>Upload file(s) and send as attachment(s)</summary> | |
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> | |
/// <returns>The operation succeeded.</returns> | |
/// <exception cref="DirectLineException">A server side error occurred.</exception> | |
public async System.Threading.Tasks.Task<ResourceResponse> UploadAsync(string conversationId, string userId, FileParameter file, System.Threading.CancellationToken cancellationToken) | |
{ | |
if (conversationId == null) | |
throw new System.ArgumentNullException("conversationId"); | |
var urlBuilder_ = new System.Text.StringBuilder(); | |
urlBuilder_.Append(BaseUrl).Append("/v3/directline/conversations/{conversationId}/upload?"); | |
urlBuilder_.Replace("{conversationId}", System.Uri.EscapeDataString(System.Convert.ToString(conversationId, System.Globalization.CultureInfo.InvariantCulture))); | |
if (userId != null) urlBuilder_.Append("userId=").Append(System.Uri.EscapeDataString(System.Convert.ToString(userId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); | |
urlBuilder_.Length--; | |
var client_ = _httpClient; | |
try | |
{ | |
using (var request_ = new System.Net.Http.HttpRequestMessage()) | |
{ | |
var boundary_ = System.Guid.NewGuid().ToString(); | |
var content_ = new System.Net.Http.MultipartFormDataContent(boundary_); | |
content_.Headers.Remove("Content-Type"); | |
content_.Headers.TryAddWithoutValidation("Content-Type", "multipart/form-data; boundary=" + boundary_); | |
if (file == null) | |
throw new System.ArgumentNullException("file"); | |
else | |
content_.Add(new System.Net.Http.StreamContent(file.Data), "file", file.FileName ?? "file"); | |
request_.Content = content_; | |
request_.Method = new System.Net.Http.HttpMethod("POST"); | |
request_.Headers.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); | |
PrepareRequest(client_, request_, urlBuilder_); | |
var url_ = urlBuilder_.ToString(); | |
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); | |
PrepareRequest(client_, request_, url_); | |
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); | |
try | |
{ | |
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); | |
foreach (var item_ in response_.Content.Headers) | |
headers_[item_.Key] = item_.Value; | |
ProcessResponse(client_, response_); | |
var status_ = ((int)response_.StatusCode).ToString(); | |
if (status_ == "200") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
var result_ = default(ResourceResponse); | |
try | |
{ | |
result_ = Newtonsoft.Json.JsonConvert.DeserializeObject<ResourceResponse>(responseData_, _settings.Value); | |
return result_; | |
} | |
catch (System.Exception exception) | |
{ | |
throw new DirectLineException("Could not deserialize the response body.", status_, responseData_, headers_, exception); | |
} | |
} | |
else | |
if (status_ == "202") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The request was accepted for processing.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "204") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The operation succeeded. No content was returned.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "400") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The URL, body, or headers in the request are malformed or invalid.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "401") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The operation included an invalid or missing Authorization header.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "403") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("You are forbidden from performing this action because your token or secret is invalid.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "404") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The requested resource was not found.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "500") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("An internal server error has occurred.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "502") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The bot is unavailable or returned an error.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ != "200" && status_ != "204") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", status_, responseData_, headers_, null); | |
} | |
return default(ResourceResponse); | |
} | |
finally | |
{ | |
if (response_ != null) | |
response_.Dispose(); | |
} | |
} | |
} | |
finally | |
{ | |
} | |
} | |
} | |
[System.CodeDom.Compiler.GeneratedCode("NSwag", "11.9.0.0")] | |
public partial class TokensClient | |
{ | |
private System.Lazy<Newtonsoft.Json.JsonSerializerSettings> _settings; | |
private string _baseUrl = "https://directline.botframework.com"; | |
private System.Net.Http.HttpClient _httpClient; | |
public TokensClient(System.Net.Http.HttpClient httpClient) | |
{ | |
_httpClient = httpClient; | |
_settings = new System.Lazy<Newtonsoft.Json.JsonSerializerSettings>(() => | |
{ | |
var settings = new Newtonsoft.Json.JsonSerializerSettings(); | |
UpdateJsonSerializerSettings(settings); | |
return settings; | |
}); | |
} | |
public string BaseUrl | |
{ | |
get { return _baseUrl; } | |
set { _baseUrl = value; } | |
} | |
partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); | |
partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); | |
partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); | |
partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); | |
/// <summary>Refresh a token</summary> | |
/// <returns>The conversation was successfully created, updated, or retrieved.</returns> | |
/// <exception cref="DirectLineException">A server side error occurred.</exception> | |
public System.Threading.Tasks.Task<Conversation> RefreshTokenAsync() | |
{ | |
return RefreshTokenAsync(System.Threading.CancellationToken.None); | |
} | |
/// <summary>Refresh a token</summary> | |
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> | |
/// <returns>The conversation was successfully created, updated, or retrieved.</returns> | |
/// <exception cref="DirectLineException">A server side error occurred.</exception> | |
public async System.Threading.Tasks.Task<Conversation> RefreshTokenAsync(System.Threading.CancellationToken cancellationToken) | |
{ | |
var urlBuilder_ = new System.Text.StringBuilder(); | |
urlBuilder_.Append(BaseUrl).Append("/v3/directline/tokens/refresh"); | |
var client_ = _httpClient; | |
try | |
{ | |
using (var request_ = new System.Net.Http.HttpRequestMessage()) | |
{ | |
var content_ = new System.Net.Http.StringContent(string.Empty); | |
request_.Content = content_; | |
request_.Method = new System.Net.Http.HttpMethod("POST"); | |
request_.Headers.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); | |
PrepareRequest(client_, request_, urlBuilder_); | |
var url_ = urlBuilder_.ToString(); | |
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); | |
PrepareRequest(client_, request_, url_); | |
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); | |
try | |
{ | |
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); | |
foreach (var item_ in response_.Content.Headers) | |
headers_[item_.Key] = item_.Value; | |
ProcessResponse(client_, response_); | |
var status_ = ((int)response_.StatusCode).ToString(); | |
if (status_ == "200") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
var result_ = default(Conversation); | |
try | |
{ | |
result_ = Newtonsoft.Json.JsonConvert.DeserializeObject<Conversation>(responseData_, _settings.Value); | |
return result_; | |
} | |
catch (System.Exception exception) | |
{ | |
throw new DirectLineException("Could not deserialize the response body.", status_, responseData_, headers_, exception); | |
} | |
} | |
else | |
if (status_ == "401") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The operation included an invalid or missing Authorization header.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "403") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("You are forbidden from performing this action because your token or secret is invalid.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "404") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The requested resource was not found.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "500") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("An internal server error has occurred.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ != "200" && status_ != "204") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", status_, responseData_, headers_, null); | |
} | |
return default(Conversation); | |
} | |
finally | |
{ | |
if (response_ != null) | |
response_.Dispose(); | |
} | |
} | |
} | |
finally | |
{ | |
} | |
} | |
/// <summary>Generate a token for a new conversation</summary> | |
/// <returns>The conversation was successfully created, updated, or retrieved.</returns> | |
/// <exception cref="DirectLineException">A server side error occurred.</exception> | |
public System.Threading.Tasks.Task<Conversation> GenerateTokenForNewConversationAsync(TokenParameters tokenParameters) | |
{ | |
return GenerateTokenForNewConversationAsync(tokenParameters, System.Threading.CancellationToken.None); | |
} | |
/// <summary>Generate a token for a new conversation</summary> | |
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> | |
/// <returns>The conversation was successfully created, updated, or retrieved.</returns> | |
/// <exception cref="DirectLineException">A server side error occurred.</exception> | |
public async System.Threading.Tasks.Task<Conversation> GenerateTokenForNewConversationAsync(TokenParameters tokenParameters, System.Threading.CancellationToken cancellationToken) | |
{ | |
var urlBuilder_ = new System.Text.StringBuilder(); | |
urlBuilder_.Append(BaseUrl).Append("/v3/directline/tokens/generate"); | |
var client_ = _httpClient; | |
try | |
{ | |
using (var request_ = new System.Net.Http.HttpRequestMessage()) | |
{ | |
var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(tokenParameters, _settings.Value)); | |
content_.Headers.ContentType.MediaType = "application/json"; | |
request_.Content = content_; | |
request_.Method = new System.Net.Http.HttpMethod("POST"); | |
request_.Headers.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); | |
PrepareRequest(client_, request_, urlBuilder_); | |
var url_ = urlBuilder_.ToString(); | |
request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); | |
PrepareRequest(client_, request_, url_); | |
var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); | |
try | |
{ | |
var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); | |
foreach (var item_ in response_.Content.Headers) | |
headers_[item_.Key] = item_.Value; | |
ProcessResponse(client_, response_); | |
var status_ = ((int)response_.StatusCode).ToString(); | |
if (status_ == "200") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
var result_ = default(Conversation); | |
try | |
{ | |
result_ = Newtonsoft.Json.JsonConvert.DeserializeObject<Conversation>(responseData_, _settings.Value); | |
return result_; | |
} | |
catch (System.Exception exception) | |
{ | |
throw new DirectLineException("Could not deserialize the response body.", status_, responseData_, headers_, exception); | |
} | |
} | |
else | |
if (status_ == "401") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The operation included an invalid or missing Authorization header.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "403") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("You are forbidden from performing this action because your token or secret is invalid.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "404") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The requested resource was not found.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ == "500") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("An internal server error has occurred.", status_, responseData_, headers_, null); | |
} | |
else | |
if (status_ != "200" && status_ != "204") | |
{ | |
var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false); | |
throw new DirectLineException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", status_, responseData_, headers_, null); | |
} | |
return default(Conversation); | |
} | |
finally | |
{ | |
if (response_ != null) | |
response_.Dispose(); | |
} | |
} | |
} | |
finally | |
{ | |
} | |
} | |
} | |
/// <summary>An object representing a conversation or a conversation token</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class Conversation : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _conversationId; | |
private string _token; | |
private int? _expires_in; | |
private string _streamUrl; | |
private string _referenceGrammarId; | |
private string _eTag; | |
/// <summary>ID for this conversation</summary> | |
[Newtonsoft.Json.JsonProperty("conversationId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string ConversationId | |
{ | |
get { return _conversationId; } | |
set | |
{ | |
if (_conversationId != value) | |
{ | |
_conversationId = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Token scoped to this conversation</summary> | |
[Newtonsoft.Json.JsonProperty("token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Token | |
{ | |
get { return _token; } | |
set | |
{ | |
if (_token != value) | |
{ | |
_token = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Expiration for token</summary> | |
[Newtonsoft.Json.JsonProperty("expires_in", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public int? Expires_in | |
{ | |
get { return _expires_in; } | |
set | |
{ | |
if (_expires_in != value) | |
{ | |
_expires_in = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>URL for this conversation's message stream</summary> | |
[Newtonsoft.Json.JsonProperty("streamUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string StreamUrl | |
{ | |
get { return _streamUrl; } | |
set | |
{ | |
if (_streamUrl != value) | |
{ | |
_streamUrl = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>ID for the reference grammar for this bot</summary> | |
[Newtonsoft.Json.JsonProperty("referenceGrammarId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string ReferenceGrammarId | |
{ | |
get { return _referenceGrammarId; } | |
set | |
{ | |
if (_referenceGrammarId != value) | |
{ | |
_referenceGrammarId = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
[Newtonsoft.Json.JsonProperty("eTag", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string ETag | |
{ | |
get { return _eTag; } | |
set | |
{ | |
if (_eTag != value) | |
{ | |
_eTag = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static Conversation FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<Conversation>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>A collection of activities</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class ActivitySet : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private System.Collections.ObjectModel.ObservableCollection<Activity> _activities; | |
private string _watermark; | |
/// <summary>Activities</summary> | |
[Newtonsoft.Json.JsonProperty("activities", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<Activity> Activities | |
{ | |
get { return _activities; } | |
set | |
{ | |
if (_activities != value) | |
{ | |
_activities = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Maximum watermark of activities within this set</summary> | |
[Newtonsoft.Json.JsonProperty("watermark", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Watermark | |
{ | |
get { return _watermark; } | |
set | |
{ | |
if (_watermark != value) | |
{ | |
_watermark = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static ActivitySet FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<ActivitySet>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>An Activity is the basic communication type for the Bot Framework 3.0 protocol</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class Activity : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _type; | |
private string _id; | |
private System.DateTime? _timestamp; | |
private System.DateTime? _localTimestamp; | |
private string _serviceUrl; | |
private string _channelId; | |
private ChannelAccount _from; | |
private ConversationAccount _conversation; | |
private ChannelAccount _recipient; | |
private string _textFormat; | |
private string _attachmentLayout; | |
private System.Collections.ObjectModel.ObservableCollection<ChannelAccount> _membersAdded; | |
private System.Collections.ObjectModel.ObservableCollection<ChannelAccount> _membersRemoved; | |
private string _topicName; | |
private bool? _historyDisclosed; | |
private string _locale; | |
private string _text; | |
private string _speak; | |
private string _inputHint; | |
private string _summary; | |
private SuggestedActions _suggestedActions; | |
private System.Collections.ObjectModel.ObservableCollection<Attachment> _attachments; | |
private System.Collections.ObjectModel.ObservableCollection<Entity> _entities; | |
private object _channelData; | |
private string _action; | |
private string _replyToId; | |
private object _value; | |
private string _name; | |
private ConversationReference _relatesTo; | |
private string _code; | |
/// <summary>The type of the activity [message|contactRelationUpdate|converationUpdate|typing|endOfConversation|event|invoke]</summary> | |
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Type | |
{ | |
get { return _type; } | |
set | |
{ | |
if (_type != value) | |
{ | |
_type = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>ID of this activity</summary> | |
[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Id | |
{ | |
get { return _id; } | |
set | |
{ | |
if (_id != value) | |
{ | |
_id = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>UTC Time when message was sent (set by service)</summary> | |
[Newtonsoft.Json.JsonProperty("timestamp", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.DateTime? Timestamp | |
{ | |
get { return _timestamp; } | |
set | |
{ | |
if (_timestamp != value) | |
{ | |
_timestamp = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Local time when message was sent (set by client, Ex: 2016-09-23T13:07:49.4714686-07:00)</summary> | |
[Newtonsoft.Json.JsonProperty("localTimestamp", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.DateTime? LocalTimestamp | |
{ | |
get { return _localTimestamp; } | |
set | |
{ | |
if (_localTimestamp != value) | |
{ | |
_localTimestamp = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Service endpoint where operations concerning the activity may be performed</summary> | |
[Newtonsoft.Json.JsonProperty("serviceUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string ServiceUrl | |
{ | |
get { return _serviceUrl; } | |
set | |
{ | |
if (_serviceUrl != value) | |
{ | |
_serviceUrl = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>ID of the channel where the activity was sent</summary> | |
[Newtonsoft.Json.JsonProperty("channelId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string ChannelId | |
{ | |
get { return _channelId; } | |
set | |
{ | |
if (_channelId != value) | |
{ | |
_channelId = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Sender address</summary> | |
[Newtonsoft.Json.JsonProperty("from", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public ChannelAccount From | |
{ | |
get { return _from; } | |
set | |
{ | |
if (_from != value) | |
{ | |
_from = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Conversation</summary> | |
[Newtonsoft.Json.JsonProperty("conversation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public ConversationAccount Conversation | |
{ | |
get { return _conversation; } | |
set | |
{ | |
if (_conversation != value) | |
{ | |
_conversation = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>(Outbound to bot only) Bot's address that received the message</summary> | |
[Newtonsoft.Json.JsonProperty("recipient", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public ChannelAccount Recipient | |
{ | |
get { return _recipient; } | |
set | |
{ | |
if (_recipient != value) | |
{ | |
_recipient = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Format of text fields [plain|markdown] Default:markdown</summary> | |
[Newtonsoft.Json.JsonProperty("textFormat", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string TextFormat | |
{ | |
get { return _textFormat; } | |
set | |
{ | |
if (_textFormat != value) | |
{ | |
_textFormat = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Hint for how to deal with multiple attachments: [list|carousel] Default:list</summary> | |
[Newtonsoft.Json.JsonProperty("attachmentLayout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string AttachmentLayout | |
{ | |
get { return _attachmentLayout; } | |
set | |
{ | |
if (_attachmentLayout != value) | |
{ | |
_attachmentLayout = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Array of address added</summary> | |
[Newtonsoft.Json.JsonProperty("membersAdded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<ChannelAccount> MembersAdded | |
{ | |
get { return _membersAdded; } | |
set | |
{ | |
if (_membersAdded != value) | |
{ | |
_membersAdded = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Array of addresses removed</summary> | |
[Newtonsoft.Json.JsonProperty("membersRemoved", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<ChannelAccount> MembersRemoved | |
{ | |
get { return _membersRemoved; } | |
set | |
{ | |
if (_membersRemoved != value) | |
{ | |
_membersRemoved = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Conversations new topic name</summary> | |
[Newtonsoft.Json.JsonProperty("topicName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string TopicName | |
{ | |
get { return _topicName; } | |
set | |
{ | |
if (_topicName != value) | |
{ | |
_topicName = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>True if the previous history of the channel is disclosed</summary> | |
[Newtonsoft.Json.JsonProperty("historyDisclosed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public bool? HistoryDisclosed | |
{ | |
get { return _historyDisclosed; } | |
set | |
{ | |
if (_historyDisclosed != value) | |
{ | |
_historyDisclosed = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>The language code of the Text field</summary> | |
[Newtonsoft.Json.JsonProperty("locale", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Locale | |
{ | |
get { return _locale; } | |
set | |
{ | |
if (_locale != value) | |
{ | |
_locale = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Content for the message</summary> | |
[Newtonsoft.Json.JsonProperty("text", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Text | |
{ | |
get { return _text; } | |
set | |
{ | |
if (_text != value) | |
{ | |
_text = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>SSML Speak for TTS audio response</summary> | |
[Newtonsoft.Json.JsonProperty("speak", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Speak | |
{ | |
get { return _speak; } | |
set | |
{ | |
if (_speak != value) | |
{ | |
_speak = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Indicates whether the bot is accepting, expecting, or ignoring input</summary> | |
[Newtonsoft.Json.JsonProperty("inputHint", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string InputHint | |
{ | |
get { return _inputHint; } | |
set | |
{ | |
if (_inputHint != value) | |
{ | |
_inputHint = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Text to display if the channel cannot render cards</summary> | |
[Newtonsoft.Json.JsonProperty("summary", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Summary | |
{ | |
get { return _summary; } | |
set | |
{ | |
if (_summary != value) | |
{ | |
_summary = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>SuggestedActions are used to provide keyboard/quickreply like behavior in many clients</summary> | |
[Newtonsoft.Json.JsonProperty("suggestedActions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public SuggestedActions SuggestedActions | |
{ | |
get { return _suggestedActions; } | |
set | |
{ | |
if (_suggestedActions != value) | |
{ | |
_suggestedActions = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Attachments</summary> | |
[Newtonsoft.Json.JsonProperty("attachments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<Attachment> Attachments | |
{ | |
get { return _attachments; } | |
set | |
{ | |
if (_attachments != value) | |
{ | |
_attachments = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Collection of Entity objects, each of which contains metadata about this activity. Each Entity object is typed.</summary> | |
[Newtonsoft.Json.JsonProperty("entities", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<Entity> Entities | |
{ | |
get { return _entities; } | |
set | |
{ | |
if (_entities != value) | |
{ | |
_entities = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Channel-specific payload</summary> | |
[Newtonsoft.Json.JsonProperty("channelData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public object ChannelData | |
{ | |
get { return _channelData; } | |
set | |
{ | |
if (_channelData != value) | |
{ | |
_channelData = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>ContactAdded/Removed action</summary> | |
[Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Action | |
{ | |
get { return _action; } | |
set | |
{ | |
if (_action != value) | |
{ | |
_action = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>The original ID this message is a response to</summary> | |
[Newtonsoft.Json.JsonProperty("replyToId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string ReplyToId | |
{ | |
get { return _replyToId; } | |
set | |
{ | |
if (_replyToId != value) | |
{ | |
_replyToId = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Open-ended value</summary> | |
[Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public object Value | |
{ | |
get { return _value; } | |
set | |
{ | |
if (_value != value) | |
{ | |
_value = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Name of the operation to invoke or the name of the event</summary> | |
[Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Name | |
{ | |
get { return _name; } | |
set | |
{ | |
if (_name != value) | |
{ | |
_name = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Reference to another conversation or activity</summary> | |
[Newtonsoft.Json.JsonProperty("relatesTo", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public ConversationReference RelatesTo | |
{ | |
get { return _relatesTo; } | |
set | |
{ | |
if (_relatesTo != value) | |
{ | |
_relatesTo = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Code indicating why the conversation has ended</summary> | |
[Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Code | |
{ | |
get { return _code; } | |
set | |
{ | |
if (_code != value) | |
{ | |
_code = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static Activity FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<Activity>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>Channel account information needed to route a message</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class ChannelAccount : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _id; | |
private string _name; | |
/// <summary>Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or 123456)</summary> | |
[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Id | |
{ | |
get { return _id; } | |
set | |
{ | |
if (_id != value) | |
{ | |
_id = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Display friendly name</summary> | |
[Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Name | |
{ | |
get { return _name; } | |
set | |
{ | |
if (_name != value) | |
{ | |
_name = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static ChannelAccount FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<ChannelAccount>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>Channel account information for a conversation</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class ConversationAccount : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private bool? _isGroup; | |
private string _id; | |
private string _name; | |
/// <summary>Is this a reference to a group</summary> | |
[Newtonsoft.Json.JsonProperty("isGroup", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public bool? IsGroup | |
{ | |
get { return _isGroup; } | |
set | |
{ | |
if (_isGroup != value) | |
{ | |
_isGroup = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or 123456)</summary> | |
[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Id | |
{ | |
get { return _id; } | |
set | |
{ | |
if (_id != value) | |
{ | |
_id = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Display friendly name</summary> | |
[Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Name | |
{ | |
get { return _name; } | |
set | |
{ | |
if (_name != value) | |
{ | |
_name = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static ConversationAccount FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<ConversationAccount>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>SuggestedActions that can be performed</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class SuggestedActions : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private System.Collections.ObjectModel.ObservableCollection<string> _to; | |
private System.Collections.ObjectModel.ObservableCollection<CardAction> _actions; | |
/// <summary>Ids of the recipients that the actions should be shown to. These Ids are relative to the channelId and a subset of all recipients of the activity</summary> | |
[Newtonsoft.Json.JsonProperty("to", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<string> To | |
{ | |
get { return _to; } | |
set | |
{ | |
if (_to != value) | |
{ | |
_to = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Actions that can be shown to the user</summary> | |
[Newtonsoft.Json.JsonProperty("actions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<CardAction> Actions | |
{ | |
get { return _actions; } | |
set | |
{ | |
if (_actions != value) | |
{ | |
_actions = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static SuggestedActions FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<SuggestedActions>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>An attachment within an activity</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class Attachment : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _contentType; | |
private string _contentUrl; | |
private object _content; | |
private string _name; | |
private string _thumbnailUrl; | |
/// <summary>mimetype/Contenttype for the file</summary> | |
[Newtonsoft.Json.JsonProperty("contentType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string ContentType | |
{ | |
get { return _contentType; } | |
set | |
{ | |
if (_contentType != value) | |
{ | |
_contentType = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Content Url</summary> | |
[Newtonsoft.Json.JsonProperty("contentUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string ContentUrl | |
{ | |
get { return _contentUrl; } | |
set | |
{ | |
if (_contentUrl != value) | |
{ | |
_contentUrl = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Embedded content</summary> | |
[Newtonsoft.Json.JsonProperty("content", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public object Content | |
{ | |
get { return _content; } | |
set | |
{ | |
if (_content != value) | |
{ | |
_content = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>(OPTIONAL) The name of the attachment</summary> | |
[Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Name | |
{ | |
get { return _name; } | |
set | |
{ | |
if (_name != value) | |
{ | |
_name = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>(OPTIONAL) Thumbnail associated with attachment</summary> | |
[Newtonsoft.Json.JsonProperty("thumbnailUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string ThumbnailUrl | |
{ | |
get { return _thumbnailUrl; } | |
set | |
{ | |
if (_thumbnailUrl != value) | |
{ | |
_thumbnailUrl = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static Attachment FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<Attachment>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>Object of schema.org types</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class Entity : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _type; | |
/// <summary>Entity Type (typically from schema.org types)</summary> | |
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Type | |
{ | |
get { return _type; } | |
set | |
{ | |
if (_type != value) | |
{ | |
_type = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static Entity FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<Entity>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>An object relating to a particular point in a conversation</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class ConversationReference : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _activityId; | |
private ChannelAccount _user; | |
private ChannelAccount _bot; | |
private ConversationAccount _conversation; | |
private string _channelId; | |
private string _serviceUrl; | |
/// <summary>(Optional) ID of the activity to refer to</summary> | |
[Newtonsoft.Json.JsonProperty("activityId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string ActivityId | |
{ | |
get { return _activityId; } | |
set | |
{ | |
if (_activityId != value) | |
{ | |
_activityId = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>(Optional) User participating in this conversation</summary> | |
[Newtonsoft.Json.JsonProperty("user", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public ChannelAccount User | |
{ | |
get { return _user; } | |
set | |
{ | |
if (_user != value) | |
{ | |
_user = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Bot participating in this conversation</summary> | |
[Newtonsoft.Json.JsonProperty("bot", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public ChannelAccount Bot | |
{ | |
get { return _bot; } | |
set | |
{ | |
if (_bot != value) | |
{ | |
_bot = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Conversation reference</summary> | |
[Newtonsoft.Json.JsonProperty("conversation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public ConversationAccount Conversation | |
{ | |
get { return _conversation; } | |
set | |
{ | |
if (_conversation != value) | |
{ | |
_conversation = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Channel ID</summary> | |
[Newtonsoft.Json.JsonProperty("channelId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string ChannelId | |
{ | |
get { return _channelId; } | |
set | |
{ | |
if (_channelId != value) | |
{ | |
_channelId = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Service endpoint where operations concerning the referenced conversation may be performed</summary> | |
[Newtonsoft.Json.JsonProperty("serviceUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string ServiceUrl | |
{ | |
get { return _serviceUrl; } | |
set | |
{ | |
if (_serviceUrl != value) | |
{ | |
_serviceUrl = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static ConversationReference FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<ConversationReference>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>An action on a card</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class CardAction : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _type; | |
private string _title; | |
private string _image; | |
private object _value; | |
/// <summary>Defines the type of action implemented by this button.</summary> | |
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Type | |
{ | |
get { return _type; } | |
set | |
{ | |
if (_type != value) | |
{ | |
_type = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Text description which appear on the button.</summary> | |
[Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Title | |
{ | |
get { return _title; } | |
set | |
{ | |
if (_title != value) | |
{ | |
_title = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>URL Picture which will appear on the button, next to text label.</summary> | |
[Newtonsoft.Json.JsonProperty("image", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Image | |
{ | |
get { return _image; } | |
set | |
{ | |
if (_image != value) | |
{ | |
_image = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Supplementary parameter for action. Content of this property depends on the ActionType</summary> | |
[Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public object Value | |
{ | |
get { return _value; } | |
set | |
{ | |
if (_value != value) | |
{ | |
_value = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static CardAction FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<CardAction>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>A response containing a resource ID</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class ResourceResponse : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _id; | |
/// <summary>Id of the resource</summary> | |
[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Id | |
{ | |
get { return _id; } | |
set | |
{ | |
if (_id != value) | |
{ | |
_id = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static ResourceResponse FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<ResourceResponse>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>A Hero card (card with a single, large image)</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class HeroCard : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _title; | |
private string _subtitle; | |
private string _text; | |
private System.Collections.ObjectModel.ObservableCollection<CardImage> _images; | |
private System.Collections.ObjectModel.ObservableCollection<CardAction> _buttons; | |
private CardAction _tap; | |
/// <summary>Title of the card</summary> | |
[Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Title | |
{ | |
get { return _title; } | |
set | |
{ | |
if (_title != value) | |
{ | |
_title = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Subtitle of the card</summary> | |
[Newtonsoft.Json.JsonProperty("subtitle", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Subtitle | |
{ | |
get { return _subtitle; } | |
set | |
{ | |
if (_subtitle != value) | |
{ | |
_subtitle = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Text for the card</summary> | |
[Newtonsoft.Json.JsonProperty("text", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Text | |
{ | |
get { return _text; } | |
set | |
{ | |
if (_text != value) | |
{ | |
_text = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Array of images for the card</summary> | |
[Newtonsoft.Json.JsonProperty("images", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<CardImage> Images | |
{ | |
get { return _images; } | |
set | |
{ | |
if (_images != value) | |
{ | |
_images = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Set of actions applicable to the current card</summary> | |
[Newtonsoft.Json.JsonProperty("buttons", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<CardAction> Buttons | |
{ | |
get { return _buttons; } | |
set | |
{ | |
if (_buttons != value) | |
{ | |
_buttons = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>This action will be activated when user taps on the card itself</summary> | |
[Newtonsoft.Json.JsonProperty("tap", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public CardAction Tap | |
{ | |
get { return _tap; } | |
set | |
{ | |
if (_tap != value) | |
{ | |
_tap = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static HeroCard FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<HeroCard>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>An image on a card</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class CardImage : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _url; | |
private string _alt; | |
private CardAction _tap; | |
/// <summary>URL Thumbnail image for major content property.</summary> | |
[Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Url | |
{ | |
get { return _url; } | |
set | |
{ | |
if (_url != value) | |
{ | |
_url = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Image description intended for screen readers</summary> | |
[Newtonsoft.Json.JsonProperty("alt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Alt | |
{ | |
get { return _alt; } | |
set | |
{ | |
if (_alt != value) | |
{ | |
_alt = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Action assigned to specific Attachment.E.g.navigate to specific URL or play/open media content</summary> | |
[Newtonsoft.Json.JsonProperty("tap", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public CardAction Tap | |
{ | |
get { return _tap; } | |
set | |
{ | |
if (_tap != value) | |
{ | |
_tap = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static CardImage FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<CardImage>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>An HTTP API response</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class ErrorResponse : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private Error _error; | |
/// <summary>Error message</summary> | |
[Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public Error Error | |
{ | |
get { return _error; } | |
set | |
{ | |
if (_error != value) | |
{ | |
_error = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static ErrorResponse FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<ErrorResponse>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>Object representing error information</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class Error : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _code; | |
private string _message; | |
/// <summary>Error code</summary> | |
[Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Code | |
{ | |
get { return _code; } | |
set | |
{ | |
if (_code != value) | |
{ | |
_code = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Error message</summary> | |
[Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Message | |
{ | |
get { return _message; } | |
set | |
{ | |
if (_message != value) | |
{ | |
_message = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static Error FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<Error>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>An animation card (Ex: gif or short video clip)</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class AnimationCard : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _title; | |
private string _subtitle; | |
private string _text; | |
private ThumbnailUrl _image; | |
private System.Collections.ObjectModel.ObservableCollection<MediaUrl> _media; | |
private System.Collections.ObjectModel.ObservableCollection<CardAction> _buttons; | |
private bool? _shareable; | |
private bool? _autoloop; | |
private bool? _autostart; | |
/// <summary>Title of the card</summary> | |
[Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Title | |
{ | |
get { return _title; } | |
set | |
{ | |
if (_title != value) | |
{ | |
_title = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Subtitle of the card</summary> | |
[Newtonsoft.Json.JsonProperty("subtitle", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Subtitle | |
{ | |
get { return _subtitle; } | |
set | |
{ | |
if (_subtitle != value) | |
{ | |
_subtitle = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Text of the card</summary> | |
[Newtonsoft.Json.JsonProperty("text", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Text | |
{ | |
get { return _text; } | |
set | |
{ | |
if (_text != value) | |
{ | |
_text = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Thumbnail placeholder</summary> | |
[Newtonsoft.Json.JsonProperty("image", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public ThumbnailUrl Image | |
{ | |
get { return _image; } | |
set | |
{ | |
if (_image != value) | |
{ | |
_image = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Array of media Url objects</summary> | |
[Newtonsoft.Json.JsonProperty("media", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<MediaUrl> Media | |
{ | |
get { return _media; } | |
set | |
{ | |
if (_media != value) | |
{ | |
_media = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Set of actions applicable to the current card</summary> | |
[Newtonsoft.Json.JsonProperty("buttons", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<CardAction> Buttons | |
{ | |
get { return _buttons; } | |
set | |
{ | |
if (_buttons != value) | |
{ | |
_buttons = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Is it OK for this content to be shareable with others (default:true)</summary> | |
[Newtonsoft.Json.JsonProperty("shareable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public bool? Shareable | |
{ | |
get { return _shareable; } | |
set | |
{ | |
if (_shareable != value) | |
{ | |
_shareable = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Should the client loop playback at end of content (default:true)</summary> | |
[Newtonsoft.Json.JsonProperty("autoloop", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public bool? Autoloop | |
{ | |
get { return _autoloop; } | |
set | |
{ | |
if (_autoloop != value) | |
{ | |
_autoloop = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Should the client automatically start playback of video in this card (default:true)</summary> | |
[Newtonsoft.Json.JsonProperty("autostart", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public bool? Autostart | |
{ | |
get { return _autostart; } | |
set | |
{ | |
if (_autostart != value) | |
{ | |
_autostart = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static AnimationCard FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<AnimationCard>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>Object describing a media thumbnail</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class ThumbnailUrl : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _url; | |
private string _alt; | |
/// <summary>url pointing to an thumbnail to use for media content</summary> | |
[Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Url | |
{ | |
get { return _url; } | |
set | |
{ | |
if (_url != value) | |
{ | |
_url = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Alt text to display for screen readers on the thumbnail image</summary> | |
[Newtonsoft.Json.JsonProperty("alt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Alt | |
{ | |
get { return _alt; } | |
set | |
{ | |
if (_alt != value) | |
{ | |
_alt = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static ThumbnailUrl FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<ThumbnailUrl>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>MediaUrl data</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class MediaUrl : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _url; | |
private string _profile; | |
/// <summary>Url for the media</summary> | |
[Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Url | |
{ | |
get { return _url; } | |
set | |
{ | |
if (_url != value) | |
{ | |
_url = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Optional profile hint to the client to differentiate multiple MediaUrl objects from each other</summary> | |
[Newtonsoft.Json.JsonProperty("profile", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Profile | |
{ | |
get { return _profile; } | |
set | |
{ | |
if (_profile != value) | |
{ | |
_profile = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static MediaUrl FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<MediaUrl>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>A audio card</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class AudioCard : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _aspect; | |
private string _title; | |
private string _subtitle; | |
private string _text; | |
private ThumbnailUrl _image; | |
private System.Collections.ObjectModel.ObservableCollection<MediaUrl> _media; | |
private System.Collections.ObjectModel.ObservableCollection<CardAction> _buttons; | |
private bool? _shareable; | |
private bool? _autoloop; | |
private bool? _autostart; | |
/// <summary>Aspect ratio of thumbnail/media placeholder, allowed values are "16x9" and "9x16"</summary> | |
[Newtonsoft.Json.JsonProperty("aspect", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Aspect | |
{ | |
get { return _aspect; } | |
set | |
{ | |
if (_aspect != value) | |
{ | |
_aspect = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Title of the card</summary> | |
[Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Title | |
{ | |
get { return _title; } | |
set | |
{ | |
if (_title != value) | |
{ | |
_title = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Subtitle of the card</summary> | |
[Newtonsoft.Json.JsonProperty("subtitle", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Subtitle | |
{ | |
get { return _subtitle; } | |
set | |
{ | |
if (_subtitle != value) | |
{ | |
_subtitle = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Text of the card</summary> | |
[Newtonsoft.Json.JsonProperty("text", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Text | |
{ | |
get { return _text; } | |
set | |
{ | |
if (_text != value) | |
{ | |
_text = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Thumbnail placeholder</summary> | |
[Newtonsoft.Json.JsonProperty("image", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public ThumbnailUrl Image | |
{ | |
get { return _image; } | |
set | |
{ | |
if (_image != value) | |
{ | |
_image = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Array of media Url objects</summary> | |
[Newtonsoft.Json.JsonProperty("media", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<MediaUrl> Media | |
{ | |
get { return _media; } | |
set | |
{ | |
if (_media != value) | |
{ | |
_media = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Set of actions applicable to the current card</summary> | |
[Newtonsoft.Json.JsonProperty("buttons", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<CardAction> Buttons | |
{ | |
get { return _buttons; } | |
set | |
{ | |
if (_buttons != value) | |
{ | |
_buttons = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Is it OK for this content to be shareable with others (default:true)</summary> | |
[Newtonsoft.Json.JsonProperty("shareable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public bool? Shareable | |
{ | |
get { return _shareable; } | |
set | |
{ | |
if (_shareable != value) | |
{ | |
_shareable = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Should the client loop playback at end of content (default:true)</summary> | |
[Newtonsoft.Json.JsonProperty("autoloop", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public bool? Autoloop | |
{ | |
get { return _autoloop; } | |
set | |
{ | |
if (_autoloop != value) | |
{ | |
_autoloop = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Should the client automatically start playback of video in this card (default:true)</summary> | |
[Newtonsoft.Json.JsonProperty("autostart", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public bool? Autostart | |
{ | |
get { return _autostart; } | |
set | |
{ | |
if (_autostart != value) | |
{ | |
_autostart = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static AudioCard FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<AudioCard>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>A receipt card</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class ReceiptCard : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _title; | |
private System.Collections.ObjectModel.ObservableCollection<ReceiptItem> _items; | |
private System.Collections.ObjectModel.ObservableCollection<Fact> _facts; | |
private CardAction _tap; | |
private string _total; | |
private string _tax; | |
private string _vat; | |
private System.Collections.ObjectModel.ObservableCollection<CardAction> _buttons; | |
/// <summary>Title of the card</summary> | |
[Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Title | |
{ | |
get { return _title; } | |
set | |
{ | |
if (_title != value) | |
{ | |
_title = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Array of Receipt Items</summary> | |
[Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<ReceiptItem> Items | |
{ | |
get { return _items; } | |
set | |
{ | |
if (_items != value) | |
{ | |
_items = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Array of Fact Objects Array of key-value pairs.</summary> | |
[Newtonsoft.Json.JsonProperty("facts", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<Fact> Facts | |
{ | |
get { return _facts; } | |
set | |
{ | |
if (_facts != value) | |
{ | |
_facts = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>This action will be activated when user taps on the card</summary> | |
[Newtonsoft.Json.JsonProperty("tap", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public CardAction Tap | |
{ | |
get { return _tap; } | |
set | |
{ | |
if (_tap != value) | |
{ | |
_tap = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Total amount of money paid (or should be paid)</summary> | |
[Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Total | |
{ | |
get { return _total; } | |
set | |
{ | |
if (_total != value) | |
{ | |
_total = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Total amount of TAX paid(or should be paid)</summary> | |
[Newtonsoft.Json.JsonProperty("tax", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Tax | |
{ | |
get { return _tax; } | |
set | |
{ | |
if (_tax != value) | |
{ | |
_tax = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Total amount of VAT paid(or should be paid)</summary> | |
[Newtonsoft.Json.JsonProperty("vat", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Vat | |
{ | |
get { return _vat; } | |
set | |
{ | |
if (_vat != value) | |
{ | |
_vat = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Set of actions applicable to the current card</summary> | |
[Newtonsoft.Json.JsonProperty("buttons", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<CardAction> Buttons | |
{ | |
get { return _buttons; } | |
set | |
{ | |
if (_buttons != value) | |
{ | |
_buttons = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static ReceiptCard FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<ReceiptCard>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>An item on a receipt card</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class ReceiptItem : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _title; | |
private string _subtitle; | |
private string _text; | |
private CardImage _image; | |
private string _price; | |
private string _quantity; | |
private CardAction _tap; | |
/// <summary>Title of the Card</summary> | |
[Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Title | |
{ | |
get { return _title; } | |
set | |
{ | |
if (_title != value) | |
{ | |
_title = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Subtitle appears just below Title field, differs from Title in font styling only</summary> | |
[Newtonsoft.Json.JsonProperty("subtitle", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Subtitle | |
{ | |
get { return _subtitle; } | |
set | |
{ | |
if (_subtitle != value) | |
{ | |
_subtitle = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Text field appears just below subtitle, differs from Subtitle in font styling only</summary> | |
[Newtonsoft.Json.JsonProperty("text", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Text | |
{ | |
get { return _text; } | |
set | |
{ | |
if (_text != value) | |
{ | |
_text = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Image</summary> | |
[Newtonsoft.Json.JsonProperty("image", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public CardImage Image | |
{ | |
get { return _image; } | |
set | |
{ | |
if (_image != value) | |
{ | |
_image = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Amount with currency</summary> | |
[Newtonsoft.Json.JsonProperty("price", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Price | |
{ | |
get { return _price; } | |
set | |
{ | |
if (_price != value) | |
{ | |
_price = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Number of items of given kind</summary> | |
[Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Quantity | |
{ | |
get { return _quantity; } | |
set | |
{ | |
if (_quantity != value) | |
{ | |
_quantity = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>This action will be activated when user taps on the Item bubble.</summary> | |
[Newtonsoft.Json.JsonProperty("tap", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public CardAction Tap | |
{ | |
get { return _tap; } | |
set | |
{ | |
if (_tap != value) | |
{ | |
_tap = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static ReceiptItem FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<ReceiptItem>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>Set of key-value pairs. Advantage of this section is that key and value properties will be | |
/// rendered with default style information with some delimiter between them. So there is no need for developer to specify style information.</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class Fact : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _key; | |
private string _value; | |
/// <summary>The key for this Fact</summary> | |
[Newtonsoft.Json.JsonProperty("key", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Key | |
{ | |
get { return _key; } | |
set | |
{ | |
if (_key != value) | |
{ | |
_key = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>The value for this Fact</summary> | |
[Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Value | |
{ | |
get { return _value; } | |
set | |
{ | |
if (_value != value) | |
{ | |
_value = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static Fact FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<Fact>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>A card representing a request to sign in</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class SigninCard : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _text; | |
private System.Collections.ObjectModel.ObservableCollection<CardAction> _buttons; | |
/// <summary>Text for signin request</summary> | |
[Newtonsoft.Json.JsonProperty("text", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Text | |
{ | |
get { return _text; } | |
set | |
{ | |
if (_text != value) | |
{ | |
_text = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Action to use to perform signin</summary> | |
[Newtonsoft.Json.JsonProperty("buttons", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<CardAction> Buttons | |
{ | |
get { return _buttons; } | |
set | |
{ | |
if (_buttons != value) | |
{ | |
_buttons = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static SigninCard FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<SigninCard>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>A thumbnail card (card with a single, small thumbnail image)</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class ThumbnailCard : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _title; | |
private string _subtitle; | |
private string _text; | |
private System.Collections.ObjectModel.ObservableCollection<CardImage> _images; | |
private System.Collections.ObjectModel.ObservableCollection<CardAction> _buttons; | |
private CardAction _tap; | |
/// <summary>Title of the card</summary> | |
[Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Title | |
{ | |
get { return _title; } | |
set | |
{ | |
if (_title != value) | |
{ | |
_title = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Subtitle of the card</summary> | |
[Newtonsoft.Json.JsonProperty("subtitle", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Subtitle | |
{ | |
get { return _subtitle; } | |
set | |
{ | |
if (_subtitle != value) | |
{ | |
_subtitle = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Text for the card</summary> | |
[Newtonsoft.Json.JsonProperty("text", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Text | |
{ | |
get { return _text; } | |
set | |
{ | |
if (_text != value) | |
{ | |
_text = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Array of images for the card</summary> | |
[Newtonsoft.Json.JsonProperty("images", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<CardImage> Images | |
{ | |
get { return _images; } | |
set | |
{ | |
if (_images != value) | |
{ | |
_images = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Set of actions applicable to the current card</summary> | |
[Newtonsoft.Json.JsonProperty("buttons", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<CardAction> Buttons | |
{ | |
get { return _buttons; } | |
set | |
{ | |
if (_buttons != value) | |
{ | |
_buttons = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>This action will be activated when user taps on the card itself</summary> | |
[Newtonsoft.Json.JsonProperty("tap", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public CardAction Tap | |
{ | |
get { return _tap; } | |
set | |
{ | |
if (_tap != value) | |
{ | |
_tap = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static ThumbnailCard FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<ThumbnailCard>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>A video card</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class VideoCard : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _aspect; | |
private string _title; | |
private string _subtitle; | |
private string _text; | |
private ThumbnailUrl _image; | |
private System.Collections.ObjectModel.ObservableCollection<MediaUrl> _media; | |
private System.Collections.ObjectModel.ObservableCollection<CardAction> _buttons; | |
private bool? _shareable; | |
private bool? _autoloop; | |
private bool? _autostart; | |
/// <summary>Aspect ratio (16:9)(4:3)</summary> | |
[Newtonsoft.Json.JsonProperty("aspect", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Aspect | |
{ | |
get { return _aspect; } | |
set | |
{ | |
if (_aspect != value) | |
{ | |
_aspect = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Title of the card</summary> | |
[Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Title | |
{ | |
get { return _title; } | |
set | |
{ | |
if (_title != value) | |
{ | |
_title = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Subtitle of the card</summary> | |
[Newtonsoft.Json.JsonProperty("subtitle", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Subtitle | |
{ | |
get { return _subtitle; } | |
set | |
{ | |
if (_subtitle != value) | |
{ | |
_subtitle = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Text of the card</summary> | |
[Newtonsoft.Json.JsonProperty("text", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Text | |
{ | |
get { return _text; } | |
set | |
{ | |
if (_text != value) | |
{ | |
_text = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Thumbnail placeholder</summary> | |
[Newtonsoft.Json.JsonProperty("image", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public ThumbnailUrl Image | |
{ | |
get { return _image; } | |
set | |
{ | |
if (_image != value) | |
{ | |
_image = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Array of media Url objects</summary> | |
[Newtonsoft.Json.JsonProperty("media", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<MediaUrl> Media | |
{ | |
get { return _media; } | |
set | |
{ | |
if (_media != value) | |
{ | |
_media = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Set of actions applicable to the current card</summary> | |
[Newtonsoft.Json.JsonProperty("buttons", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public System.Collections.ObjectModel.ObservableCollection<CardAction> Buttons | |
{ | |
get { return _buttons; } | |
set | |
{ | |
if (_buttons != value) | |
{ | |
_buttons = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Is it OK for this content to be shareable with others (default:true)</summary> | |
[Newtonsoft.Json.JsonProperty("shareable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public bool? Shareable | |
{ | |
get { return _shareable; } | |
set | |
{ | |
if (_shareable != value) | |
{ | |
_shareable = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Should the client loop playback at end of content (default:true)</summary> | |
[Newtonsoft.Json.JsonProperty("autoloop", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public bool? Autoloop | |
{ | |
get { return _autoloop; } | |
set | |
{ | |
if (_autoloop != value) | |
{ | |
_autoloop = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Should the client automatically start playback of video in this card (default:true)</summary> | |
[Newtonsoft.Json.JsonProperty("autostart", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public bool? Autostart | |
{ | |
get { return _autostart; } | |
set | |
{ | |
if (_autostart != value) | |
{ | |
_autostart = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static VideoCard FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<VideoCard>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>GeoCoordinates (entity type: "https://schema.org/GeoCoordinates")</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class GeoCoordinates : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private double? _elevation; | |
private double? _latitude; | |
private double? _longitude; | |
private string _type; | |
private string _name; | |
/// <summary>Elevation of the location [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)</summary> | |
[Newtonsoft.Json.JsonProperty("elevation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public double? Elevation | |
{ | |
get { return _elevation; } | |
set | |
{ | |
if (_elevation != value) | |
{ | |
_elevation = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Latitude of the location [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)</summary> | |
[Newtonsoft.Json.JsonProperty("latitude", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public double? Latitude | |
{ | |
get { return _latitude; } | |
set | |
{ | |
if (_latitude != value) | |
{ | |
_latitude = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Longitude of the location [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)</summary> | |
[Newtonsoft.Json.JsonProperty("longitude", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public double? Longitude | |
{ | |
get { return _longitude; } | |
set | |
{ | |
if (_longitude != value) | |
{ | |
_longitude = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>The type of the thing</summary> | |
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Type | |
{ | |
get { return _type; } | |
set | |
{ | |
if (_type != value) | |
{ | |
_type = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>The name of the thing</summary> | |
[Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Name | |
{ | |
get { return _name; } | |
set | |
{ | |
if (_name != value) | |
{ | |
_name = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static GeoCoordinates FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<GeoCoordinates>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>Mention information (entity type: "mention")</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class Mention : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private ChannelAccount _mentioned; | |
private string _text; | |
private string _type; | |
/// <summary>The mentioned user</summary> | |
[Newtonsoft.Json.JsonProperty("mentioned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public ChannelAccount Mentioned | |
{ | |
get { return _mentioned; } | |
set | |
{ | |
if (_mentioned != value) | |
{ | |
_mentioned = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Sub Text which represents the mention (can be null or empty)</summary> | |
[Newtonsoft.Json.JsonProperty("text", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Text | |
{ | |
get { return _text; } | |
set | |
{ | |
if (_text != value) | |
{ | |
_text = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Entity Type (typically from schema.org types)</summary> | |
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Type | |
{ | |
get { return _type; } | |
set | |
{ | |
if (_type != value) | |
{ | |
_type = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static Mention FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<Mention>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>Place (entity type: "https://schema.org/Place")</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class Place : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private object _address; | |
private object _geo; | |
private object _hasMap; | |
private string _type; | |
private string _name; | |
/// <summary>Address of the place (may be `string` or complex object of type `PostalAddress`)</summary> | |
[Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public object Address | |
{ | |
get { return _address; } | |
set | |
{ | |
if (_address != value) | |
{ | |
_address = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Geo coordinates of the place (may be complex object of type `GeoCoordinates` or `GeoShape`)</summary> | |
[Newtonsoft.Json.JsonProperty("geo", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public object Geo | |
{ | |
get { return _geo; } | |
set | |
{ | |
if (_geo != value) | |
{ | |
_geo = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>Map to the place (may be `string` (URL) or complex object of type `Map`)</summary> | |
[Newtonsoft.Json.JsonProperty("hasMap", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public object HasMap | |
{ | |
get { return _hasMap; } | |
set | |
{ | |
if (_hasMap != value) | |
{ | |
_hasMap = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>The type of the thing</summary> | |
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Type | |
{ | |
get { return _type; } | |
set | |
{ | |
if (_type != value) | |
{ | |
_type = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>The name of the thing</summary> | |
[Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Name | |
{ | |
get { return _name; } | |
set | |
{ | |
if (_name != value) | |
{ | |
_name = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static Place FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<Place>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>Thing (entity type: "https://schema.org/Thing")</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class Thing : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private string _type; | |
private string _name; | |
/// <summary>The type of the thing</summary> | |
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Type | |
{ | |
get { return _type; } | |
set | |
{ | |
if (_type != value) | |
{ | |
_type = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
/// <summary>The name of the thing</summary> | |
[Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string Name | |
{ | |
get { return _name; } | |
set | |
{ | |
if (_name != value) | |
{ | |
_name = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static Thing FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<Thing>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
/// <summary>Parameters for creating a token</summary> | |
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.7.1.0 (Newtonsoft.Json v9.0.0.0)")] | |
public partial class TokenParameters : System.ComponentModel.INotifyPropertyChanged | |
{ | |
private ChannelAccount _user; | |
private string _eTag; | |
/// <summary>User account to embed within the token</summary> | |
[Newtonsoft.Json.JsonProperty("user", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public ChannelAccount User | |
{ | |
get { return _user; } | |
set | |
{ | |
if (_user != value) | |
{ | |
_user = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
[Newtonsoft.Json.JsonProperty("eTag", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | |
public string ETag | |
{ | |
get { return _eTag; } | |
set | |
{ | |
if (_eTag != value) | |
{ | |
_eTag = value; | |
RaisePropertyChanged(); | |
} | |
} | |
} | |
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; | |
public string ToJson() | |
{ | |
return Newtonsoft.Json.JsonConvert.SerializeObject(this); | |
} | |
public static TokenParameters FromJson(string data) | |
{ | |
return Newtonsoft.Json.JsonConvert.DeserializeObject<TokenParameters>(data); | |
} | |
protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) | |
{ | |
var handler = PropertyChanged; | |
if (handler != null) | |
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); | |
} | |
} | |
[System.CodeDom.Compiler.GeneratedCode("NSwag", "11.9.0.0")] | |
public class FileParameter | |
{ | |
public FileParameter(System.IO.Stream data) | |
: this (data, null) | |
{ | |
} | |
public FileParameter(System.IO.Stream data, string fileName) | |
{ | |
Data = data; | |
FileName = fileName; | |
} | |
public System.IO.Stream Data { get; private set; } | |
public string FileName { get; private set; } | |
} | |
[System.CodeDom.Compiler.GeneratedCode("NSwag", "11.9.0.0")] | |
public class DirectLineException : System.Exception | |
{ | |
public string StatusCode { get; private set; } | |
public string Response { get; private set; } | |
public System.Collections.Generic.Dictionary<string, System.Collections.Generic.IEnumerable<string>> Headers { get; private set; } | |
public DirectLineException(string message, string statusCode, string response, System.Collections.Generic.Dictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.Exception innerException) | |
: base(message, innerException) | |
{ | |
StatusCode = statusCode; | |
Response = response; | |
Headers = headers; | |
} | |
public override string ToString() | |
{ | |
return string.Format("HTTP Response: \n\n{0}\n\n{1}", Response, base.ToString()); | |
} | |
} | |
[System.CodeDom.Compiler.GeneratedCode("NSwag", "11.9.0.0")] | |
public class DirectLineException<TResult> : DirectLineException | |
{ | |
public TResult Result { get; private set; } | |
public DirectLineException(string message, string statusCode, string response, System.Collections.Generic.Dictionary<string, System.Collections.Generic.IEnumerable<string>> headers, TResult result, System.Exception innerException) | |
: base(message, statusCode, response, headers, innerException) | |
{ | |
Result = result; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment