com.vk.api.sdk.queries.apps.AppsIsNotificationsAllowedQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
Java library for VK API interaction, includes OAuth 2.0 authorization and API methods.
The newest version!
// Autogenerated from vk-api-schema. Please don't edit it manually.
package com.vk.api.sdk.queries.apps;
import com.vk.api.sdk.client.AbstractQueryBuilder;
import com.vk.api.sdk.client.VkApiClient;
import com.vk.api.sdk.client.actors.ServiceActor;
import com.vk.api.sdk.client.actors.UserActor;
import com.vk.api.sdk.objects.annotations.ApiParam;
import com.vk.api.sdk.objects.apps.responses.IsNotificationsAllowedResponse;
import java.util.Arrays;
import java.util.List;
/**
* Query for Apps.isNotificationsAllowed method
*/
public class AppsIsNotificationsAllowedQuery extends AbstractQueryBuilder {
/**
* Creates a AbstractQueryBuilder instance that can be used to build user api request with various parameters
*
* @param client VK API client
* @param actor actor with access token
*/
public AppsIsNotificationsAllowedQuery(VkApiClient client, UserActor actor) {
super(client, "apps.isNotificationsAllowed", IsNotificationsAllowedResponse.class);
accessToken(actor.getAccessToken());
}
/**
* Creates a AbstractQueryBuilder instance that can be used to build service api request with various parameters
*
* @param client VK API client
* @param actor actor with access token
*/
public AppsIsNotificationsAllowedQuery(VkApiClient client, ServiceActor actor) {
super(client, "apps.isNotificationsAllowed", IsNotificationsAllowedResponse.class);
accessToken(actor.getAccessToken());
clientSecret(actor.getClientSecret());
}
/**
* Set user id
*
* @param value value of "user id" parameter. Minimum is 1. Entity - owner
*
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
@ApiParam("user_id")
public AppsIsNotificationsAllowedQuery userId(Long value) {
return unsafeParam("user_id", value);
}
@Override
protected AppsIsNotificationsAllowedQuery getThis() {
return this;
}
@Override
protected List essentialKeys() {
return Arrays.asList("access_token");
}
}