ErrorReporting/src/V1beta1/ErrorEvent.php
public function setServiceContext($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class);
        $this->service_context = $var;

        return $this;
    }
public function setServiceContext($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class);
        $this->service_context = $var;

        return $this;
    }
public function setServiceContext ( $ var ) { GPBUtil :: checkMessage ( $ var , \ Google \ Cloud \ ErrorReporting \ V1beta1 \ ServiceContext :: class ) ; $ this -> service_context = $ var ; return $ this ; }
The `ServiceContext` for which this error was reported.

Generated from protobuf field <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2;</code>
@param \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $var
@return $this
The ServiceContext for which this error was reported .