PubSub/src/Connection/Grpc.php
private function buildSubscription(array &$args, $required = false)
    {
        $pushConfig = $this->pluck('pushConfig', $args, $required);
        $pushConfig = $pushConfig
            ? $this->buildPushConfig($pushConfig)
            : null;

        return $this->serializer->decodeMessage(new Subscription(), array_filter([
            'name' => $this->pluck('name', $args, $required),
            'topic' => $this->pluck('topic', $args, $required),
            'pushConfig' => $pushConfig,
            'ackDeadlineSeconds' => $this->pluck('ackDeadlineSeconds', $args, $required),
            'retainAckedMessages' => $this->pluck('retainAckedMessages', $args, $required),
            'messageRetentionDuration' => $this->pluck('messageRetentionDuration', $args, $required),
        ]));
    }
private function buildSubscription(array &$args, $required = false)
    {
        $pushConfig = $this->pluck('pushConfig', $args, $required);
        $pushConfig = $pushConfig
            ? $this->buildPushConfig($pushConfig)
            : null;

        return $this->serializer->decodeMessage(new Subscription(), array_filter([
            'name' => $this->pluck('name', $args, $required),
            'topic' => $this->pluck('topic', $args, $required),
            'pushConfig' => $pushConfig,
            'ackDeadlineSeconds' => $this->pluck('ackDeadlineSeconds', $args, $required),
            'retainAckedMessages' => $this->pluck('retainAckedMessages', $args, $required),
            'messageRetentionDuration' => $this->pluck('messageRetentionDuration', $args, $required),
        ]));
    }
private function buildSubscription ( array & $ args , $ required = false ) { $ pushConfig = $ this -> pluck ( 'pushConfig' , $ args , $ required ) ; $ pushConfig = $ pushConfig ? $ this -> buildPushConfig ( $ pushConfig ) : null ; return $ this -> serializer -> decodeMessage ( new Subscription ( ) , array_filter ( [ 'name' => $ this -> pluck ( 'name' , $ args , $ required ) , 'topic' => $ this -> pluck ( 'topic' , $ args , $ required ) , 'pushConfig' => $ pushConfig , 'ackDeadlineSeconds' => $ this -> pluck ( 'ackDeadlineSeconds' , $ args , $ required ) , 'retainAckedMessages' => $ this -> pluck ( 'retainAckedMessages' , $ args , $ required ) , 'messageRetentionDuration' => $ this -> pluck ( 'messageRetentionDuration' , $ args , $ required ) , ] ) ) ; }
Create a Subscription proto message from an array of arguments.

@param array $args
@param bool $required
@return Subscription
Create a Subscription proto message from an array of arguments .