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

io.swagger.client.model.AccessToken Maven / Gradle / Ivy

The newest version!
/*
 * elasticemail_Restful_api
 * Send your emails with ElasticEmail API
 *
 * OpenAPI spec version: 3.0.1
 * Contact: [email protected]
 *
 * 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 io.swagger.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.threeten.bp.OffsetDateTime;

/**
 * AccessToken
 */
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-03-29T15:32:30.861Z")
public class AccessToken {
  /**
   * Access which this Token grants
   */
  @JsonAdapter(AccessLevelEnum.Adapter.class)
  public enum AccessLevelEnum {
    NONE("None"),
    
    VIEWACCOUNT("ViewAccount"),
    
    VIEWCONTACTS("ViewContacts"),
    
    VIEWFORMS("ViewForms"),
    
    VIEWTEMPLATES("ViewTemplates"),
    
    VIEWCAMPAIGNS("ViewCampaigns"),
    
    VIEWCHANNELS("ViewChannels"),
    
    VIEWJOURNEYS("ViewJourneys"),
    
    VIEWSURVEYS("ViewSurveys"),
    
    VIEWSETTINGS("ViewSettings"),
    
    VIEWBILLING("ViewBilling"),
    
    VIEWSUBACCOUNTS("ViewSubAccounts"),
    
    VIEWUSERS("ViewUsers"),
    
    VIEWFILES("ViewFiles"),
    
    VIEWREPORTS("ViewReports"),
    
    MODIFYACCOUNT("ModifyAccount"),
    
    MODIFYCONTACTS("ModifyContacts"),
    
    MODIFYFORMS("ModifyForms"),
    
    MODIFYTEMPLATES("ModifyTemplates"),
    
    MODIFYCAMPAIGNS("ModifyCampaigns"),
    
    MODIFYCHANNELS("ModifyChannels"),
    
    MODIFYJOURNEYS("ModifyJourneys"),
    
    MODIFYSURVEYS("ModifySurveys"),
    
    MODIFYFILES("ModifyFiles"),
    
    EXPORT("Export"),
    
    SENDSMTP("SendSmtp"),
    
    SENDSMS("SendSMS"),
    
    MODIFYSETTINGS("ModifySettings"),
    
    MODIFYBILLING("ModifyBilling"),
    
    MODIFYPROFILE("ModifyProfile"),
    
    MODIFYSUBACCOUNTS("ModifySubAccounts"),
    
    MODIFYUSERS("ModifyUsers"),
    
    SECURITY("Security"),
    
    MODIFYLANGUAGE("ModifyLanguage"),
    
    VIEWSUPPORT("ViewSupport"),
    
    SENDHTTP("SendHttp"),
    
    MODIFY2FA("Modify2FA"),
    
    MODIFYSUPPORT("ModifySupport"),
    
    VIEWCUSTOMFIELDS("ViewCustomFields"),
    
    MODIFYCUSTOMFIELDS("ModifyCustomFields"),
    
    MODIFYWEBNOTIFICATIONS("ModifyWebNotifications"),
    
    EXTENDEDLOGS("ExtendedLogs");

    private String value;

    AccessLevelEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static AccessLevelEnum fromValue(String text) {
      for (AccessLevelEnum b : AccessLevelEnum.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 AccessLevelEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public AccessLevelEnum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return AccessLevelEnum.fromValue(String.valueOf(value));
      }
    }
  }

  @SerializedName("AccessLevel")
  private AccessLevelEnum accessLevel = null;

  @SerializedName("Name")
  private String name = null;

  @SerializedName("LastUse")
  private OffsetDateTime lastUse = null;

  public AccessToken accessLevel(AccessLevelEnum accessLevel) {
    this.accessLevel = accessLevel;
    return this;
  }

   /**
   * Access which this Token grants
   * @return accessLevel
  **/
  @ApiModelProperty(required = true, value = "Access which this Token grants")
  public AccessLevelEnum getAccessLevel() {
    return accessLevel;
  }

  public void setAccessLevel(AccessLevelEnum accessLevel) {
    this.accessLevel = accessLevel;
  }

  public AccessToken name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Filename
   * @return name
  **/
  @ApiModelProperty(example = "attachment.txt", required = true, value = "Filename")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public AccessToken lastUse(OffsetDateTime lastUse) {
    this.lastUse = lastUse;
    return this;
  }

   /**
   * When was this AccessToken used last
   * @return lastUse
  **/
  @ApiModelProperty(value = "When was this AccessToken used last")
  public OffsetDateTime getLastUse() {
    return lastUse;
  }

  public void setLastUse(OffsetDateTime lastUse) {
    this.lastUse = lastUse;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AccessToken accessToken = (AccessToken) o;
    return Objects.equals(this.accessLevel, accessToken.accessLevel) &&
        Objects.equals(this.name, accessToken.name) &&
        Objects.equals(this.lastUse, accessToken.lastUse);
  }

  @Override
  public int hashCode() {
    return Objects.hash(accessLevel, name, lastUse);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AccessToken {\n");
    
    sb.append("    accessLevel: ").append(toIndentedString(accessLevel)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    lastUse: ").append(toIndentedString(lastUse)).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