<commit_before>// Copyright 2014 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.api.ads.adwords.jaxws.extensions.report.model.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.google.api.ads.adwords.jaxws.extensions.report.model.csv.annotation.CsvField;
import com.google.api.ads.adwords.jaxws.extensions.report.model.csv.annotation.CsvReport;
import com.google.api.ads.adwords.lib.jaxb.v201402.ReportDefinitionReportType;

/**
 * Specific Report class for GeoPerformanceReports
 *
 * @author <EMAIL> (<NAME>)
 */
@Entity
@com.googlecode.objectify.annotation.Entity
@Table(name = "AW_ReportGeoPerformance")
@CsvReport(value = ReportDefinitionReportType.GEO_PERFORMANCE_REPORT)
public class ReportGeo extends ReportBase {

  @Column(name = "ADFORMAT")
  @CsvField(value = "Ad type", reportField = "AdFormat")
  private String adFormat;

  @Column(name = "ADGROUP_ID")
  @CsvField(value = "Ad group ID", reportField = "AdGroupId")
  private Long adGroupId;

  @Column(name = "ADGROUP_NAME", length = 255)
  @CsvField(value = "Ad group", reportField = "AdGroupName")
  private String adGroupName;

  @Column(name = "ADGROUP_STATUS", length = 32)
  @CsvField(value = "Ad group state", reportField = "AdGroupStatus")
  private String adGroupStatus;

  @Column(name = "CAMPAIGN_ID")
  @CsvField(value = "Campaign ID", reportField = "CampaignId")
  private Long campaignId;

  @Column(name = "CAMPAIGN_NAME", length = 255)
  @CsvField(value = "Campaign", reportField = "CampaignName")
  private String campaignName;

  @Column(name = "CAMPAIGN_STATUS", length = 32)
  @CsvField(value = "Campaign state", reportField = "CampaignStatus")
  private String campaignStatus;

  @Column(name = "CITY_CRITERIA_ID", length = 16)
  @CsvField(value = "City", reportField = "CityCriteriaId")
  private String cityCriteriaId;

  @Column(name = "CONVERSION_TRACKER_ID")
  @CsvField(value = "Conversion Tracker Id", reportField = "ConversionTrackerId")
  private String conversionTrackerId;

  @Column(name = "COUNTRY_CRITERIA_ID")
  @CsvField(value = "Country/Territory", reportField = "CountryCriteriaId")
  private String countryTerritory;

  @Column(name = "IS_TARGETING_LOCATION")
  @CsvField(value = "Is Targetable", reportField = "IsTargetingLocation")
  private String isTargetable;

  @Column(name = "LOCATION_TYPE")
  @CsvField(value = "Location type", reportField = "LocationType")
  private String locationType;

  @Column(name = "METRO_CRITERIA_ID")
  @CsvField(value = "Metro area", reportField = "MetroCriteriaId")
  private String metroArea;

  @Column(name = "MOST_SPECIFIC_LOCATION")
  @CsvField(value = "Most specific location", reportField = "MostSpecificCriteriaId")
  private String mostSpecificLocation;

  @Column(name = "REGION_CRITERIA_ID")
  @CsvField(value = "Region", reportField = "RegionCriteriaId")
  private String region;

  /**
   * Hibernate needs an empty constructor
   */
  public ReportGeo() {}

