Sets the type of this WebAuthorization.
        The authorization scheme.  Usually this is \"Bearer\" but it could be other values like \"Token\" or \"Basic\" etc.

        :param type: The type of this WebAuthorization.
        :type: str
354823
def type(self, type):
        
        if type is None:
            raise ValueError("Invalid value for `type`, must not be `None`")
        if type is not None and len(type) > 50:
            raise ValueError("Invalid value for `type`, length must be less than or equal to `50`")
        if type is not None and not re.search('[\\x21-\\x7E \\t]*', type):
            raise ValueError("Invalid value for `type`, must be a follow pattern or equal to `/[\\x21-\\x7E \\t]*/`")

        self._type = type
1160429
private void handleAuthenticationType(final Object authenticationType) {
		if (request != null) {
			if (authenticationType != null) {
				// be defensive
				if (!(authenticationType instanceof String)) {
					final String message = "Attribute "
							+ HttpContext.AUTHENTICATION_TYPE
							+ " expected to be a String but was an ["
							+ authenticationType.getClass() + "]";
					LOG.error(message);
					throw new IllegalArgumentException(message);
				}
			}
			getOsgiAuth().setAuthMethod((String) authenticationType);
		} else {
			LOG.warn("Authentication type cannot be set to "
					+ authenticationType
					+ ". HttpService specific authentication is disabled because the ServletRequest object cannot be used: "
					+ "Expected to be an instance of "
					+ Request.class.getName() + " but got "
					+ originalRequest.getClass().getName() + ".");
		}
	}
1187847
public void setType(BusItineraryHaltType type) {
		if (type != null && type != this.type) {
			this.type = type;
			firePrimitiveChanged();
		}
	}
725749
void setPrincipal(int type, String principalName) {

        m_rpc.setPrincipal(type, principalName);
        // forcing the RPC to be executed immediately
        getConnection().getHeartbeat().send();
    }
21398
def token(cls: Type[SIGType], pubkey: str) -> SIGType:
        
        sig = cls()
        sig.pubkey = pubkey
        return sig
614095
protected void setPrincipal(int type, String principalName) {

        m_principalName.setValue(principalName);

        String typeName = null;
        switch (type) {
            case 0:
                typeName = I_CmsPrincipal.PRINCIPAL_GROUP;
                break;
            case 1:
            default:
                typeName = I_CmsPrincipal.PRINCIPAL_USER;
                break;
        }
        if (typeName != null) {
            m_principalTypeSelect.setValue(typeName);
        }
    }
445053
def type(self, type):
        # pylint: disable=redefined-builtin
        """"""

        type = _ensure_unicode(type)

        # We perform this check after the initialization to avoid errors
        # in test tools that show the object with repr().
        if type not in ALL_CIMTYPES:
            raise ValueError(
                _format("Invalid CIM type: {0}", type))

        # pylint: disable=attribute-defined-outside-init
        self._type = type
167581
def set_token(self, token):
        

        self.token = token

        self.set_header(
            'Authorization',
            "Bearer {}".format(token)
        )
496835
func (s *Method) SetAuthorizationType(v string) *Method {
	s.AuthorizationType = &v
	return s
}
983888
public void setType(String type) throws PageException {
	if (type == null) return;
	try {
	    this.type = toType(type);
	}
	catch (SearchException e) {
	    throw Caster.toPageException(e);
	}
    }
78908
public function setType($type)
    {
        if ($type instanceof PagSeguroPaymentMethodType) {
            $this->type = $type;
        } else {
            $this->type = new PagSeguroPaymentMethodType($type);
        }
    }
407461
public void setType(String type) throws ApplicationException {
	if (StringUtil.isEmpty(type, true)) return;
	type = type.toLowerCase().trim();

	if (type.equals("url")) param.setType(HttpParamBean.TYPE_URL);
	else if (type.equals("formfield") || type.equals("form")) param.setType(HttpParamBean.TYPE_FORM);
	else if (type.equals("cgi")) param.setType(HttpParamBean.TYPE_CGI);
	else if (type.startsWith("head") || type.startsWith("header")) param.setType(HttpParamBean.TYPE_HEADER);
	else if (type.equals("cookie")) param.setType(HttpParamBean.TYPE_COOKIE);
	else if (type.equals("file")) param.setType(HttpParamBean.TYPE_FILE);
	else if (type.equals("xml")) param.setType(HttpParamBean.TYPE_XML);
	else if (type.equals("body")) param.setType(HttpParamBean.TYPE_BODY);
	else throw new ApplicationException("invalid type [" + type + "], valid types are [body,cgi,cookie,file,form,head,url,xml]");
    }
947030
public void setCostType(com.google.api.ads.admanager.axis.v201902.CostType costType) {
        this.costType = costType;
    }
277956
@XmlElement(name = "authentication-mechanism-type", required = true)
    public void setAuthenticationMechanismType(String authMech) {
        AuthenticationMechanismType type = AuthenticationMechanismType.valueOf(authMech);
        authenticationMechanismType = type.name();
    }
1177456
@SuppressWarnings("WeakerAccess")
  public CreateInstanceRequest setType(@Nonnull Instance.Type type) {
    Preconditions.checkNotNull(type);
    Preconditions.checkArgument(type != Instance.Type.UNRECOGNIZED, "Type is unrecognized");
    builder.getInstanceBuilder().setType(type.toProto());
    return this;
  }
388353
function setType(object, type) {
    Object.defineProperty(object, '_ethersType', { configurable: false, value: type, writable: false });
}
521154
public void setParameterType(String type) {
		String typeName;
		if (Strings.isEmpty(type)) {
			typeName = Object.class.getName();
		} else {
			typeName = type;
		}
		this.parameter.setParameterType(newTypeRef(this.context, typeName));
	}