<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class VehicleFields extends AbstractEnum {

  const ADDRESS = 'address';
  const APPLINKS = 'applinks';
  const AVAILABILITY = 'availability';
  const BODY_STYLE = 'body_style';
  const CATEGORY_SPECIFIC_FIELDS = 'category_specific_fields';
  const CONDITION = 'condition';
  const CURRENCY = 'currency';
  const CUSTOM_LABEL_0 = 'custom_label_0';
  const DATE_FIRST_ON_LOT = 'date_first_on_lot';
  const DEALER_COMMUNICATION_CHANNEL = 'dealer_communication_channel';
  const DEALER_EMAIL = 'dealer_email';
  const DEALER_ID = 'dealer_id';
  const DEALER_NAME = 'dealer_name';
  const DEALER_PHONE = 'dealer_phone';
  const DEALER_PRIVACY_POLICY_URL = 'dealer_privacy_policy_url';
  const DESCRIPTION = 'description';
  const DRIVETRAIN = 'drivetrain';
  const EXTERIOR_COLOR = 'exterior_color';
  const FB_PAGE_ID = 'fb_page_id';
  const FEATURES = 'features';
  const FUEL_TYPE = 'fuel_type';
  const ID = 'id';
  const IMAGE_FETCH_STATUS = 'image_fetch_status';
  const IMAGES = 'images';
  const INTERIOR_COLOR = 'interior_color';
  const LEGAL_DISCLOSURE_IMPRESSUM_URL = 'legal_disclosure_impressum_url';
  const MAKE = 'make';
  const MILEAGE = 'mileage';
  const MODEL = 'model';
  const PREVIOUS_CURRENCY = 'previous_currency';
  const PREVIOUS_PRICE = 'previous_price';
  const PRICE = 'price';
  const SALE_CURRENCY = 'sale_currency';
  const SALE_PRICE = 'sale_price';
  const SANITIZED_IMAGES = 'sanitized_images';
  const STATE_OF_VEHICLE = 'state_of_vehicle';
  const TITLE = 'title';
  const TRANSMISSION = 'transmission';
  const TRIM = 'trim';
  const UNIT_PRICE = 'unit_price';
  const URL = 'url';
  const VEHICLE_ID = 'vehicle_id';
  const VEHICLE_REGISTRATION_PLATE = 'vehicle_registration_plate';
  const VEHICLE_SPECIFICATIONS = 'vehicle_specifications';
  const VEHICLE_TYPE = 'vehicle_type';
  const VIN = 'vin';
  const VISIBILITY = 'visibility';
  const YEAR = 'year';

  public function getFieldTypes() {
    return array(
      'address' => 'Object',
      'applinks' => 'CatalogItemAppLinks',
      'availability' => 'string',
      'body_style' => 'string',
      'category_specific_fields' => 'CatalogSubVerticalList',
      'condition' => 'string',
      'currency' => 'string',
      'custom_label_0' => 'string',
      'date_first_on_lot' => 'string',
      'dealer_communication_channel' => 'string',
      'dealer_email' => 'string',
      'dealer_id' => 'string',
      'dealer_name' => 'string',
      'dealer_phone' => 'string',
      'dealer_privacy_policy_url' => 'string',
      'description' => 'string',
      'drivetrain' => 'string',
      'exterior_color' => 'string',
      'fb_page_id' => 'Page',
      'features' => 'list<Object>',
      'fuel_type' => 'string',
      'id' => 'string',
      'image_fetch_status' => 'ImageFetchStatus',
      'images' => 'list<string>',
      'interior_color' => 'string',
      'legal_disclosure_impressum_url' => 'string',
      'make' => 'string',
      'mileage' => 'Object',
      'model' => 'string',
      'previous_currency' => 'string',
      'previous_price' => 'string',
      'price' => 'string',
      'sale_currency' => 'string',
      'sale_price' => 'string',
      'sanitized_images' => 'list<string>',
      'state_of_vehicle' => 'string',
      'title' => 'string',
      'transmission' => 'string',
      'trim' => 'string',
      'unit_price' => 'Object',
      'url' => 'string',
      'vehicle_id' => 'string',
      'vehicle_registration_plate' => 'string',
      'vehicle_specifications' => 'list<Object>',
      'vehicle_type' => 'string',
      'vin' => 'string',
      'visibility' => 'Visibility',
      'year' => 'unsigned int',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class VehicleOfferFields extends AbstractEnum {

  const AMOUNT_CURRENCY = 'amount_currency';
  const AMOUNT_PERCENTAGE = 'amount_percentage';
  const AMOUNT_PRICE = 'amount_price';
  const AMOUNT_QUALIFIER = 'amount_qualifier';
  const APPLINKS = 'applinks';
  const AVAILABILITY = 'availability';
  const BODY_STYLE = 'body_style';
  const CASHBACK_CURRENCY = 'cashback_currency';
  const CASHBACK_PRICE = 'cashback_price';
  const CATEGORY_SPECIFIC_FIELDS = 'category_specific_fields';
  const CURRENCY = 'currency';
  const DMA_CODES = 'dma_codes';
  const DOWNPAYMENT_CURRENCY = 'downpayment_currency';
  const DOWNPAYMENT_PRICE = 'downpayment_price';
  const DOWNPAYMENT_QUALIFIER = 'downpayment_qualifier';
  const DRIVETRAIN = 'drivetrain';
  const END_DATE = 'end_date';
  const END_TIME = 'end_time';
  const EXTERIOR_COLOR = 'exterior_color';
  const FUEL_TYPE = 'fuel_type';
  const GENERATION = 'generation';
  const ID = 'id';
  const IMAGE_FETCH_STATUS = 'image_fetch_status';
  const IMAGES = 'images';
  const INTERIOR_COLOR = 'interior_color';
  const INTERIOR_UPHOLSTERY = 'interior_upholstery';
  const MAKE = 'make';
  const MODEL = 'model';
  const OFFER_DESCRIPTION = 'offer_description';
  const OFFER_DISCLAIMER = 'offer_disclaimer';
  const OFFER_TYPE = 'offer_type';
  const PRICE = 'price';
  const SANITIZED_IMAGES = 'sanitized_images';
  const START_DATE = 'start_date';
  const START_TIME = 'start_time';
  const TERM_LENGTH = 'term_length';
  const TERM_QUALIFIER = 'term_qualifier';
  const TITLE = 'title';
  const TRANSMISSION = 'transmission';
  const TRIM = 'trim';
  const UNIT_PRICE = 'unit_price';
  const URL = 'url';
  const VEHICLE_OFFER_ID = 'vehicle_offer_id';
  const VISIBILITY = 'visibility';
  const YEAR = 'year';

  public function getFieldTypes() {
    return array(
      'amount_currency' => 'string',
      'amount_percentage' => 'float',
      'amount_price' => 'string',
      'amount_qualifier' => 'string',
      'applinks' => 'CatalogItemAppLinks',
      'availability' => 'string',
      'body_style' => 'string',
      'cashback_currency' => 'string',
      'cashback_price' => 'string',
      'category_specific_fields' => 'CatalogSubVerticalList',
      'currency' => 'string',
      'dma_codes' => 'list<string>',
      'downpayment_currency' => 'string',
      'downpayment_price' => 'string',
      'downpayment_qualifier' => 'string',
      'drivetrain' => 'string',
      'end_date' => 'string',
      'end_time' => 'int',
      'exterior_color' => 'string',
      'fuel_type' => 'string',
      'generation' => 'string',
      'id' => 'string',
      'image_fetch_status' => 'ImageFetchStatus',
      'images' => 'list<string>',
      'interior_color' => 'string',
      'interior_upholstery' => 'string',
      'make' => 'string',
      'model' => 'string',
      'offer_description' => 'string',
      'offer_disclaimer' => 'string',
      'offer_type' => 'string',
      'price' => 'string',
      'sanitized_images' => 'list<string>',
      'start_date' => 'string',
      'start_time' => 'int',
      'term_length' => 'unsigned int',
      'term_qualifier' => 'string',
      'title' => 'string',
      'transmission' => 'string',
      'trim' => 'string',
      'unit_price' => 'Object',
      'url' => 'string',
      'vehicle_offer_id' => 'string',
      'visibility' => 'Visibility',
      'year' => 'int',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class VideoCopyrightConditionGroupFields extends AbstractEnum {

  const ACTION = 'action';
  const CONDITIONS = 'conditions';
  const VALIDITY_STATUS = 'validity_status';

  public function getFieldTypes() {
    return array(
      'action' => 'string',
      'conditions' => 'list<Object>',
      'validity_status' => 'string',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class VideoCopyrightFields extends AbstractEnum {

  const CONTENT_CATEGORY = 'content_category';
  const COPYRIGHT_CONTENT_ID = 'copyright_content_id';
  const CREATOR = 'creator';
  const EXCLUDED_OWNERSHIP_SEGMENTS = 'excluded_ownership_segments';
  const ID = 'id';
  const IN_CONFLICT = 'in_conflict';
  const MONITORING_STATUS = 'monitoring_status';
  const MONITORING_TYPE = 'monitoring_type';
  const OWNERSHIP_COUNTRIES = 'ownership_countries';
  const REFERENCE_FILE = 'reference_file';
  const REFERENCE_FILE_DISABLED = 'reference_file_disabled';
  const REFERENCE_FILE_DISABLED_BY_OPS = 'reference_file_disabled_by_ops';
  const REFERENCE_OWNER_ID = 'reference_owner_id';
  const RULE_IDS = 'rule_ids';
  const TAGS = 'tags';
  const WHITELISTED_IDS = 'whitelisted_ids';

  public function getFieldTypes() {
    return array(
      'content_category' => 'string',
      'copyright_content_id' => 'string',
      'creator' => 'User',
      'excluded_ownership_segments' => 'list<VideoCopyrightSegment>',
      'id' => 'string',
      'in_conflict' => 'bool',
      'monitoring_status' => 'string',
      'monitoring_type' => 'string',
      'ownership_countries' => 'VideoCopyrightGeoGate',
      'reference_file' => 'CopyrightReferenceContainer',
      'reference_file_disabled' => 'bool',
      'reference_file_disabled_by_ops' => 'bool',
      'reference_owner_id' => 'string',
      'rule_ids' => 'list<VideoCopyrightRule>',
      'tags' => 'list<string>',
      'whitelisted_ids' => 'list<string>',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class VideoCopyrightGeoGateFields extends AbstractEnum {

  const EXCLUDED_COUNTRIES = 'excluded_countries';
  const INCLUDED_COUNTRIES = 'included_countries';

  public function getFieldTypes() {
    return array(
      'excluded_countries' => 'list<string>',
      'included_countries' => 'list<string>',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class VideoCopyrightRuleFields extends AbstractEnum {

  const CONDITION_GROUPS = 'condition_groups';
  const COPYRIGHTS = 'copyrights';
  const CREATED_DATE = 'created_date';
  const CREATOR = 'creator';
  const ID = 'id';
  const IS_IN_MIGRATION = 'is_in_migration';
  const NAME = 'name';

  public function getFieldTypes() {
    return array(
      'condition_groups' => 'list<VideoCopyrightConditionGroup>',
      'copyrights' => 'list<string>',
      'created_date' => 'datetime',
      'creator' => 'User',
      'id' => 'string',
      'is_in_migration' => 'bool',
      'name' => 'string',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class VideoCopyrightSegmentFields extends AbstractEnum {

  const DURATION_IN_SEC = 'duration_in_sec';
  const MEDIA_TYPE = 'media_type';
  const START_TIME_IN_SEC = 'start_time_in_sec';

  public function getFieldTypes() {
    return array(
      'duration_in_sec' => 'float',
      'media_type' => 'string',
      'start_time_in_sec' => 'float',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class VideoListFields extends AbstractEnum {

  const CREATION_TIME = 'creation_time';
  const DESCRIPTION = 'description';
  const ID = 'id';
  const LAST_MODIFIED = 'last_modified';
  const OWNER = 'owner';
  const SEASON_NUMBER = 'season_number';
  const THUMBNAIL = 'thumbnail';
  const TITLE = 'title';
  const VIDEOS_COUNT = 'videos_count';

  public function getFieldTypes() {
    return array(
      'creation_time' => 'datetime',
      'description' => 'string',
      'id' => 'string',
      'last_modified' => 'datetime',
      'owner' => 'Object',
      'season_number' => 'int',
      'thumbnail' => 'string',
      'title' => 'string',
      'videos_count' => 'int',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class VideoPollFields extends AbstractEnum {

  const CLOSE_AFTER_VOTING = 'close_after_voting';
  const DEFAULT_OPEN = 'default_open';
  const ID = 'id';
  const QUESTION = 'question';
  const SHOW_GRADIENT = 'show_gradient';
  const SHOW_RESULTS = 'show_results';
  const STATUS = 'status';

  public function getFieldTypes() {
    return array(
      'close_after_voting' => 'bool',
      'default_open' => 'bool',
      'id' => 'string',
      'question' => 'string',
      'show_gradient' => 'bool',
      'show_results' => 'bool',
      'status' => 'Status',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class VideoThumbnailFields extends AbstractEnum {

  const HEIGHT = 'height';
  const ID = 'id';
  const IS_PREFERRED = 'is_preferred';
  const NAME = 'name';
  const SCALE = 'scale';
  const URI = 'uri';
  const WIDTH = 'width';

  public function getFieldTypes() {
    return array(
      'height' => 'unsigned int',
      'id' => 'string',
      'is_preferred' => 'bool',
      'name' => 'string',
      'scale' => 'float',
      'uri' => 'string',
      'width' => 'unsigned int',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class VideoUploadLimitsFields extends AbstractEnum {

  const LENGTH = 'length';
  const SIZE = 'size';

  public function getFieldTypes() {
    return array(
      'length' => 'unsigned int',
      'size' => 'int',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class VoipInfoFields extends AbstractEnum {

  const HAS_MOBILE_APP = 'has_mobile_app';
  const HAS_PERMISSION = 'has_permission';
  const IS_CALLABLE = 'is_callable';
  const IS_CALLABLE_WEBRTC = 'is_callable_webrtc';
  const IS_PUSHABLE = 'is_pushable';
  const REASON_CODE = 'reason_code';
  const REASON_DESCRIPTION = 'reason_description';

  public function getFieldTypes() {
    return array(
      'has_mobile_app' => 'bool',
      'has_permission' => 'bool',
      'is_callable' => 'bool',
      'is_callable_webrtc' => 'bool',
      'is_pushable' => 'bool',
      'reason_code' => 'unsigned int',
      'reason_description' => 'string',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class WebAppLinkFields extends AbstractEnum {

  const SHOULD_FALLBACK = 'should_fallback';
  const URL = 'url';

  public function getFieldTypes() {
    return array(
      'should_fallback' => 'bool',
      'url' => 'string',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class WhatsAppBusinessAccountFields extends AbstractEnum {

  const ACCOUNT_REVIEW_STATUS = 'account_review_status';
  const ANALYTICS = 'analytics';
  const BUSINESS_VERIFICATION_STATUS = 'business_verification_status';
  const COUNTRY = 'country';
  const CREATION_TIME = 'creation_time';
  const CURRENCY = 'currency';
  const ID = 'id';
  const MESSAGE_TEMPLATE_NAMESPACE = 'message_template_namespace';
  const NAME = 'name';
  const ON_BEHALF_OF_BUSINESS_INFO = 'on_behalf_of_business_info';
  const OWNER_BUSINESS = 'owner_business';
  const OWNER_BUSINESS_INFO = 'owner_business_info';
  const OWNERSHIP_TYPE = 'ownership_type';
  const PRIMARY_FUNDING_ID = 'primary_funding_id';
  const PURCHASE_ORDER_NUMBER = 'purchase_order_number';
  const STATUS = 'status';
  const TIMEZONE_ID = 'timezone_id';

  public function getFieldTypes() {
    return array(
      'account_review_status' => 'string',
      'analytics' => 'Object',
      'business_verification_status' => 'string',
      'country' => 'string',
      'creation_time' => 'int',
      'currency' => 'string',
      'id' => 'string',
      'message_template_namespace' => 'string',
      'name' => 'string',
      'on_behalf_of_business_info' => 'Object',
      'owner_business' => 'Business',
      'owner_business_info' => 'Object',
      'ownership_type' => 'string',
      'primary_funding_id' => 'string',
      'purchase_order_number' => 'string',
      'status' => 'string',
      'timezone_id' => 'string',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class WhatsAppBusinessPreVerifiedPhoneNumberFields extends AbstractEnum {

  const CODE_VERIFICATION_STATUS = 'code_verification_status';
  const CODE_VERIFICATION_TIME = 'code_verification_time';
  const ID = 'id';
  const PHONE_NUMBER = 'phone_number';
  const VERIFICATION_EXPIRY_TIME = 'verification_expiry_time';

  public function getFieldTypes() {
    return array(
      'code_verification_status' => 'string',
      'code_verification_time' => 'datetime',
      'id' => 'string',
      'phone_number' => 'string',
      'verification_expiry_time' => 'datetime',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class WhatsAppBusinessProfileFields extends AbstractEnum {

  const ID = 'id';
  const NAME_VERIFICATION = 'name_verification';
  const WHATSAPP_BUSINESS_API_DATA = 'whatsapp_business_api_data';

  public function getFieldTypes() {
    return array(
      'id' => 'string',
      'name_verification' => 'Object',
      'whatsapp_business_api_data' => 'Object',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class WindowsAppLinkFields extends AbstractEnum {

  const APP_ID = 'app_id';
  const APP_NAME = 'app_name';
  const PACKAGE_FAMILY_NAME = 'package_family_name';
  const URL = 'url';

  public function getFieldTypes() {
    return array(
      'app_id' => 'string',
      'app_name' => 'string',
      'package_family_name' => 'string',
      'url' => 'string',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class WindowsPhoneAppLinkFields extends AbstractEnum {

  const APP_ID = 'app_id';
  const APP_NAME = 'app_name';
  const URL = 'url';

  public function getFieldTypes() {
    return array(
      'app_id' => 'string',
      'app_name' => 'string',
      'url' => 'string',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class WoodhengePurchasedPAYGReceiptFields extends AbstractEnum {

  const ID = 'id';
  const NUMBER_OF_SUBSCRIPTIONS_PURCHASED = 'number_of_subscriptions_purchased';
  const PURCHASE_TIME = 'purchase_time';
  const USER = 'user';

  public function getFieldTypes() {
    return array(
      'id' => 'string',
      'number_of_subscriptions_purchased' => 'int',
      'purchase_time' => 'datetime',
      'user' => 'User',
    );
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Fields;

use FacebookAds\Enum\AbstractEnum;

/**
 * This class is auto-generated.
 *
 * For any issues or feature requests related to this class, please let us know
 * on github and we'll fix in our codegen framework. We'll not be able to accept
 * pull request for this class.
 *
 */

class WorkUserFrontlineFields extends AbstractEnum {

  const HAS_ACCESS = 'has_access';
  const IS_FRONTLINE = 'is_frontline';

  public function getFieldTypes() {
    return array(
      'has_access' => 'bool',
      'is_frontline' => 'bool',
    );
  }
}


<?php
/**
 * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Search;

use FacebookAds\Enum\AbstractEnum;

/**
 * @method static DemographicSearchClasses getInstance()
 */
class DemographicSearchClasses extends AbstractEnum {

  const LIFE_EVENTS = 'life_events';
  const POLITICS = 'politics';
  const MARKETS = 'markets';
  const INDUSTRIES = 'industries';
  const INCOME = 'income';
  const NET_WORTH = 'net_worth';
  const HOME_TYPE = 'home_type';
  const HOME_OWNERSHIP = 'home_ownership';
  const HOME_VALUE = 'home_value';
  const ETHNIC_AFFINITY = 'ethnic_affinity';
  const GENERATION = 'generation';
  const HOUSEHOLD_COMPOSITION = 'household_composition';
  const MOMS = 'moms';
  const OFFICE_TYPE = 'office_type';
  const FAMILY_STATUSES = 'family_statuses';
  const DEMOGRAPHICS = 'demographics';
}


<?php
/**
 * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\Search;

use FacebookAds\Enum\AbstractEnum;

/**
 * @method static TargetingSearchTypes getInstance()
 */
class TargetingSearchTypes extends AbstractEnum {

  const COUNTRY = 'adcountry';
  const EDUCATION = 'adeducationschool';
  const EMPLOYER = 'adworkemployer';
  const GEOLOCATION = 'adgeolocation';
  const GEOLOCATIONMETA = 'adgeolocationmeta';
  const INTEREST = 'adinterest';
  const INTEREST_SUGGESTION = 'adinterestsuggestion';
  const INTEREST_VALIDATE = 'adinterestvalid';
  const KEYWORD = 'adkeyword';
  const LOCALE = 'adlocale';
  const MAJOR = 'adeducationmajor';
  const POSITION = 'adworkposition';
  const RADIUS_SUGGESTION = 'adradiussuggestion';
  const TARGETING_CATEGORY = 'adTargetingCategory';
  const ZIPCODE = 'adzipcode';
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\ServerSide;

use FacebookAds\Enum\AbstractEnum;

/**
 * Class ActionSource
 *
 * Where the conversion event occurred.
 *
 * @package FacebookAds\Object\ServerSide
 */
class ActionSource extends AbstractEnum {

  /**
   * Conversion happened over email.
   */
  const EMAIL = 'email';

  /**
   * Conversion was made on your website.
   */
  const WEBSITE = 'website';

  /**
   * Conversion was made using your app.
   */
  const APP = 'app';

  /**
   * Conversion was made over the phone.
   */
  const PHONE_CALL = 'phone_call';

  /**
   * Conversion was made via a messaging app, SMS, or online messaging feature.
   */
  const CHAT = 'chat';

  /**
   * Conversion was made in person at your physical store.
   */
  const PHYSICAL_STORE = 'physical_store';

  /**
   * Conversion happened automatically, for example, a subscription renewal thatâ€™s set on auto-pay each month.
   */
  const SYSTEM_GENERATED = 'system_generated';

  /**
   * Conversion happened in a way that is not listed.
   */
  const OTHER = 'other';
}


<?php
/**
 * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\ServerSide;

use FacebookAds\Http\Client;
use FacebookAds\Http\SimpleRequest;
use FacebookAds\Exception\Exception;

use ArrayAccess;

class AdsPixelSettings implements ArrayAccess {

  /**
   * @var string
   */
  const SIGNALS_JSON_CONFIG_PATH = 'signals/config/json';

  /**
   * Associative array for storing property values
   * @var mixed[]
   */
  protected $container = array();

   /**
   * Constructor
   * @param mixed[] $data Associated array of property value initializing the model
   */
  public function __construct(array $data = null) {
    $this->container['enable_automatic_matching'] = isset($data['enableAutomaticMatching']) ? $data['enableAutomaticMatching'] : null;;
    $this->container['enabled_automatic_matching_fields'] = isset($data['enabledAutomaticMatchingFields']) ? $data['enabledAutomaticMatchingFields'] : null;
    $this->container['pixel_id'] = isset($data['pixel_id']) ? $data['pixel_id'] : null;
  }

  /**
   * Factory method to build the settings given a pixel id
   * @param string $pixelId
   * @return AdsPixelId
   */
  public static function buildFromPixelId($pixelId){
    $response = self::callPixelSettingsEndpoint($pixelId);
    if( $response !== null ){
      $jsonString = $response->getBody();
      $pixelSettingsAsDict = json_decode($jsonString, true);
      if (array_key_exists('errorMessage', $pixelSettingsAsDict)){
        return null;
      }
      $pixelSettingsAsDict['matchingConfig']['pixel_id'] = $pixelId;
      return new AdsPixelSettings($pixelSettingsAsDict['matchingConfig']);
    }
    return null;
  }

  /**
   * @param string $pixelId
   * @return SimpleRequest
  */
  private static function callPixelSettingsEndpoint($pixelId){
    $path = sprintf("%s/%s/", self::SIGNALS_JSON_CONFIG_PATH, $pixelId);
    $client = new Client();
    $request = new SimpleRequest($client);
    $request->setPath($path);
    try{
      return $client->sendRequest($request);
    }
    catch(Exception $e){
      return null;
    }
  }

  /**
   * Get Pixel Id.
   * @return string pixel id
   */
  public function getPixelId() {
    return $this->container['pixel_id'];
  }

  /**
   * Sets Pixel id.
   * @param string $pixelId
   * @return $this
   */
  public function setPixelId($pixelId) {
    $this->container['pixel_id'] = $pixelId;
    return $this;
  }

  /**
   * Get Enable automatic matching.
   * @return bool enable automatic matching
   */
  public function getEnableAutomaticMatching() {
    return $this->container['enable_automatic_matching'];
  }

  /**
   * Sets Enable automatic matching.
   * @param bool $enableAutomaticMatching
   * @return $this
   */
  public function setEnableAutomaticMatching($enableAutomaticMatching) {
    $this->container['enable_automatic_matching'] = $enableAutomaticMatching;
    return $this;
  }

  /**
   * Get Enabled automatic matching fields.
   * @return array enabled automatic matching fields
   */
  public function getEnabledAutomaticMatchingFields() {
    return $this->container['enabled_automatic_matching_fields'];
  }

  /**
   * Sets Enabled automatic matching fields.
   * @param array $enabledAutomaticMatchingFields
   * @return $this
   */
  public function setEnabledAutomaticMatchingFields($enabledAutomaticMatchingFields) {
    $this->container['enabled_automatic_matching_fields'] = $enabledAutomaticMatchingFields;
    return $this;
  }

  /**
   * Returns true if offset exists. False otherwise.
   * @param integer $offset Offset
   * @return boolean
   */
  public function offsetExists($offset) : bool {
    return isset($this->container[$offset]);
  }

  /**
   * Gets offset.
   * @param integer $offset Offset
   * @return mixed
   */
  public function offsetGet($offset) : mixed {
    return isset($this->container[$offset]) ? $this->container[$offset] : null;
  }

  /**
   * Sets value based on offset.
   * @param integer $offset Offset
   * @param mixed $value Value to be set
   * @return void
   */
  public function offsetSet($offset, $value) : void {
    if (is_null($offset)) {
      $this->container[] = $value;
    } else {
      $this->container[$offset] = $value;
    }
  }

  /**
   * Unsets offset.
   * @param integer $offset Offset
   * @return void
   */
  public function offsetUnset($offset) : void {
    unset($this->container[$offset]);
  }

  /**
   * Gets the string presentation of the object
   * @return string
   */
  public function __toString() {
    if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
      return json_encode($this, JSON_PRETTY_PRINT);
    }
    return json_encode($this);
  }

}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\ServerSide;

use ArrayAccess;

class AppData implements ArrayAccess {

  private $application_tracking_enabled;
  private $advertiser_tracking_enabled;
  private $app_user_id;
  private $campaign_ids;
  private $consider_views;
  private $extinfo;
  private $include_dwell_data;
  private $include_video_data;
  private $install_referrer;
  private $installer_package;
  private $receipt_data;
  private $url_schemes;
  private $windows_attribution_id;

  protected static $param_types = array(
    'application_tracking_enabled' => 'bool',
    'advertiser_tracking_enabled' => 'bool',
    'app_user_id' => 'string',
    'campaign_ids' => 'string',
    'consider_views' => 'bool',
    'extinfo' => 'FacebookAds\Object\ServerSide\ExtendedDeviceInfo',
    'include_dwell_data' => 'bool',
    'include_video_data' => 'bool',
    'install_referrer' => 'string',
    'installer_package' => 'string',
    'receipt_data' => 'string',
    'url_schemes' => 'string',
    'windows_attribution_id' => 'string',
  );

  protected static $attributeMap = array(
    'application_tracking_enabled' => 'application_tracking_enabled',
    'advertiser_tracking_enabled' => 'advertiser_tracking_enabled',
    'app_user_id' => 'app_user_id',
    'campaign_ids' => 'campaign_ids',
    'consider_views' => 'consider_views',
    'extinfo' => 'extinfo',
    'include_dwell_data' => 'include_dwell_data',
    'include_video_data' => 'include_video_data',
    'install_referrer' => 'install_referrer',
    'installer_package' => 'installer_package',
    'receipt_data' => 'receipt_data',
    'url_schemes' => 'url_schemes',
    'windows_attribution_id' => 'windows_attribution_id',
  );

  protected static $setters = array(
    'application_tracking_enabled' => 'setApplicationTrackingEnabled',
    'advertiser_tracking_enabled' => 'setAdvertiserTrackingEnabled',
    'app_user_id' => 'setAppUserId',
    'campaign_ids' => 'setCampaignIds',
    'consider_views' => 'setConsiderViews',
    'extinfo' => 'setExtinfo',
    'include_dwell_data' => 'setIncludeDwellData',
    'include_video_data' => 'setIncludeVideoData',
    'install_referrer' => 'setInstallReferrer',
    'installer_package' => 'setInstallerPackage',
    'receipt_data' => 'setReceiptData',
    'url_schemes' => 'setUrlSchemes',
    'windows_attribution_id' => 'setWindowsAttributionId',
  );

  protected static $getters = array(
    'application_tracking_enabled' => 'getApplicationTrackingEnabled',
    'advertiser_tracking_enabled' => 'getAdvertiserTrackingEnabled',
    'app_user_id' => 'getAppUserId',
    'campaign_ids' => 'getCampaignIds',
    'consider_views' => 'getConsiderViews',
    'extinfo' => 'getExtinfo',
    'include_dwell_data' => 'getIncludeDwellData',
    'include_video_data' => 'getIncludeVideoData',
    'install_referrer' => 'getInstallReferrer',
    'installer_package' => 'getInstallerPackage',
    'receipt_data' => 'getReceiptData',
    'url_schemes' => 'getUrlSchemes',
    'windows_attribution_id' => 'getWindowsAttributionId',
  );

  protected $container = array();

  public function __construct(array $data = null) {
    $this->container['application_tracking_enabled'] = isset($data['application_tracking_enabled']) ? $data['application_tracking_enabled'] : null;
    $this->container['advertiser_tracking_enabled'] = isset($data['advertiser_tracking_enabled']) ? $data['advertiser_tracking_enabled'] : null;
    $this->container['app_user_id'] = isset($data['app_user_id']) ? $data['app_user_id'] : null;
    $this->container['campaign_ids'] = isset($data['campaign_ids']) ? $data['campaign_ids'] : null;
    $this->container['consider_views'] = isset($data['consider_views']) ? $data['consider_views'] : null;
    $this->container['extinfo'] = isset($data['extinfo']) ? $data['extinfo'] : null;
    $this->container['include_dwell_data'] = isset($data['include_dwell_data']) ? $data['include_dwell_data'] : null;
    $this->container['include_video_data'] = isset($data['include_video_data']) ? $data['include_video_data'] : null;
    $this->container['install_referrer'] = isset($data['install_referrer']) ? $data['install_referrer'] : null;
    $this->container['installer_package'] = isset($data['installer_package']) ? $data['installer_package'] : null;
    $this->container['receipt_data'] = isset($data['receipt_data']) ? $data['receipt_data'] : null;
    $this->container['url_schemes'] = isset($data['url_schemes']) ? $data['url_schemes'] : null;
    $this->container['windows_attribution_id'] = isset($data['windows_attribution_id']) ? $data['windows_attribution_id'] : null;
  }

  public static function paramTypes() {
    return $self::param_types;
  }

  public static function attributeMap() {
    return self::$attributeMap;
  }

  public static function setters() {
    return self::$setters;
  }

  public static function getters() {
    return self::$getters;
  }

  /**
   * show all the invalid properties with reasons.
   *
   * @return array invalid properties with reasons
   */
  public function listInvalidProperties() {
    $invalid_properties = array();
    return $invalid_properties;
  }

  /**
   * validate all the properties in the model
   * return true if all passed
   *
   * @return bool True if all properties are valid
   */
  public function valid() {
    return true;
  }

  public function setApplicationTrackingEnabled($application_tracking_enabled) {
    $this->container['application_tracking_enabled'] = $application_tracking_enabled;

    return $this;
  }

  public function setAdvertiserTrackingEnabled($advertiser_tracking_enabled) {
    $this->container['advertiser_tracking_enabled'] = $advertiser_tracking_enabled;

    return $this;
  }

  public function setAppUserId($app_user_id) {
    $this->container['app_user_id'] = $app_user_id;

    return $this;
  }

  public function setCampaignIds($campaign_ids) {
    $this->container['campaign_ids'] = $campaign_ids;

    return $this;
  }

  public function setConsiderViews($consider_views) {
    $this->container['consider_views'] = $consider_views;

    return $this;
  }

  public function setExtinfo($extinfo) {
    $this->container['extinfo'] = $extinfo;

    return $this;
  }

  public function setIncludeDwellData($include_dwell_data) {
    $this->container['include_dwell_data'] = $include_dwell_data;

    return $this;
  }

  public function setIncludeVideoData($include_video_data) {
    $this->container['include_video_data'] = $include_video_data;

    return $this;
  }

  public function setInstallReferrer($install_referrer) {
    $this->container['install_referrer'] = $install_referrer;

    return $this;
  }

  public function setInstallerPackage($installer_package) {
    $this->container['installer_package'] = $installer_package;

    return $this;
  }

  public function setReceiptData($receipt_data) {
    $this->container['receipt_data'] = $receipt_data;

    return $this;
  }

  public function setUrlSchemes($url_schemes) {
    $this->container['url_schemes'] = $url_schemes;

    return $this;
  }

  public function  setWindowsAttributionId($windows_attribution_id) {
    $this->container['windows_attribution_id'] = $windows_attribution_id;

    return $this;
  }

  /**
   * Returns true if offset exists. False otherwise.
   * @param integer $offset Offset
   * @return boolean
   */
  public function offsetExists($offset) : bool {
    return isset($this->container[$offset]);
  }

  /**
   * Gets offset.
   * @param integer $offset Offset
   * @return mixed
   */
  public function offsetGet($offset) : mixed {
    return isset($this->container[$offset]) ? $this->container[$offset] : null;
  }

  /**
   * Sets value based on offset.
   * @param integer $offset Offset
   * @param mixed $value Value to be set
   * @return void
   */
  public function offsetSet($offset, $value) : void {
    if (is_null($offset)) {
      $this->container[] = $value;
    } else {
      $this->container[$offset] = $value;
    }
  }

  /**
   * Unsets offset.
   * @param integer $offset Offset
   * @return void
   */
  public function offsetUnset($offset) : void {
    unset($this->container[$offset]);
  }

  /**
   * Noramlize
   * @return array
   */
  public function normalize() {
    $normalized_payload = array();

    $normalized_payload['app_user_id']= $this->getAppUserId();
    $normalized_payload['campaign_ids'] = $this->getCampaignIds();
    $normalized_payload['consider_views'] = $this->getConsiderViews();
    $normalized_payload['extinfo'] = isset($this->container['extinfo'])? $this->getExtinfo()->normalize() : null;
    $normalized_payload['include_dwell_data'] = $this->getIncludeDwellData();
    $normalized_payload['include_video_data']= $this->getIncludeVideoData();
    $normalized_payload['install_referrer'] = $this->getInstallReferrer();
    $normalized_payload['installer_package'] = $this->getInstallerPackage();
    $normalized_payload['receipt_data'] = $this->getReceiptData();
    $normalized_payload['url_schemes'] = $this->getUrlSchemes();
    $normalized_payload['windows_attribution_id'] = $this->getWindowsAttributionId();

    $normalized_payload = array_filter($normalized_payload);

    // The following two booleans are set after array_filter because they are required and
    // shouldn't be removed when falsy
    $normalized_payload['application_tracking_enabled'] = $this->getApplicationTrackingEnabled();
    $normalized_payload['advertiser_tracking_enabled'] = $this->getAdvertiserTrackingEnabled();

    return $normalized_payload;
  }

  public function getApplicationTrackingEnabled() {
    return $this->container['application_tracking_enabled'];
  }

  public function getAdvertiserTrackingEnabled() {
    return $this->container['advertiser_tracking_enabled'];
  }

  public function getAppUserId() {
    return $this->container['app_user_id'];
  }

  public function getCampaignIds() {
    return $this->container['campaign_ids'];
  }

  public function getConsiderViews() {
    return $this->container['consider_views'];
  }

  public function getExtinfo() {
    return $this->container['extinfo'];
  }

  public function getIncludeDwellData() {
    return $this->container['include_dwell_data'];
  }

  public function getIncludeVideoData() {
    return $this->container['include_video_data'];
  }

  public function getInstallReferrer() {
    return $this->container['install_referrer'];
  }

  public function getInstallerPackage() {
    return $this->container['installer_package'];
  }

  public function getReceiptData() {
    return $this->container['receipt_data'];
  }

  public function getUrlSchemes() {
    return $this->container['url_schemes'];
  }

  public function  getWindowsAttributionId() {
    return $this->container['windows_attribution_id'];
  }

  /**
   * Gets the string presentation of the object
   * @return string
   */
  public function __toString() {
    if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
      return json_encode($this, JSON_PRETTY_PRINT);
    }

    return json_encode($this);
  }

}


<?php
/**
 * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\ServerSide;

use FacebookAds\Api;

use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Handler\CurlHandler;

class AsyncClient extends Singleton {
  protected $client = null;

  public function __construct() {
    $handler_stack = HandlerStack::create(new CurlHandler([
      'options' => [
        CURLOPT_CONNECTTIMEOUT => 10,
        CURLOPT_TIMEOUT => 60,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HEADER => true,
        CURLOPT_CAINFO => Api::instance()->getHttpClient()->getCaBundlePath(),
      ]
    ]));

    $this->client = new Client(['handler' => $handler_stack]);
  }

  public function getClient() {
    return $this->client;
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\ServerSide;

use GuzzleHttp\Promise;

class BatchProcessor {
  protected $batch_size;
  protected $concurrent_requests;
  protected $pixel_id;

  /**
   * Constructor
   * @param int $pixel_id
   * @param int $batch_size
   * @param int $concurrent_requests
   */
  public function __construct($pixel_id, $batch_size = 50, $concurrent_requests = 4) {
    $this->pixel_id = $pixel_id;
    // Note: batch_size is only used in processEvents and processEventsGenerator
    $this->batch_size = $batch_size;
    $this->concurrent_requests = $concurrent_requests;
  }

  /**
   * Processes events that have identical event_request params
   * @param array $event_request_params
   * @param array|\FacebookAds\Object\ServerSide\Event $events
   * @return void
   */
  public function processEvents($event_request_params, $events) {
    $generator = $this->processEventsGenerator($event_request_params, $events);
    foreach ($generator as $promises) {
      Promise\unwrap($promises);
    }
  }

  /**
   * This generator returns event_requests promises for events that have identical event_request params
   * @param array $event_request_params
   * @param array|\FacebookAds\Object\ServerSide\Event $events
   * @return Generator|array|\GuzzleHttp\Promise\PromiseInterface $promises
   */
  public function processEventsGenerator($event_request_params, $events) {
    $index = 0;
    while ($index < count($events)) {
      $promises = [];

      while ($index < count($events) && count($promises) < $this->concurrent_requests) {
        $params = array_merge(
          array('events' => array_slice($events, $index, $this->batch_size)),
          $event_request_params
        );
        $event_request = new EventRequestAsync(
          $this->pixel_id,
          $params
        );

        $promises[] = $event_request->execute();
        $index += $this->batch_size;
      }

      yield $promises;
    }
  }

  /**
   * Processes async event_requests
   * @param array|\FacebookAds\Object\ServerSide\EventRequestAsync $event_requests_async
   * @return void
   */
  public function processEventRequests($event_requests_async) {
    $generator = $this->processEventRequestsGenerator($event_requests_async);
    foreach ($generator as $promises) {
      Promise\unwrap($promises);
    }
  }

  /**
   * This generator returns event_requests promises
   * @param array|\FacebookAds\Object\ServerSide\EventRequestAsync $event_requests_async
   * @return Generator|array|\GuzzleHttp\Promise\PromiseInterface $promises
   */
  public function processEventRequestsGenerator($event_requests_async) {
    $index = 0;
    while ($index < count($event_requests_async)) {
      $promises = [];

      $offset = 0;
      while (($index + $offset) < count($event_requests_async) && count($promises) < $this->concurrent_requests) {
        $promises[] = $event_requests_async[$index + $offset]->execute();
        $offset += 1;
      }
      $index += $offset;

      yield $promises;
    }
  }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\ServerSide;

use Exception;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Promise\PromiseInterface;
use GuzzleHttp\Utils;
use Psr\Http\Message\ResponseInterface;

/**
 * Implementation of Custom Endpoint Request that sends events to CAPIG /events endpoint
 *
 * @category Class
 */
class CAPIGatewayEndpoint implements CustomEndpointRequest {
    private Client $client;
    private string $access_key;
    private string $endpoint_URL;
    private bool $sendToEndpointOnly;
    private ?Filter $filter = null;

    /**
     * Constructor
     * @param string $endpoint_URL endpoint_URL
     * @param string $access_key access_key
     * @throws Exception
     */
    public function __construct(string $endpoint_URL, string $access_key) {
        $this->validateEndpoint($endpoint_URL);
        $this->endpoint_URL = $endpoint_URL;
        $this->access_key = $access_key;
        $this->client= new Client(['headers' => ['Content-Type' => 'application/json; charset=utf-8']]);
        $this->sendToEndpointOnly = false;
    }

    /**
     * Validates URL
     * @param string $endpoint_URL
     * @throws Exception
     */
    private function validateEndpoint(string $endpoint_URL):void {
        if (!filter_var($endpoint_URL, FILTER_VALIDATE_URL)) {
            throw new Exception('URL is in invalid format ');
        }
    }

    /**
     * Synchronously send events to specified CAPIG /events endpoint
     * @throws GuzzleException
     * @throws Exception
     */
    public function sendEvent(string $pixel_id, array $events): CustomEndpointResponse
    {
        try {
            if (!is_null($this->filter)) {
                $events = array_filter($events, function(Event $var){
                    return $this->filter->shouldSendEvent($var);
                });
            }
            if (count($events) == 0) {
                return new CustomEndpointResponse(array('message' => 'No events to send'));
            }
            $response = $this->client->request('POST', $this->endpoint_URL.'/capi/'.$pixel_id.'/events', ['http_errors'=> false, 'body' => $this->createRequestBody($events)]);
            if ($response->getStatusCode() != '202') {
                // a HTTP response code of 202 means the events were accepted
                throw new Exception('Server response code is '.$response->getStatusCode().' expect: 202');
            } else {
                return new CustomEndpointResponse(array('message' => $response->getBody()->getContents(), 'response_code'=> $response->getStatusCode()));
            }
        } catch (Exception $e) {
            throw new Exception('Server failed to accept events. '.$e->getMessage());
        }
    }

    /**
     * Asynchronously send events to specified CAPIG /events endpoint
     * @throws Exception
     * returns PromiseInterface
     */
    public function sendEventAsync(string $pixel_id, array $events): PromiseInterface
    {
        if (!is_null($this->filter)) {
            $events = array_filter($events, function (Event $var) {
                return $this->filter->shouldSendEvent($var);
            });
        }
        $promise = $this->client->requestAsync('POST', $this->endpoint_URL.'/capi/'.$pixel_id.'/events', ['http_errors'=> false, 'body' => $this->createRequestBody($events)]);
        $promise->then(
            function (ResponseInterface $response) {
                if ($response->getStatusCode() != '202') {
                    // a HTTP response code of 202 means the events were accepted
                    throw new Exception('Server response code is '.$response->getStatusCode().' expect: 202');
                } else {
                    return new CustomEndpointResponse(array('message' => $response->getBody()->getContents(), 'response_code'=> $response->getStatusCode()));
                }
            },
            function (RequestException $e) {
                throw new Exception('Server failed to accept events. '.$e->getMessage());
            }
        );
        return $promise;
    }

    private function createRequestBody($events): string
    {
        $events = $this->normalize($events);
        $body = array();
        $body['data'] = $events;
        $body['accessKey'] = $this->access_key;
        return Utils::jsonEncode($body);
    }

    private function normalize(array $events): array
    {
        // we need to normalize the event fields before sending
        $normalized_events = array();
        foreach ($events as $event) {
            $normalized_event = $event->normalize();
            $normalized_events[] = $normalized_event;
        }
        return $normalized_events;
    }

    public function setFilter(Filter $filter)
    {
        $this->filter = $filter;
    }

    public function setSendToEndpointOnly(bool $setSendToEndpointOnly)
    {
        $this->sendToEndpointOnly = $setSendToEndpointOnly;
    }

    public function isSendToEndpointOnly(): bool
    {
        return $this->sendToEndpointOnly;
    }

    public function getEndpoint(): string
    {
        return $this->endpoint_URL;
    }
}


<?php
/**
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
 *
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
 * use, copy, modify, and distribute this software in source code or binary
 * form for use in connection with the web services and APIs provided by
 * Facebook.
 *
 * As with any software that integrates with the Facebook platform, your use
 * of this software is subject to the Facebook Developer Principles and
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
 * shall be included in all copies or substantial portions of the software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */

namespace FacebookAds\Object\ServerSide;

use ArrayAccess;

class Content implements ArrayAccess {
  /**
   * Associative array for storing property values
   * @var mixed[]
   */
  protected $container = array();

  /**
   * Constructor
   * @param mixed[] $data Associated array of property value initializing the model
   */
  public function __construct(array $data = null) {
    $this->container['product_id'] = isset($data['product_id']) ? $data['product_id'] : null;;
    $this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null;
    $this->container['item_price'] = isset($data['item_price']) ? $data['item_price'] : null;
    $this->container['title'] = isset($data['title']) ? $data['title'] : null;
    $this->container['description'] = isset($data['description']) ? $data['description'] : null;
    $this->container['brand'] = isset($data['brand']) ? $data['brand'] : null;
    $this->container['category'] = isset($data['category']) ? $data['category'] : null;
    $this->container['delivery_category'] = isset($data['delivery_category']) ? $data['delivery_category'] : null;
  }

  /**
   * Get Product Id.
   * @return string Product Id
   */
  public function getProductId() {
    return $this->container['product_id'];
  }

  /**
   * Sets product id.
   * @param string $product_id product id
   * @return $this
   */
  public function setProductId($product_id) {
    $this->container['product_id'] = $product_id;
    return $this;
  }

  /**
   * Get number of product.
   * @return integer quantity
   */
  public function getQuantity() {
    return $this->container['quantity'];
  }

  /**
   * Set number of product.
   * @param integer $quantity number of items
   * @return $this
   */
  public function setQuantity($quantity) {
    $this->container['quantity'] = $quantity;
    return $this;
  }

  /**
   * Get Item Price.
   * @return float Item Price
   */
  public function getItemPrice() {
    return $this->container['item_price'];
  }

  /**
   * Set Item Price.
   * @param float $item_price single item price
   * @return Content
   */
  public function setItemPrice($item_price) {
    $this->container['item_price'] = $item_price;
    return $this;
  }

  /**
   * Get title.
   * @return string title
   */
  public function getTitle() {
    return $this->container['title'];
  }

  /**
   * Sets title.
   * @param string $title title
   * @return $this
   */
  public function setTitle($title) {
    $this->container['title'] = $title;
    return $this;
  }

  /**
   * Get description.
   * @return string description
   */
  public function getDescription() {
    return $this->container['description'];
  }

  /**
   * Sets description.
   * @param string $description description
   * @return $this
   */
  public function setDescription($description) {
    $this->container['description'] = $description;
    return $this;
  }

  /**
   * Get brand.
   * @return string brand
   */
  public function getBrand() {
    return $this->container['brand'];
  }

  /**
   * Sets brand.
   * @param string $brand brand
   * @return $this
   */
  public function setBrand($brand) {
    $this->container['brand'] = $brand;
    return $this;
  }

  /**
   * Get category.
   * @return string category
   */
  public function getCategory() {
    return $this->container['category'];
  }

  /**
   * Sets category.
   * @param string $category category
   * @return $this
   */
  public function setCategory($category) {
    $this->container['category'] = $category;
    return $this;
  }

  /**
   * Gets Type of delivery for a purchase event.
   * @return string delivery_category
   */
  public function getDeliveryCategory() {
    return $this->container['delivery_category'];
  }

  /**
   * Sets Type of delivery for a purchase event.
   * @param string $delivery_category
   * @return $this
   */
  public function setDeliveryCategory($delivery_category) {
    $this->container['delivery_category'] = $delivery_category;
    return $this;
  }

  /**
   * Returns true if offset exists. False otherwise.
   * @param integer $offset Offset
   * @return boolean
   */
  public function offsetExists($offset) : bool {
    return isset($this->container[$offset]);
  }

  /**
   * Gets offset.
   * @param integer $offset Offset
   * @return mixed
   */
  public function offsetGet($offset) : mixed {
    return isset($this->container[$offset]) ? $this->container[$offset] : null;
  }

  /**
   * Sets value based on offset.
   * @param integer $offset Offset
   * @param mixed $value Value to be set
   * @return void
   */
  public function offsetSet($offset, $value) : void {
    if (is_null($offset)) {
      $this->container[] = $value;
    } else {
      $this->container[$offset] = $value;
    }
  }

  /**
   * Unsets offset.
   * @param integer $offset Offset
   * @return void
   */
  public function offsetUnset($offset) : void {
    unset($this->container[$offset]);
  }

  /**
   * Gets the string presentation of the object
   * @return string
   */
  public function __toString() {
    if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
      return json_encode($this, JSON_PRETTY_PRINT);
    }

    return json_encode($this);
  }

  /**
   * Normalize
   * @return array
   */
  public function normalize() {
    $normalized_payload = array(
      'id' => $this->container['product_id'],
      'quantity' => $this->container['quantity'],
      'item_price' => $this->container['item_price'],
      'title' => $this->container['title'],
      'description' => $this->container['description'],
      'brand' => $this->container['brand'],
      'category' => $this->container['category'],
      'delivery_category' => Normalizer::normalize(
        'delivery_category', $this->container['delivery_category']
      ),
    );

    $normalized_payload = array_filter($normalized_payload);

    return $normalized_payload;
  }

}