[e3d4e0a] | 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 |
|
---|
| 18 | namespace Google\Service\Dfareporting\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Dfareporting\CreativeFieldValue;
|
---|
| 21 | use 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 | */
|
---|
| 31 | class 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 | * @throws \Google\Service\Exception
|
---|
| 42 | */
|
---|
| 43 | public function delete($profileId, $creativeFieldId, $id, $optParams = [])
|
---|
| 44 | {
|
---|
| 45 | $params = ['profileId' => $profileId, 'creativeFieldId' => $creativeFieldId, 'id' => $id];
|
---|
| 46 | $params = array_merge($params, $optParams);
|
---|
| 47 | return $this->call('delete', [$params]);
|
---|
| 48 | }
|
---|
| 49 | /**
|
---|
| 50 | * Gets one creative field value by ID. (creativeFieldValues.get)
|
---|
| 51 | *
|
---|
| 52 | * @param string $profileId User profile ID associated with this request.
|
---|
| 53 | * @param string $creativeFieldId Creative field ID for this creative field
|
---|
| 54 | * value.
|
---|
| 55 | * @param string $id Creative Field Value ID
|
---|
| 56 | * @param array $optParams Optional parameters.
|
---|
| 57 | * @return CreativeFieldValue
|
---|
| 58 | * @throws \Google\Service\Exception
|
---|
| 59 | */
|
---|
| 60 | public function get($profileId, $creativeFieldId, $id, $optParams = [])
|
---|
| 61 | {
|
---|
| 62 | $params = ['profileId' => $profileId, 'creativeFieldId' => $creativeFieldId, 'id' => $id];
|
---|
| 63 | $params = array_merge($params, $optParams);
|
---|
| 64 | return $this->call('get', [$params], CreativeFieldValue::class);
|
---|
| 65 | }
|
---|
| 66 | /**
|
---|
| 67 | * Inserts a new creative field value. (creativeFieldValues.insert)
|
---|
| 68 | *
|
---|
| 69 | * @param string $profileId User profile ID associated with this request.
|
---|
| 70 | * @param string $creativeFieldId Creative field ID for this creative field
|
---|
| 71 | * value.
|
---|
| 72 | * @param CreativeFieldValue $postBody
|
---|
| 73 | * @param array $optParams Optional parameters.
|
---|
| 74 | * @return CreativeFieldValue
|
---|
| 75 | * @throws \Google\Service\Exception
|
---|
| 76 | */
|
---|
| 77 | public function insert($profileId, $creativeFieldId, CreativeFieldValue $postBody, $optParams = [])
|
---|
| 78 | {
|
---|
| 79 | $params = ['profileId' => $profileId, 'creativeFieldId' => $creativeFieldId, 'postBody' => $postBody];
|
---|
| 80 | $params = array_merge($params, $optParams);
|
---|
| 81 | return $this->call('insert', [$params], CreativeFieldValue::class);
|
---|
| 82 | }
|
---|
| 83 | /**
|
---|
| 84 | * Retrieves a list of creative field values, possibly filtered. This method
|
---|
| 85 | * supports paging. (creativeFieldValues.listCreativeFieldValues)
|
---|
| 86 | *
|
---|
| 87 | * @param string $profileId User profile ID associated with this request.
|
---|
| 88 | * @param string $creativeFieldId Creative field ID for this creative field
|
---|
| 89 | * value.
|
---|
| 90 | * @param array $optParams Optional parameters.
|
---|
| 91 | *
|
---|
| 92 | * @opt_param string ids Select only creative field values with these IDs.
|
---|
| 93 | * @opt_param int maxResults Maximum number of results to return.
|
---|
| 94 | * @opt_param string pageToken Value of the nextPageToken from the previous
|
---|
| 95 | * result page.
|
---|
| 96 | * @opt_param string searchString Allows searching for creative field values by
|
---|
| 97 | * their values. Wildcards (e.g. *) are not allowed.
|
---|
| 98 | * @opt_param string sortField Field by which to sort the list.
|
---|
| 99 | * @opt_param string sortOrder Order of sorted results.
|
---|
| 100 | * @return CreativeFieldValuesListResponse
|
---|
| 101 | * @throws \Google\Service\Exception
|
---|
| 102 | */
|
---|
| 103 | public function listCreativeFieldValues($profileId, $creativeFieldId, $optParams = [])
|
---|
| 104 | {
|
---|
| 105 | $params = ['profileId' => $profileId, 'creativeFieldId' => $creativeFieldId];
|
---|
| 106 | $params = array_merge($params, $optParams);
|
---|
| 107 | return $this->call('list', [$params], CreativeFieldValuesListResponse::class);
|
---|
| 108 | }
|
---|
| 109 | /**
|
---|
| 110 | * Updates an existing creative field value. This method supports patch
|
---|
| 111 | * semantics. (creativeFieldValues.patch)
|
---|
| 112 | *
|
---|
| 113 | * @param string $profileId User profile ID associated with this request.
|
---|
| 114 | * @param string $creativeFieldId CreativeField ID.
|
---|
| 115 | * @param string $id CreativeFieldValue ID.
|
---|
| 116 | * @param CreativeFieldValue $postBody
|
---|
| 117 | * @param array $optParams Optional parameters.
|
---|
| 118 | * @return CreativeFieldValue
|
---|
| 119 | * @throws \Google\Service\Exception
|
---|
| 120 | */
|
---|
| 121 | public function patch($profileId, $creativeFieldId, $id, CreativeFieldValue $postBody, $optParams = [])
|
---|
| 122 | {
|
---|
| 123 | $params = ['profileId' => $profileId, 'creativeFieldId' => $creativeFieldId, 'id' => $id, 'postBody' => $postBody];
|
---|
| 124 | $params = array_merge($params, $optParams);
|
---|
| 125 | return $this->call('patch', [$params], CreativeFieldValue::class);
|
---|
| 126 | }
|
---|
| 127 | /**
|
---|
| 128 | * Updates an existing creative field value. (creativeFieldValues.update)
|
---|
| 129 | *
|
---|
| 130 | * @param string $profileId User profile ID associated with this request.
|
---|
| 131 | * @param string $creativeFieldId Creative field ID for this creative field
|
---|
| 132 | * value.
|
---|
| 133 | * @param CreativeFieldValue $postBody
|
---|
| 134 | * @param array $optParams Optional parameters.
|
---|
| 135 | * @return CreativeFieldValue
|
---|
| 136 | * @throws \Google\Service\Exception
|
---|
| 137 | */
|
---|
| 138 | public function update($profileId, $creativeFieldId, CreativeFieldValue $postBody, $optParams = [])
|
---|
| 139 | {
|
---|
| 140 | $params = ['profileId' => $profileId, 'creativeFieldId' => $creativeFieldId, 'postBody' => $postBody];
|
---|
| 141 | $params = array_merge($params, $optParams);
|
---|
| 142 | return $this->call('update', [$params], CreativeFieldValue::class);
|
---|
| 143 | }
|
---|
| 144 | }
|
---|
| 145 |
|
---|
| 146 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 147 | class_alias(CreativeFieldValues::class, 'Google_Service_Dfareporting_Resource_CreativeFieldValues');
|
---|