// NewTeamFolderArchiveArg returns a new TeamFolderArchiveArg instance
330814
func NewTeamFolderArchiveArg(TeamFolderId string) *TeamFolderArchiveArg {
	s := new(TeamFolderArchiveArg)
	s.TeamFolderId = TeamFolderId
	s.ForceAsyncOff = false
	return s
}
878574
func NewTarStrategy(o *RsyncOptions) CopyStrategy {

	tarHelper := tar.New(s2ifs.NewFileSystem())
	tarHelper.SetExclusionPattern(nil)

	ignoredFlags := rsyncSpecificFlags(o)

	remoteExec := newRemoteExecutor(o)

	return &tarStrategy{
		Quiet:          o.Quiet,
		Delete:         o.Delete,
		Includes:       o.RsyncInclude,
		Excludes:       o.RsyncExclude,
		Tar:            tarHelper,
		RemoteExecutor: remoteExec,
		IgnoredFlags:   ignoredFlags,
		Flags:          tarFlagsFromOptions(o),
	}
}
681318
func NewUpdateFileMemberArgs(File string, Member *MemberSelector, AccessLevel *AccessLevel) *UpdateFileMemberArgs {
	s := new(UpdateFileMemberArgs)
	s.File = File
	s.Member = Member
	s.AccessLevel = AccessLevel
	return s
}
627821
func (up *Uploader) NewTreeUpload(dir string) *TreeUpload {
	tu := up.NewRootlessTreeUpload()
	tu.rootless = false
	tu.base = dir
	return tu
}
665787
func NewCreateFolderArg(Path string) *CreateFolderArg {
	s := new(CreateFolderArg)
	s.Path = Path
	s.Autorename = false
	return s
}
610937
func (c TeamsClient) ProfileTeamLoad(ctx context.Context, arg LoadTeamArg) (res ProfileTeamLoadRes, err error) {
	__arg := ProfileTeamLoadArg{Arg: arg}
	err = c.Cli.Call(ctx, "keybase.1.teams.profileTeamLoad", []interface{}{__arg}, &res)
	return
}
256624
func NewTeamFolderPermanentlyDeleteType(Description string) *TeamFolderPermanentlyDeleteType {
	s := new(TeamFolderPermanentlyDeleteType)
	s.Description = Description
	return s
}
1187641
func NewTarget(dependencyMap map[string]*Dependencies, targetArg string, extendFlag bool) (target Target, err error) {

	target = Target{
		initial:      []string{},
		dependencies: []string{},
	}

	initialTarget := cfg.ContainersForReference(targetArg)
	for _, c := range initialTarget {
		if includes(allowed, c) {
			target.initial = append(target.initial, c)
		}
	}

	if extendFlag {
		var (
			dependenciesSet = make(map[string]struct{})
			cascadingSeeds  = []string{}
		)
		// start from the explicitly targeted target
		for _, name := range target.initial {
			dependenciesSet[name] = struct{}{}
			cascadingSeeds = append(cascadingSeeds, name)
		}

		// Cascade until the dependency map has been fully traversed
		// according to the cascading flags.
		for len(cascadingSeeds) > 0 {
			nextCascadingSeeds := []string{}
			for _, seed := range cascadingSeeds {
				if dependencies, ok := dependencyMap[seed]; ok {
					// Queue direct dependencies if we haven't already considered them
					for _, name := range dependencies.All {
						if _, alreadyIncluded := dependenciesSet[name]; !alreadyIncluded {
							dependenciesSet[name] = struct{}{}
							nextCascadingSeeds = append(nextCascadingSeeds, name)
						}
					}
				}
			}
			cascadingSeeds = nextCascadingSeeds
		}

		for name := range dependenciesSet {
			if !includes(target.initial, name) {
				target.dependencies = append(target.dependencies, name)
			}
		}

		sort.Strings(target.dependencies)
	}

	return
}
1021156
func NewTeamMergeFromType(Description string) *TeamMergeFromType {
	s := new(TeamMergeFromType)
	s.Description = Description
	return s
}
1199538
func NewCreateFolderResult(Metadata *FolderMetadata) *CreateFolderResult {
	s := new(CreateFolderResult)
	s.Metadata = Metadata
	return s
}
195754
func NewTeamMemberProfile(TeamMemberId string, Email string, EmailVerified bool, Status *TeamMemberStatus, Name *users.Name, MembershipType *TeamMembershipType, Groups []string, MemberFolderId string) *TeamMemberProfile {
	s := new(TeamMemberProfile)
	s.TeamMemberId = TeamMemberId
	s.Email = Email
	s.EmailVerified = EmailVerified
	s.Status = Status
	s.Name = Name
	s.MembershipType = MembershipType
	s.Groups = Groups
	s.MemberFolderId = MemberFolderId
	return s
}
953680
func NewGetTemporaryLinkArg(Path string) *GetTemporaryLinkArg {
	s := new(GetTemporaryLinkArg)
	s.Path = Path
	return s
}
1209462
func NewTeamRootInfo(RootNamespaceId string, HomeNamespaceId string, HomePath string) *TeamRootInfo {
	s := new(TeamRootInfo)
	s.RootNamespaceId = RootNamespaceId
	s.HomeNamespaceId = HomeNamespaceId
	s.HomePath = HomePath
	return s
}
737638
func NewTeeFromJSON(js json.RawMessage) (*WriteOperations, error) {
	tmp := struct {
		Tee json.RawMessage `json:"tee"`
	}{}
	if err := json.Unmarshal(js, &tmp); err != nil {
		return nil, err
	} else if step, err := NewWriteOperationsFromJSON(tmp.Tee); err != nil {
		return nil, err
	} else {
		return step, nil
	}
}
720633
func NewTeamMemberPolicies(Sharing *TeamSharingPolicies, EmmState *EmmState, OfficeAddin *OfficeAddInPolicy) *TeamMemberPolicies {
	s := new(TeamMemberPolicies)
	s.Sharing = Sharing
	s.EmmState = EmmState
	s.OfficeAddin = OfficeAddin
	return s
}
1187992
func NewTeamSpaceAllocation(Used uint64, Allocated uint64, UserWithinTeamSpaceAllocated uint64, UserWithinTeamSpaceLimitType *team_common.MemberSpaceLimitType) *TeamSpaceAllocation {
	s := new(TeamSpaceAllocation)
	s.Used = Used
	s.Allocated = Allocated
	s.UserWithinTeamSpaceAllocated = UserWithinTeamSpaceAllocated
	s.UserWithinTeamSpaceLimitType = UserWithinTeamSpaceLimitType
	return s
}
205812
func (c *CmdTeamDelete) listSubteamsRecursive(cli *keybase1.TeamsClient) (res []keybase1.TeamName, err error) {
	subs, err := cli.TeamListSubteamsRecursive(context.TODO(), keybase1.TeamListSubteamsRecursiveArg{
		ParentTeamName: c.Team.String(),
		ForceRepoll:    true,
	})
	if err != nil {
		return res, err
	}
	// Sort the response alphabetically
	sort.Slice(subs, func(i, j int) bool {
		return subs[i].Name.String() < subs[j].Name.String()
	})
	for _, sub := range subs {
		res = append(res, sub.Name)
	}
	return res, err
}