
com.vk.api.sdk.queries.ads.AdsGetCampaignsQuery 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.
// Autogenerated from vk-api-schema. Please don't edit it manually.
package com.vk.api.sdk.queries.ads;
import com.vk.api.sdk.client.AbstractQueryBuilder;
import com.vk.api.sdk.client.Utils;
import com.vk.api.sdk.client.VkApiClient;
import com.vk.api.sdk.client.actors.UserActor;
import com.vk.api.sdk.objects.ads.responses.GetCampaignsResponse;
import java.util.Arrays;
import java.util.List;
/**
* Query for Ads.getCampaigns method
*/
public class AdsGetCampaignsQuery extends AbstractQueryBuilder> {
/**
* Creates a AbstractQueryBuilder instance that can be used to build api request with various parameters
*
* @param client VK API client
* @param actor actor with access token
* @param accountId value of "account id" parameter.
*/
public AdsGetCampaignsQuery(VkApiClient client, UserActor actor, int accountId) {
super(client, "ads.getCampaigns", Utils.buildParametrizedType(List.class, GetCampaignsResponse.class));
accessToken(actor.getAccessToken());
accountId(accountId);
}
/**
* Advertising account ID.
*
* @param value value of "account id" parameter.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
protected AdsGetCampaignsQuery accountId(int value) {
return unsafeParam("account_id", value);
}
/**
* 'For advertising agencies'. ID of the client advertising campaigns are retrieved from.
*
* @param value value of "client id" parameter.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
public AdsGetCampaignsQuery clientId(Integer value) {
return unsafeParam("client_id", value);
}
/**
* Flag that specifies whether archived ads shall be shown. *0 — show only active campaigns,, *1 — show all campaigns.
*
* @param value value of "include deleted" parameter.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
public AdsGetCampaignsQuery includeDeleted(Boolean value) {
return unsafeParam("include_deleted", value);
}
/**
* Filter of advertising campaigns to show. Serialized JSON array with campaign IDs. Only campaigns that exist in 'campaign_ids' and belong to the specified advertising account will be shown. If the parameter is null, all campaigns will be shown.
*
* @param value value of "campaign ids" parameter.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
public AdsGetCampaignsQuery campaignIds(String value) {
return unsafeParam("campaign_ids", value);
}
/**
* fields
* Set fields
*
* @param value value of "fields" parameter.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
public AdsGetCampaignsQuery fields(String... value) {
return unsafeParam("fields", value);
}
/**
* Set fields
*
* @param value value of "fields" parameter.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
public AdsGetCampaignsQuery fields(List value) {
return unsafeParam("fields", value);
}
@Override
protected AdsGetCampaignsQuery getThis() {
return this;
}
@Override
protected List essentialKeys() {
return Arrays.asList("account_id", "access_token");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy