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

com.vk.api.sdk.objects.bugtracker.Attachment 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.objects.bugtracker;

import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
import com.vk.api.sdk.objects.Validable;
import com.vk.api.sdk.objects.annotations.Required;
import com.vk.api.sdk.objects.docs.Doc;
import com.vk.api.sdk.objects.photos.Photo;
import java.util.Objects;

/**
 * Attachment object
 */
public class Attachment implements Validable {
    @SerializedName("doc")
    private Doc doc;

    @SerializedName("photo")
    private Photo photo;

    @SerializedName("type")
    @Required
    private AttachmentType type;

    public Doc getDoc() {
        return doc;
    }

    public Attachment setDoc(Doc doc) {
        this.doc = doc;
        return this;
    }

    public Photo getPhoto() {
        return photo;
    }

    public Attachment setPhoto(Photo photo) {
        this.photo = photo;
        return this;
    }

    public AttachmentType getType() {
        return type;
    }

    public Attachment setType(AttachmentType type) {
        this.type = type;
        return this;
    }

    @Override
    public int hashCode() {
        return Objects.hash(doc, photo, type);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Attachment attachment = (Attachment) o;
        return Objects.equals(doc, attachment.doc) &&
                Objects.equals(photo, attachment.photo) &&
                Objects.equals(type, attachment.type);
    }

    @Override
    public String toString() {
        final Gson gson = new Gson();
        return gson.toJson(this);
    }

    public String toPrettyString() {
        final StringBuilder sb = new StringBuilder("Attachment{");
        sb.append("doc=").append(doc);
        sb.append(", photo=").append(photo);
        sb.append(", type='").append(type).append("'");
        sb.append('}');
        return sb.toString();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy