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

com.bandwidth.messaging.models.Media Maven / Gradle / Ivy

Go to download

The official client SDK for Bandwidth's Voice, Messaging, MFA, and WebRTC APIs

There is a newer version: 12.0.0
Show newest version
/*
 * BandwidthLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

package com.bandwidth.messaging.models;

import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;

/**
 * This is a model class for Media type.
 */
public class Media {
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String content;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer contentLength;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String mediaName;

    /**
     * Default constructor.
     */
    public Media() {
    }

    /**
     * Initialization constructor.
     * @param  content  String value for content.
     * @param  contentLength  Integer value for contentLength.
     * @param  mediaName  String value for mediaName.
     */
    public Media(
            String content,
            Integer contentLength,
            String mediaName) {
        this.content = content;
        this.contentLength = contentLength;
        this.mediaName = mediaName;
    }

    /**
     * Getter for Content.
     * @return Returns the String
     */
    @JsonGetter("content")
    public String getContent() {
        return content;
    }

    /**
     * Setter for Content.
     * @param content Value for String
     */
    @JsonSetter("content")
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * Getter for ContentLength.
     * @return Returns the Integer
     */
    @JsonGetter("contentLength")
    public Integer getContentLength() {
        return contentLength;
    }

    /**
     * Setter for ContentLength.
     * @param contentLength Value for Integer
     */
    @JsonSetter("contentLength")
    public void setContentLength(Integer contentLength) {
        this.contentLength = contentLength;
    }

    /**
     * Getter for MediaName.
     * @return Returns the String
     */
    @JsonGetter("mediaName")
    public String getMediaName() {
        return mediaName;
    }

    /**
     * Setter for MediaName.
     * @param mediaName Value for String
     */
    @JsonSetter("mediaName")
    public void setMediaName(String mediaName) {
        this.mediaName = mediaName;
    }

    /**
     * Converts this Media into string format.
     * @return String representation of this class
     */
    @Override
    public String toString() {
        return "Media [" + "content=" + content + ", contentLength=" + contentLength
                + ", mediaName=" + mediaName + "]";
    }

    /**
     * Builds a new {@link Media.Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link Media.Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder()
                .content(getContent())
                .contentLength(getContentLength())
                .mediaName(getMediaName());
        return builder;
    }

    /**
     * Class to build instances of {@link Media}.
     */
    public static class Builder {
        private String content;
        private Integer contentLength;
        private String mediaName;



        /**
         * Setter for content.
         * @param  content  String value for content.
         * @return Builder
         */
        public Builder content(String content) {
            this.content = content;
            return this;
        }

        /**
         * Setter for contentLength.
         * @param  contentLength  Integer value for contentLength.
         * @return Builder
         */
        public Builder contentLength(Integer contentLength) {
            this.contentLength = contentLength;
            return this;
        }

        /**
         * Setter for mediaName.
         * @param  mediaName  String value for mediaName.
         * @return Builder
         */
        public Builder mediaName(String mediaName) {
            this.mediaName = mediaName;
            return this;
        }

        /**
         * Builds a new {@link Media} object using the set fields.
         * @return {@link Media}
         */
        public Media build() {
            return new Media(content, contentLength, mediaName);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy