com.vk.api.sdk.queries.market.MarketAddQuery 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.market;
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.market.responses.AddResponse;
import java.util.Arrays;
import java.util.List;
/**
* Query for Market.add method
*/
public class MarketAddQuery 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 ownerId value of "owner id" parameter.
* @param name value of "name" parameter.
* @param description value of "description" parameter.
* @param categoryId value of "category id" parameter. Minimum is 0.
*/
public MarketAddQuery(VkApiClient client, UserActor actor, int ownerId, String name,
String description, int categoryId) {
super(client, "market.add", AddResponse.class);
accessToken(actor.getAccessToken());
ownerId(ownerId);
name(name);
description(description);
categoryId(categoryId);
}
/**
* ID of an item owner community.
*
* @param value value of "owner id" parameter.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
protected MarketAddQuery ownerId(int value) {
return unsafeParam("owner_id", value);
}
/**
* Item name.
*
* @param value value of "name" parameter.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
protected MarketAddQuery name(String value) {
return unsafeParam("name", value);
}
/**
* Item description.
*
* @param value value of "description" parameter.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
protected MarketAddQuery description(String value) {
return unsafeParam("description", value);
}
/**
* Item category ID.
*
* @param value value of "category id" parameter. Minimum is 0.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
protected MarketAddQuery categoryId(int value) {
return unsafeParam("category_id", value);
}
/**
* Item price.
*
* @param value value of "price" parameter. Minimum is 0.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
public MarketAddQuery price(Number value) {
return unsafeParam("price", value);
}
/**
* Set old price
*
* @param value value of "old price" parameter. Minimum is 0.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
public MarketAddQuery oldPrice(Number value) {
return unsafeParam("old_price", value);
}
/**
* Item status ('1' — deleted, '0' — not deleted).
*
* @param value value of "deleted" parameter.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
public MarketAddQuery deleted(Boolean value) {
return unsafeParam("deleted", value);
}
/**
* Cover photo ID.
*
* @param value value of "main photo id" parameter. Minimum is 0.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
public MarketAddQuery mainPhotoId(Integer value) {
return unsafeParam("main_photo_id", value);
}
/**
* Url for button in market item.
*
* @param value value of "url" parameter.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
public MarketAddQuery url(String value) {
return unsafeParam("url", value);
}
/**
* Set dimension width
*
* @param value value of "dimension width" parameter. Maximum is 100000. Minimum is 0.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
public MarketAddQuery dimensionWidth(Integer value) {
return unsafeParam("dimension_width", value);
}
/**
* Set dimension height
*
* @param value value of "dimension height" parameter. Maximum is 100000. Minimum is 0.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
public MarketAddQuery dimensionHeight(Integer value) {
return unsafeParam("dimension_height", value);
}
/**
* Set dimension length
*
* @param value value of "dimension length" parameter. Maximum is 100000. Minimum is 0.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
public MarketAddQuery dimensionLength(Integer value) {
return unsafeParam("dimension_length", value);
}
/**
* Set weight
*
* @param value value of "weight" parameter. Maximum is 100000000. Minimum is 0.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
public MarketAddQuery weight(Integer value) {
return unsafeParam("weight", value);
}
/**
* Set sku
*
* @param value value of "sku" parameter.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
public MarketAddQuery sku(String value) {
return unsafeParam("sku", value);
}
/**
* photo_ids
* IDs of additional photos.
*
* @param value value of "photo ids" parameter.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
public MarketAddQuery photoIds(Integer... value) {
return unsafeParam("photo_ids", value);
}
/**
* IDs of additional photos.
*
* @param value value of "photo ids" parameter.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
public MarketAddQuery photoIds(List value) {
return unsafeParam("photo_ids", value);
}
@Override
protected MarketAddQuery getThis() {
return this;
}
@Override
protected List essentialKeys() {
return Arrays.asList("name", "description", "owner_id", "category_id", "access_token");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy