samples/composed/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/src/main/CsharpDotNet2/IO/Swagger/Api/PetApi.cs
/// <summary>
/// Find pet by ID schedule pet feeding
/// </summary>
/// <param name="body">Pet object that needs to be added to the store</param>
/// <param name="token">status</param>
/// <param name="petType">type of food</param>
/// <param name="status">status</param>
/// <param name="petId">ID of pet to return</param>
/// <returns></returns>
Find pet by ID schedule pet feeding
Find pet by ID schedule pet feeding
public void FeedPet (Pet body, string token, string petType, string status, long? petId)
        {
            if (body == null) throw new ApiException(400, "Missing required parameter 'body' when calling FeedPet");
            if (token == null) throw new ApiException(400, "Missing required parameter 'token' when calling FeedPet");
            if (petType == null) throw new ApiException(400, "Missing required parameter 'petType' when calling FeedPet");
            if (status == null) throw new ApiException(400, "Missing required parameter 'status' when calling FeedPet");
            if (petId == null) throw new ApiException(400, "Missing required parameter 'petId' when calling FeedPet");
            var path = "/pet/feed/{petId}";
            path = path.Replace("{format}", "json");
            path = path.Replace("{" + "petId" + "}", ApiClient.ParameterToString(petId));
            var queryParams = new Dictionary<String, String>();
            var headerParams = new Dictionary<String, String>();
            var formParams = new Dictionary<String, String>();
            var fileParams = new Dictionary<String, FileParameter>();
            String postBody = null;
             if (petType != null) queryParams.Add("petType", ApiClient.ParameterToString(petType)); 
 if (status != null) queryParams.Add("status", ApiClient.ParameterToString(status)); 
             if (token != null) headerParams.Add("token", ApiClient.ParameterToString(token)); 
                        postBody = ApiClient.Serialize(body); 
            String[] authSettings = new String[] {  };
            IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, authSettings);
            if (((int)response.StatusCode) >= 400)
                throw new ApiException ((int)response.StatusCode, "Error calling FeedPet: " + response.Content, response.Content);
            else if (((int)response.StatusCode) == 0)
                throw new ApiException ((int)response.StatusCode, "Error calling FeedPet: " + response.ErrorMessage, response.ErrorMessage);
            return;
        }
public void FeedPet ( Pet body , string token , string petType , string status , long ? petId ) { if ( body == null ) throw new ApiException ( 400 , " " ) ; if ( token == null ) throw new ApiException ( 400 , " " ) ; if ( petType == null ) throw new ApiException ( 400 , " " ) ; if ( status == null ) throw new ApiException ( 400 , " " ) ; if ( petId == null ) throw new ApiException ( 400 , " " ) ; var path = " " ; path = path . Replace ( " " , " " ) ; path = path . Replace ( " " + " " + " " , ApiClient . ParameterToString ( petId ) ) ; var queryParams = new Dictionary < String , String > ( ) ; var headerParams = new Dictionary < String , String > ( ) ; var formParams = new Dictionary < String , String > ( ) ; var fileParams = new Dictionary < String , FileParameter > ( ) ; String postBody = null ; if ( petType != null ) queryParams . Add ( " " , ApiClient . ParameterToString ( petType ) ) ; if ( status != null ) queryParams . Add ( " " , ApiClient . ParameterToString ( status ) ) ; if ( token != null ) headerParams . Add ( " " , ApiClient . ParameterToString ( token ) ) ; postBody = ApiClient . Serialize ( body ) ; String [ ] authSettings = new String [ ] { } ; IRestResponse response = ( IRestResponse ) ApiClient . CallApi ( path , Method . POST , queryParams , postBody , headerParams , formParams , fileParams , authSettings ) ; if ( ( ( int ) response . StatusCode ) >= 400 ) throw new ApiException ( ( int ) response . StatusCode , " " + response . Content , response . Content ) ; else if ( ( ( int ) response . StatusCode ) == 0 ) throw new ApiException ( ( int ) response . StatusCode , " " + response . ErrorMessage , response . ErrorMessage ) ; return ; }
Find pet by ID schedule pet feeding
Find pet by ID schedule pet feeding
// verify the required parameter 'body' is set // verify the required parameter 'token' is set // verify the required parameter 'petType' is set // verify the required parameter 'status' is set // verify the required parameter 'petId' is set // query parameter // query parameter // header parameter // http body (model) parameter // authentication setting, if any // make the HTTP request
None
body
Pet
Pet object that needs to be added to the store
Pet object that needs to be added to the store
token
string
None
petType
string
type of food
type of food
status
string
None
petId
long?
ID of pet to return
ID of pet to return