// ServiceAccounts mocks base method
549068
func (m *MockCoreV1Interface) ServiceAccounts(arg0 string) v11.ServiceAccountInterface {
	ret := m.ctrl.Call(m, "ServiceAccounts", arg0)
	ret0, _ := ret[0].(v11.ServiceAccountInterface)
	return ret0
}
252604
func (l *Client) GetAccounts() ([]*Account, error) {
	res := ApiResp{}
	var data []*Account

	// make the request
	err := l.Get(accountListEndpoint, nil, nil, &res, &data)
	if err != nil {
		return data, err
	}

	return data, nil
}
829901
func (s *GetCallerIdentityOutput) SetAccount(v string) *GetCallerIdentityOutput {
	s.Account = &v
	return s
}
193312
func (o SecretOptions) GetServiceAccount() (*corev1.ServiceAccount, error) {
	r := o.BuilderFunc().
		WithScheme(scheme.Scheme, scheme.Scheme.PrioritizedVersionsAllGroups()...).
		NamespaceParam(o.Namespace).
		ResourceNames("serviceaccounts", o.TargetName).
		SingleResourceType().
		Do()
	if r.Err() != nil {
		return nil, r.Err()
	}
	obj, err := r.Object()
	if err != nil {
		return nil, err
	}

	switch t := obj.(type) {
	case *corev1.ServiceAccount:
		return t, nil
	default:
		return nil, fmt.Errorf("unhandled object: %#v", t)
	}
}
1005780
func (s *Server) LookupAccount(name string) (*Account, error) {
	return s.lookupAccount(name)
}
338433
func RegisterAccountServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
	return RegisterAccountServiceHandlerClient(ctx, mux, NewAccountServiceClient(conn))
}
163284
func (s *CreateStackInstancesInput) SetAccounts(v []*string) *CreateStackInstancesInput {
	s.Accounts = v
	return s
}
196656
func (self *realKubeFramework) CreateServiceAccount(sa *v1.ServiceAccount) error {
	_, err := self.kubeClient.CoreV1().ServiceAccounts(sa.Namespace).Create(sa)
	return err
}
795517
func ValidateServiceAccount(serviceAccount *api.ServiceAccount) validation.ErrorList {
	allErrs := ValidateObjectMeta(&serviceAccount.ObjectMeta, true, ValidateServiceAccountName, validation.NewFieldPath("metadata"))
	return allErrs
}
238677
func (l *Client) GetAccount(id string) (Account, error) {
	res := ApiResp{}
	data := Account{}

	// make the request
	err := l.Get(parseLyticsURL(accountEndpoint, map[string]string{"id": id}), nil, nil, &res, &data)
	if err != nil {
		return data, err
	}

	return data, nil
}
780898
func (s *StackInstance) SetAccount(v string) *StackInstance {
	s.Account = &v
	return s
}
814844
func SigningAccounts(concretePrivateAccounts []*PrivateAccount) []AddressableSigner {
	signingAccounts := make([]AddressableSigner, len(concretePrivateAccounts))
	for i, cpa := range concretePrivateAccounts {
		signingAccounts[i] = cpa
	}
	return signingAccounts
}
1300175
func Convert_v1_ServiceAccountList_To_core_ServiceAccountList(in *v1.ServiceAccountList, out *core.ServiceAccountList, s conversion.Scope) error {
	return autoConvert_v1_ServiceAccountList_To_core_ServiceAccountList(in, out, s)
}
850902
func CreateServiceAccount(
	clientset kubernetes.Interface,
	serviceAccountName string,
	namespace string,
) error {
	serviceAccount := apiv1.ServiceAccount{
		TypeMeta: metav1.TypeMeta{
			APIVersion: "v1",
			Kind:       "ServiceAccount",
		},
		ObjectMeta: metav1.ObjectMeta{
			Name:      serviceAccountName,
			Namespace: namespace,
		},
	}
	_, err := clientset.CoreV1().ServiceAccounts(namespace).Create(&serviceAccount)
	if err != nil {
		if !apierr.IsAlreadyExists(err) {
			return fmt.Errorf("Failed to create service account %q: %v", serviceAccountName, err)
		}
		log.Infof("ServiceAccount %q already exists", serviceAccountName)
		return nil
	}
	log.Infof("ServiceAccount %q created", serviceAccountName)
	return nil
}
455373
func (s *serviceAccount) getServiceAccountTokens(serviceAccount *corev1.ServiceAccount) ([]*corev1.Secret, error) {
	secrets, err := s.secretLister.Secrets(serviceAccount.Namespace).List(labels.Everything())
	if err != nil {
		return nil, err
	}

	tokens := []*corev1.Secret{}

	for _, secret := range secrets {
		if secret.Type != corev1.SecretTypeServiceAccountToken {
			continue
		}

		if serviceaccount.IsServiceAccountToken(secret, serviceAccount) {
			tokens = append(tokens, secret)
		}
	}
	return tokens, nil
}
8129
func (a *Account) numServiceRoutes() int {
	a.mu.RLock()
	defer a.mu.RUnlock()
	return len(a.imports.services)
}
393770
func (m *MockLambdaAPI) GetAccountSettingsRequest(arg0 *lambda.GetAccountSettingsInput) (*request.Request, *lambda.GetAccountSettingsOutput) {
	ret := m.ctrl.Call(m, "GetAccountSettingsRequest", arg0)
	ret0, _ := ret[0].(*request.Request)
	ret1, _ := ret[1].(*lambda.GetAccountSettingsOutput)
	return ret0, ret1
}