1<?php 2/* 3 * Copyright 2014 Google Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 6 * use this file except in compliance with the License. You may obtain a copy of 7 * the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 * License for the specific language governing permissions and limitations under 15 * the License. 16 */ 17 18namespace Google\Service\Dfareporting\Resource; 19 20use Google\Service\Dfareporting\CreativeFieldValue; 21use Google\Service\Dfareporting\CreativeFieldValuesListResponse; 22 23/** 24 * The "creativeFieldValues" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $dfareportingService = new Google\Service\Dfareporting(...); 28 * $creativeFieldValues = $dfareportingService->creativeFieldValues; 29 * </code> 30 */ 31class CreativeFieldValues extends \Google\Service\Resource 32{ 33 /** 34 * Deletes an existing creative field value. (creativeFieldValues.delete) 35 * 36 * @param string $profileId User profile ID associated with this request. 37 * @param string $creativeFieldId Creative field ID for this creative field 38 * value. 39 * @param string $id Creative Field Value ID 40 * @param array $optParams Optional parameters. 41 */ 42 public function delete($profileId, $creativeFieldId, $id, $optParams = []) 43 { 44 $params = ['profileId' => $profileId, 'creativeFieldId' => $creativeFieldId, 'id' => $id]; 45 $params = array_merge($params, $optParams); 46 return $this->call('delete', [$params]); 47 } 48 /** 49 * Gets one creative field value by ID. (creativeFieldValues.get) 50 * 51 * @param string $profileId User profile ID associated with this request. 52 * @param string $creativeFieldId Creative field ID for this creative field 53 * value. 54 * @param string $id Creative Field Value ID 55 * @param array $optParams Optional parameters. 56 * @return CreativeFieldValue 57 */ 58 public function get($profileId, $creativeFieldId, $id, $optParams = []) 59 { 60 $params = ['profileId' => $profileId, 'creativeFieldId' => $creativeFieldId, 'id' => $id]; 61 $params = array_merge($params, $optParams); 62 return $this->call('get', [$params], CreativeFieldValue::class); 63 } 64 /** 65 * Inserts a new creative field value. (creativeFieldValues.insert) 66 * 67 * @param string $profileId User profile ID associated with this request. 68 * @param string $creativeFieldId Creative field ID for this creative field 69 * value. 70 * @param CreativeFieldValue $postBody 71 * @param array $optParams Optional parameters. 72 * @return CreativeFieldValue 73 */ 74 public function insert($profileId, $creativeFieldId, CreativeFieldValue $postBody, $optParams = []) 75 { 76 $params = ['profileId' => $profileId, 'creativeFieldId' => $creativeFieldId, 'postBody' => $postBody]; 77 $params = array_merge($params, $optParams); 78 return $this->call('insert', [$params], CreativeFieldValue::class); 79 } 80 /** 81 * Retrieves a list of creative field values, possibly filtered. This method 82 * supports paging. (creativeFieldValues.listCreativeFieldValues) 83 * 84 * @param string $profileId User profile ID associated with this request. 85 * @param string $creativeFieldId Creative field ID for this creative field 86 * value. 87 * @param array $optParams Optional parameters. 88 * 89 * @opt_param string ids Select only creative field values with these IDs. 90 * @opt_param int maxResults Maximum number of results to return. 91 * @opt_param string pageToken Value of the nextPageToken from the previous 92 * result page. 93 * @opt_param string searchString Allows searching for creative field values by 94 * their values. Wildcards (e.g. *) are not allowed. 95 * @opt_param string sortField Field by which to sort the list. 96 * @opt_param string sortOrder Order of sorted results. 97 * @return CreativeFieldValuesListResponse 98 */ 99 public function listCreativeFieldValues($profileId, $creativeFieldId, $optParams = []) 100 { 101 $params = ['profileId' => $profileId, 'creativeFieldId' => $creativeFieldId]; 102 $params = array_merge($params, $optParams); 103 return $this->call('list', [$params], CreativeFieldValuesListResponse::class); 104 } 105 /** 106 * Updates an existing creative field value. This method supports patch 107 * semantics. (creativeFieldValues.patch) 108 * 109 * @param string $profileId User profile ID associated with this request. 110 * @param string $creativeFieldId CreativeField ID. 111 * @param string $id CreativeFieldValue ID. 112 * @param CreativeFieldValue $postBody 113 * @param array $optParams Optional parameters. 114 * @return CreativeFieldValue 115 */ 116 public function patch($profileId, $creativeFieldId, $id, CreativeFieldValue $postBody, $optParams = []) 117 { 118 $params = ['profileId' => $profileId, 'creativeFieldId' => $creativeFieldId, 'id' => $id, 'postBody' => $postBody]; 119 $params = array_merge($params, $optParams); 120 return $this->call('patch', [$params], CreativeFieldValue::class); 121 } 122 /** 123 * Updates an existing creative field value. (creativeFieldValues.update) 124 * 125 * @param string $profileId User profile ID associated with this request. 126 * @param string $creativeFieldId Creative field ID for this creative field 127 * value. 128 * @param CreativeFieldValue $postBody 129 * @param array $optParams Optional parameters. 130 * @return CreativeFieldValue 131 */ 132 public function update($profileId, $creativeFieldId, CreativeFieldValue $postBody, $optParams = []) 133 { 134 $params = ['profileId' => $profileId, 'creativeFieldId' => $creativeFieldId, 'postBody' => $postBody]; 135 $params = array_merge($params, $optParams); 136 return $this->call('update', [$params], CreativeFieldValue::class); 137 } 138} 139 140// Adding a class alias for backwards compatibility with the previous class name. 141class_alias(CreativeFieldValues::class, 'Google_Service_Dfareporting_Resource_CreativeFieldValues'); 142