// SetApiKey sets the ApiKey field's value.
962165
func (s *UpdateApiKeyOutput) SetApiKey(v *ApiKey) *UpdateApiKeyOutput {
	s.ApiKey = v
	return s
}
343985
func (s *ListApiKeysOutput) SetApiKeys(v []*ApiKey) *ListApiKeysOutput {
	s.ApiKeys = v
	return s
}
399442
func (s *GetModelsInput) SetApiId(v string) *GetModelsInput {
	s.ApiId = &v
	return s
}
230981
func (s *UpdateApiKeyInput) SetApiKey(v string) *UpdateApiKeyInput {
	s.ApiKey = &v
	return s
}
1324304
func (s *UpdateApiMappingOutput) SetApiId(v string) *UpdateApiMappingOutput {
	s.ApiId = &v
	return s
}
540939
func (apiM ApiManager) verifyAPIKey(verifyApiKeyReq VerifyApiKeyRequest) (*VerifyApiKeySuccessResponse, *common.ErrorResponse) {

	dataWrapper := VerifyApiKeyRequestResponseDataWrapper{
		verifyApiKeyRequest: verifyApiKeyReq,
	}
	dataWrapper.verifyApiKeySuccessResponse.ClientId.ClientId = verifyApiKeyReq.Key
	dataWrapper.verifyApiKeySuccessResponse.Environment = verifyApiKeyReq.EnvironmentName

	err := apiM.DbMan.getApiKeyDetails(&dataWrapper)

	switch {
	case err != nil && err.Error() == "InvalidApiKey":
		reason := "API Key verify failed for (" + verifyApiKeyReq.Key + ", " + verifyApiKeyReq.OrganizationName + ")"
		errorCode := "oauth.v2.InvalidApiKey"
		errResponse := errorResponse(reason, errorCode, http.StatusOK)
		return nil, &errResponse

	case err != nil:
		reason := err.Error()
		errorCode := "SEARCH_INTERNAL_ERROR"
		errResponse := errorResponse(reason, errorCode, http.StatusInternalServerError)
		return nil, &errResponse
	}

	dataWrapper.verifyApiKeySuccessResponse.ApiProduct = shortListApiProduct(dataWrapper.apiProducts, verifyApiKeyReq)
	/*
	 * Perform all validations
	 */
	errResponse := apiM.performValidations(dataWrapper)
	if errResponse != nil {
		return nil, errResponse
	}

	apiM.enrichAttributes(&dataWrapper)

	setDevOrCompanyInResponseBasedOnCtype(dataWrapper.ctype, dataWrapper.tempDeveloperDetails, &dataWrapper.verifyApiKeySuccessResponse)

	return &dataWrapper.verifyApiKeySuccessResponse, nil
}
1291977
func (c *Client) RestoreAPIKey(keyID string, opts ...interface{}) (res RestoreKeyRes, err error) {
	path := c.path("/keys/%s/restore", keyID)
	err = c.transport.Request(&res, http.MethodPost, path, nil, call.Write, opts...)
	res.wait = c.waitKeyIsAvailable(keyID)
	return
}
855501
func (s *UpdateAuthorizerInput) SetApiId(v string) *UpdateAuthorizerInput {
	s.ApiId = &v
	return s
}
192872
func (s *DeleteApiInput) SetApiId(v string) *DeleteApiInput {
	s.ApiId = &v
	return s
}
1164213
func (s *GetAuthorizerInput) SetApiId(v string) *GetAuthorizerInput {
	s.ApiId = &v
	return s
}
571273
func (s *Api) SetApiKeySelectionExpression(v string) *Api {
	s.ApiKeySelectionExpression = &v
	return s
}
236386
func (s *DeleteModelInput) SetApiId(v string) *DeleteModelInput {
	s.ApiId = &v
	return s
}
472332
func (s *UpdateDeploymentInput) SetApiId(v string) *UpdateDeploymentInput {
	s.ApiId = &v
	return s
}
1008640
func (s *CreateApiInput) SetApiKeySelectionExpression(v string) *CreateApiInput {
	s.ApiKeySelectionExpression = &v
	return s
}
1039742
func (s *ListFunctionsInput) SetApiId(v string) *ListFunctionsInput {
	s.ApiId = &v
	return s
}
1324380
func (s *UpdateModelInput) SetApiId(v string) *UpdateModelInput {
	s.ApiId = &v
	return s
}
877382
func (s *DeleteDataSourceInput) SetApiId(v string) *DeleteDataSourceInput {
	s.ApiId = &v
	return s
}