Class AccountsResource.AdclientsResource.AdunitsResource.CreateRequest
Creates an ad unit. This method can be called only by a restricted set of projects, which are
usually owned by AdSense for Platforms
publishers. Contact your account manager if you need to use this method. Note that ad units can only
be created for ad clients with an "AFC" product code. For more info see the AdClient
resource. For now, this method can only
be used to create DISPLAY
ad units. See: https://support.google.com/adsense/answer/9183566
Inheritance
AccountsResource.AdclientsResource.AdunitsResource.CreateRequest
Inherited Members
Namespace: Google.Apis.Adsense.v2
Assembly: Google.Apis.Adsense.v2.dll
Syntax
public class AccountsResource.AdclientsResource.AdunitsResource.CreateRequest : AdsenseBaseServiceRequest<AdUnit>, IClientServiceRequest<AdUnit>, IClientServiceRequest
Constructors
CreateRequest(IClientService, AdUnit, string)
Constructs a new Create request.
Declaration
public CreateRequest(IClientService service, AdUnit body, string parent)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service | |
AdUnit | body | |
string | parent |
Properties
HttpMethod
Gets the HTTP method.
Declaration
public override string HttpMethod { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Google.Apis.Requests.ClientServiceRequest<Google.Apis.Adsense.v2.Data.AdUnit>.HttpMethod
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Google.Apis.Requests.ClientServiceRequest<Google.Apis.Adsense.v2.Data.AdUnit>.MethodName
Parent
Required. Ad client to create an ad unit under. Format: accounts/{account}/adclients/{adclient}
Declaration
[RequestParameter("parent", RequestParameterType.Path)]
public virtual string Parent { get; }
Property Value
Type | Description |
---|---|
string |
RestPath
Gets the REST path.
Declaration
public override string RestPath { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Google.Apis.Requests.ClientServiceRequest<Google.Apis.Adsense.v2.Data.AdUnit>.RestPath
Methods
GetBody()
Returns the body of the request.
Declaration
protected override object GetBody()
Returns
Type | Description |
---|---|
object |
Overrides
Google.Apis.Requests.ClientServiceRequest<Google.Apis.Adsense.v2.Data.AdUnit>.GetBody()
InitParameters()
Initializes Create parameter list.
Declaration
protected override void InitParameters()