<?php

# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/api/auth.proto
namespace SEOPressPro\Vendor\Google\Api;

use SEOPressPro\Vendor\Google\Protobuf\Internal\GPBType;
use SEOPressPro\Vendor\Google\Protobuf\Internal\RepeatedField;
use SEOPressPro\Vendor\Google\Protobuf\Internal\GPBUtil;
/**
 * Configuration for an authentication provider, including support for
 * [JSON Web Token
 * (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
 *
 * Generated from protobuf message <code>google.api.AuthProvider</code>
 */
class AuthProvider extends \SEOPressPro\Vendor\Google\Protobuf\Internal\Message
{
    /**
     * The unique identifier of the auth provider. It will be referred to by
     * `AuthRequirement.provider_id`.
     * Example: "bookstore_auth".
     *
     * Generated from protobuf field <code>string id = 1;</code>
     */
    protected $id = '';
    /**
     * Identifies the principal that issued the JWT. See
     * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
     * Usually a URL or an email address.
     * Example: https://securetoken.google.com
     * Example: 1234567-compute&#64;developer.gserviceaccount.com
     *
     * Generated from protobuf field <code>string issuer = 2;</code>
     */
    protected $issuer = '';
    /**
     * URL of the provider's public key set to validate signature of the JWT. See
     * [OpenID
     * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
     * Optional if the key set document:
     *  - can be retrieved from
     *    [OpenID
     *    Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
     *    of the issuer.
     *  - can be inferred from the email domain of the issuer (e.g. a Google
     *  service account).
     * Example: https://www.googleapis.com/oauth2/v1/certs
     *
     * Generated from protobuf field <code>string jwks_uri = 3;</code>
     */
    protected $jwks_uri = '';
    /**
     * The list of JWT
     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
     * that are allowed to access. A JWT containing any of these audiences will
     * be accepted. When this setting is absent, JWTs with audiences:
     *   - "https://[service.name]/[google.protobuf.Api.name]"
     *   - "https://[service.name]/"
     * will be accepted.
     * For example, if no audiences are in the setting, LibraryService API will
     * accept JWTs with the following audiences:
     *   -
     *   https://library-example.googleapis.com/google.example.library.v1.LibraryService
     *   - https://library-example.googleapis.com/
     * Example:
     *     audiences: bookstore_android.apps.googleusercontent.com,
     *                bookstore_web.apps.googleusercontent.com
     *
     * Generated from protobuf field <code>string audiences = 4;</code>
     */
    protected $audiences = '';
    /**
     * Redirect URL if JWT token is required but not present or is expired.
     * Implement authorizationUrl of securityDefinitions in OpenAPI spec.
     *
     * Generated from protobuf field <code>string authorization_url = 5;</code>
     */
    protected $authorization_url = '';
    /**
     * Defines the locations to extract the JWT.  For now it is only used by the
     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
     * JWT locations can be one of HTTP headers, URL query parameters or
     * cookies. The rule is that the first match wins.
     * If not specified,  default to use following 3 locations:
     *    1) Authorization: Bearer
     *    2) x-goog-iap-jwt-assertion
     *    3) access_token query parameter
     * Default locations can be specified as followings:
     *    jwt_locations:
     *    - header: Authorization
     *      value_prefix: "Bearer "
     *    - header: x-goog-iap-jwt-assertion
     *    - query: access_token
     *
     * Generated from protobuf field <code>repeated .google.api.JwtLocation jwt_locations = 6;</code>
     */
    private $jwt_locations;
    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           The unique identifier of the auth provider. It will be referred to by
     *           `AuthRequirement.provider_id`.
     *           Example: "bookstore_auth".
     *     @type string $issuer
     *           Identifies the principal that issued the JWT. See
     *           https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
     *           Usually a URL or an email address.
     *           Example: https://securetoken.google.com
     *           Example: 1234567-compute&#64;developer.gserviceaccount.com
     *     @type string $jwks_uri
     *           URL of the provider's public key set to validate signature of the JWT. See
     *           [OpenID
     *           Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
     *           Optional if the key set document:
     *            - can be retrieved from
     *              [OpenID
     *              Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
     *              of the issuer.
     *            - can be inferred from the email domain of the issuer (e.g. a Google
     *            service account).
     *           Example: https://www.googleapis.com/oauth2/v1/certs
     *     @type string $audiences
     *           The list of JWT
     *           [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
     *           that are allowed to access. A JWT containing any of these audiences will
     *           be accepted. When this setting is absent, JWTs with audiences:
     *             - "https://[service.name]/[google.protobuf.Api.name]"
     *             - "https://[service.name]/"
     *           will be accepted.
     *           For example, if no audiences are in the setting, LibraryService API will
     *           accept JWTs with the following audiences:
     *             -
     *             https://library-example.googleapis.com/google.example.library.v1.LibraryService
     *             - https://library-example.googleapis.com/
     *           Example:
     *               audiences: bookstore_android.apps.googleusercontent.com,
     *                          bookstore_web.apps.googleusercontent.com
     *     @type string $authorization_url
     *           Redirect URL if JWT token is required but not present or is expired.
     *           Implement authorizationUrl of securityDefinitions in OpenAPI spec.
     *     @type array<\Google\Api\JwtLocation>|\Google\Protobuf\Internal\RepeatedField $jwt_locations
     *           Defines the locations to extract the JWT.  For now it is only used by the
     *           Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
     *           (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
     *           JWT locations can be one of HTTP headers, URL query parameters or
     *           cookies. The rule is that the first match wins.
     *           If not specified,  default to use following 3 locations:
     *              1) Authorization: Bearer
     *              2) x-goog-iap-jwt-assertion
     *              3) access_token query parameter
     *           Default locations can be specified as followings:
     *              jwt_locations:
     *              - header: Authorization
     *                value_prefix: "Bearer "
     *              - header: x-goog-iap-jwt-assertion
     *              - query: access_token
     * }
     */
    public function __construct($data = NULL)
    {
        \SEOPressPro\Vendor\GPBMetadata\Google\Api\Auth::initOnce();
        parent::__construct($data);
    }
    /**
     * The unique identifier of the auth provider. It will be referred to by
     * `AuthRequirement.provider_id`.
     * Example: "bookstore_auth".
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }
    /**
     * The unique identifier of the auth provider. It will be referred to by
     * `AuthRequirement.provider_id`.
     * Example: "bookstore_auth".
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;
        return $this;
    }
    /**
     * Identifies the principal that issued the JWT. See
     * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
     * Usually a URL or an email address.
     * Example: https://securetoken.google.com
     * Example: 1234567-compute&#64;developer.gserviceaccount.com
     *
     * Generated from protobuf field <code>string issuer = 2;</code>
     * @return string
     */
    public function getIssuer()
    {
        return $this->issuer;
    }
    /**
     * Identifies the principal that issued the JWT. See
     * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
     * Usually a URL or an email address.
     * Example: https://securetoken.google.com
     * Example: 1234567-compute&#64;developer.gserviceaccount.com
     *
     * Generated from protobuf field <code>string issuer = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setIssuer($var)
    {
        GPBUtil::checkString($var, True);
        $this->issuer = $var;
        return $this;
    }
    /**
     * URL of the provider's public key set to validate signature of the JWT. See
     * [OpenID
     * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
     * Optional if the key set document:
     *  - can be retrieved from
     *    [OpenID
     *    Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
     *    of the issuer.
     *  - can be inferred from the email domain of the issuer (e.g. a Google
     *  service account).
     * Example: https://www.googleapis.com/oauth2/v1/certs
     *
     * Generated from protobuf field <code>string jwks_uri = 3;</code>
     * @return string
     */
    public function getJwksUri()
    {
        return $this->jwks_uri;
    }
    /**
     * URL of the provider's public key set to validate signature of the JWT. See
     * [OpenID
     * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
     * Optional if the key set document:
     *  - can be retrieved from
     *    [OpenID
     *    Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html)
     *    of the issuer.
     *  - can be inferred from the email domain of the issuer (e.g. a Google
     *  service account).
     * Example: https://www.googleapis.com/oauth2/v1/certs
     *
     * Generated from protobuf field <code>string jwks_uri = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setJwksUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->jwks_uri = $var;
        return $this;
    }
    /**
     * The list of JWT
     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
     * that are allowed to access. A JWT containing any of these audiences will
     * be accepted. When this setting is absent, JWTs with audiences:
     *   - "https://[service.name]/[google.protobuf.Api.name]"
     *   - "https://[service.name]/"
     * will be accepted.
     * For example, if no audiences are in the setting, LibraryService API will
     * accept JWTs with the following audiences:
     *   -
     *   https://library-example.googleapis.com/google.example.library.v1.LibraryService
     *   - https://library-example.googleapis.com/
     * Example:
     *     audiences: bookstore_android.apps.googleusercontent.com,
     *                bookstore_web.apps.googleusercontent.com
     *
     * Generated from protobuf field <code>string audiences = 4;</code>
     * @return string
     */
    public function getAudiences()
    {
        return $this->audiences;
    }
    /**
     * The list of JWT
     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
     * that are allowed to access. A JWT containing any of these audiences will
     * be accepted. When this setting is absent, JWTs with audiences:
     *   - "https://[service.name]/[google.protobuf.Api.name]"
     *   - "https://[service.name]/"
     * will be accepted.
     * For example, if no audiences are in the setting, LibraryService API will
     * accept JWTs with the following audiences:
     *   -
     *   https://library-example.googleapis.com/google.example.library.v1.LibraryService
     *   - https://library-example.googleapis.com/
     * Example:
     *     audiences: bookstore_android.apps.googleusercontent.com,
     *                bookstore_web.apps.googleusercontent.com
     *
     * Generated from protobuf field <code>string audiences = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setAudiences($var)
    {
        GPBUtil::checkString($var, True);
        $this->audiences = $var;
        return $this;
    }
    /**
     * Redirect URL if JWT token is required but not present or is expired.
     * Implement authorizationUrl of securityDefinitions in OpenAPI spec.
     *
     * Generated from protobuf field <code>string authorization_url = 5;</code>
     * @return string
     */
    public function getAuthorizationUrl()
    {
        return $this->authorization_url;
    }
    /**
     * Redirect URL if JWT token is required but not present or is expired.
     * Implement authorizationUrl of securityDefinitions in OpenAPI spec.
     *
     * Generated from protobuf field <code>string authorization_url = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setAuthorizationUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->authorization_url = $var;
        return $this;
    }
    /**
     * Defines the locations to extract the JWT.  For now it is only used by the
     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
     * JWT locations can be one of HTTP headers, URL query parameters or
     * cookies. The rule is that the first match wins.
     * If not specified,  default to use following 3 locations:
     *    1) Authorization: Bearer
     *    2) x-goog-iap-jwt-assertion
     *    3) access_token query parameter
     * Default locations can be specified as followings:
     *    jwt_locations:
     *    - header: Authorization
     *      value_prefix: "Bearer "
     *    - header: x-goog-iap-jwt-assertion
     *    - query: access_token
     *
     * Generated from protobuf field <code>repeated .google.api.JwtLocation jwt_locations = 6;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getJwtLocations()
    {
        return $this->jwt_locations;
    }
    /**
     * Defines the locations to extract the JWT.  For now it is only used by the
     * Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations]
     * (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations)
     * JWT locations can be one of HTTP headers, URL query parameters or
     * cookies. The rule is that the first match wins.
     * If not specified,  default to use following 3 locations:
     *    1) Authorization: Bearer
     *    2) x-goog-iap-jwt-assertion
     *    3) access_token query parameter
     * Default locations can be specified as followings:
     *    jwt_locations:
     *    - header: Authorization
     *      value_prefix: "Bearer "
     *    - header: x-goog-iap-jwt-assertion
     *    - query: access_token
     *
     * Generated from protobuf field <code>repeated .google.api.JwtLocation jwt_locations = 6;</code>
     * @param array<\Google\Api\JwtLocation>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setJwtLocations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \SEOPressPro\Vendor\Google\Protobuf\Internal\GPBType::MESSAGE, \SEOPressPro\Vendor\Google\Api\JwtLocation::class);
        $this->jwt_locations = $arr;
        return $this;
    }
}
