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

com.twitter.clientlib.model.ComplianceJobStatus Maven / Gradle / Ivy

/*
Copyright 2020 Twitter, Inc.
SPDX-License-Identifier: Apache-2.0

Licensed 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.

NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
https://openapi-generator.tech
Do not edit the class manually.
*/


package com.twitter.clientlib.model;

import java.util.Objects;
import java.util.Arrays;
import io.swagger.annotations.ApiModel;
import com.google.gson.annotations.SerializedName;

import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;

/**
 * Status of a compliance job
 */
@JsonAdapter(ComplianceJobStatus.Adapter.class)
public enum ComplianceJobStatus {
  
  CREATED("created"),
  
  IN_PROGRESS("in_progress"),
  
  FAILED("failed"),
  
  COMPLETE("complete");

  private String value;

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

  public String getValue() {
    return value;
  }

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

  public static ComplianceJobStatus fromValue(String value) {
    for (ComplianceJobStatus b : ComplianceJobStatus.values()) {
      if (b.value.equals(value)) {
        return b;
      }
    }
    throw new IllegalArgumentException("Unexpected value '" + value + "'");
  }

  public static class Adapter extends TypeAdapter {
    @Override
    public void write(final JsonWriter jsonWriter, final ComplianceJobStatus enumeration) throws IOException {
      jsonWriter.value(enumeration.getValue());
    }

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





© 2015 - 2024 Weber Informatics LLC | Privacy Policy