-
Notifications
You must be signed in to change notification settings - Fork 266
/
Copy pathProductCondition.php
78 lines (69 loc) · 2.18 KB
/
ProductCondition.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads/v11/enums/product_condition.proto
namespace Google\Ads\GoogleAds\V11\Enums\ProductConditionEnum;
use UnexpectedValueException;
/**
* Enum describing the condition of a product offer.
*
* Protobuf type <code>google.ads.googleads.v11.enums.ProductConditionEnum.ProductCondition</code>
*/
class ProductCondition
{
/**
* Not specified.
*
* Generated from protobuf enum <code>UNSPECIFIED = 0;</code>
*/
const UNSPECIFIED = 0;
/**
* Used for return value only. Represents value unknown in this version.
*
* Generated from protobuf enum <code>UNKNOWN = 1;</code>
*/
const UNKNOWN = 1;
/**
* The product condition is new.
*
* Generated from protobuf enum <code>NEW = 3;</code>
*/
const PBNEW = 3;
/**
* The product condition is refurbished.
*
* Generated from protobuf enum <code>REFURBISHED = 4;</code>
*/
const REFURBISHED = 4;
/**
* The product condition is used.
*
* Generated from protobuf enum <code>USED = 5;</code>
*/
const USED = 5;
private static $valueToName = [
self::UNSPECIFIED => 'UNSPECIFIED',
self::UNKNOWN => 'UNKNOWN',
self::PBNEW => 'PBNEW',
self::REFURBISHED => 'REFURBISHED',
self::USED => 'USED',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProductCondition::class, \Google\Ads\GoogleAds\V11\Enums\ProductConditionEnum_ProductCondition::class);