Class RequestParameterAttribute (1.60.0)

[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class RequestParameterAttribute : Attribute

An attribute which is used to specially mark a property for reflective purposes, assign a name to the property and indicate it's location in the request as either in the path or query portion of the request URL.

Inheritance

object > Attribute > RequestParameterAttribute

Namespace

GoogleApisUtil

Assembly

Google.Apis.Core.dll

Constructors

RequestParameterAttribute(string)

public RequestParameterAttribute(string name)

Constructs a new property attribute to be a part of a REST URI. This constructor uses Query as the parameter's type.

Parameter
NameDescription
namestring

The name of the parameter. If the parameter is a path parameter this name will be used to substitute the string value into the path, replacing {name}. If the parameter is a query parameter, this parameter will be added to the query string, in the format "name=value".

RequestParameterAttribute(string, RequestParameterType)

public RequestParameterAttribute(string name, RequestParameterType type)

Constructs a new property attribute to be a part of a REST URI.

Parameters
NameDescription
namestring

The name of the parameter. If the parameter is a path parameter this name will be used to substitute the string value into the path, replacing {name}. If the parameter is a query parameter, this parameter will be added to the query string, in the format "name=value".

typeRequestParameterType

The type of the parameter, either Path, Query or UserDefinedQueries.

Properties

Name

public string Name { get; }

Gets the name of the parameter.

Property Value
TypeDescription
string

Type

public RequestParameterType Type { get; }

Gets the type of the parameter, Path or Query.

Property Value
TypeDescription
RequestParameterType

Extension Method