<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/datastream/v1/datastream_resources.proto

namespace Google\Cloud\Datastream\V1\SalesforceProfile;

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

/**
 * OAuth2 Client Credentials.
 *
 * Generated from protobuf message <code>google.cloud.datastream.v1.SalesforceProfile.Oauth2ClientCredentials</code>
 */
class Oauth2ClientCredentials extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Client ID for Salesforce OAuth2 Client Credentials.
     *
     * Generated from protobuf field <code>string client_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $client_id = '';
    /**
     * Optional. Client secret for Salesforce OAuth2 Client Credentials.
     * Mutually exclusive with the `secret_manager_stored_client_secret` field.
     *
     * Generated from protobuf field <code>string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $client_secret = '';
    /**
     * Optional. A reference to a Secret Manager resource name storing the
     * Salesforce OAuth2 client_secret. Mutually exclusive with the
     * `client_secret` field.
     *
     * Generated from protobuf field <code>string secret_manager_stored_client_secret = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $secret_manager_stored_client_secret = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $client_id
     *           Required. Client ID for Salesforce OAuth2 Client Credentials.
     *     @type string $client_secret
     *           Optional. Client secret for Salesforce OAuth2 Client Credentials.
     *           Mutually exclusive with the `secret_manager_stored_client_secret` field.
     *     @type string $secret_manager_stored_client_secret
     *           Optional. A reference to a Secret Manager resource name storing the
     *           Salesforce OAuth2 client_secret. Mutually exclusive with the
     *           `client_secret` field.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Client ID for Salesforce OAuth2 Client Credentials.
     *
     * Generated from protobuf field <code>string client_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getClientId()
    {
        return $this->client_id;
    }

    /**
     * Required. Client ID for Salesforce OAuth2 Client Credentials.
     *
     * Generated from protobuf field <code>string client_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setClientId($var)
    {
        GPBUtil::checkString($var, True);
        $this->client_id = $var;

        return $this;
    }

    /**
     * Optional. Client secret for Salesforce OAuth2 Client Credentials.
     * Mutually exclusive with the `secret_manager_stored_client_secret` field.
     *
     * Generated from protobuf field <code>string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getClientSecret()
    {
        return $this->client_secret;
    }

    /**
     * Optional. Client secret for Salesforce OAuth2 Client Credentials.
     * Mutually exclusive with the `secret_manager_stored_client_secret` field.
     *
     * Generated from protobuf field <code>string client_secret = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setClientSecret($var)
    {
        GPBUtil::checkString($var, True);
        $this->client_secret = $var;

        return $this;
    }

    /**
     * Optional. A reference to a Secret Manager resource name storing the
     * Salesforce OAuth2 client_secret. Mutually exclusive with the
     * `client_secret` field.
     *
     * Generated from protobuf field <code>string secret_manager_stored_client_secret = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getSecretManagerStoredClientSecret()
    {
        return $this->secret_manager_stored_client_secret;
    }

    /**
     * Optional. A reference to a Secret Manager resource name storing the
     * Salesforce OAuth2 client_secret. Mutually exclusive with the
     * `client_secret` field.
     *
     * Generated from protobuf field <code>string secret_manager_stored_client_secret = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setSecretManagerStoredClientSecret($var)
    {
        GPBUtil::checkString($var, True);
        $this->secret_manager_stored_client_secret = $var;

        return $this;
    }

}

