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

com.vk.api.sdk.queries.messages.MessagesJoinChatByInviteLinkQuery Maven / Gradle / Ivy

Go to download

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.messages;

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.messages.responses.JoinChatByInviteLinkResponse;
import java.util.Arrays;
import java.util.List;

/**
 * Query for Messages.joinChatByInviteLink method
 */
public class MessagesJoinChatByInviteLinkQuery 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 link value of "link" parameter.
     */
    public MessagesJoinChatByInviteLinkQuery(VkApiClient client, UserActor actor, String link) {
        super(client, "messages.joinChatByInviteLink", JoinChatByInviteLinkResponse.class);
        accessToken(actor.getAccessToken());
        link(link);
    }

    /**
     * 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 MessagesJoinChatByInviteLinkQuery(VkApiClient client, UserActor actor) {
        super(client, "messages.joinChatByInviteLink", JoinChatByInviteLinkResponse.class);
        accessToken(actor.getAccessToken());
    }

    /**
     * Invitation link.
     *
     * @param value value of "link" parameter.
     * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
     */
    @ApiParam("link")
    public MessagesJoinChatByInviteLinkQuery link(String value) {
        return unsafeParam("link", value);
    }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy