001// Generated by delombok at Thu Aug 13 13:56:43 UTC 2026
002/*
003 * Copyright (c) 2010-2026 Mark Allen, Norbert Bartels.
004 *
005 * Permission is hereby granted, free of charge, to any person obtaining a copy
006 * of this software and associated documentation files (the "Software"), to deal
007 * in the Software without restriction, including without limitation the rights
008 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
009 * copies of the Software, and to permit persons to whom the Software is
010 * furnished to do so, subject to the following conditions:
011 *
012 * The above copyright notice and this permission notice shall be included in
013 * all copies or substantial portions of the Software.
014 *
015 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
016 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
017 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
018 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
019 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
020 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
021 * THE SOFTWARE.
022 */
023package com.restfb.types.ads;
024
025import java.util.HashMap;
026import java.util.Map;
027import com.restfb.Facebook;
028import com.restfb.JsonMapper;
029import com.restfb.types.AbstractFacebookType;
030
031public class TargetingResponseGeographicMetadata extends AbstractFacebookType {
032  @Facebook
033  private String data;
034  private MetaData metaData;
035
036  public Map<String, TargetingResponseGeographic> getCountries() {
037    return metaData.getCountries();
038  }
039
040  public Map<String, TargetingResponseGeographic> getRegions() {
041    return metaData.getRegions();
042  }
043
044  public Map<String, TargetingResponseGeographic> getCities() {
045    return metaData.getCities();
046  }
047
048  public Map<String, TargetingResponseGeographic> getZips() {
049    return metaData.getZips();
050  }
051
052  public Map<String, TargetingResponseGeographic> getPlaces() {
053    return metaData.getPlaces();
054  }
055
056  public Map<String, TargetingResponseGeographic> getCustomLocations() {
057    return metaData.getCustomLocations();
058  }
059
060  public Map<String, TargetingResponseGeographic> getGeoMarkets() {
061    return metaData.getGeoMarkets();
062  }
063
064  public Map<String, TargetingResponseGeographic> getElectoralDistricts() {
065    return metaData.getElectoralDistricts();
066  }
067
068  @JsonMapper.JsonMappingCompleted
069  void convertData(JsonMapper mapper) {
070    if (data != null) {
071      metaData = mapper.toJavaObject(data, MetaData.class);
072    }
073  }
074
075
076  private static class MetaData extends AbstractFacebookType {
077    @Facebook
078    private Map<String, TargetingResponseGeographic> countries = new HashMap<>();
079    @Facebook
080    private Map<String, TargetingResponseGeographic> regions = new HashMap<>();
081    @Facebook
082    private Map<String, TargetingResponseGeographic> cities = new HashMap<>();
083    @Facebook
084    private Map<String, TargetingResponseGeographic> zips = new HashMap<>();
085    @Facebook
086    private Map<String, TargetingResponseGeographic> places = new HashMap<>();
087    @Facebook("custom_locations")
088    private Map<String, TargetingResponseGeographic> customLocations = new HashMap<>();
089    @Facebook("geo_markets")
090    private Map<String, TargetingResponseGeographic> geoMarkets = new HashMap<>();
091    @Facebook("electoral_districts")
092    private Map<String, TargetingResponseGeographic> electoralDistricts = new HashMap<>();
093
094    @java.lang.SuppressWarnings("all")
095    @lombok.Generated
096    public Map<String, TargetingResponseGeographic> getCountries() {
097      return this.countries;
098    }
099
100    @java.lang.SuppressWarnings("all")
101    @lombok.Generated
102    public Map<String, TargetingResponseGeographic> getRegions() {
103      return this.regions;
104    }
105
106    @java.lang.SuppressWarnings("all")
107    @lombok.Generated
108    public Map<String, TargetingResponseGeographic> getCities() {
109      return this.cities;
110    }
111
112    @java.lang.SuppressWarnings("all")
113    @lombok.Generated
114    public Map<String, TargetingResponseGeographic> getZips() {
115      return this.zips;
116    }
117
118    @java.lang.SuppressWarnings("all")
119    @lombok.Generated
120    public Map<String, TargetingResponseGeographic> getPlaces() {
121      return this.places;
122    }
123
124    @java.lang.SuppressWarnings("all")
125    @lombok.Generated
126    public Map<String, TargetingResponseGeographic> getCustomLocations() {
127      return this.customLocations;
128    }
129
130    @java.lang.SuppressWarnings("all")
131    @lombok.Generated
132    public Map<String, TargetingResponseGeographic> getGeoMarkets() {
133      return this.geoMarkets;
134    }
135
136    @java.lang.SuppressWarnings("all")
137    @lombok.Generated
138    public Map<String, TargetingResponseGeographic> getElectoralDistricts() {
139      return this.electoralDistricts;
140    }
141  }
142}