001/*
002 *   Copyright 2024 Vonage
003 *
004 *   Licensed under the Apache License, Version 2.0 (the "License");
005 *   you may not use this file except in compliance with the License.
006 *   You may obtain a copy of the License at
007 *
008 *        http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *   Unless required by applicable law or agreed to in writing, software
011 *   distributed under the License is distributed on an "AS IS" BASIS,
012 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *   See the License for the specific language governing permissions and
014 *   limitations under the License.
015 */
016package com.vonage.client.insight;
017
018import com.fasterxml.jackson.annotation.JsonProperty;
019import com.vonage.client.Jsonable;
020import com.vonage.client.JsonableBaseObject;
021
022/**
023 * Response object constructed from the JSON payload returned for Basic number insight requests.
024 */
025public class BasicInsightResponse extends JsonableBaseObject {
026    private InsightStatus status;
027    private String statusMessage, requestId, internationalFormatNumber, nationalFormatNumber,
028            countryCode, countryCodeIso3, countryName, countryPrefix;
029
030    public static BasicInsightResponse fromJson(String json) {
031        return Jsonable.fromJson(json);
032    }
033
034    /**
035     * @return The status code of the message, as an enum.
036     */
037    @JsonProperty("status")
038    public InsightStatus getStatus() {
039        return status;
040    }
041
042    /**
043     * @return The status description of your request.
044     */
045    @JsonProperty("status_message")
046    public String getStatusMessage() {
047        return statusMessage;
048    }
049
050    /**
051     * @return The unique identifier for your request.
052     * This is an alphanumeric string of up to 40 characters.
053     */
054    @JsonProperty("request_id")
055    public String getRequestId() {
056        return requestId;
057    }
058
059    /**
060     * @return The number in your request in international format.
061     */
062    @JsonProperty("international_format_number")
063    public String getInternationalFormatNumber() {
064        return internationalFormatNumber;
065    }
066
067    /**
068     * @return The number in your request in the format used by the country the number belongs to.
069     */
070    @JsonProperty("national_format_number")
071    public String getNationalFormatNumber() {
072        return nationalFormatNumber;
073    }
074
075    /**
076     * @return Two character country code for number. This is in ISO 3166-1 alpha-2 format.
077     */
078    @JsonProperty("country_code")
079    public String getCountryCode() {
080        return countryCode;
081    }
082
083    /**
084     * @return Three character country code for number. This is in ISO 3166-1 alpha-3 format.
085     */
086    @JsonProperty("country_code_iso3")
087    public String getCountryCodeIso3() {
088        return countryCodeIso3;
089    }
090
091    /**
092     * @return The full name of the country that number is registered in.
093     */
094    @JsonProperty("country_name")
095    public String getCountryName() {
096        return countryName;
097    }
098
099    /**
100     * @return The numeric prefix for the country that number is registered in.
101     */
102    @JsonProperty("country_prefix")
103    public String getCountryPrefix() {
104        return countryPrefix;
105    }
106}