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),
        ]));
    }