// WriteState writes a value of core.State into a key with a given marshaling function.
178510
func (d *EtcdStateDriver) WriteState(key string, value core.State,
	marshal func(interface{}) ([]byte, error)) error {
	encodedState, err := marshal(value)
	if err != nil {
		return err
	}

	return d.Write(key, encodedState)
}
325730
func (s *State) State() *states.State {
	s.mu.Lock()
	defer s.mu.Unlock()

	return s.state.DeepCopy()
}
593384
func (c *coordinator) UpdateState(s updateCoordinatorState) error {
	c.configLock.Lock()
	c.config["STATE"] = string(s)
	c.configLock.Unlock()

	return c.writeConfig()
}
1039325
func (s *SearchAvailablePhoneNumbersInput) SetState(v string) *SearchAvailablePhoneNumbersInput {
	s.State = &v
	return s
}
530611
func (s *GlobConfig) Write() error {
	key := globalConfigPath
	return s.StateDriver.WriteState(key, s, json.Marshal)
}
373677
func (s *DeleteClusterOutput) SetState(v string) *DeleteClusterOutput {
	s.State = &v
	return s
}
1308756
func SaveState(storage storage.StorageWriter, state *BootstrapState) error {
	data, err := goyaml.Marshal(state)
	if err != nil {
		return err
	}
	return putState(storage, data)
}
589937
func (s *InitiateDeviceClaimOutput) SetState(v string) *InitiateDeviceClaimOutput {
	s.State = &v
	return s
}
565354
func (s *ClusterInfo) SetState(v string) *ClusterInfo {
	s.State = &v
	return s
}
464877
func (s *InitializeClusterOutput) SetState(v string) *InitializeClusterOutput {
	s.State = &v
	return s
}
1141614
func (s *InstanceGroupDetail) SetState(v string) *InstanceGroupDetail {
	s.State = &v
	return s
}
10901
func (s *GetLifecyclePoliciesInput) SetState(v string) *GetLifecyclePoliciesInput {
	s.State = &v
	return s
}
418664
func (s *AssessmentRunStateChange) SetState(v string) *AssessmentRunStateChange {
	s.State = &v
	return s
}
559616
func makeState(arg fastLoadArg, s *keybase1.FastTeamData) *keybase1.FastTeamData {
	if s != nil {
		tmp := s.DeepCopy()
		return &tmp
	}
	return &keybase1.FastTeamData{
		PerTeamKeySeedsUnverified: make(map[keybase1.PerTeamKeyGeneration]keybase1.PerTeamKeySeed),
		ReaderKeyMasks:            make(map[keybase1.TeamApplication](map[keybase1.PerTeamKeyGeneration]keybase1.MaskB64)),
		Chain: keybase1.FastTeamSigChainState{
			ID:                      arg.ID,
			Public:                  arg.Public,
			PerTeamKeys:             make(map[keybase1.PerTeamKeyGeneration]keybase1.PerTeamKey),
			PerTeamKeySeedsVerified: make(map[keybase1.PerTeamKeyGeneration]keybase1.PerTeamKeySeed),
			DownPointers:            make(map[keybase1.Seqno]keybase1.DownPointer),
			LinkIDs:                 make(map[keybase1.Seqno]keybase1.LinkID),
			MerkleInfo:              make(map[keybase1.Seqno]keybase1.MerkleRootV2),
		},
	}
}
698818
func (s *CreateAccountStatus) SetState(v string) *CreateAccountStatus {
	s.State = &v
	return s
}
1221272
func (s *Cluster) SetState(v string) *Cluster {
	s.State = &v
	return s
}
853021
func (s *Hsm) SetState(v string) *Hsm {
	s.State = &v
	return s
}