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.JsonableBaseObject;
020
021public class CallerIdentity extends JsonableBaseObject {
022    private CallerType type;
023    private String name, firstName, lastName;
024
025    /**
026     * @return The caller type, as an enum.
027     */
028    @JsonProperty("caller_type")
029    public CallerType getType() {
030        return type;
031    }
032
033    /**
034     * @return Full name of the person or business who owns the phone number, or "unknown" if this
035     * information is not available. This parameter is only present if cnam had a value of
036     * {@code true} in the request.
037     */
038    @JsonProperty("caller_name")
039    public String getName() {
040        return name;
041    }
042
043    /**
044     * @return First name of the person who owns the phone number if the owner is an individual.
045     * This parameter is only present if cnam had a value of {@code true} in the request.
046     */
047    @JsonProperty("first_name")
048    public String getFirstName() {
049        return firstName;
050    }
051
052    /**
053     * @return Last name of the person who owns the phone number if the owner is an individual.
054     * This parameter is only present if cnam had a value of {@code true} in the request.
055     */
056    @JsonProperty("last_name")
057    public String getLastName() {
058        return lastName;
059    }
060}