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

com.sinch.sdk.domains.verification.models.v1.internal.IdentityInternal Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
/*
 * Verification | Sinch
 *
 * OpenAPI document version: 2.0.1
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * Do not edit the class manually.
 */

package com.sinch.sdk.domains.verification.models.v1.internal;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.sinch.sdk.core.utils.EnumDynamic;
import com.sinch.sdk.core.utils.EnumSupportDynamic;
import java.util.Arrays;
import java.util.stream.Stream;

/**
 * Specifies the type of endpoint that will be verified and the particular endpoint. number
 *  is currently the only supported endpoint type.
 */
@JsonDeserialize(builder = IdentityInternalImpl.Builder.class)
public interface IdentityInternal {

  /** Currently only number type is supported. */
  public class TypeEnum extends EnumDynamic {
    public static final TypeEnum NUMBER = new TypeEnum("number");

    private static final EnumSupportDynamic ENUM_SUPPORT =
        new EnumSupportDynamic<>(TypeEnum.class, TypeEnum::new, Arrays.asList(NUMBER));

    private TypeEnum(String value) {
      super(value);
    }

    public static Stream values() {
      return ENUM_SUPPORT.values();
    }

    public static TypeEnum from(String value) {
      return ENUM_SUPPORT.from(value);
    }

    public static String valueOf(TypeEnum e) {
      return ENUM_SUPPORT.valueOf(e);
    }
  }

  /**
   * Currently only number type is supported.
   *
   * @return type
   */
  TypeEnum getType();

  /**
   * For type number use an E.164-compatible phone
   * number.
   *
   * @return endpoint
   */
  String getEndpoint();

  /**
   * Getting builder
   *
   * @return New Builder instance
   */
  static Builder builder() {
    return new IdentityInternalImpl.Builder();
  }

  /** Dedicated Builder */
  interface Builder {

    /**
     * see getter
     *
     * @param type see getter
     * @return Current builder
     * @see #getType
     */
    Builder setType(TypeEnum type);

    /**
     * see getter
     *
     * @param endpoint see getter
     * @return Current builder
     * @see #getEndpoint
     */
    Builder setEndpoint(String endpoint);

    /**
     * Create instance
     *
     * @return The instance build with current builder values
     */
    IdentityInternal build();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy