All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vk.api.sdk.queries.ads.AdsDeleteTargetGroupQuery Maven / Gradle / Ivy

Go to download

Java library for VK API interaction, includes OAuth 2.0 authorization and API methods.

There is a newer version: 1.0.16
Show newest version
// 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.VkApiClient;
import com.vk.api.sdk.client.actors.UserActor;
import com.vk.api.sdk.objects.annotations.ApiParam;
import com.vk.api.sdk.objects.base.responses.OkResponse;
import java.util.Arrays;
import java.util.List;

/**
 * Query for Ads.deleteTargetGroup method
 */
public class AdsDeleteTargetGroupQuery 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
     * @param accountId value of "account id" parameter.
     * @param targetGroupId value of "target group id" parameter.
     */
    public AdsDeleteTargetGroupQuery(VkApiClient client, UserActor actor, Integer accountId,
            Integer targetGroupId) {
        super(client, "ads.deleteTargetGroup", OkResponse.class);
        accessToken(actor.getAccessToken());
        accountId(accountId);
        targetGroupId(targetGroupId);
    }

    /**
     * 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 AdsDeleteTargetGroupQuery(VkApiClient client, UserActor actor) {
        super(client, "ads.deleteTargetGroup", OkResponse.class);
        accessToken(actor.getAccessToken());
    }

    /**
     * Advertising account ID.
     *
     * @param value value of "account id" parameter.
     * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
     */
    @ApiParam("account_id")
    public AdsDeleteTargetGroupQuery accountId(Integer value) {
        return unsafeParam("account_id", value);
    }

    /**
     * 'Only for advertising agencies.' , ID of the client with the advertising account where the group will be created.
     *
     * @param value value of "client id" parameter.
     * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
     */
    @ApiParam("client_id")
    public AdsDeleteTargetGroupQuery clientId(Integer value) {
        return unsafeParam("client_id", value);
    }

    /**
     * Group ID.
     *
     * @param value value of "target group id" parameter.
     * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
     */
    @ApiParam("target_group_id")
    public AdsDeleteTargetGroupQuery targetGroupId(Integer value) {
        return unsafeParam("target_group_id", value);
    }

    @Override
    protected AdsDeleteTargetGroupQuery getThis() {
        return this;
    }

    @Override
    protected List essentialKeys() {
        return Arrays.asList("target_group_id", "account_id", "access_token");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy