The immutable purpose of this [CryptoKey][google.cloud.kms.v1.CryptoKey].

Generated from protobuf field <code>.google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose purpose = 3;</code>
@param int $var
@return $this
334185
public function setPurpose($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKey_CryptoKeyPurpose::class);
        $this->purpose = $var;

        return $this;
    }
992688
public function setHttpConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\HttpConfig::class);
        $this->http_config = $var;

        return $this;
    }
886995
public function setCloudRepo($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DevTools\Source\V1\CloudRepoSourceContext::class);
        $this->writeOneof(1, $var);

        return $this;
    }
305412
public function setBlocks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Vision\V1\Block::class);
        $this->blocks = $arr;

        return $this;
    }
319906
public function setEncodingType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Language\V1\EncodingType::class);
        $this->encoding_type = $var;

        return $this;
    }
332902
public function setKmsWrapped($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\KmsWrappedCryptoKey::class);
        $this->writeOneof(3, $var);

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

        return $this;
    }
797287
public function setSpoof($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\VideoIntelligence\V1beta1\Likelihood::class);
        $this->spoof = $var;

        return $this;
    }
446757
public function setPayload($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AutoMl\V1beta1\AnnotationPayload::class);
        $this->payload = $arr;

        return $this;
    }
208085
public function setAction($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Container\V1\SetMasterAuthRequest_Action::class);
        $this->action = $var;

        return $this;
    }
1044781
public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion_CryptoKeyVersionState::class);
        $this->state = $var;

        return $this;
    }
416654
public function setSessions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Spanner\V1\Session::class);
        $this->sessions = $arr;

        return $this;
    }
451482
public function setSinks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogSink::class);
        $this->sinks = $arr;

        return $this;
    }
256893
public function setInventors($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->inventors = $arr;

        return $this;
    }
186092
public function setMessages($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\PubSub\V1\PubsubMessage::class);
        $this->messages = $arr;

        return $this;
    }
84183
public function setGroup($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\Group::class);
        $this->group = $arr;

        return $this;
    }
770560
public function setOriginServerCerts($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES);
        $this->origin_server_certs = $arr;

        return $this;
    }