@ -28,6 +28,7 @@ namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs.proxy;
#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type"
#pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)."
using System = global :: System ;
[System.CodeDom.Compiler.GeneratedCode("NSwag", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")]
@ -47,7 +48,7 @@ namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs.proxy;
{
BaseUrl = baseUrl ;
_ httpClient = httpClient ;
_ path = path ;
_ path = path ;
Initialize ( ) ;
}
@ -69,18 +70,19 @@ namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs.proxy;
}
}
private string _ path ;
public string Path
{
get { return _ path ; }
set
{
_ path = value ;
_ path = value ;
}
}
protected Newtonsoft . Json . JsonSerializerSettings JsonSerializerSettings { get { return _ instanceSettings ? ? _ settings . Value ; } }
static partial void UpdateJsonSerializerSettings ( Newtonsoft . Json . JsonSerializerSettings settings ) ;
@ -375,6 +377,148 @@ namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs.proxy;
}
}
/// <returns>Success</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public virtual System . Threading . Tasks . Task < AgvResultObject > NotifyOutTaskBack4FWAsync ( AgvRequestBack body )
{
return NotifyOutTaskBack4FWAsync ( body , System . Threading . CancellationToken . None ) ;
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <returns>Success</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public virtual async System . Threading . Tasks . Task < AgvResultObject > NotifyOutTaskBack4FWAsync ( AgvRequestBack body , System . Threading . CancellationToken cancellationToken )
{
var client_ = _ httpClient ;
var disposeClient_ = false ;
try
{
using ( var request_ = new System . Net . Http . HttpRequestMessage ( ) )
{
var json_ = Newtonsoft . Json . JsonConvert . SerializeObject ( body , JsonSerializerSettings ) ;
var content_ = new System . Net . Http . StringContent ( json_ ) ;
content_ . Headers . ContentType = System . Net . Http . Headers . MediaTypeHeaderValue . Parse ( "application/json" ) ;
request_ . Content = content_ ;
request_ . Method = new System . Net . Http . HttpMethod ( "POST" ) ;
request_ . Headers . Accept . Add ( System . Net . Http . Headers . MediaTypeWithQualityHeaderValue . Parse ( "text/plain" ) ) ;
var urlBuilder_ = new System . Text . StringBuilder ( ) ;
if ( ! string . IsNullOrEmpty ( _ baseUrl ) ) urlBuilder_ . Append ( _ baseUrl ) ;
// Operation Path: "notifyOutTaskBack4FW"
urlBuilder_ . Append ( "notifyOutTaskBack4FW" ) ;
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 ) ;
var disposeResponse_ = true ;
try
{
var headers_ = new System . Collections . Generic . Dictionary < string , System . Collections . Generic . IEnumerable < string > > ( ) ;
foreach ( var item_ in response_ . Headers )
headers_ [ item_ . Key ] = item_ . Value ;
if ( response_ . Content ! = null & & response_ . Content . Headers ! = null )
{
foreach ( var item_ in response_ . Content . Headers )
headers_ [ item_ . Key ] = item_ . Value ;
}
ProcessResponse ( client_ , response_ ) ;
var status_ = ( int ) response_ . StatusCode ;
if ( status_ = = 2 0 0 )
{
var objectResponse_ = await ReadObjectResponseAsync < AgvResultObject > ( response_ , headers_ , cancellationToken ) . ConfigureAwait ( false ) ;
if ( objectResponse_ . Object = = null )
{
throw new ApiException ( "Response was null which was not expected." , status_ , objectResponse_ . Text , headers_ , null ) ;
}
return objectResponse_ . Object ;
}
else
if ( status_ = = 4 0 3 )
{
var objectResponse_ = await ReadObjectResponseAsync < RemoteServiceErrorResponse > ( response_ , headers_ , cancellationToken ) . ConfigureAwait ( false ) ;
if ( objectResponse_ . Object = = null )
{
throw new ApiException ( "Response was null which was not expected." , status_ , objectResponse_ . Text , headers_ , null ) ;
}
throw new ApiException < RemoteServiceErrorResponse > ( "Forbidden" , status_ , objectResponse_ . Text , headers_ , objectResponse_ . Object , null ) ;
}
else
if ( status_ = = 4 0 1 )
{
var objectResponse_ = await ReadObjectResponseAsync < RemoteServiceErrorResponse > ( response_ , headers_ , cancellationToken ) . ConfigureAwait ( false ) ;
if ( objectResponse_ . Object = = null )
{
throw new ApiException ( "Response was null which was not expected." , status_ , objectResponse_ . Text , headers_ , null ) ;
}
throw new ApiException < RemoteServiceErrorResponse > ( "Unauthorized" , status_ , objectResponse_ . Text , headers_ , objectResponse_ . Object , null ) ;
}
else
if ( status_ = = 4 0 0 )
{
var objectResponse_ = await ReadObjectResponseAsync < RemoteServiceErrorResponse > ( response_ , headers_ , cancellationToken ) . ConfigureAwait ( false ) ;
if ( objectResponse_ . Object = = null )
{
throw new ApiException ( "Response was null which was not expected." , status_ , objectResponse_ . Text , headers_ , null ) ;
}
throw new ApiException < RemoteServiceErrorResponse > ( "Bad Request" , status_ , objectResponse_ . Text , headers_ , objectResponse_ . Object , null ) ;
}
else
if ( status_ = = 4 0 4 )
{
var objectResponse_ = await ReadObjectResponseAsync < RemoteServiceErrorResponse > ( response_ , headers_ , cancellationToken ) . ConfigureAwait ( false ) ;
if ( objectResponse_ . Object = = null )
{
throw new ApiException ( "Response was null which was not expected." , status_ , objectResponse_ . Text , headers_ , null ) ;
}
throw new ApiException < RemoteServiceErrorResponse > ( "Not Found" , status_ , objectResponse_ . Text , headers_ , objectResponse_ . Object , null ) ;
}
else
if ( status_ = = 5 0 1 )
{
var objectResponse_ = await ReadObjectResponseAsync < RemoteServiceErrorResponse > ( response_ , headers_ , cancellationToken ) . ConfigureAwait ( false ) ;
if ( objectResponse_ . Object = = null )
{
throw new ApiException ( "Response was null which was not expected." , status_ , objectResponse_ . Text , headers_ , null ) ;
}
throw new ApiException < RemoteServiceErrorResponse > ( "Server Error" , status_ , objectResponse_ . Text , headers_ , objectResponse_ . Object , null ) ;
}
else
if ( status_ = = 5 0 0 )
{
var objectResponse_ = await ReadObjectResponseAsync < RemoteServiceErrorResponse > ( response_ , headers_ , cancellationToken ) . ConfigureAwait ( false ) ;
if ( objectResponse_ . Object = = null )
{
throw new ApiException ( "Response was null which was not expected." , status_ , objectResponse_ . Text , headers_ , null ) ;
}
throw new ApiException < RemoteServiceErrorResponse > ( "Server Error" , status_ , objectResponse_ . Text , headers_ , objectResponse_ . Object , null ) ;
}
else
{
var responseData_ = response_ . Content = = null ? null : await response_ . Content . ReadAsStringAsync ( ) . ConfigureAwait ( false ) ;
throw new ApiException ( "The HTTP status code of the response was not expected (" + status_ + ")." , status_ , responseData_ , headers_ , null ) ;
}
}
finally
{
if ( disposeResponse_ )
response_ . Dispose ( ) ;
}
}
}
finally
{
if ( disposeClient_ )
client_ . Dispose ( ) ;
}
}
protected struct ObjectResponseResult < T >
{
public ObjectResponseResult ( T responseObject , string responseText )
@ -529,7 +673,6 @@ namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs.proxy;
[System.CodeDom.Compiler.GeneratedCode("NSwag", "14.2.0.0 (NJsonSchema v11.1.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class ApiException : System . Exception
{
@ -567,10 +710,10 @@ namespace Win_in.Sfs.Wms.Store.Jobs.IssueJobs.proxy;
#pragma warning restore 108
#pragma warning restore 114
#pragma warning restore 472
#pragma warning restore 612
#pragma warning restore 108
#pragma warning restore 114
#pragma warning restore 472
#pragma warning restore 612
#pragma warning restore 1573
#pragma warning restore 1591
#pragma warning restore 8073