Skip to content

Commit

Permalink
feat(assistant-v1): alt_text property added to Image response type
Browse files Browse the repository at this point in the history
  • Loading branch information
nan2iz committed Sep 9, 2021
1 parent ad9aaaf commit 1743425
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 8 deletions.
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2019, 2021.
* (C) Copyright IBM Corp. 2021.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -161,7 +161,7 @@ public class QueryTypeValue
[JsonProperty("typing", NullValueHandling = NullValueHandling.Ignore)]
public bool? Typing { get; protected set; }
/// <summary>
/// The URL of the image.
/// The `https:` URL of the image.
/// </summary>
[JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)]
public string Source { get; protected set; }
Expand All @@ -176,6 +176,11 @@ public class QueryTypeValue
[JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)]
public string Description { get; protected set; }
/// <summary>
/// Descriptive text that can be used for screen readers or other situations where the image cannot be seen.
/// </summary>
[JsonProperty("alt_text", NullValueHandling = NullValueHandling.Ignore)]
public string AltText { get; protected set; }
/// <summary>
/// An array of objects describing the options from which the user can choose. You can include up to 20 options.
/// </summary>
[JsonProperty("options", NullValueHandling = NullValueHandling.Ignore)]
Expand Down
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2020, 2021.
* (C) Copyright IBM Corp. 2021.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,7 +36,7 @@ public new string ResponseType
set { base.ResponseType = value; }
}
/// <summary>
/// The URL of the image.
/// The `https:` URL of the image.
/// </summary>
[JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)]
public new string Source
Expand Down Expand Up @@ -71,5 +71,14 @@ public new List<ResponseGenericChannel> Channels
get { return base.Channels; }
set { base.Channels = value; }
}
/// <summary>
/// Descriptive text that can be used for screen readers or other situations where the image cannot be seen.
/// </summary>
[JsonProperty("alt_text", NullValueHandling = NullValueHandling.Ignore)]
public new string AltText
{
get { return base.AltText; }
set { base.AltText = value; }
}
}
}
9 changes: 7 additions & 2 deletions Scripts/Services/Assistant/V1/Model/RuntimeResponseGeneric.cs
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2019, 2021.
* (C) Copyright IBM Corp. 2021.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -108,7 +108,7 @@ public class PreferenceValue
[JsonProperty("typing", NullValueHandling = NullValueHandling.Ignore)]
public bool? Typing { get; protected set; }
/// <summary>
/// The URL of the image.
/// The `https:` URL of the image.
/// </summary>
[JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)]
public string Source { get; protected set; }
Expand All @@ -123,6 +123,11 @@ public class PreferenceValue
[JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)]
public string Description { get; protected set; }
/// <summary>
/// Descriptive text that can be used for screen readers or other situations where the image cannot be seen.
/// </summary>
[JsonProperty("alt_text", NullValueHandling = NullValueHandling.Ignore)]
public string AltText { get; protected set; }
/// <summary>
/// An array of objects describing the options from which the user can choose.
/// </summary>
[JsonProperty("options", NullValueHandling = NullValueHandling.Ignore)]
Expand Down
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corp. 2020, 2021.
* (C) Copyright IBM Corp. 2021.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,7 +36,7 @@ public new string ResponseType
set { base.ResponseType = value; }
}
/// <summary>
/// The URL of the image.
/// The `https:` URL of the image.
/// </summary>
[JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)]
public new string Source
Expand Down Expand Up @@ -72,5 +72,14 @@ public new List<ResponseGenericChannel> Channels
get { return base.Channels; }
set { base.Channels = value; }
}
/// <summary>
/// Descriptive text that can be used for screen readers or other situations where the image cannot be seen.
/// </summary>
[JsonProperty("alt_text", NullValueHandling = NullValueHandling.Ignore)]
public new string AltText
{
get { return base.AltText; }
set { base.AltText = value; }
}
}
}

0 comments on commit 1743425

Please sign in to comment.