<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/datamanager/v1/encryption_info.proto

namespace Google\Ads\DataManager\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Encryption information for the data being ingested.
 *
 * Generated from protobuf message <code>google.ads.datamanager.v1.EncryptionInfo</code>
 */
class EncryptionInfo extends \Google\Protobuf\Internal\Message
{
    protected $wrapped_key;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Ads\DataManager\V1\GcpWrappedKeyInfo $gcp_wrapped_key_info
     *           Google Cloud Platform wrapped key information.
     *     @type \Google\Ads\DataManager\V1\AwsWrappedKeyInfo $aws_wrapped_key_info
     *           Amazon Web Services wrapped key information.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\Datamanager\V1\EncryptionInfo::initOnce();
        parent::__construct($data);
    }

    /**
     * Google Cloud Platform wrapped key information.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.GcpWrappedKeyInfo gcp_wrapped_key_info = 1;</code>
     * @return \Google\Ads\DataManager\V1\GcpWrappedKeyInfo|null
     */
    public function getGcpWrappedKeyInfo()
    {
        return $this->readOneof(1);
    }

    public function hasGcpWrappedKeyInfo()
    {
        return $this->hasOneof(1);
    }

    /**
     * Google Cloud Platform wrapped key information.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.GcpWrappedKeyInfo gcp_wrapped_key_info = 1;</code>
     * @param \Google\Ads\DataManager\V1\GcpWrappedKeyInfo $var
     * @return $this
     */
    public function setGcpWrappedKeyInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\DataManager\V1\GcpWrappedKeyInfo::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Amazon Web Services wrapped key information.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.AwsWrappedKeyInfo aws_wrapped_key_info = 2;</code>
     * @return \Google\Ads\DataManager\V1\AwsWrappedKeyInfo|null
     */
    public function getAwsWrappedKeyInfo()
    {
        return $this->readOneof(2);
    }

    public function hasAwsWrappedKeyInfo()
    {
        return $this->hasOneof(2);
    }

    /**
     * Amazon Web Services wrapped key information.
     *
     * Generated from protobuf field <code>.google.ads.datamanager.v1.AwsWrappedKeyInfo aws_wrapped_key_info = 2;</code>
     * @param \Google\Ads\DataManager\V1\AwsWrappedKeyInfo $var
     * @return $this
     */
    public function setAwsWrappedKeyInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\DataManager\V1\AwsWrappedKeyInfo::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getWrappedKey()
    {
        return $this->whichOneof("wrapped_key");
    }

}

