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

com.bandwidth.webrtc.models.Session 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.1
Show newest version
/*
 * BandwidthLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

package com.bandwidth.webrtc.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 Session type.
 */
public class Session {
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String id;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String tag;

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

    /**
     * Initialization constructor.
     * @param  id  String value for id.
     * @param  tag  String value for tag.
     */
    public Session(
            String id,
            String tag) {
        this.id = id;
        this.tag = tag;
    }

    /**
     * Getter for Id.
     * Unique id of the session
     * @return Returns the String
     */
    @JsonGetter("id")
    public String getId() {
        return id;
    }

    /**
     * Setter for Id.
     * Unique id of the session
     * @param id Value for String
     */
    @JsonSetter("id")
    public void setId(String id) {
        this.id = id;
    }

    /**
     * Getter for Tag.
     * User defined tag to associate with the session
     * @return Returns the String
     */
    @JsonGetter("tag")
    public String getTag() {
        return tag;
    }

    /**
     * Setter for Tag.
     * User defined tag to associate with the session
     * @param tag Value for String
     */
    @JsonSetter("tag")
    public void setTag(String tag) {
        this.tag = tag;
    }

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

    /**
     * Builds a new {@link Session.Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link Session.Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder()
                .id(getId())
                .tag(getTag());
        return builder;
    }

    /**
     * Class to build instances of {@link Session}.
     */
    public static class Builder {
        private String id;
        private String tag;



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

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

        /**
         * Builds a new {@link Session} object using the set fields.
         * @return {@link Session}
         */
        public Session build() {
            return new Session(id, tag);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy