csharp.RequestOptions.mustache Maven / Gradle / Ivy
{{>partial_header}}
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
namespace {{packageName}}.Client
{
///
/// A container for generalized request inputs. This type allows consumers to extend the request functionality
/// by abstracting away from the default (built-in) request framework (e.g. RestSharp).
///
public class RequestOptions
{
///
/// Parameters to be bound to path parts of the Request's URL
///
public Dictionary PathParameters { get; set; }
///
/// Query parameters to be applied to the request.
/// Keys may have 1 or more values associated.
///
public Multimap QueryParameters { get; set; }
///
/// Header parameters to be applied to the request.
/// Keys may have 1 or more values associated.
///
public Multimap HeaderParameters { get; set; }
///
/// Form parameters to be sent along with the request.
///
public Dictionary FormParameters { get; set; }
{{#supportsFileParameters}}
///
/// File parameters to be sent along with the request.
///
public Multimap FileParameters { get; set; }
{{/supportsFileParameters}}
///
/// Cookies to be sent along with the request.
///
public List Cookies { get; set; }
///
/// Operation associated with the request path.
///
public string Operation { get; set; }
///
/// Index associated with the operation.
///
public int OperationIndex { get; set; }
///
/// Any data associated with a request body.
///
public Object Data { get; set; }
{{#hasOAuthMethods}}
///
/// If request should be authenticated with OAuth.
///
public bool OAuth { get; set; }
{{/hasOAuthMethods}}
///
/// Constructs a new instance of
///
public RequestOptions()
{
PathParameters = new Dictionary();
QueryParameters = new Multimap();
HeaderParameters = new Multimap();
FormParameters = new Dictionary();
{{#supportsFileParameters}}
FileParameters = new Multimap();
{{/supportsFileParameters}}
Cookies = new List();
}
}
}