<?php

abstract class googleRTBCreative
{
    const ACCOUNT_ID = "195568039";
    
    public function createCreativeValidData() {
        return [
            [
                'name' => 'account_id',
                'display' => 'Account ID',
                'description' =>'The resource ID of the buyers resource under which the creative is to be created.',
                'required' => FALSE,
                'default' => self::ACCOUNT_ID
            ],
            [
                'name' => 'advertiser_name',
                'display' => 'Advertiser name',
                'description' => 'The name of the company being advertised in the creative.',
                'required' => false,
                'default' => 'Localpages.com'
            ],
            [
                'name' => 'creative_id',
                'display' => 'Creative ID',
                'description' =>'The user-specified creative ID. The maximum length of the creative ID is 128 bytes',
                'required' => true,
            ],
            [
                'name' => 'declared_attributes',
                'display' => 'Declared attributes',
                'description' =>'The creative attributes being declared. Specify each attribute separated by a comma.',
                'required' => false,
                'is_array' => true,
                'default' => ['CREATIVE_TYPE_HTML']
            ],
            [
                'name' => 'declared_click_urls',
                'display' => 'Declared click URLs',
                'description' =>'The click-through URLs being declared. Specify each URL separated by a comma.',
                'required' => false,
                'is_array' => false
            ],
            [
                'name' => 'declared_restricted_categories',
                'display' => 'Declared restricted categories',
                'description' =>'The restricted categories being declared. Specify each category separated by a comma.',
                'required' => false,
                'is_array' => true
            ],
            [
                'name' => 'declared_vendor_ids',
                'display' => 'Declared vendor IDs',
                'description' =>'The vendor IDs being declared. Specify each ID separated by a comma.',
                'required' => false,
                'is_array' => true
            ],
            [
                'name' => 'html_snippet',
                'display' => 'HTML snippet',
                'description' =>'The HTML snippet that displays the ad when inserted in the web page.',
                'required' => true
            ],
            [
                'name' => 'html_height',
                'display' => 'Height',
                'description' => 'The height of the HTML snippet in pixels.',
                'required' => true
            ],
            [
                'name' => 'html_width',
                'display' => 'Width',
                'description' => 'The width of the HTML snippet in pixels.',
                'required' => true
            ]
        ];
    }
    
    public function getCreativeValidData() {
        return [
            [
                'name' => 'account_id',
                'display' => 'Account ID',
                'description' =>
                    'The resource ID of the buyers resource under which the creative was ' .
                    'created. This will be used to construct the name used as a path parameter ' .
                    'for the creatives.get request.',
                'required' => FALSE,
                'default' => self::ACCOUNT_ID
            ],
            [
                'name' => 'creative_id',
                'display' => 'Creative ID',
                'required' => true,
                'description' =>
                    'The resource ID of the buyers.creatives resource under which the creative ' .
                    'was created. This will be used to construct the name used as a path ' .
                    'parameter for the creatives.get request.'
            ]
        ];
    }
    
    public function updateCreativeValidData() {
        return [
            [
                'name' => 'account_id',
                'display' => 'Account ID',
                'description' =>
                    'The resource ID of the buyers resource under which the creative was ' .
                    'created. This will be used to construct the name used as a path parameter ' .
                    'for the creatives.get request.',
                'required' => FALSE,
                'default' => self::ACCOUNT_ID
            ],
            [
                'name' => 'creative_id',
                'display' => 'Creative ID',
                'required' => true,
                'description' =>
                    'The resource ID of the buyers.creatives resource under which the creative ' .
                    'was created. This will be used to construct the name used as a path ' .
                    'parameter for the creatives.get request.'
            ],
            [
                'name' => 'declared_click_urls',
                'display' => 'Declared click URLs',
                'description' =>'The click-through URLs being declared. Specify each URL separated by a comma.',
                'required' => false,
                'is_array' => false
            ],
            [
                'name' => 'html_snippet',
                'display' => 'HTML snippet',
                'description' =>'The HTML snippet that displays the ad when inserted in the web page.',
                'required' => true
            ]
        ];
    }

    public function getPretargtingListValidData() {
        return [
            [
                'name' => 'account_id',
                'display' => 'Bidder account ID',
                'required' => true,
                'default' => self::ACCOUNT_ID,
                'description' =>
                    'The resource ID of the bidders resource under which the pretargeting ' .
                    'configurations were created. This will be used to construct the parent ' .
                    'used as a path parameter for the pretargetingConfig.list request.'
            ],
            [
                'name' => 'page_size',
                'display' => 'Page size',
                'required' => false,
                'description' =>
                    'The number of rows to return per page. The server may return fewer rows ' .
                    'than specified.',
                'default' => 10
            ]
        ];
    }
    
    public function getAllCreativeList() {
        return [
            [
                'name' => 'account_id',
                'display' => 'Account ID',
                'description' =>
                    'The resource ID of the buyers resource under which the creative was ' .
                    'created. This will be used to construct the name used as a path parameter ' .
                    'for the creatives.get request.',
                'required' => FALSE,
                'default' => self::ACCOUNT_ID
            ],
            [
                'name' => 'filter',
                'display' => 'Filter',
                'required' => false,
                'description' =>
                    'Query string to filter creatives. If no filter is specified, all active ' .
                    'creatives will be returned. To demonstrate usage, the default behavior of ' .
                    'this sample is to filter such that only approved HTML snippet creatives ' .
                    'are returned.',
                'default' =>
                    'creativeServingDecision.networkPolicyCompliance.status=APPROVED ' .
                    'AND creativeFormat=HTML'
            ],
            [
                'name' => 'view',
                'display' => 'View',
                'required' => false,
                'description' =>
                    'Controls the amount of information included in the response. By default, ' .
                    'the creatives.list method only includes creativeServingDecision. This ' .
                    'sample configures the view to return the full contents of the creatives by ' .
                    'setting this to "FULL".',
                'default' => 'FULL'
            ]
        ];
    }
}