Skip to content

Commit 1743425

Browse files
committed
feat(assistant-v1): alt_text property added to Image response type
1 parent ad9aaaf commit 1743425

File tree

4 files changed

+36
-8
lines changed

4 files changed

+36
-8
lines changed

Scripts/Services/Assistant/V1/Model/DialogNodeOutputGeneric.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2019, 2021.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -161,7 +161,7 @@ public class QueryTypeValue
161161
[JsonProperty("typing", NullValueHandling = NullValueHandling.Ignore)]
162162
public bool? Typing { get; protected set; }
163163
/// <summary>
164-
/// The URL of the image.
164+
/// The `https:` URL of the image.
165165
/// </summary>
166166
[JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)]
167167
public string Source { get; protected set; }
@@ -176,6 +176,11 @@ public class QueryTypeValue
176176
[JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)]
177177
public string Description { get; protected set; }
178178
/// <summary>
179+
/// Descriptive text that can be used for screen readers or other situations where the image cannot be seen.
180+
/// </summary>
181+
[JsonProperty("alt_text", NullValueHandling = NullValueHandling.Ignore)]
182+
public string AltText { get; protected set; }
183+
/// <summary>
179184
/// An array of objects describing the options from which the user can choose. You can include up to 20 options.
180185
/// </summary>
181186
[JsonProperty("options", NullValueHandling = NullValueHandling.Ignore)]

Scripts/Services/Assistant/V1/Model/DialogNodeOutputGenericDialogNodeOutputResponseTypeImage.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2020, 2021.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ public class DialogNodeOutputGenericDialogNodeOutputResponseTypeImage : DialogNo
3636
set { base.ResponseType = value; }
3737
}
3838
/// <summary>
39-
/// The URL of the image.
39+
/// The `https:` URL of the image.
4040
/// </summary>
4141
[JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)]
4242
public new string Source
@@ -71,5 +71,14 @@ public class DialogNodeOutputGenericDialogNodeOutputResponseTypeImage : DialogNo
7171
get { return base.Channels; }
7272
set { base.Channels = value; }
7373
}
74+
/// <summary>
75+
/// Descriptive text that can be used for screen readers or other situations where the image cannot be seen.
76+
/// </summary>
77+
[JsonProperty("alt_text", NullValueHandling = NullValueHandling.Ignore)]
78+
public new string AltText
79+
{
80+
get { return base.AltText; }
81+
set { base.AltText = value; }
82+
}
7483
}
7584
}

Scripts/Services/Assistant/V1/Model/RuntimeResponseGeneric.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2019, 2021.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -108,7 +108,7 @@ public class PreferenceValue
108108
[JsonProperty("typing", NullValueHandling = NullValueHandling.Ignore)]
109109
public bool? Typing { get; protected set; }
110110
/// <summary>
111-
/// The URL of the image.
111+
/// The `https:` URL of the image.
112112
/// </summary>
113113
[JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)]
114114
public string Source { get; protected set; }
@@ -123,6 +123,11 @@ public class PreferenceValue
123123
[JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)]
124124
public string Description { get; protected set; }
125125
/// <summary>
126+
/// Descriptive text that can be used for screen readers or other situations where the image cannot be seen.
127+
/// </summary>
128+
[JsonProperty("alt_text", NullValueHandling = NullValueHandling.Ignore)]
129+
public string AltText { get; protected set; }
130+
/// <summary>
126131
/// An array of objects describing the options from which the user can choose.
127132
/// </summary>
128133
[JsonProperty("options", NullValueHandling = NullValueHandling.Ignore)]

Scripts/Services/Assistant/V1/Model/RuntimeResponseGenericRuntimeResponseTypeImage.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2020, 2021.
2+
* (C) Copyright IBM Corp. 2021.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ public class RuntimeResponseGenericRuntimeResponseTypeImage : RuntimeResponseGen
3636
set { base.ResponseType = value; }
3737
}
3838
/// <summary>
39-
/// The URL of the image.
39+
/// The `https:` URL of the image.
4040
/// </summary>
4141
[JsonProperty("source", NullValueHandling = NullValueHandling.Ignore)]
4242
public new string Source
@@ -72,5 +72,14 @@ public class RuntimeResponseGenericRuntimeResponseTypeImage : RuntimeResponseGen
7272
get { return base.Channels; }
7373
set { base.Channels = value; }
7474
}
75+
/// <summary>
76+
/// Descriptive text that can be used for screen readers or other situations where the image cannot be seen.
77+
/// </summary>
78+
[JsonProperty("alt_text", NullValueHandling = NullValueHandling.Ignore)]
79+
public new string AltText
80+
{
81+
get { return base.AltText; }
82+
set { base.AltText = value; }
83+
}
7584
}
7685
}

0 commit comments

Comments
 (0)