Push one element onto the end of the set.

@param  AbstractClassContent $var The pushed values

@return AbstractClassContent the current instance content
@throws ClassContentException Occurs if the attached content is not a ContentSet
337814
public function push(AbstractClassContent $var)
    {
        if (!($this->_content instanceof ContentSet)) {
            throw new ClassContentException(
                sprintf('Can not push in a content %s.', get_class($this)),
                ClassContentException::UNKNOWN_ERROR
            );
        }

        if ($this->isAccepted($var)) {
            $this->_data[] = array(get_class($var) => $var->getUid());
        }

        return $this->getContent();
    }
852951
public function setTense($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\PartOfSpeech_Tense::class);
        $this->tense = $var;

        return $this;
    }
1171141
public function setTextSnippet($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AutoMl\V1beta1\TextSnippet::class);
        $this->writeOneof(2, $var);

        return $this;
    }
83403
public function setKind($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\KindExpression::class);
        $this->kind = $var;

        return $this;
    }
732447
public function setMethod($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Gcp\MethodConfig::class);
        $this->method = $arr;

        return $this;
    }
1184043
public function setPhpClassPrefix($var)
    {
        GPBUtil::checkString($var, True);
        $this->php_class_prefix = $var;
        $this->has_php_class_prefix = true;

        return $this;
    }
1372331
protected function getClassAttribute($var, $type = 'class')
    {
        $status = trim(( $type === 'class' ? $this->classAttribute : $this->styleAttribute) . $this->{$type}[$var]);

        return $this->createAttribute($status, $type);
    }
231287
public function setMode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Datastore\V1\CommitRequest_Mode::class);
        $this->mode = $var;

        return $this;
    }
981586
public function setFields($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Field::class);
        $this->fields = $arr;

        return $this;
    }
603312
public function setTransient($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\TransientCryptoKey::class);
        $this->writeOneof(1, $var);

        return $this;
    }
1070782
public function setExplicitAnnotation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\ExplicitContentAnnotation::class);
        $this->explicit_annotation = $var;

        return $this;
    }
197512
public function setReason($var)
    {
        GPBUtil::checkEnum($var, \Rxnet\EventStore\Data\NotHandled_NotHandledReason::class);
        $this->reason = $var;

        return $this;
    }
302977
public function setDatasets($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AutoMl\V1beta1\Dataset::class);
        $this->datasets = $arr;

        return $this;
    }
674480
public function __isset($var)
    {
        if ($this->getContentInstance() instanceof ContentSet) {
            throw new UnknownPropertyException(sprintf(
                'Unknown property %s in %s.',
                $var,
                ClassUtils::getRealClass($this->getContentInstance())
            ));
        }

        return array_key_exists($var, $this->_data) && 0 < count($this->_data[$var]);
    }
902137
public function setMethod($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\MethodDescriptorProto::class);
        $this->method = $arr;
        $this->has_method = true;

        return $this;
    }
1247601
public function setExtensionRange($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto\ExtensionRange::class);
        $this->extension_range = $arr;
        $this->has_extension_range = true;

        return $this;
    }
259454
public function setContext($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DevTools\Source\V1\SourceContext::class);
        $this->context = $var;

        return $this;
    }