// SetUploadId sets the UploadId field's value.
346597
func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput {
	s.UploadId = &v
	return s
}
1173161
func (s *CreateUploadOutput) SetUpload(v *Upload) *CreateUploadOutput {
	s.Upload = v
	return s
}
1315150
func (s *Distribution) SetId(v string) *Distribution {
	s.Id = &v
	return s
}
123546
func (s *Deployment) SetId(v string) *Deployment {
	s.Id = &v
	return s
}
369689
func (s *RestApi) SetId(v string) *RestApi {
	s.Id = &v
	return s
}
566212
func (s *HostedZone) SetId(v string) *HostedZone {
	s.Id = &v
	return s
}
1265986
func (s *ListUpdatesOutput) SetUpdateIds(v []*string) *ListUpdatesOutput {
	s.UpdateIds = v
	return s
}
307408
func (s *ResourceMetadata) SetId(v string) *ResourceMetadata {
	s.Id = &v
	return s
}
1125951
func (s *UploadMetadata) SetUploadUrl(v string) *UploadMetadata {
	s.UploadUrl = &v
	return s
}
505199
func (s *Logger) SetId(v string) *Logger {
	s.Id = &v
	return s
}
281815
func (s *ProvisionedProductDetail) SetId(v string) *ProvisionedProductDetail {
	s.Id = &v
	return s
}
1075586
func (s *Initiator) SetID(v string) *Initiator {
	s.ID = &v
	return s
}
1288728
func (s *InitiateLayerUploadOutput) SetUploadId(v string) *InitiateLayerUploadOutput {
	s.UploadId = &v
	return s
}
709149
func (s *Connector) SetId(v string) *Connector {
	s.Id = &v
	return s
}
1272447
func (s *PlatformDevice) SetId(v string) *PlatformDevice {
	s.Id = &v
	return s
}
1253701
func (a *Agent) setupNodeID(config *config.RuntimeConfig) error {
	// If they've configured a node ID manually then just use that, as
	// long as it's valid.
	if config.NodeID != "" {
		config.NodeID = types.NodeID(strings.ToLower(string(config.NodeID)))
		if _, err := uuid.ParseUUID(string(config.NodeID)); err != nil {
			return err
		}

		return nil
	}

	// For dev mode we have no filesystem access so just make one.
	if a.config.DataDir == "" {
		id, err := a.makeNodeID()
		if err != nil {
			return err
		}

		config.NodeID = types.NodeID(id)
		return nil
	}

	// Load saved state, if any. Since a user could edit this, we also
	// validate it.
	fileID := filepath.Join(config.DataDir, "node-id")
	if _, err := os.Stat(fileID); err == nil {
		rawID, err := ioutil.ReadFile(fileID)
		if err != nil {
			return err
		}

		nodeID := strings.TrimSpace(string(rawID))
		nodeID = strings.ToLower(nodeID)
		if _, err := uuid.ParseUUID(nodeID); err != nil {
			return err
		}

		config.NodeID = types.NodeID(nodeID)
	}

	// If we still don't have a valid node ID, make one.
	if config.NodeID == "" {
		id, err := a.makeNodeID()
		if err != nil {
			return err
		}
		if err := lib.EnsurePath(fileID, false); err != nil {
			return err
		}
		if err := ioutil.WriteFile(fileID, []byte(id), 0600); err != nil {
			return err
		}

		config.NodeID = types.NodeID(id)
	}
	return nil
}
410922
func (s *CompleteLayerUploadOutput) SetUploadId(v string) *CompleteLayerUploadOutput {
	s.UploadId = &v
	return s
}