// SetAddresses updates storage with new address list
342523
func (fs *FileAddrStorage) SetAddresses(addrs []NetAddr) error {
	bytes, err := json.Marshal(addrs)
	if err != nil {
		return trace.Wrap(err)
	}
	err = ioutil.WriteFile(fs.filePath, bytes, 0666)
	if err != nil {
		log.Error(err)
		return trace.ConvertSystemError(err)
	}
	return nil
}
63107
func (s *SearchAddressBooksOutput) SetAddressBooks(v []*AddressBookData) *SearchAddressBooksOutput {
	s.AddressBooks = v
	return s
}
918341
func (s *Destination) SetToAddresses(v []*string) *Destination {
	s.ToAddresses = v
	return s
}
506716
func (m *Machine) setAddresses(machineAddresses, providerAddresses *[]network.Address) error {
	var (
		machineStateAddresses, providerStateAddresses []address
		newPrivate, newPublic                         *address
		err                                           error
	)
	machine := m
	buildTxn := func(attempt int) ([]txn.Op, error) {
		if attempt != 0 {
			if machine, err = machine.st.Machine(machine.doc.Id); err != nil {
				return nil, err
			}
		}
		var ops []txn.Op
		ops, machineStateAddresses, providerStateAddresses, newPrivate, newPublic, err = machine.setAddressesOps(
			machineAddresses, providerAddresses,
		)
		if err != nil {
			return nil, err
		}
		return ops, nil
	}
	if err := m.st.db().Run(buildTxn); err != nil {
		return errors.Trace(err)
	}

	m.doc.MachineAddresses = machineStateAddresses
	m.doc.Addresses = providerStateAddresses
	if newPrivate != nil {
		oldPrivate := m.doc.PreferredPrivateAddress.networkAddress()
		m.doc.PreferredPrivateAddress = *newPrivate
		logger.Infof(
			"machine %q preferred private address changed from %q to %q",
			m.Id(), oldPrivate, newPrivate.networkAddress(),
		)
	}
	if newPublic != nil {
		oldPublic := m.doc.PreferredPublicAddress.networkAddress()
		m.doc.PreferredPublicAddress = *newPublic
		logger.Infof(
			"machine %q preferred public address changed from %q to %q",
			m.Id(), oldPublic, newPublic.networkAddress(),
		)
	}
	return nil
}
436068
func (s *ListResolverEndpointIpAddressesOutput) SetIpAddresses(v []*IpAddressResponse) *ListResolverEndpointIpAddressesOutput {
	s.IpAddresses = v
	return s
}
868284
func (s *AddressBookData) SetAddressBookArn(v string) *AddressBookData {
	s.AddressBookArn = &v
	return s
}
798703
func (s *UpdateJobInput) SetAddressId(v string) *UpdateJobInput {
	s.AddressId = &v
	return s
}
988114
func (s *Device) SetMacAddress(v string) *Device {
	s.MacAddress = &v
	return s
}
365622
func (s *CreateConditionalForwarderInput) SetDnsIpAddrs(v []*string) *CreateConditionalForwarderInput {
	s.DnsIpAddrs = v
	return s
}
1109434
func (s *AddressBook) SetAddressBookArn(v string) *AddressBook {
	s.AddressBookArn = &v
	return s
}
1070242
func (s *BrokerInstance) SetIpAddress(v string) *BrokerInstance {
	s.IpAddress = &v
	return s
}
1218562
func (s *Subscriber) SetAddress(v string) *Subscriber {
	s.Address = &v
	return s
}
302409
func (s *EndpointBatchItem) SetAddress(v string) *EndpointBatchItem {
	s.Address = &v
	return s
}
1289034
func (s *Connector) SetMacAddress(v string) *Connector {
	s.MacAddress = &v
	return s
}
1190748
func (s *UpdateProfileInput) SetAddress(v string) *UpdateProfileInput {
	s.Address = &v
	return s
}
687771
func (s *ContactDetail) SetAddressLine2(v string) *ContactDetail {
	s.AddressLine2 = &v
	return s
}
372847
func (s *ContextDataType) SetIpAddress(v string) *ContextDataType {
	s.IpAddress = &v
	return s
}