  @Override
  public void setId() {

    // Generating unique id after having date and accountId
    if (this.getAccountId() != null) {
      this.id = this.getAccountId().toString();
    } else {
      this.id = "null";
    }
    if (this.getCampaignId() != null) {
      this.id += "-" + this.getCampaignId().toString();
    } else {
      this.id += "null";
    }
    if (this.getAdGroupId() != null) {
      this.id += "-" + this.getAdGroupId().toString();
    } else {
      this.id += "null";
    }
    if (this.getConversionTrackerId() != null) {<commit_msg>Fixes for Bug in GeoPerformance IDs, API Doc has wrong information.<commit_after>// Copyright 2014 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.api.ads.adwords.jaxws.extensions.report.model.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.google.api.ads.adwords.jaxws.extensions.report.model.csv.annotation.CsvField;
import com.google.api.ads.adwords.jaxws.extensions.report.model.csv.annotation.CsvReport;
import com.google.api.ads.adwords.lib.jaxb.v201402.ReportDefinitionReportType;

/**
 * Specific Report class for GeoPerformanceReports
 *
 * @author <EMAIL> (<NAME>)
 */
@Entity
@com.googlecode.objectify.annotation.Entity
@Table(name = "AW_ReportGeoPerformance")
@CsvReport(value = ReportDefinitionReportType.GEO_PERFORMANCE_REPORT)
public class ReportGeo extends ReportBase {

  @Column(name = "ADFORMAT")
  @CsvField(value = "Ad type", reportField = "AdFormat")
  private String adFormat;

  @Column(name = "ADGROUP_ID")
  @CsvField(value = "Ad group ID", reportField = "AdGroupId")
  private Long adGroupId;

  @Column(name = "ADGROUP_NAME", length = 255)
  @CsvField(value = "Ad group", reportField = "AdGroupName")
  private String adGroupName;

  @Column(name = "ADGROUP_STATUS", length = 32)
  @CsvField(value = "Ad group state", reportField = "AdGroupStatus")
  private String adGroupStatus;

  @Column(name = "CAMPAIGN_ID")
  @CsvField(value = "Campaign ID", reportField = "CampaignId")
  private Long campaignId;

  @Column(name = "CAMPAIGN_NAME", length = 255)
  @CsvField(value = "Campaign", reportField = "CampaignName")
  private String campaignName;

  @Column(name = "CAMPAIGN_STATUS", length = 32)
  @CsvField(value = "Campaign state", reportField = "CampaignStatus")
  private String campaignStatus;

  @Column(name = "CITY_CRITERIA_ID", length = 64)
  @CsvField(value = "City", reportField = "CityCriteriaId")
  private String cityCriteriaId;

  @Column(name = "CONVERSION_TRACKER_ID", length = 64)
  @CsvField(value = "Conversion Tracker Id", reportField = "ConversionTrackerId")
  private String conversionTrackerId;

  @Column(name = "COUNTRY_CRITERIA_ID", length = 64)
  @CsvField(value = "Country/Territory", reportField = "CountryCriteriaId")
  private String countryTerritory;

  @Column(name = "IS_TARGETING_LOCATION")
  @CsvField(value = "Is Targetable", reportField = "IsTargetingLocation")
  private String isTargetable;

  @Column(name = "LOCATION_TYPE", length = 32)
  @CsvField(value = "Location type", reportField = "LocationType")
  private String locationType;

  @Column(name = "METRO_CRITERIA_ID", length = 64)
  @CsvField(value = "Metro area", reportField = "MetroCriteriaId")
  private String metroArea;

  @Column(name = "MOST_SPECIFIC_LOCATION", length = 64)
  @CsvField(value = "Most specific location", reportField = "MostSpecificCriteriaId")
  private String mostSpecificLocation;

  @Column(name = "REGION_CRITERIA_ID", length = 64)
  @CsvField(value = "Region", reportField = "RegionCriteriaId")
  private String region;

  /**
   * Hibernate needs an empty constructor
   */
  public ReportGeo() {}

  @Override
  public void setId() {

    // Generating unique id after having date and accountId
    if (this.getAccountId() != null) {
      this.id = this.getAccountId().toString();
    } else {
      this.id = "null";
    }
    if (this.getCampaignId() != null) {
      this.id += "-" + this.getCampaignId().toString();
    } else {
      this.id += "null";
    }
    if (this.getAdGroupId() != null) {
      this.id += "-" + this.getAdGroupId().toString();
    } else {
      this.id += "null";
    }
    if (this.getConversionTrackerId() != null) {
{'fraction_non_alphanumeric': 0.12547892720306514, 'fraction_numerical': 0.007662835249042145, 'mean_word_length': 4.445241199478487, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '425607', 'n_tokens_mistral': 2695, 'n_tokens_neox': 2581, 'n_words': 672}