// SetRepositoryName sets the RepositoryName field's value.
10667
func (s *Repository) SetRepositoryName(v string) *Repository {
	s.RepositoryName = &v
	return s
}
1088361
func ChangeRepositoryName(u *User, oldRepoName, newRepoName string) (err error) {
	oldRepoName = strings.ToLower(oldRepoName)
	newRepoName = strings.ToLower(newRepoName)
	if err = IsUsableRepoName(newRepoName); err != nil {
		return err
	}

	has, err := IsRepositoryExist(u, newRepoName)
	if err != nil {
		return fmt.Errorf("IsRepositoryExist: %v", err)
	} else if has {
		return ErrRepoAlreadyExist{u.Name, newRepoName}
	}

	repo, err := GetRepositoryByName(u.ID, oldRepoName)
	if err != nil {
		return fmt.Errorf("GetRepositoryByName: %v", err)
	}

	// Change repository directory name
	if err = os.Rename(repo.RepoPath(), RepoPath(u.Name, newRepoName)); err != nil {
		return fmt.Errorf("rename repository directory: %v", err)
	}

	wikiPath := repo.WikiPath()
	if com.IsExist(wikiPath) {
		if err = os.Rename(wikiPath, WikiPath(u.Name, newRepoName)); err != nil {
			return fmt.Errorf("rename repository wiki: %v", err)
		}
		RemoveAllWithNotice("Delete repository wiki local copy", repo.LocalWikiPath())
	}

	RemoveAllWithNotice("Delete repository local copy", repo.LocalCopyPath())
	return nil
}
693792
func (s *GetFileInput) SetRepositoryName(v string) *GetFileInput {
	s.RepositoryName = &v
	return s
}
785319
func (s *PullRequestTarget) SetRepositoryName(v string) *PullRequestTarget {
	s.RepositoryName = &v
	return s
}
336905
func (s *GetCommentsForComparedCommitInput) SetRepositoryName(v string) *GetCommentsForComparedCommitInput {
	s.RepositoryName = &v
	return s
}
1190539
func (s *DeleteFileInput) SetRepositoryName(v string) *DeleteFileInput {
	s.RepositoryName = &v
	return s
}
1342826
func (s *ReviewPolicy) SetPolicyName(v string) *ReviewPolicy {
	s.PolicyName = &v
	return s
}
547395
func (s *CreateDirectoryConfigInput) SetDirectoryName(v string) *CreateDirectoryConfigInput {
	s.DirectoryName = &v
	return s
}
400097
func (s *CommentsForPullRequest) SetRepositoryName(v string) *CommentsForPullRequest {
	s.RepositoryName = &v
	return s
}
241366
func (s *EffectivePolicy) SetPolicyName(v string) *EffectivePolicy {
	s.PolicyName = &v
	return s
}
1020082
func (s *PullRequestCreatedEventMetadata) SetRepositoryName(v string) *PullRequestCreatedEventMetadata {
	s.RepositoryName = &v
	return s
}
1362837
func (s *DeleteRepositoryPolicyInput) SetRepositoryName(v string) *DeleteRepositoryPolicyInput {
	s.RepositoryName = &v
	return s
}
359403
func (s *GetDownloadUrlForLayerInput) SetRepositoryName(v string) *GetDownloadUrlForLayerInput {
	s.RepositoryName = &v
	return s
}
1053264
func (s *DeleteDirectoryConfigInput) SetDirectoryName(v string) *DeleteDirectoryConfigInput {
	s.DirectoryName = &v
	return s
}
1146163
func (s *DeletePolicyInput) SetPolicyName(v string) *DeletePolicyInput {
	s.PolicyName = &v
	return s
}
35071
func (s *BatchDeleteImageInput) SetRepositoryName(v string) *BatchDeleteImageInput {
	s.RepositoryName = &v
	return s
}
615095
func (s *DeleteLifecyclePolicyOutput) SetRepositoryName(v string) *DeleteLifecyclePolicyOutput {
	s.RepositoryName = &v
	return s
}