org.killbill.billing.client.model.gen.Phase Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of killbill-client-java Show documentation
Show all versions of killbill-client-java Show documentation
Kill Bill Java client library
The newest version!
/*
* Copyright 2010-2014 Ning, Inc.
* Copyright 2014-2020 Groupon, Inc
* Copyright 2020-2021 Equinix, Inc
* Copyright 2014-2021 The Billing Project, LLC
*
* The Billing Project licenses this file to you under the Apache License, version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package org.killbill.billing.client.model.gen;
import java.util.Objects;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import org.killbill.billing.client.model.gen.Duration;
import org.killbill.billing.client.model.gen.Price;
import org.killbill.billing.client.model.gen.Usage;
/**
* DO NOT EDIT !!!
*
* This code has been generated by the Kill Bill swagger generator.
* @See https://github.com/killbill/killbill-swagger-coden
*/
import org.killbill.billing.client.model.KillBillObject;
public class Phase {
private String type = null;
private List prices = null;
private List fixedPrices = null;
private Duration duration = null;
private List usages = null;
public Phase() {
}
public Phase(final String type,
final List prices,
final List fixedPrices,
final Duration duration,
final List usages) {
this.type = type;
this.prices = prices;
this.fixedPrices = fixedPrices;
this.duration = duration;
this.usages = usages;
}
public Phase setType(final String type) {
this.type = type;
return this;
}
public String getType() {
return type;
}
public Phase setPrices(final List prices) {
this.prices = prices;
return this;
}
public Phase addPricesItem(final Price pricesItem) {
if (this.prices == null) {
this.prices = new ArrayList();
}
this.prices.add(pricesItem);
return this;
}
public List getPrices() {
return prices;
}
public Phase setFixedPrices(final List fixedPrices) {
this.fixedPrices = fixedPrices;
return this;
}
public Phase addFixedPricesItem(final Price fixedPricesItem) {
if (this.fixedPrices == null) {
this.fixedPrices = new ArrayList();
}
this.fixedPrices.add(fixedPricesItem);
return this;
}
public List getFixedPrices() {
return fixedPrices;
}
public Phase setDuration(final Duration duration) {
this.duration = duration;
return this;
}
public Duration getDuration() {
return duration;
}
public Phase setUsages(final List usages) {
this.usages = usages;
return this;
}
public Phase addUsagesItem(final Usage usagesItem) {
if (this.usages == null) {
this.usages = new ArrayList();
}
this.usages.add(usagesItem);
return this;
}
public List getUsages() {
return usages;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Phase phase = (Phase) o;
return Objects.equals(this.type, phase.type) &&
Objects.equals(this.prices, phase.prices) &&
Objects.equals(this.fixedPrices, phase.fixedPrices) &&
Objects.equals(this.duration, phase.duration) &&
Objects.equals(this.usages, phase.usages);
}
@Override
public int hashCode() {
return Objects.hash(type,
prices,
fixedPrices,
duration,
usages);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Phase {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" prices: ").append(toIndentedString(prices)).append("\n");
sb.append(" fixedPrices: ").append(toIndentedString(fixedPrices)).append("\n");
sb.append(" duration: ").append(toIndentedString(duration)).append("\n");
sb.append(" usages: ").append(toIndentedString(usages)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy