Class ProjectsResource.RegistrationsResource.TopicSubscriptionsResource.CreateRequest
Creates a TopicSubscription. Subscribes an app installation instance (by registration_id, either FID or FCM Token) to a topicSubscription. Returns a TopicSubscription if it is created successfully. If the subscription already exists, returns error of ALREADY_EXISTS.
Inheritance
Inherited Members
Namespace: Google.Apis.FirebaseCloudMessaging.v1
Assembly: Google.Apis.FirebaseCloudMessaging.v1.dll
Syntax
public class ProjectsResource.RegistrationsResource.TopicSubscriptionsResource.CreateRequest : FirebaseCloudMessagingBaseServiceRequest<TopicSubscription>, IClientServiceRequest<TopicSubscription>, IClientServiceRequest
Constructors
CreateRequest(IClientService, TopicSubscription, string)
Constructs a new Create request.
Declaration
public CreateRequest(IClientService service, TopicSubscription body, string parent)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service | |
| TopicSubscription | body | |
| string | parent |
Properties
HttpMethod
Gets the HTTP method.
Declaration
public override string HttpMethod { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
Parent
Required. The parent resource where this subscription will be created. Format: projects/{project}/registrations/{registration} The {registration} part can be an FID or an FCM Token.
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
TopicName
Required. The ID to use for the subscription, which is the topic name. This will become the last segment of the TopicSubscription's resource name. Topic names match the pattern of "[a-zA-Z0-9-_.~%]{1,900}".
Declaration
[RequestParameter("topicName", RequestParameterType.Query)]
public virtual string TopicName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
GetBody()
Returns the body of the request.
Declaration
protected override object GetBody()
Returns
| Type | Description |
|---|---|
| object |
Overrides
InitParameters()
Initializes Create parameter list.
Declaration
protected override void InitParameters()