com.tencent.ads.model.MaxQuotaEnum Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of marketing-api-java-sdk Show documentation
Show all versions of marketing-api-java-sdk Show documentation
Tencent Ads Mareting-Api Java Sdk
/*
* Marketing API
* Marketing API
*
* OpenAPI spec version: 1.3
*
*
* 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.tencent.ads.model;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
/** 最高额度 */
@JsonAdapter(MaxQuotaEnum.Adapter.class)
public enum MaxQuotaEnum {
_5_LOW("MAX_QUOTA_5_LOW"),
_10("MAX_QUOTA_10"),
_15("MAX_QUOTA_15"),
_20("MAX_QUOTA_20"),
_30("MAX_QUOTA_30"),
_50("MAX_QUOTA_50"),
_100("MAX_QUOTA_100"),
_300("MAX_QUOTA_300"),
_300_HIGH("MAX_QUOTA_300_HIGH");
private String value;
MaxQuotaEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static MaxQuotaEnum fromValue(String text) {
for (MaxQuotaEnum b : MaxQuotaEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final MaxQuotaEnum enumeration)
throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public MaxQuotaEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return MaxQuotaEnum.fromValue(String.valueOf(value));
}
}
}