@@ -70,10 +70,10 @@ public static AssistantsKnowledgeResource Create(CreateAssistantsKnowledgeOption
7070 /// <param name="options"> Create AssistantsKnowledge parameters </param>
7171 /// <param name="client"> Client to make requests to Twilio </param>
7272 /// <returns> Task that resolves to A single instance of AssistantsKnowledge </returns>
73- public static async System . Threading . Tasks . Task < AssistantsKnowledgeResource > CreateAsync ( CreateAssistantsKnowledgeOptions options , ITwilioRestClient client = null )
73+ public static async System . Threading . Tasks . Task < AssistantsKnowledgeResource > CreateAsync ( CreateAssistantsKnowledgeOptions options , ITwilioRestClient client = null , CancellationToken cancellationToken = default )
7474 {
7575 client = client ?? TwilioClient . GetRestClient ( ) ;
76- var response = await client . RequestAsync ( BuildCreateRequest ( options , client ) ) ;
76+ var response = await client . RequestAsync ( BuildCreateRequest ( options , client ) , cancellationToken ) ;
7777 return FromJson ( response . Content ) ;
7878 }
7979 #endif
@@ -104,7 +104,7 @@ public static async System.Threading.Tasks.Task<AssistantsKnowledgeResource> Cre
104104 ITwilioRestClient client = null )
105105 {
106106 var options = new CreateAssistantsKnowledgeOptions ( pathAssistantId , pathId ) { } ;
107- return await CreateAsync ( options , client ) ;
107+ return await CreateAsync ( options , client , cancellationToken ) ;
108108 }
109109 #endif
110110
@@ -147,11 +147,12 @@ public static bool Delete(DeleteAssistantsKnowledgeOptions options, ITwilioRestC
147147 /// <param name="options"> Delete AssistantsKnowledge parameters </param>
148148 /// <param name="client"> Client to make requests to Twilio </param>
149149 /// <returns> Task that resolves to A single instance of AssistantsKnowledge </returns>
150- public static async System . Threading . Tasks . Task < bool > DeleteAsync ( DeleteAssistantsKnowledgeOptions options ,
151- ITwilioRestClient client = null )
150+ public static async System . Threading . Tasks . Task < bool > DeleteAsync ( DeleteAssistantsKnowledgeOptions options ,
151+ ITwilioRestClient client = null ,
152+ CancellationToken cancellationToken = default )
152153 {
153154 client = client ?? TwilioClient . GetRestClient ( ) ;
154- var response = await client . RequestAsync ( BuildDeleteRequest ( options , client ) ) ;
155+ var response = await client . RequestAsync ( BuildDeleteRequest ( options , client ) , cancellationToken ) ;
155156 return response . StatusCode == System . Net . HttpStatusCode . NoContent ;
156157 }
157158 #endif
@@ -176,7 +177,7 @@ public static bool Delete(string pathAssistantId, string pathId, ITwilioRestClie
176177 public static async System . Threading . Tasks . Task < bool > DeleteAsync ( string pathAssistantId , string pathId , ITwilioRestClient client = null )
177178 {
178179 var options = new DeleteAssistantsKnowledgeOptions ( pathAssistantId , pathId ) ;
179- return await DeleteAsync ( options , client ) ;
180+ return await DeleteAsync ( options , client , cancellationToken ) ;
180181 }
181182 #endif
182183
@@ -213,10 +214,10 @@ public static ResourceSet<AssistantsKnowledgeResource> Read(ReadAssistantsKnowle
213214 /// <param name="options"> Read AssistantsKnowledge parameters </param>
214215 /// <param name="client"> Client to make requests to Twilio </param>
215216 /// <returns> Task that resolves to A single instance of AssistantsKnowledge </returns>
216- public static async System . Threading . Tasks . Task < ResourceSet < AssistantsKnowledgeResource > > ReadAsync ( ReadAssistantsKnowledgeOptions options , ITwilioRestClient client = null )
217+ public static async System . Threading . Tasks . Task < ResourceSet < AssistantsKnowledgeResource > > ReadAsync ( ReadAssistantsKnowledgeOptions options , ITwilioRestClient client = null , CancellationToken cancellationToken = default )
217218 {
218219 client = client ?? TwilioClient . GetRestClient ( ) ;
219- var response = await client . RequestAsync ( BuildReadRequest ( options , client ) ) ;
220+ var response = await client . RequestAsync ( BuildReadRequest ( options , client ) , cancellationToken ) ;
220221
221222 var page = Page < AssistantsKnowledgeResource > . FromJson ( "knowledge" , response . Content ) ;
222223 return new ResourceSet < AssistantsKnowledgeResource > ( page , options , client ) ;
@@ -252,7 +253,7 @@ public static async System.Threading.Tasks.Task<ResourceSet<AssistantsKnowledgeR
252253 ITwilioRestClient client = null )
253254 {
254255 var options = new ReadAssistantsKnowledgeOptions ( pathAssistantId ) { PageSize = pageSize , Limit = limit } ;
255- return await ReadAsync ( options , client ) ;
256+ return await ReadAsync ( options , client , cancellationToken ) ;
256257 }
257258 #endif
258259
0 commit comments