// setFileMode sets the FileMode.
7404
func (t *TemplateResource) setFileMode() error {
	if t.Mode == "" {
		if !util.IsFileExist(t.Dest) {
			t.FileMode = 0644
		} else {
			fi, err := os.Stat(t.Dest)
			if err != nil {
				return err
			}
			t.FileMode = fi.Mode()
		}
	} else {
		mode, err := strconv.ParseUint(t.Mode, 0, 32)
		if err != nil {
			return err
		}
		t.FileMode = os.FileMode(mode)
	}
	return nil
}
398900
func (s *DeleteVirtualNodeOutput) SetVirtualNode(v *VirtualNodeData) *DeleteVirtualNodeOutput {
	s.VirtualNode = v
	return s
}
887400
func (s *TaskDefinition) SetIpcMode(v string) *TaskDefinition {
	s.IpcMode = &v
	return s
}
1202988
func (s *OTAUpdateFile) SetFileLocation(v *FileLocation) *OTAUpdateFile {
	s.FileLocation = v
	return s
}
1066295
func (s *MountTargetDescription) SetFileSystemId(v string) *MountTargetDescription {
	s.FileSystemId = &v
	return s
}
633703
func (s *CreateMountTargetInput) SetFileSystemId(v string) *CreateMountTargetInput {
	s.FileSystemId = &v
	return s
}
700654
func (s *TerminologyData) SetFile(v []byte) *TerminologyData {
	s.File = v
	return s
}
140823
func (s *DeleteTagsInput) SetFileSystemId(v string) *DeleteTagsInput {
	s.FileSystemId = &v
	return s
}
288459
func (s *DescribeTagsInput) SetFileSystemId(v string) *DescribeTagsInput {
	s.FileSystemId = &v
	return s
}
584470
func UpdateFileMode(fm *os.FileMode, b PermissionBits) {
	// Setuid, Setgid, and Sticky bits are not in the same position in the two bitmaks
	// So we need to set their values manually
	if b.Setuid() {
		*fm |= os.ModeSetuid
	} else {
		*fm &^= os.ModeSetuid
	}
	if b.Setgid() {
		*fm |= os.ModeSetgid
	} else {
		*fm &^= os.ModeSetgid
	}
	if b.Sticky() {
		*fm |= os.ModeSticky
	} else {
		*fm &^= os.ModeSticky
	}

	// unset bit-values that don't map to the same position in FileMode
	b.SetSetgid(false)
	b.SetSetuid(false)
	b.SetSticky(false)

	// Clear the permission bitss
	*fm &^= 0777

	// Set the permission bits
	*fm |= os.FileMode(b)
}
185001
func (s *DescribeVirtualNodeOutput) SetVirtualNode(v *VirtualNodeData) *DescribeVirtualNodeOutput {
	s.VirtualNode = v
	return s
}
574743
func (c *ConfigLocal) SetMode(mode InitMode) {
	c.lock.Lock()
	defer c.lock.Unlock()
	c.mode = mode
}
826319
func (s *GetFileInput) SetFilePath(v string) *GetFileInput {
	s.FilePath = &v
	return s
}
664087
func (s *DeleteFileOutput) SetFilePath(v string) *DeleteFileOutput {
	s.FilePath = &v
	return s
}
1199093
func (s *Service) SetServiceCode(v string) *Service {
	s.ServiceCode = &v
	return s
}
1258836
func (s *UpdateFileSystemOutput) SetFileSystemId(v string) *UpdateFileSystemOutput {
	s.FileSystemId = &v
	return s
}
709079
func (s *CreateTagsInput) SetFileSystemId(v string) *CreateTagsInput {
	s.FileSystemId = &v
	return s
}