diff --git a/packages/Types/lib/Generated/Model/ClicksElementGoal.php b/packages/Types/lib/Generated/Model/ClicksElementGoal.php index 925aca8..7de6f49 100644 --- a/packages/Types/lib/Generated/Model/ClicksElementGoal.php +++ b/packages/Types/lib/Generated/Model/ClicksElementGoal.php @@ -89,7 +89,7 @@ class ClicksElementGoal implements ModelInterface, ArrayAccess, \JsonSerializabl protected static array $openAPINullables = [ 'id' => false, 'name' => false, - 'key' => false, + 'key' => true, 'type' => false, 'rules' => true, 'settings' => false @@ -420,7 +420,14 @@ public function getKey() public function setKey($key) { if (is_null($key)) { - throw new \InvalidArgumentException('non-nullable key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['key'] = $key; diff --git a/packages/Types/lib/Generated/Model/ClicksLinkGoal.php b/packages/Types/lib/Generated/Model/ClicksLinkGoal.php index 74a9a94..854b1a4 100644 --- a/packages/Types/lib/Generated/Model/ClicksLinkGoal.php +++ b/packages/Types/lib/Generated/Model/ClicksLinkGoal.php @@ -89,7 +89,7 @@ class ClicksLinkGoal implements ModelInterface, ArrayAccess, \JsonSerializable protected static array $openAPINullables = [ 'id' => false, 'name' => false, - 'key' => false, + 'key' => true, 'type' => false, 'rules' => true, 'settings' => false @@ -420,7 +420,14 @@ public function getKey() public function setKey($key) { if (is_null($key)) { - throw new \InvalidArgumentException('non-nullable key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['key'] = $key; diff --git a/packages/Types/lib/Generated/Model/ConfigAudience.php b/packages/Types/lib/Generated/Model/ConfigAudience.php index 5b8ef13..f065616 100644 --- a/packages/Types/lib/Generated/Model/ConfigAudience.php +++ b/packages/Types/lib/Generated/Model/ConfigAudience.php @@ -87,7 +87,7 @@ class ConfigAudience implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static array $openAPINullables = [ 'id' => false, - 'key' => false, + 'key' => true, 'name' => false, 'type' => false, 'rules' => true @@ -365,7 +365,14 @@ public function getKey() public function setKey($key) { if (is_null($key)) { - throw new \InvalidArgumentException('non-nullable key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['key'] = $key; diff --git a/packages/Types/lib/Generated/Model/ConfigExperience.php b/packages/Types/lib/Generated/Model/ConfigExperience.php index 9630dd0..15c203b 100644 --- a/packages/Types/lib/Generated/Model/ConfigExperience.php +++ b/packages/Types/lib/Generated/Model/ConfigExperience.php @@ -113,7 +113,7 @@ class ConfigExperience implements ModelInterface, ArrayAccess, \JsonSerializable protected static array $openAPINullables = [ 'id' => false, 'name' => false, - 'key' => false, + 'key' => true, 'locations' => true, 'site_area' => true, 'audiences' => true, @@ -482,7 +482,14 @@ public function getKey() public function setKey($key) { if (is_null($key)) { - throw new \InvalidArgumentException('non-nullable key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['key'] = $key; diff --git a/packages/Types/lib/Generated/Model/ConfigFeature.php b/packages/Types/lib/Generated/Model/ConfigFeature.php index 7d457d9..a05fba1 100644 --- a/packages/Types/lib/Generated/Model/ConfigFeature.php +++ b/packages/Types/lib/Generated/Model/ConfigFeature.php @@ -86,7 +86,7 @@ class ConfigFeature implements ModelInterface, ArrayAccess, \JsonSerializable protected static array $openAPINullables = [ 'id' => false, 'name' => false, - 'key' => false, + 'key' => true, 'variables' => false ]; @@ -385,7 +385,14 @@ public function getKey() public function setKey($key) { if (is_null($key)) { - throw new \InvalidArgumentException('non-nullable key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['key'] = $key; diff --git a/packages/Types/lib/Generated/Model/ConfigGoal.php b/packages/Types/lib/Generated/Model/ConfigGoal.php index 797e212..92e9104 100644 --- a/packages/Types/lib/Generated/Model/ConfigGoal.php +++ b/packages/Types/lib/Generated/Model/ConfigGoal.php @@ -89,7 +89,7 @@ class ConfigGoal implements ModelInterface, ArrayAccess, \JsonSerializable protected static array $openAPINullables = [ 'id' => false, 'name' => false, - 'key' => false, + 'key' => true, 'type' => false, 'rules' => true, 'settings' => false @@ -438,7 +438,14 @@ public function getKey() public function setKey($key) { if (is_null($key)) { - throw new \InvalidArgumentException('non-nullable key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['key'] = $key; diff --git a/packages/Types/lib/Generated/Model/ConfigGoalBase.php b/packages/Types/lib/Generated/Model/ConfigGoalBase.php index 58f81cd..ff4e541 100644 --- a/packages/Types/lib/Generated/Model/ConfigGoalBase.php +++ b/packages/Types/lib/Generated/Model/ConfigGoalBase.php @@ -88,7 +88,7 @@ class ConfigGoalBase implements ModelInterface, ArrayAccess, \JsonSerializable protected static array $openAPINullables = [ 'id' => false, 'name' => false, - 'key' => false, + 'key' => true, 'type' => false, 'rules' => true ]; @@ -392,7 +392,14 @@ public function getKey() public function setKey($key) { if (is_null($key)) { - throw new \InvalidArgumentException('non-nullable key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['key'] = $key; diff --git a/packages/Types/lib/Generated/Model/ConfigLocation.php b/packages/Types/lib/Generated/Model/ConfigLocation.php index fbcb9bb..bccf0cf 100644 --- a/packages/Types/lib/Generated/Model/ConfigLocation.php +++ b/packages/Types/lib/Generated/Model/ConfigLocation.php @@ -87,7 +87,7 @@ class ConfigLocation implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static array $openAPINullables = [ 'id' => false, - 'key' => false, + 'key' => true, 'name' => false, 'trigger' => false, 'rules' => true @@ -365,7 +365,14 @@ public function getKey() public function setKey($key) { if (is_null($key)) { - throw new \InvalidArgumentException('non-nullable key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['key'] = $key; diff --git a/packages/Types/lib/Generated/Model/ConfigSegment.php b/packages/Types/lib/Generated/Model/ConfigSegment.php index 183d845..54fe495 100644 --- a/packages/Types/lib/Generated/Model/ConfigSegment.php +++ b/packages/Types/lib/Generated/Model/ConfigSegment.php @@ -85,7 +85,7 @@ class ConfigSegment implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static array $openAPINullables = [ 'id' => false, - 'key' => false, + 'key' => true, 'name' => false, 'rules' => true ]; @@ -358,7 +358,14 @@ public function getKey() public function setKey($key) { if (is_null($key)) { - throw new \InvalidArgumentException('non-nullable key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['key'] = $key; diff --git a/packages/Types/lib/Generated/Model/DomInteractionGoal.php b/packages/Types/lib/Generated/Model/DomInteractionGoal.php index 47a9b39..5b0644f 100644 --- a/packages/Types/lib/Generated/Model/DomInteractionGoal.php +++ b/packages/Types/lib/Generated/Model/DomInteractionGoal.php @@ -89,7 +89,7 @@ class DomInteractionGoal implements ModelInterface, ArrayAccess, \JsonSerializab protected static array $openAPINullables = [ 'id' => false, 'name' => false, - 'key' => false, + 'key' => true, 'type' => false, 'rules' => true, 'settings' => false @@ -420,7 +420,14 @@ public function getKey() public function setKey($key) { if (is_null($key)) { - throw new \InvalidArgumentException('non-nullable key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['key'] = $key; diff --git a/packages/Types/lib/Generated/Model/ExperienceKeyBucketedMatchRule.php b/packages/Types/lib/Generated/Model/ExperienceKeyBucketedMatchRule.php new file mode 100644 index 0000000..37107d4 --- /dev/null +++ b/packages/Types/lib/Generated/Model/ExperienceKeyBucketedMatchRule.php @@ -0,0 +1,480 @@ + + */ +class ExperienceKeyBucketedMatchRule implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ExperienceKeyBucketedMatchRule'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'rule_type' => '\OpenAPI\Client\Model\ExperienceKeyBucketedMatchRulesTypes', + 'value' => 'string', + 'matching' => '\OpenAPI\Client\Model\ExperienceKeyBucketedMatchRuleAllOfMatching' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'rule_type' => null, + 'value' => null, + 'matching' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'rule_type' => false, + 'value' => false, + 'matching' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'rule_type' => 'rule_type', + 'value' => 'value', + 'matching' => 'matching' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'rule_type' => 'setRuleType', + 'value' => 'setValue', + 'matching' => 'setMatching' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'rule_type' => 'getRuleType', + 'value' => 'getValue', + 'matching' => 'getMatching' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('rule_type', $data ?? [], null); + $this->setIfExists('value', $data ?? [], null); + $this->setIfExists('matching', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['rule_type'] === null) { + $invalidProperties[] = "'rule_type' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets rule_type + * + * @return \OpenAPI\Client\Model\ExperienceKeyBucketedMatchRulesTypes + */ + public function getRuleType() + { + return $this->container['rule_type']; + } + + /** + * Sets rule_type + * + * @param \OpenAPI\Client\Model\ExperienceKeyBucketedMatchRulesTypes $rule_type rule_type + * + * @return self + */ + public function setRuleType($rule_type) + { + if (is_null($rule_type)) { + throw new \InvalidArgumentException('non-nullable rule_type cannot be null'); + } + $this->container['rule_type'] = $rule_type; + + return $this; + } + + /** + * Gets value + * + * @return string|null + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string|null $value The value used to match against 'rule_type' using 'matching' + * + * @return self + */ + public function setValue($value) + { + if (is_null($value)) { + throw new \InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets matching + * + * @return \OpenAPI\Client\Model\ExperienceKeyBucketedMatchRuleAllOfMatching|null + */ + public function getMatching() + { + return $this->container['matching']; + } + + /** + * Sets matching + * + * @param \OpenAPI\Client\Model\ExperienceKeyBucketedMatchRuleAllOfMatching|null $matching matching + * + * @return self + */ + public function setMatching($matching) + { + if (is_null($matching)) { + throw new \InvalidArgumentException('non-nullable matching cannot be null'); + } + $this->container['matching'] = $matching; + + 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|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $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]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/packages/Types/lib/Generated/Model/ExperienceKeyBucketedMatchRuleAllOfMatching.php b/packages/Types/lib/Generated/Model/ExperienceKeyBucketedMatchRuleAllOfMatching.php new file mode 100644 index 0000000..fe48d9b --- /dev/null +++ b/packages/Types/lib/Generated/Model/ExperienceKeyBucketedMatchRuleAllOfMatching.php @@ -0,0 +1,443 @@ + + */ +class ExperienceKeyBucketedMatchRuleAllOfMatching implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ExperienceKeyBucketedMatchRule_allOf_matching'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'negated' => 'bool', + 'match_type' => '\OpenAPI\Client\Model\ChoiceMatchingOptions' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'negated' => null, + 'match_type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'negated' => false, + 'match_type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'negated' => 'negated', + 'match_type' => 'match_type' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'negated' => 'setNegated', + 'match_type' => 'setMatchType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'negated' => 'getNegated', + 'match_type' => 'getMatchType' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[]|null $data Associated array of property values + * initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('negated', $data ?? [], null); + $this->setIfExists('match_type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets negated + * + * @return bool|null + */ + public function getNegated() + { + return $this->container['negated']; + } + + /** + * Sets negated + * + * @param bool|null $negated If `true`, the logical result of the match is inverted. For example, if `match_type` is 'contains' and `value` is 'apple', `negated: true` means the rule matches if the attribute *does not* contain 'apple'. + * + * @return self + */ + public function setNegated($negated) + { + if (is_null($negated)) { + throw new \InvalidArgumentException('non-nullable negated cannot be null'); + } + $this->container['negated'] = $negated; + + return $this; + } + + /** + * Gets match_type + * + * @return \OpenAPI\Client\Model\ChoiceMatchingOptions|null + */ + public function getMatchType() + { + return $this->container['match_type']; + } + + /** + * Sets match_type + * + * @param \OpenAPI\Client\Model\ChoiceMatchingOptions|null $match_type match_type + * + * @return self + */ + public function setMatchType($match_type) + { + if (is_null($match_type)) { + throw new \InvalidArgumentException('non-nullable match_type cannot be null'); + } + $this->container['match_type'] = $match_type; + + 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|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $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]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/packages/Types/lib/Generated/Model/ExperienceKeyBucketedMatchRulesTypes.php b/packages/Types/lib/Generated/Model/ExperienceKeyBucketedMatchRulesTypes.php new file mode 100644 index 0000000..40a36b2 --- /dev/null +++ b/packages/Types/lib/Generated/Model/ExperienceKeyBucketedMatchRulesTypes.php @@ -0,0 +1,59 @@ + false, 'name' => false, - 'key' => false, + 'key' => true, 'traffic_allocation' => false, 'status' => false, 'changes' => false @@ -407,7 +407,14 @@ public function getKey() public function setKey($key) { if (is_null($key)) { - throw new \InvalidArgumentException('non-nullable key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['key'] = $key; diff --git a/packages/Types/lib/Generated/Model/GaGoal.php b/packages/Types/lib/Generated/Model/GaGoal.php index 0f1332e..4cf96a4 100644 --- a/packages/Types/lib/Generated/Model/GaGoal.php +++ b/packages/Types/lib/Generated/Model/GaGoal.php @@ -89,7 +89,7 @@ class GaGoal implements ModelInterface, ArrayAccess, \JsonSerializable protected static array $openAPINullables = [ 'id' => false, 'name' => false, - 'key' => false, + 'key' => true, 'type' => false, 'rules' => true, 'settings' => false @@ -420,7 +420,14 @@ public function getKey() public function setKey($key) { if (is_null($key)) { - throw new \InvalidArgumentException('non-nullable key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['key'] = $key; diff --git a/packages/Types/lib/Generated/Model/NoSettingsGoal.php b/packages/Types/lib/Generated/Model/NoSettingsGoal.php index 3fefa7f..d71f656 100644 --- a/packages/Types/lib/Generated/Model/NoSettingsGoal.php +++ b/packages/Types/lib/Generated/Model/NoSettingsGoal.php @@ -87,7 +87,7 @@ class NoSettingsGoal implements ModelInterface, ArrayAccess, \JsonSerializable protected static array $openAPINullables = [ 'id' => false, 'name' => false, - 'key' => false, + 'key' => true, 'type' => false, 'rules' => true ]; @@ -417,7 +417,14 @@ public function getKey() public function setKey($key) { if (is_null($key)) { - throw new \InvalidArgumentException('non-nullable key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['key'] = $key; diff --git a/packages/Types/lib/Generated/Model/RevenueGoal.php b/packages/Types/lib/Generated/Model/RevenueGoal.php index af6cfe6..9cba0b3 100644 --- a/packages/Types/lib/Generated/Model/RevenueGoal.php +++ b/packages/Types/lib/Generated/Model/RevenueGoal.php @@ -89,7 +89,7 @@ class RevenueGoal implements ModelInterface, ArrayAccess, \JsonSerializable protected static array $openAPINullables = [ 'id' => false, 'name' => false, - 'key' => false, + 'key' => true, 'type' => false, 'rules' => true, 'settings' => false @@ -420,7 +420,14 @@ public function getKey() public function setKey($key) { if (is_null($key)) { - throw new \InvalidArgumentException('non-nullable key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['key'] = $key; diff --git a/packages/Types/lib/Generated/Model/ScrollPercentageGoal.php b/packages/Types/lib/Generated/Model/ScrollPercentageGoal.php index 69af5ac..d20d16d 100644 --- a/packages/Types/lib/Generated/Model/ScrollPercentageGoal.php +++ b/packages/Types/lib/Generated/Model/ScrollPercentageGoal.php @@ -89,7 +89,7 @@ class ScrollPercentageGoal implements ModelInterface, ArrayAccess, \JsonSerializ protected static array $openAPINullables = [ 'id' => false, 'name' => false, - 'key' => false, + 'key' => true, 'type' => false, 'rules' => true, 'settings' => false @@ -420,7 +420,14 @@ public function getKey() public function setKey($key) { if (is_null($key)) { - throw new \InvalidArgumentException('non-nullable key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['key'] = $key; diff --git a/packages/Types/lib/Generated/Model/SubmitsFormGoal.php b/packages/Types/lib/Generated/Model/SubmitsFormGoal.php index c8ae870..41609c0 100644 --- a/packages/Types/lib/Generated/Model/SubmitsFormGoal.php +++ b/packages/Types/lib/Generated/Model/SubmitsFormGoal.php @@ -89,7 +89,7 @@ class SubmitsFormGoal implements ModelInterface, ArrayAccess, \JsonSerializable protected static array $openAPINullables = [ 'id' => false, 'name' => false, - 'key' => false, + 'key' => true, 'type' => false, 'rules' => true, 'settings' => false @@ -420,7 +420,14 @@ public function getKey() public function setKey($key) { if (is_null($key)) { - throw new \InvalidArgumentException('non-nullable key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['key'] = $key; diff --git a/packages/Types/lib/Generated/Model/VisitorInsightsBase.php b/packages/Types/lib/Generated/Model/VisitorInsightsBase.php index 8b04519..499d7db 100644 --- a/packages/Types/lib/Generated/Model/VisitorInsightsBase.php +++ b/packages/Types/lib/Generated/Model/VisitorInsightsBase.php @@ -305,9 +305,9 @@ public function getHeatmapVisitsLimitAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('enabled', $data ?? [], null); - $this->setIfExists('obfuscate_text', $data ?? [], true); + $this->setIfExists('obfuscate_text', $data ?? [], false); $this->setIfExists('sampling_rate', $data ?? [], self::SAMPLING_RATE_NUMBER_5); - $this->setIfExists('heatmap_visits_limit', $data ?? [], self::HEATMAP_VISITS_LIMIT_NUMBER_5000); + $this->setIfExists('heatmap_visits_limit', $data ?? [], self::HEATMAP_VISITS_LIMIT_NUMBER_2500); } /** diff --git a/packages/Types/lib/Generated/Model/VisitorInsightsData.php b/packages/Types/lib/Generated/Model/VisitorInsightsData.php index 0432d60..b9c5b17 100644 --- a/packages/Types/lib/Generated/Model/VisitorInsightsData.php +++ b/packages/Types/lib/Generated/Model/VisitorInsightsData.php @@ -288,9 +288,9 @@ public function getHeatmapVisitsLimitAllowableValues() public function __construct(?array $data = null) { $this->setIfExists('enabled', $data ?? [], null); - $this->setIfExists('obfuscate_text', $data ?? [], true); + $this->setIfExists('obfuscate_text', $data ?? [], false); $this->setIfExists('sampling_rate', $data ?? [], 5); - $this->setIfExists('heatmap_visits_limit', $data ?? [], self::HEATMAP_VISITS_LIMIT_NUMBER_5000); + $this->setIfExists('heatmap_visits_limit', $data ?? [], self::HEATMAP_VISITS_LIMIT_NUMBER_2500); $this->setIfExists('tracking_id', $data ?? [], null); } diff --git a/packages/Types/lib/Generated/Model/VisitorSegments.php b/packages/Types/lib/Generated/Model/VisitorSegments.php index 3108ff0..02080d4 100644 --- a/packages/Types/lib/Generated/Model/VisitorSegments.php +++ b/packages/Types/lib/Generated/Model/VisitorSegments.php @@ -62,6 +62,7 @@ class VisitorSegments implements ModelInterface, ArrayAccess, \JsonSerializable 'devices' => 'string[]', 'source' => 'string', 'campaign' => 'string', + 'content' => 'string', 'visitorType' => 'string', 'country' => 'string', 'customSegments' => 'string[]' @@ -79,6 +80,7 @@ class VisitorSegments implements ModelInterface, ArrayAccess, \JsonSerializable 'devices' => null, 'source' => null, 'campaign' => null, + 'content' => null, 'visitorType' => null, 'country' => null, 'customSegments' => null @@ -94,6 +96,7 @@ class VisitorSegments implements ModelInterface, ArrayAccess, \JsonSerializable 'devices' => false, 'source' => false, 'campaign' => false, + 'content' => false, 'visitorType' => false, 'country' => false, 'customSegments' => false @@ -189,6 +192,7 @@ public function isNullableSetToNull(string $property): bool 'devices' => 'devices', 'source' => 'source', 'campaign' => 'campaign', + 'content' => 'content', 'visitorType' => 'visitorType', 'country' => 'country', 'customSegments' => 'customSegments' @@ -204,6 +208,7 @@ public function isNullableSetToNull(string $property): bool 'devices' => 'setDevices', 'source' => 'setSource', 'campaign' => 'setCampaign', + 'content' => 'setContent', 'visitorType' => 'setVisitorType', 'country' => 'setCountry', 'customSegments' => 'setCustomSegments' @@ -219,6 +224,7 @@ public function isNullableSetToNull(string $property): bool 'devices' => 'getDevices', 'source' => 'getSource', 'campaign' => 'getCampaign', + 'content' => 'getContent', 'visitorType' => 'getVisitorType', 'country' => 'getCountry', 'customSegments' => 'getCustomSegments' @@ -371,6 +377,7 @@ public function __construct(?array $data = null) $this->setIfExists('devices', $data ?? [], null); $this->setIfExists('source', $data ?? [], null); $this->setIfExists('campaign', $data ?? [], null); + $this->setIfExists('content', $data ?? [], null); $this->setIfExists('visitorType', $data ?? [], null); $this->setIfExists('country', $data ?? [], null); $this->setIfExists('customSegments', $data ?? [], null); @@ -590,6 +597,33 @@ public function setCampaign($campaign) return $this; } + /** + * Gets content + * + * @return string|null + */ + public function getContent() + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string|null $content Content string (ad-creative identifier from utm_content) + * + * @return self + */ + public function setContent($content) + { + if (is_null($content)) { + throw new \InvalidArgumentException('non-nullable content cannot be null'); + } + $this->container['content'] = $content; + + return $this; + } + /** * Gets visitor_type *