// SetStaticTokens sets the list of static tokens used to provision nodes.
168024
func (s *ClusterConfigurationService) SetStaticTokens(c services.StaticTokens) error {
	value, err := services.GetStaticTokensMarshaler().Marshal(c)
	if err != nil {
		return trace.Wrap(err)
	}
	_, err = s.Put(context.TODO(), backend.Item{
		Key:     backend.Key(clusterConfigPrefix, staticTokensPrefix),
		Value:   value,
		Expires: c.Expiry(),
		ID:      c.GetResourceID(),
	})
	if err != nil {
		return trace.Wrap(err)
	}

	return nil
}
581588
func (s *ClusterConfigurationService) GetStaticTokens() (services.StaticTokens, error) {
	item, err := s.Get(context.TODO(), backend.Key(clusterConfigPrefix, staticTokensPrefix))
	if err != nil {
		if trace.IsNotFound(err) {
			return nil, trace.NotFound("static tokens not found")
		}
		return nil, trace.Wrap(err)
	}
	return services.GetStaticTokensMarshaler().Unmarshal(item.Value,
		services.WithResourceID(item.ID), services.WithExpires(item.Expires))
}
1155006
func (s *GetRelationalDatabaseMetricDataInput) SetStatistics(v []*string) *GetRelationalDatabaseMetricDataInput {
	s.Statistics = v
	return s
}
6475
func (s *EntityFilter) SetStatusCodes(v []*string) *EntityFilter {
	s.StatusCodes = v
	return s
}
491355
func (s *StackInstance) SetStatus(v string) *StackInstance {
	s.Status = &v
	return s
}
658269
func (s *AssociationDescription) SetStatus(v *AssociationStatus) *AssociationDescription {
	s.Status = v
	return s
}
552426
func (s *RegisterDeviceInput) SetToken(v string) *RegisterDeviceInput {
	s.Token = &v
	return s
}
411545
func (s *QueryExecution) SetStatistics(v *QueryExecutionStatistics) *QueryExecution {
	s.Statistics = v
	return s
}
1119880
func (s *CreateDBClusterEndpointOutput) SetStaticMembers(v []*string) *CreateDBClusterEndpointOutput {
	s.StaticMembers = v
	return s
}
688847
func (s *ConfirmSubscriptionInput) SetToken(v string) *ConfirmSubscriptionInput {
	s.Token = &v
	return s
}
200134
func NewStaticTokens(spec StaticTokensSpecV2) (StaticTokens, error) {
	st := StaticTokensV2{
		Kind:    KindStaticTokens,
		Version: V2,
		Metadata: Metadata{
			Name:      MetaNameStaticTokens,
			Namespace: defaults.Namespace,
		},
		Spec: spec,
	}
	if err := st.CheckAndSetDefaults(); err != nil {
		return nil, trace.Wrap(err)
	}

	return &st, nil
}
854737
func (s *DisassociateNodeOutput) SetNodeAssociationStatusToken(v string) *DisassociateNodeOutput {
	s.NodeAssociationStatusToken = &v
	return s
}
178769
func (a *AuthWithRoles) SetStaticTokens(s services.StaticTokens) error {
	if err := a.action(defaults.Namespace, services.KindStaticTokens, services.VerbCreate); err != nil {
		return trace.Wrap(err)
	}
	if err := a.action(defaults.Namespace, services.KindStaticTokens, services.VerbUpdate); err != nil {
		return trace.Wrap(err)
	}
	return a.authServer.SetStaticTokens(s)
}
645018
func (s *SalesforceAction) SetToken(v string) *SalesforceAction {
	s.Token = &v
	return s
}
764755
func (s *NodeGroup) SetStatus(v string) *NodeGroup {
	s.Status = &v
	return s
}
1348772
func (s *GetStaticIpOutput) SetStaticIp(v *StaticIp) *GetStaticIpOutput {
	s.StaticIp = v
	return s
}
1268734
func (s *CreateAuthorizerInput) SetTokenSigningPublicKeys(v map[string]*string) *CreateAuthorizerInput {
	s.TokenSigningPublicKeys = v
	return s
}