001// -------------------------------------------------------------------------------- 002// Copyright 2002-2025 Echo Three, LLC 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// -------------------------------------------------------------------------------- 016 017package com.echothree.model.control.geo.server.graphql; 018 019import com.echothree.model.control.graphql.server.graphql.BaseObject; 020import com.echothree.model.data.geo.server.entity.GeoCodeCountry; 021import graphql.annotations.annotationTypes.GraphQLDescription; 022import graphql.annotations.annotationTypes.GraphQLField; 023import graphql.annotations.annotationTypes.GraphQLName; 024import graphql.annotations.annotationTypes.GraphQLNonNull; 025 026@GraphQLDescription("geo code country object") 027@GraphQLName("GeoCodeCountry") 028public class GeoCodeCountryObject 029 extends BaseObject 030 implements GeoCodeInterface { 031 032 private final GeoCodeCountry geoCodeCountry; // Always Present 033 034 public GeoCodeCountryObject(GeoCodeCountry geoCodeCountry) { 035 this.geoCodeCountry = geoCodeCountry; 036 } 037 038 @GraphQLField 039 @GraphQLDescription("telephone code") 040 public String getTelephoneCode() { 041 return geoCodeCountry.getTelephoneCode(); 042 } 043 044 @GraphQLField 045 @GraphQLDescription("area code pattern") 046 public String getAreaCodePattern() { 047 return geoCodeCountry.getAreaCodePattern(); 048 } 049 050 @GraphQLField 051 @GraphQLDescription("area code required") 052 @GraphQLNonNull 053 public boolean getAreaCodeRequired() { 054 return geoCodeCountry.getAreaCodeRequired(); 055 } 056 057 @GraphQLField 058 @GraphQLDescription("area code example") 059 public String getAreaCodeExample() { 060 return geoCodeCountry.getAreaCodeExample(); 061 } 062 063 @GraphQLField 064 @GraphQLDescription("telephone number pattern") 065 public String getTelephoneNumberPattern() { 066 return geoCodeCountry.getTelephoneNumberPattern(); 067 } 068 069 @GraphQLField 070 @GraphQLDescription("telephone number example") 071 public String getTelephoneNumberExample() { 072 return geoCodeCountry.getTelephoneNumberExample(); 073 } 074 075 //| geoc_pstafmt_postaladdressformatid | bigint | NO | MUL | NULL | | 076 077 @GraphQLField 078 @GraphQLDescription("city required") 079 @GraphQLNonNull 080 public boolean getCityRequired() { 081 return geoCodeCountry.getCityRequired(); 082 } 083 084 @GraphQLField 085 @GraphQLDescription("city geo code required") 086 @GraphQLNonNull 087 public boolean getCityGeoCodeRequired() { 088 return geoCodeCountry.getCityGeoCodeRequired(); 089 } 090 091 @GraphQLField 092 @GraphQLDescription("state required") 093 @GraphQLNonNull 094 public boolean getStateRequired() { 095 return geoCodeCountry.getStateRequired(); 096 } 097 098 @GraphQLField 099 @GraphQLDescription("state geo code required") 100 @GraphQLNonNull 101 public boolean getStateGeoCodeRequired() { 102 return geoCodeCountry.getStateGeoCodeRequired(); 103 } 104 105 @GraphQLField 106 @GraphQLDescription("postal code pattern") 107 public String getPostalCodePattern() { 108 return geoCodeCountry.getPostalCodePattern(); 109 } 110 111 @GraphQLField 112 @GraphQLDescription("postal code required") 113 @GraphQLNonNull 114 public boolean getPostalCodeRequired() { 115 return geoCodeCountry.getPostalCodeRequired(); 116 } 117 118 @GraphQLField 119 @GraphQLDescription("postal code geo code required") 120 @GraphQLNonNull 121 public boolean getPostalCodeGeoCodeRequired() { 122 return geoCodeCountry.getPostalCodeGeoCodeRequired(); 123 } 124 125 @GraphQLField 126 @GraphQLDescription("postal code length") 127 @GraphQLNonNull 128 public int getPostalCodeLength() { 129 return geoCodeCountry.getPostalCodeLength(); 130 } 131 132 @GraphQLField 133 @GraphQLDescription("postal code geo code length") 134 @GraphQLNonNull 135 public int getPostalCodeGeoCodeLength() { 136 return geoCodeCountry.getPostalCodeGeoCodeLength(); 137 } 138 139 @GraphQLField 140 @GraphQLDescription("postal code example") 141 public String getPostalCodeExample() { 142 return geoCodeCountry.getPostalCodeExample(); 143 } 144 145}