@@ -13,7 +13,7 @@ public class Asset
1313
1414 internal string resourcePath ;
1515
16- internal Asset ( Stack stack , string uid = null )
16+ internal Asset ( Stack stack , string ? uid = null )
1717 {
1818 stack . ThrowIfAPIKeyEmpty ( ) ;
1919
@@ -49,7 +49,7 @@ public Query Query()
4949 /// </code></pre>
5050 /// </example>
5151 /// <returns>The <see cref="Models.Folder"/></returns>
52- public Folder Folder ( string uid = null )
52+ public Folder Folder ( string ? uid = null )
5353 {
5454 ThrowIfUidNotEmpty ( ) ;
5555 return new Folder ( stack , uid ) ;
@@ -83,11 +83,11 @@ public Version Version(int? versionNumber = null)
8383 /// </code></pre>
8484 /// </example>
8585 /// <returns>The <see cref="ContentstackResponse"/>.</returns>
86- public virtual ContentstackResponse Create ( AssetModel model , ParameterCollection collection = null )
86+ public virtual ContentstackResponse Create ( AssetModel model , ParameterCollection ? collection = null )
8787 {
8888 ThrowIfUidNotEmpty ( ) ;
8989
90- var service = new UploadService ( stack . client . serializer , stack , resourcePath , model ) ;
90+ var service = new UploadService ( stack , resourcePath , model , stjOptions : stack . client . SerializerOptions ) ;
9191 return stack . client . InvokeSync ( service ) ;
9292 }
9393
@@ -104,12 +104,12 @@ public virtual ContentstackResponse Create(AssetModel model, ParameterCollection
104104 /// </code></pre>
105105 /// </example>
106106 /// <returns>The Task.</returns>
107- public virtual Task < ContentstackResponse > CreateAsync ( AssetModel model , ParameterCollection collection = null )
107+ public virtual Task < ContentstackResponse > CreateAsync ( AssetModel model , ParameterCollection ? collection = null )
108108 {
109109 ThrowIfUidNotEmpty ( ) ;
110110 stack . ThrowIfNotLoggedIn ( ) ;
111111
112- var service = new UploadService ( stack . client . serializer , stack , resourcePath , model ) ;
112+ var service = new UploadService ( stack , resourcePath , model , stjOptions : stack . client . SerializerOptions ) ;
113113 return stack . client . InvokeAsync < UploadService , ContentstackResponse > ( service , true ) ;
114114 }
115115
@@ -126,11 +126,11 @@ public virtual Task<ContentstackResponse> CreateAsync(AssetModel model, Paramete
126126 /// </code></pre>
127127 /// </example>
128128 /// <returns>The <see cref="ContentstackResponse"/>.</returns>
129- public virtual ContentstackResponse Update ( AssetModel model , ParameterCollection collection = null )
129+ public virtual ContentstackResponse Update ( AssetModel model , ParameterCollection ? collection = null )
130130 {
131131 ThrowIfUidEmpty ( ) ;
132132
133- var service = new UploadService ( stack . client . serializer , stack , resourcePath , model , "PUT" ) ;
133+ var service = new UploadService ( stack , resourcePath , model , "PUT" , stjOptions : stack . client . SerializerOptions ) ;
134134 return stack . client . InvokeSync ( service ) ;
135135 }
136136
@@ -147,12 +147,12 @@ public virtual ContentstackResponse Update(AssetModel model, ParameterCollection
147147 /// </code></pre>
148148 /// </example>
149149 /// <returns>The <see cref="ContentstackResponse"/>.</returns>
150- public virtual Task < ContentstackResponse > UpdateAsync ( AssetModel model , ParameterCollection collection = null )
150+ public virtual Task < ContentstackResponse > UpdateAsync ( AssetModel model , ParameterCollection ? collection = null )
151151 {
152152 stack . ThrowIfNotLoggedIn ( ) ;
153153 ThrowIfUidEmpty ( ) ;
154154
155- var service = new UploadService ( stack . client . serializer , stack , resourcePath , model , "PUT" ) ;
155+ var service = new UploadService ( stack , resourcePath , model , "PUT" , stjOptions : stack . client . SerializerOptions ) ;
156156 return stack . client . InvokeAsync < UploadService , ContentstackResponse > ( service , true ) ;
157157 }
158158
@@ -167,12 +167,12 @@ public virtual Task<ContentstackResponse> UpdateAsync(AssetModel model, Paramete
167167 /// </code></pre>
168168 /// </example>
169169 /// <returns>The <see cref="ContentstackResponse"/>.</returns>
170- public virtual ContentstackResponse Fetch ( ParameterCollection collection = null )
170+ public virtual ContentstackResponse Fetch ( ParameterCollection ? collection = null )
171171 {
172172 stack . ThrowIfNotLoggedIn ( ) ;
173173 ThrowIfUidEmpty ( ) ;
174174
175- var service = new FetchDeleteService ( stack . client . serializer , stack , resourcePath , collection : collection ) ;
175+ var service = new FetchDeleteService ( stack , resourcePath , collection : collection ) ;
176176 return stack . client . InvokeSync ( service ) ;
177177 }
178178
@@ -187,12 +187,12 @@ public virtual ContentstackResponse Fetch(ParameterCollection collection = null)
187187 /// </code></pre>
188188 /// </example>
189189 /// <returns>The <see cref="ContentstackResponse"/>.</returns>
190- public virtual Task < ContentstackResponse > FetchAsync ( ParameterCollection collection = null )
190+ public virtual Task < ContentstackResponse > FetchAsync ( ParameterCollection ? collection = null )
191191 {
192192 stack . ThrowIfNotLoggedIn ( ) ;
193193 ThrowIfUidEmpty ( ) ;
194194
195- var service = new FetchDeleteService ( stack . client . serializer , stack , resourcePath , collection : collection ) ;
195+ var service = new FetchDeleteService ( stack , resourcePath , collection : collection ) ;
196196 return stack . client . InvokeAsync < FetchDeleteService , ContentstackResponse > ( service , true ) ;
197197 }
198198
@@ -212,7 +212,7 @@ public virtual ContentstackResponse Delete()
212212 stack . ThrowIfNotLoggedIn ( ) ;
213213 ThrowIfUidEmpty ( ) ;
214214
215- var service = new FetchDeleteService ( stack . client . serializer , stack , resourcePath , "DELETE" ) ;
215+ var service = new FetchDeleteService ( stack , resourcePath , "DELETE" ) ;
216216 return stack . client . InvokeSync ( service ) ;
217217 }
218218
@@ -232,7 +232,7 @@ public virtual Task<ContentstackResponse> DeleteAsync()
232232 stack . ThrowIfNotLoggedIn ( ) ;
233233 ThrowIfUidEmpty ( ) ;
234234
235- var service = new FetchDeleteService ( stack . client . serializer , stack , resourcePath , "DELETE" ) ;
235+ var service = new FetchDeleteService ( stack , resourcePath , "DELETE" ) ;
236236 return stack . client . InvokeAsync < FetchDeleteService , ContentstackResponse > ( service , true ) ;
237237 }
238238
@@ -247,12 +247,12 @@ public virtual Task<ContentstackResponse> DeleteAsync()
247247 /// </code></pre>
248248 /// </example>
249249 /// <returns>The <see cref="ContentstackResponse"/>.</returns>
250- public virtual ContentstackResponse Publish ( PublishUnpublishDetails details , string apiVersion = null )
250+ public virtual ContentstackResponse Publish ( PublishUnpublishDetails details , string ? apiVersion = null )
251251 {
252252 stack . ThrowIfNotLoggedIn ( ) ;
253253 ThrowIfUidEmpty ( ) ;
254254
255- var service = new PublishUnpublishService ( stack . client . serializer , stack , details , $ "{ resourcePath } /publish", "asset" ) ;
255+ var service = new PublishUnpublishService ( stack , details , $ "{ resourcePath } /publish", "asset" , stjOptions : stack . client . SerializerOptions ) ;
256256 return stack . client . InvokeSync ( service , apiVersion : apiVersion ) ;
257257 }
258258
@@ -267,12 +267,12 @@ public virtual ContentstackResponse Publish(PublishUnpublishDetails details, str
267267 /// </code></pre>
268268 /// </example>
269269 /// <returns>The <see cref="ContentstackResponse"/>.</returns>
270- public virtual Task < ContentstackResponse > PublishAsync ( PublishUnpublishDetails details , string apiVersion = null )
270+ public virtual Task < ContentstackResponse > PublishAsync ( PublishUnpublishDetails details , string ? apiVersion = null )
271271 {
272272 stack . ThrowIfNotLoggedIn ( ) ;
273273 ThrowIfUidEmpty ( ) ;
274274
275- var service = new PublishUnpublishService ( stack . client . serializer , stack , details , $ "{ resourcePath } /publish", "asset" ) ;
275+ var service = new PublishUnpublishService ( stack , details , $ "{ resourcePath } /publish", "asset" , stjOptions : stack . client . SerializerOptions ) ;
276276 return stack . client . InvokeAsync < PublishUnpublishService , ContentstackResponse > ( service , apiVersion : apiVersion ) ;
277277 }
278278
@@ -287,12 +287,12 @@ public virtual Task<ContentstackResponse> PublishAsync(PublishUnpublishDetails d
287287 /// </code></pre>
288288 /// </example>
289289 /// <returns>The <see cref="ContentstackResponse"/>.</returns>
290- public virtual ContentstackResponse Unpublish ( PublishUnpublishDetails details , string apiVersion = null )
290+ public virtual ContentstackResponse Unpublish ( PublishUnpublishDetails details , string ? apiVersion = null )
291291 {
292292 stack . ThrowIfNotLoggedIn ( ) ;
293293 ThrowIfUidEmpty ( ) ;
294294
295- var service = new PublishUnpublishService ( stack . client . serializer , stack , details , $ "{ resourcePath } /unpublish", "asset" ) ;
295+ var service = new PublishUnpublishService ( stack , details , $ "{ resourcePath } /unpublish", "asset" , stjOptions : stack . client . SerializerOptions ) ;
296296 return stack . client . InvokeSync ( service , apiVersion : apiVersion ) ;
297297 }
298298
@@ -307,12 +307,12 @@ public virtual ContentstackResponse Unpublish(PublishUnpublishDetails details, s
307307 /// </code></pre>
308308 /// </example>
309309 /// <returns>The <see cref="ContentstackResponse"/>.</returns>
310- public virtual Task < ContentstackResponse > UnpublishAsync ( PublishUnpublishDetails details , string apiVersion = null )
310+ public virtual Task < ContentstackResponse > UnpublishAsync ( PublishUnpublishDetails details , string ? apiVersion = null )
311311 {
312312 stack . ThrowIfNotLoggedIn ( ) ;
313313 ThrowIfUidEmpty ( ) ;
314314
315- var service = new PublishUnpublishService ( stack . client . serializer , stack , details , $ "{ resourcePath } /unpublish", "asset" ) ;
315+ var service = new PublishUnpublishService ( stack , details , $ "{ resourcePath } /unpublish", "asset" , stjOptions : stack . client . SerializerOptions ) ;
316316 return stack . client . InvokeAsync < PublishUnpublishService , ContentstackResponse > ( service , apiVersion : apiVersion ) ;
317317 }
318318
@@ -326,12 +326,12 @@ public virtual Task<ContentstackResponse> UnpublishAsync(PublishUnpublishDetails
326326 /// </code></pre>
327327 /// </example>
328328 /// <returns>The <see cref="ContentstackResponse"/>.</returns>
329- public virtual ContentstackResponse References ( ParameterCollection collection = null )
329+ public virtual ContentstackResponse References ( ParameterCollection ? collection = null )
330330 {
331331 stack . ThrowIfNotLoggedIn ( ) ;
332332 ThrowIfUidEmpty ( ) ;
333333
334- var service = new FetchReferencesService ( stack . client . serializer , stack , resourcePath , collection : collection ) ;
334+ var service = new FetchReferencesService ( stack , resourcePath , collection : collection , stjOptions : stack . client . SerializerOptions ) ;
335335 return stack . client . InvokeSync ( service ) ;
336336 }
337337
@@ -345,12 +345,12 @@ public virtual ContentstackResponse References(ParameterCollection collection =
345345 /// </code></pre>
346346 /// </example>
347347 /// <returns>The <see cref="ContentstackResponse"/>.</returns>
348- public virtual Task < ContentstackResponse > ReferencesAsync ( ParameterCollection collection = null )
348+ public virtual Task < ContentstackResponse > ReferencesAsync ( ParameterCollection ? collection = null )
349349 {
350350 stack . ThrowIfNotLoggedIn ( ) ;
351351 ThrowIfUidEmpty ( ) ;
352352
353- var service = new FetchReferencesService ( stack . client . serializer , stack , resourcePath , collection : collection ) ;
353+ var service = new FetchReferencesService ( stack , resourcePath , collection : collection , stjOptions : stack . client . SerializerOptions ) ;
354354 return stack . client . InvokeAsync < FetchReferencesService , ContentstackResponse > ( service ) ;
355355 }
356356
0 commit comments