Class RequestParameterAttribute
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.
Inherited Members
Namespace: Google.Apis.Util
Assembly: Google.Apis.Core.dll
Syntax
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class RequestParameterAttribute : Attribute
Constructors
RequestParameterAttribute(string)
Constructs a new property attribute to be a part of a REST URI. This constructor uses Query as the parameter's type.
Declaration
public RequestParameterAttribute(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | 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)
Constructs a new property attribute to be a part of a REST URI.
Declaration
public RequestParameterAttribute(string name, RequestParameterType type)
Parameters
Type | Name | Description |
---|---|---|
string | name | 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". |
RequestParameterType | type | The type of the parameter, either Path, Query or UserDefinedQueries. |
Properties
Name
Gets the name of the parameter.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string |
Type
Gets the type of the parameter, Path or Query.
Declaration
public RequestParameterType Type { get; }
Property Value
Type | Description |
---|---|
RequestParameterType |