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

com.devcycle.sdk.server.common.model.DevCycleUserAndEvents Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
/*
 * DevCycle Bucketing API
 * Documents the DevCycle Bucketing API which provides and API interface to User Bucketing and for generated SDKs.
 *
 * OpenAPI spec version: 1.0.0
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package com.devcycle.sdk.server.common.model;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class DevCycleUserAndEvents {

    private List events;

    private DevCycleUser user;

    public DevCycleUserAndEvents(DevCycleUser user, List events) {
        this.user = user;
        this.events = events;
    }

    public static DevCycleUserAndEvents.Builder builder() {
        return new DevCycleUserAndEvents.Builder();
    }

    public DevCycleUserAndEvents addEventItem(DevCycleEvent eventItem) {
        if (this.events == null) {
            this.events = new ArrayList<>();
        }
        this.events.add(eventItem);
        return this;
    }

    public static class Builder {
        private DevCycleUser user;
        private List events;

        Builder() {
        }

        public DevCycleUserAndEvents.Builder user(DevCycleUser user) {
            this.user = user;
            return this;
        }

        public DevCycleUserAndEvents.Builder events(List events) {
            this.events = events;
            return this;
        }

        public DevCycleUserAndEvents build() {
            return new DevCycleUserAndEvents(user, events);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy