Repository: xanzy/go-gitlab
Pull request #1788 (2023-09-04 12:03:33)

Add Ptr function to use generics for allocating pointers
* update minimum go version to 1.19
* deprecate all other functions which were allocating pointers before

svanharmelen: I'm a little busy these days, but I really like this approach. So I'll certainly get back on this one, but it might take a little...

Patch:
diff --git a/README.md b/README.md
index 1652705..3058715 100644
--- a/README.md
+++ b/README.md
@@ -133,7 +133,7 @@ to list all projects for user "svanharmelen":
 
 ```go
 git := gitlab.NewClient("yourtokengoeshere")
-opt := &gitlab.ListProjectsOptions{Search: gitlab.String("svanharmelen")}
+opt := &gitlab.ListProjectsOptions{Search: gitlab.Ptr("svanharmelen")}
 projects, _, err := git.Projects.ListProjects(opt)
 ```
 
@@ -159,11 +159,11 @@ func main() {
 
 	// Create new project
 	p := &gitlab.CreateProjectOptions{
-		Name:                 gitlab.String("My Project"),
-		Description:          gitlab.String("Just a test project to play with"),
-		MergeRequestsEnabled: gitlab.Bool(true),
-		SnippetsEnabled:      gitlab.Bool(true),
-		Visibility:           gitlab.Visibility(gitlab.PublicVisibility),
+		Name:                 gitlab.Ptr("My Project"),
+		Description:          gitlab.Ptr("Just a test project to play with"),
+		MergeRequestsEnabled: gitlab.Ptr(true),
+		SnippetsEnabled:      gitlab.Ptr(true),
+		Visibility:           gitlab.Ptr(gitlab.PublicVisibility),
 	}
 	project, _, err := git.Projects.CreateProject(p)
 	if err != nil {
@@ -172,10 +172,10 @@ func main() {
 
 	// Add a new snippet
 	s := &gitlab.CreateProjectSnippetOptions{
-		Title:           gitlab.String("Dummy Snippet"),
-		FileName:        gitlab.String("snippet.go"),
-		Content:         gitlab.String("package main...."),
-		Visibility:      gitlab.Visibility(gitlab.PublicVisibility),
+		Title:           gitlab.Ptr("Dummy Snippet"),
+		FileName:        gitlab.Ptr("snippet.go"),
+		Content:         gitlab.Ptr("package main...."),
+		Visibility:      gitlab.Ptr(gitlab.PublicVisibility),
 	}
 	_, _, err = git.ProjectSnippets.CreateSnippet(project.ID, s)
 	if err != nil {
diff --git a/examples/applications.go b/examples/applications.go
index c0b68e7..4fd5371 100644
--- a/examples/applications.go
+++ b/examples/applications.go
@@ -30,9 +30,9 @@ func applicationsExample() {
 
 	// Create an application
 	opts := &gitlab.CreateApplicationOptions{
-		Name:        gitlab.String("Travis"),
-		RedirectURI: gitlab.String("http://example.org"),
-		Scopes:      gitlab.String("api"),
+		Name:        gitlab.Ptr("Travis"),
+		RedirectURI: gitlab.Ptr("http://example.org"),
+		Scopes:      gitlab.Ptr("api"),
 	}
 	created, _, err := git.Applications.CreateApplication(opts)
 	if err != nil {
diff --git a/examples/cluster_agents.go b/examples/cluster_agents.go
index 9b4d925..70aaf2b 100644
--- a/examples/cluster_agents.go
+++ b/examples/cluster_agents.go
@@ -30,7 +30,7 @@ func clusterAgentsExample() {
 
 	projectID := 33
 	opt := &gitlab.RegisterAgentOptions{
-		Name: gitlab.String("agent-2"),
+		Name: gitlab.Ptr("agent-2"),
 	}
 
 	// Register Cluster Agent
diff --git a/examples/impersonation.go b/examples/impersonation.go
index 8e6ca4b..ce8dcf0 100644
--- a/examples/impersonation.go
+++ b/examples/impersonation.go
@@ -33,7 +33,7 @@ func impersonationExample() {
 	// list impersonation token from an user
 	tokens, _, err := git.Users.GetAllImpersonationTokens(
 		uid,
-		&gitlab.GetAllImpersonationTokensOptions{State: gitlab.String("active")},
+		&gitlab.GetAllImpersonationTokensOptions{State: gitlab.Ptr("active")},
 	)
 	if err != nil {
 		log.Fatal(err)
diff --git a/examples/labels.go b/examples/labels.go
index bd76062..fb4206e 100644
--- a/examples/labels.go
+++ b/examples/labels.go
@@ -30,8 +30,8 @@ func labelExample() {
 
 	// Create new label
 	opt := &gitlab.CreateLabelOptions{
-		Name:  gitlab.String("My Label"),
-		Color: gitlab.String("#11FF22"),
+		Name:  gitlab.Ptr("My Label"),
+		Color: gitlab.Ptr("#11FF22"),
 	}
 	label, _, err := git.Labels.CreateLabel("myname/myproject", opt)
 	if err != nil {
diff --git a/examples/personal_access_tokens.go b/examples/personal_access_tokens.go
index 9ec21e3..5706dda 100644
--- a/examples/personal_access_tokens.go
+++ b/examples/personal_access_tokens.go
@@ -46,7 +46,7 @@ func patListExampleWithUserFilter() {
 
 	opt := &gitlab.ListPersonalAccessTokensOptions{
 		ListOptions: gitlab.ListOptions{Page: 1, PerPage: 10},
-		UserID:      gitlab.Int(12345),
+		UserID:      gitlab.Ptr(12345),
 	}
 
 	personalAccessTokens, _, err := git.PersonalAccessTokens.ListPersonalAccessTokens(opt)
diff --git a/examples/pipelines.go b/examples/pipelines.go
index eaafb49..d4b6d96 100644
--- a/examples/pipelines.go
+++ b/examples/pipelines.go
@@ -30,16 +30,16 @@ func pipelineExample() {
 	}
 
 	opt := &gitlab.ListProjectPipelinesOptions{
-		Scope:         gitlab.String("branches"),
-		Status:        gitlab.BuildState(gitlab.Running),
-		Ref:           gitlab.String("master"),
-		YamlErrors:    gitlab.Bool(true),
-		Name:          gitlab.String("name"),
-		Username:      gitlab.String("username"),
-		UpdatedAfter:  gitlab.Time(time.Now().Add(-24 * 365 * time.Hour)),
-		UpdatedBefore: gitlab.Time(time.Now().Add(-7 * 24 * time.Hour)),
-		OrderBy:       gitlab.String("status"),
-		Sort:          gitlab.String("asc"),
+		Scope:         gitlab.Ptr("branches"),
+		Status:        gitlab.Ptr(gitlab.Running),
+		Ref:           gitlab.Ptr("master"),
+		YamlErrors:    gitlab.Ptr(true),
+		Name:          gitlab.Ptr("name"),
+		Username:      gitlab.Ptr("username"),
+		UpdatedAfter:  gitlab.Ptr(time.Now().Add(-24 * 365 * time.Hour)),
+		UpdatedBefore: gitlab.Ptr(time.Now().Add(-7 * 24 * time.Hour)),
+		OrderBy:       gitlab.Ptr("status"),
+		Sort:          gitlab.Ptr("asc"),
 	}
 
 	pipelines, _, err := git.Pipelines.ListProjectPipelines(2743054, opt)
diff --git a/examples/projects.go b/examples/projects.go
index b5a9196..2e9e9e6 100644
--- a/examples/projects.go
+++ b/examples/projects.go
@@ -30,11 +30,11 @@ func projectExample() {
 
 	// Create new project
 	p := &gitlab.CreateProjectOptions{
-		Name:                 gitlab.String("My Project"),
-		Description:          gitlab.String("Just a test project to play with"),
-		MergeRequestsEnabled: gitlab.Bool(true),
-		SnippetsEnabled:      gitlab.Bool(true),
-		Visibility:           gitlab.Visibility(gitlab.PublicVisibility),
+		Name:                 gitlab.Ptr("My Project"),
+		Description:          gitlab.Ptr("Just a test project to play with"),
+		MergeRequestsEnabled: gitlab.Ptr(true),
+		SnippetsEnabled:      gitlab.Ptr(true),
+		Visibility:           gitlab.Ptr(gitlab.PublicVisibility),
 	}
 	project, _, err := git.Projects.CreateProject(p)
 	if err != nil {
@@ -43,10 +43,10 @@ func projectExample() {
 
 	// Add a new snippet
 	s := &gitlab.CreateProjectSnippetOptions{
-		Title:      gitlab.String("Dummy Snippet"),
-		FileName:   gitlab.String("snippet.go"),
-		Content:    gitlab.String("package main...."),
-		Visibility: gitlab.Visibility(gitlab.PublicVisibility),
+		Title:      gitlab.Ptr("Dummy Snippet"),
+		FileName:   gitlab.Ptr("snippet.go"),
+		Content:    gitlab.Ptr("package main...."),
+		Visibility: gitlab.Ptr(gitlab.PublicVisibility),
 	}
 	_, _, err = git.ProjectSnippets.CreateSnippet(project.ID, s)
 	if err != nil {
diff --git a/examples/repository_files.go b/examples/repository_files.go
index de73e9f..b1a0783 100644
--- a/examples/repository_files.go
+++ b/examples/repository_files.go
@@ -30,9 +30,9 @@ func repositoryFileExample() {
 
 	// Create a new repository file
 	cf := &gitlab.CreateFileOptions{
-		Branch:        gitlab.String("master"),
-		Content:       gitlab.String("My file contents"),
-		CommitMessage: gitlab.String("Adding a test file"),
+		Branch:        gitlab.Ptr("master"),
+		Content:       gitlab.Ptr("My file contents"),
+		CommitMessage: gitlab.Ptr("Adding a test file"),
 	}
 	file, _, err := git.RepositoryFiles.CreateFile("myname/myproject", "file.go", cf)
 	if err != nil {
@@ -41,9 +41,9 @@ func repositoryFileExample() {
 
 	// Update a repository file
 	uf := &gitlab.UpdateFileOptions{
-		Branch:        gitlab.String("master"),
-		Content:       gitlab.String("My file content"),
-		CommitMessage: gitlab.String("Fixing typo"),
+		Branch:        gitlab.Ptr("master"),
+		Content:       gitlab.Ptr("My file content"),
+		CommitMessage: gitlab.Ptr("Fixing typo"),
 	}
 	_, _, err = git.RepositoryFiles.UpdateFile("myname/myproject", file.FilePath, uf)
 	if err != nil {
@@ -51,7 +51,7 @@ func repositoryFileExample() {
 	}
 
 	gf := &gitlab.GetFileOptions{
-		Ref: gitlab.String("master"),
+		Ref: gitlab.Ptr("master"),
 	}
 	f, _, err := git.RepositoryFiles.GetFile("myname/myproject", file.FilePath, gf)
 	if err != nil {
@@ -61,7 +61,7 @@ func repositoryFileExample() {
 	log.Printf("File contains: %s", f.Content)
 
 	gfb := &gitlab.GetFileBlameOptions{
-		Ref: gitlab.String("master"),
+		Ref: gitlab.Ptr("master"),
 	}
 	fb, _, err := git.RepositoryFiles.GetFileBlame("myname/myproject", file.FilePath, gfb)
 	if err != nil {
diff --git a/examples/topics.go b/examples/topics.go
index ffc5c52..64e7e07 100644
--- a/examples/topics.go
+++ b/examples/topics.go
@@ -31,8 +31,8 @@ func topicExample() {
 
 	// New topic
 	topic, _, err := git.Topics.CreateTopic(&gitlab.CreateTopicOptions{
-		Name:        gitlab.String("My Topic 2"),
-		Description: gitlab.String("Some description"),
+		Name:        gitlab.Ptr("My Topic 2"),
+		Description: gitlab.Ptr("Some description"),
 	})
 	if err != nil {
 		panic(err)
diff --git a/go.mod b/go.mod
index a7fad8d..26fe69c 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
 module github.com/xanzy/go-gitlab
 
-go 1.18
+go 1.19
 
 require (
 	github.com/google/go-querystring v1.1.0
diff --git a/types.go b/types.go
index cd8aad7..d737aec 100644
--- a/types.go
+++ b/types.go
@@ -26,6 +26,11 @@ import (
 	"time"
 )
 
+// Ptr is a helper returns a pointer to v.
+func Ptr[T any](v T) *T {
+	return &v
+}
+
 // AccessControlValue represents an access control value within GitLab,
 // used for managing access to certain project features.
 //
@@ -44,10 +49,10 @@ const (
 
 // AccessControl is a helper routine that allocates a new AccessControlValue
 // to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func AccessControl(v AccessControlValue) *AccessControlValue {
-	p := new(AccessControlValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // AccessLevelValue represents a permission level within GitLab.
@@ -76,10 +81,10 @@ const (
 
 // AccessLevel is a helper routine that allocates a new AccessLevelValue
 // to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func AccessLevel(v AccessLevelValue) *AccessLevelValue {
-	p := new(AccessLevelValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // UserIDValue represents a user ID value within GitLab.
@@ -217,10 +222,10 @@ const (
 
 // Availability is a helper routine that allocates a new AvailabilityValue
 // to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func Availability(v AvailabilityValue) *AvailabilityValue {
-	p := new(AvailabilityValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // BuildStateValue represents a GitLab build state.
@@ -243,10 +248,10 @@ const (
 
 // BuildState is a helper routine that allocates a new BuildStateValue
 // to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func BuildState(v BuildStateValue) *BuildStateValue {
-	p := new(BuildStateValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // DeploymentStatusValue represents a Gitlab deployment status.
@@ -263,10 +268,10 @@ const (
 
 // DeploymentStatus is a helper routine that allocates a new
 // DeploymentStatusValue to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func DeploymentStatus(v DeploymentStatusValue) *DeploymentStatusValue {
-	p := new(DeploymentStatusValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // EventTypeValue represents actions type for contribution events
@@ -321,10 +326,10 @@ const (
 
 // FileAction is a helper routine that allocates a new FileActionValue value
 // to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func FileAction(v FileActionValue) *FileActionValue {
-	p := new(FileActionValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // GenericPackageSelectValue represents a generic package select value.
@@ -337,10 +342,10 @@ const (
 
 // GenericPackageSelect is a helper routine that allocates a new
 // GenericPackageSelectValue value to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func GenericPackageSelect(v GenericPackageSelectValue) *GenericPackageSelectValue {
-	p := new(GenericPackageSelectValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // GenericPackageStatusValue represents a generic package status.
@@ -354,10 +359,10 @@ const (
 
 // GenericPackageStatus is a helper routine that allocates a new
 // GenericPackageStatusValue value to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func GenericPackageStatus(v GenericPackageStatusValue) *GenericPackageStatusValue {
-	p := new(GenericPackageStatusValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // ISOTime represents an ISO 8601 formatted date.
@@ -434,10 +439,10 @@ const (
 
 // LinkType is a helper routine that allocates a new LinkType value
 // to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func LinkType(v LinkTypeValue) *LinkTypeValue {
-	p := new(LinkTypeValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // LicenseApprovalStatusValue describe the approval statuses of a license.
@@ -455,10 +460,10 @@ const (
 
 // LicenseApprovalStatus is a helper routine that allocates a new license
 // approval status value to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func LicenseApprovalStatus(v LicenseApprovalStatusValue) *LicenseApprovalStatusValue {
-	p := new(LicenseApprovalStatusValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // MergeMethodValue represents a project merge type within GitLab.
@@ -476,11 +481,11 @@ const (
 )
 
 // MergeMethod is a helper routine that allocates a new MergeMethod
-// to sotre v and returns a pointer to it.
+// to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func MergeMethod(v MergeMethodValue) *MergeMethodValue {
-	p := new(MergeMethodValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // NoteTypeValue represents the type of a Note.
@@ -496,10 +501,10 @@ const (
 
 // NoteType is a helper routine that allocates a new NoteTypeValue to
 // store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func NoteType(v NoteTypeValue) *NoteTypeValue {
-	p := new(NoteTypeValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // NotificationLevelValue represents a notification level.
@@ -566,10 +571,10 @@ var notificationLevelTypes = map[string]NotificationLevelValue{
 
 // NotificationLevel is a helper routine that allocates a new NotificationLevelValue
 // to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func NotificationLevel(v NotificationLevelValue) *NotificationLevelValue {
-	p := new(NotificationLevelValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // ProjectCreationLevelValue represents a project creation level within GitLab.
@@ -588,10 +593,9 @@ const (
 
 // ProjectCreationLevel is a helper routine that allocates a new ProjectCreationLevelValue
 // to store v and returns a pointer to it.
+// Please use Ptr instead.
 func ProjectCreationLevel(v ProjectCreationLevelValue) *ProjectCreationLevelValue {
-	p := new(ProjectCreationLevelValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // SharedRunnersSettingValue determines whether shared runners are enabled for a
@@ -616,10 +620,10 @@ const (
 
 // SharedRunnersSetting is a helper routine that allocates a new SharedRunnersSettingValue
 // to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func SharedRunnersSetting(v SharedRunnersSettingValue) *SharedRunnersSettingValue {
-	p := new(SharedRunnersSettingValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // SubGroupCreationLevelValue represents a sub group creation level within GitLab.
@@ -637,10 +641,10 @@ const (
 
 // SubGroupCreationLevel is a helper routine that allocates a new SubGroupCreationLevelValue
 // to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func SubGroupCreationLevel(v SubGroupCreationLevelValue) *SubGroupCreationLevelValue {
-	p := new(SubGroupCreationLevelValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // SquashOptionValue represents a squash optional level within GitLab.
@@ -660,10 +664,10 @@ const (
 
 // SquashOption is a helper routine that allocates a new SquashOptionValue
 // to store s and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func SquashOption(s SquashOptionValue) *SquashOptionValue {
-	p := new(SquashOptionValue)
-	*p = s
-	return p
+	return Ptr(s)
 }
 
 // TasksCompletionStatus represents tasks of the issue/merge request.
@@ -723,10 +727,10 @@ const (
 
 // VariableType is a helper routine that allocates a new VariableTypeValue
 // to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func VariableType(v VariableTypeValue) *VariableTypeValue {
-	p := new(VariableTypeValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // VisibilityValue represents a visibility level within GitLab.
@@ -745,10 +749,10 @@ const (
 
 // Visibility is a helper routine that allocates a new VisibilityValue
 // to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func Visibility(v VisibilityValue) *VisibilityValue {
-	p := new(VisibilityValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // WikiFormatValue represents the available wiki formats.
@@ -766,42 +770,42 @@ const (
 
 // WikiFormat is a helper routine that allocates a new WikiFormatValue
 // to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func WikiFormat(v WikiFormatValue) *WikiFormatValue {
-	p := new(WikiFormatValue)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // Bool is a helper routine that allocates a new bool value
 // to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func Bool(v bool) *bool {
-	p := new(bool)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // Int is a helper routine that allocates a new int value
 // to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func Int(v int) *int {
-	p := new(int)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // String is a helper routine that allocates a new string value
 // to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func String(v string) *string {
-	p := new(string)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // Time is a helper routine that allocates a new time.Time value
 // to store v and returns a pointer to it.
+//
+// Deprecated: Please use Ptr instead.
 func Time(v time.Time) *time.Time {
-	p := new(time.Time)
-	*p = v
-	return p
+	return Ptr(v)
 }
 
 // BoolValue is a boolean value with advanced json unmarshaling features.


Test patch:
diff --git a/access_requests_test.go b/access_requests_test.go
index c809bef..61ec6bc 100644
--- a/access_requests_test.go
+++ b/access_requests_test.go
@@ -285,7 +285,7 @@ func TestApproveProjectAccessRequest(t *testing.T) {
 	}
 
 	opt := &ApproveAccessRequestOptions{
-		AccessLevel: AccessLevel(DeveloperPermissions),
+		AccessLevel: Ptr(DeveloperPermissions),
 	}
 
 	request, resp, err := client.AccessRequests.ApproveProjectAccessRequest(1, 10, opt)
@@ -344,7 +344,7 @@ func TestApproveGroupAccessRequest(t *testing.T) {
 	}
 
 	opt := &ApproveAccessRequestOptions{
-		AccessLevel: AccessLevel(DeveloperPermissions),
+		AccessLevel: Ptr(DeveloperPermissions),
 	}
 
 	request, resp, err := client.AccessRequests.ApproveGroupAccessRequest(1, 10, opt)
diff --git a/applications_test.go b/applications_test.go
index 6a5b292..134f420 100644
--- a/applications_test.go
+++ b/applications_test.go
@@ -38,7 +38,7 @@ func TestCreateApplication(t *testing.T) {
 	)
 
 	opt := &CreateApplicationOptions{
-		Name: String("testApplication"),
+		Name: Ptr("testApplication"),
 	}
 	app, _, err := client.Applications.CreateApplication(opt)
 	if err != nil {
diff --git a/avatar_test.go b/avatar_test.go
index b11f271..3e8c90e 100644
--- a/avatar_test.go
+++ b/avatar_test.go
@@ -37,7 +37,7 @@ func TestGetAvatar(t *testing.T) {
 		},
 	)
 
-	opt := &GetAvatarOptions{Email: String("sander@vanharmelen.nnl")}
+	opt := &GetAvatarOptions{Email: Ptr("sander@vanharmelen.nnl")}
 	avatar, resp, err := client.Avatar.GetAvatar(opt)
 	if err != nil {
 		t.Fatalf("Avatar.GetAvatar returned error: %v", err)
diff --git a/broadcast_messages_test.go b/broadcast_messages_test.go
index 1e059a0..e55e1c7 100644
--- a/broadcast_messages_test.go
+++ b/broadcast_messages_test.go
@@ -168,15 +168,15 @@ func TestCreateBroadcastMessages(t *testing.T) {
 	})
 
 	opt := &CreateBroadcastMessageOptions{
-		Message:            String("Some Message"),
+		Message:            Ptr("Some Message"),
 		StartsAt:           &wantedStartsAt,
 		EndsAt:             &wantedEndsAt,
-		Color:              String("#E75E40"),
-		Font:               String("#FFFFFF"),
+		Color:              Ptr("#E75E40"),
+		Font:               Ptr("#FFFFFF"),
 		TargetAccessLevels: []AccessLevelValue{GuestPermissions, DeveloperPermissions},
-		TargetPath:         String("*/welcome"),
-		BroadcastType:      String("banner"),
-		Dismissable:        Bool(false),
+		TargetPath:         Ptr("*/welcome"),
+		BroadcastType:      Ptr("banner"),
+		Dismissable:        Ptr(false),
 	}
 
 	got, _, err := client.BroadcastMessage.CreateBroadcastMessage(opt)
@@ -227,15 +227,15 @@ func TestUpdateBroadcastMessages(t *testing.T) {
 	})
 
 	opt := &UpdateBroadcastMessageOptions{
-		Message:            String("Some Message Updated"),
+		Message:            Ptr("Some Message Updated"),
 		StartsAt:           &wantedStartsAt,
 		EndsAt:             &wantedEndsAt,
-		Color:              String("#E75E40"),
-		Font:               String("#FFFFFF"),
+		Color:              Ptr("#E75E40"),
+		Font:               Ptr("#FFFFFF"),
 		TargetAccessLevels: []AccessLevelValue{GuestPermissions, DeveloperPermissions},
-		TargetPath:         String("*/welcome"),
-		BroadcastType:      String("banner"),
-		Dismissable:        Bool(false),
+		TargetPath:         Ptr("*/welcome"),
+		BroadcastType:      Ptr("banner"),
+		Dismissable:        Ptr(false),
 	}
 
 	got, _, err := client.BroadcastMessage.UpdateBroadcastMessage(1, opt)
diff --git a/cluster_agents_test.go b/cluster_agents_test.go
index 391d1da..edc3474 100644
--- a/cluster_agents_test.go
+++ b/cluster_agents_test.go
@@ -82,9 +82,9 @@ func ListClusterAgents(t *testing.T) {
 				NameWithNamespace: "Administrator / test",
 				Path:              "test",
 				PathWithNamespace: "root/test",
-				CreatedAt:         Time(time.Date(2022, time.March, 20, 20, 42, 40, 221000000, time.UTC)),
+				CreatedAt:         Ptr(time.Date(2022, time.March, 20, 20, 42, 40, 221000000, time.UTC)),
 			},
-			CreatedAt:       Time(time.Date(2022, time.April, 20, 20, 42, 40, 221000000, time.UTC)),
+			CreatedAt:       Ptr(time.Date(2022, time.April, 20, 20, 42, 40, 221000000, time.UTC)),
 			CreatedByUserID: 42,
 		},
 		{
@@ -97,9 +97,9 @@ func ListClusterAgents(t *testing.T) {
 				NameWithNamespace: "Administrator / test",
 				Path:              "test",
 				PathWithNamespace: "root/test",
-				CreatedAt:         Time(time.Date(2022, time.March, 20, 20, 42, 40, 221000000, time.UTC)),
+				CreatedAt:         Ptr(time.Date(2022, time.March, 20, 20, 42, 40, 221000000, time.UTC)),
 			},
-			CreatedAt:       Time(time.Date(2022, time.April, 20, 20, 42, 40, 221000000, time.UTC)),
+			CreatedAt:       Ptr(time.Date(2022, time.April, 20, 20, 42, 40, 221000000, time.UTC)),
 			CreatedByUserID: 42,
 		},
 	}
@@ -148,9 +148,9 @@ func GetClusterAgent(t *testing.T) {
 			NameWithNamespace: "Administrator / test",
 			Path:              "test",
 			PathWithNamespace: "root/test",
-			CreatedAt:         Time(time.Date(2022, time.March, 20, 20, 42, 40, 221000000, time.UTC)),
+			CreatedAt:         Ptr(time.Date(2022, time.March, 20, 20, 42, 40, 221000000, time.UTC)),
 		},
-		CreatedAt:       Time(time.Date(2022, time.April, 20, 20, 42, 40, 221000000, time.UTC)),
+		CreatedAt:       Ptr(time.Date(2022, time.April, 20, 20, 42, 40, 221000000, time.UTC)),
 		CreatedByUserID: 42,
 	}
 	if !reflect.DeepEqual(want, clusterAgent) {
@@ -182,7 +182,7 @@ func RegisterClusterAgent(t *testing.T) {
     	`)
 	})
 
-	opt := &RegisterAgentOptions{Name: String("agent-1")}
+	opt := &RegisterAgentOptions{Name: Ptr("agent-1")}
 	clusterAgent, _, err := client.ClusterAgents.RegisterAgent(20, opt)
 	if err != nil {
 		t.Errorf("ClusterAgents.RegisterClusterAgent returned error: %v", err)
@@ -198,9 +198,9 @@ func RegisterClusterAgent(t *testing.T) {
 			NameWithNamespace: "Administrator / test",
 			Path:              "test",
 			PathWithNamespace: "root/test",
-			CreatedAt:         Time(time.Date(2022, time.March, 20, 20, 42, 40, 221000000, time.UTC)),
+			CreatedAt:         Ptr(time.Date(2022, time.March, 20, 20, 42, 40, 221000000, time.UTC)),
 		},
-		CreatedAt:       Time(time.Date(2022, time.April, 20, 20, 42, 40, 221000000, time.UTC)),
+		CreatedAt:       Ptr(time.Date(2022, time.April, 20, 20, 42, 40, 221000000, time.UTC)),
 		CreatedByUserID: 42,
 	}
 	if !reflect.DeepEqual(want, clusterAgent) {
@@ -250,7 +250,7 @@ func ListAgentTokens(t *testing.T) {
 			Description:     "Some token",
 			AgentID:         5,
 			Status:          "active",
-			CreatedAt:       Time(time.Date(2022, time.March, 25, 14, 12, 11, 497000000, time.UTC)),
+			CreatedAt:       Ptr(time.Date(2022, time.March, 25, 14, 12, 11, 497000000, time.UTC)),
 			CreatedByUserID: 1,
 		},
 		{
@@ -259,7 +259,7 @@ func ListAgentTokens(t *testing.T) {
 			Description:     "",
 			AgentID:         5,
 			Status:          "active",
-			CreatedAt:       Time(time.Date(2022, time.March, 25, 14, 12, 11, 497000000, time.UTC)),
+			CreatedAt:       Ptr(time.Date(2022, time.March, 25, 14, 12, 11, 497000000, time.UTC)),
 			CreatedByUserID: 1,
 		},
 	}
@@ -299,7 +299,7 @@ func GetAgentToken(t *testing.T) {
 		Description:     "Some token",
 		AgentID:         5,
 		Status:          "active",
-		CreatedAt:       Time(time.Date(2022, time.March, 25, 14, 12, 11, 497000000, time.UTC)),
+		CreatedAt:       Ptr(time.Date(2022, time.March, 25, 14, 12, 11, 497000000, time.UTC)),
 		CreatedByUserID: 1,
 		LastUsedAt:      nil,
 	}
@@ -328,7 +328,7 @@ func RegisterAgentToken(t *testing.T) {
     	`)
 	})
 
-	opt := &CreateAgentTokenOptions{Name: String("abcd"), Description: String("Some token")}
+	opt := &CreateAgentTokenOptions{Name: Ptr("abcd"), Description: Ptr("Some token")}
 	clusterAgentToken, _, err := client.ClusterAgents.CreateAgentToken(20, 5, opt)
 	if err != nil {
 		t.Errorf("ClusterAgents.CreateAgentToken returned error: %v", err)
@@ -340,7 +340,7 @@ func RegisterAgentToken(t *testing.T) {
 		Description:     "Some token",
 		AgentID:         5,
 		Status:          "active",
-		CreatedAt:       Time(time.Date(2022, time.March, 25, 14, 12, 11, 497000000, time.UTC)),
+		CreatedAt:       Ptr(time.Date(2022, time.March, 25, 14, 12, 11, 497000000, time.UTC)),
 		CreatedByUserID: 1,
 		LastUsedAt:      nil,
 		Token:           "qeY8UVRisx9y3Loxo1scLxFuRxYcgeX3sxsdrpP_fR3Loq4xyg",
diff --git a/commits_test.go b/commits_test.go
index fd00e0c..4987334 100644
--- a/commits_test.go
+++ b/commits_test.go
@@ -58,7 +58,7 @@ func TestGetCommit(t *testing.T) {
 		Message:        "Sanitize for network graph",
 		ParentIDs:      []string{"ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba"},
 		Stats:          &CommitStats{Additions: 15, Deletions: 10, Total: 25},
-		Status:         BuildState(Running),
+		Status:         Ptr(Running),
 		LastPipeline: &PipelineInfo{
 			ID:        8,
 			Ref:       "master",
@@ -83,10 +83,10 @@ func TestGetCommitStatuses(t *testing.T) {
 	})
 
 	opt := &GetCommitStatusesOptions{
-		Ref:   String("master"),
-		Stage: String("test"),
-		Name:  String("ci/jenkins"),
-		All:   Bool(true),
+		Ref:   Ptr("master"),
+		Stage: Ptr("test"),
+		Name:  Ptr("ci/jenkins"),
+		All:   Ptr(true),
 	}
 	statuses, _, err := client.Commits.GetCommitStatuses("1", "b0b3a907f41409829b307a28b82fdbd552ee5a27", opt)
 	if err != nil {
@@ -119,11 +119,11 @@ func TestSetCommitStatus(t *testing.T) {
 	cov := 99.9
 	opt := &SetCommitStatusOptions{
 		State:       Running,
-		Ref:         String("master"),
-		Name:        String("ci/jenkins"),
-		Context:     String(""),
-		TargetURL:   String("http://abc"),
-		Description: String("build"),
+		Ref:         Ptr("master"),
+		Name:        Ptr("ci/jenkins"),
+		Context:     Ptr(""),
+		TargetURL:   Ptr("http://abc"),
+		Description: Ptr("build"),
 		Coverage:    &cov,
 	}
 	status, _, err := client.Commits.SetCommitStatus("1", "b0b3a907f41409829b307a28b82fdbd552ee5a27", opt)
@@ -163,7 +163,7 @@ func TestRevertCommit_NoOptions(t *testing.T) {
 		Message:        "Sanitize for network graph",
 		ParentIDs:      []string{"ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba"},
 		Stats:          &CommitStats{Additions: 15, Deletions: 10, Total: 25},
-		Status:         BuildState(Running),
+		Status:         Ptr(Running),
 		LastPipeline: &PipelineInfo{
 			ID:        8,
 			Ref:       "master",
@@ -208,7 +208,7 @@ func TestRevertCommit_WithOptions(t *testing.T) {
 		Message:        "Sanitize for network graph",
 		ParentIDs:      []string{"ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba"},
 		Stats:          &CommitStats{Additions: 15, Deletions: 10, Total: 25},
-		Status:         BuildState(Running),
+		Status:         Ptr(Running),
 		LastPipeline: &PipelineInfo{
 			ID:        8,
 			Ref:       "master",
@@ -302,7 +302,7 @@ func TestCommitsService_ListCommits(t *testing.T) {
 		Message:        "Sanitize for network graph",
 		ParentIDs:      []string{"ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba"},
 		Stats:          &CommitStats{Additions: 15, Deletions: 10, Total: 25},
-		Status:         BuildState(Running),
+		Status:         Ptr(Running),
 		LastPipeline: &PipelineInfo{
 			ID:        8,
 			Ref:       "master",
@@ -442,7 +442,7 @@ func TestCommitsService_CreateCommit(t *testing.T) {
 		Message:        "Sanitize for network graph",
 		ParentIDs:      []string{"ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba"},
 		Stats:          &CommitStats{Additions: 15, Deletions: 10, Total: 25},
-		Status:         BuildState(Running),
+		Status:         Ptr(Running),
 		LastPipeline: &PipelineInfo{
 			ID:        8,
 			Ref:       "master",
@@ -896,7 +896,7 @@ func TestCommitsService_CherryPickCommit(t *testing.T) {
 		Message:        "Sanitize for network graph",
 		ParentIDs:      []string{"ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba"},
 		Stats:          &CommitStats{Additions: 15, Deletions: 10, Total: 25},
-		Status:         BuildState(Running),
+		Status:         Ptr(Running),
 		LastPipeline: &PipelineInfo{
 			ID:        8,
 			Ref:       "master",
diff --git a/deploy_keys_test.go b/deploy_keys_test.go
index 86bba8f..260ee1c 100644
--- a/deploy_keys_test.go
+++ b/deploy_keys_test.go
@@ -230,9 +230,9 @@ func TestAddDeployKey(t *testing.T) {
 	})
 
 	opt := &AddDeployKeyOptions{
-		Key:     String("ssh-rsa AAAA..."),
-		Title:   String("My deploy key"),
-		CanPush: Bool(true),
+		Key:     Ptr("ssh-rsa AAAA..."),
+		Title:   Ptr("My deploy key"),
+		CanPush: Ptr(true),
 	}
 	deployKey, _, err := client.DeployKeys.AddDeployKey(5, opt)
 	if err != nil {
@@ -245,9 +245,9 @@ func TestAddDeployKey(t *testing.T) {
 	}
 
 	want := &ProjectDeployKey{
-		Title:     *String("My deploy key"),
+		Title:     "My deploy key",
 		ID:        12,
-		Key:       *String("ssh-rsa AAAA..."),
+		Key:       "ssh-rsa AAAA...",
 		CreatedAt: &createdAt,
 		CanPush:   true,
 	}
@@ -318,8 +318,8 @@ func TestUpdateDeployKey(t *testing.T) {
 	})
 
 	opt := &UpdateDeployKeyOptions{
-		Title:   String("New deploy key"),
-		CanPush: Bool(true),
+		Title:   Ptr("New deploy key"),
+		CanPush: Ptr(true),
 	}
 	deployKey, _, err := client.DeployKeys.UpdateDeployKey(5, 11, opt)
 	if err != nil {
@@ -333,7 +333,7 @@ func TestUpdateDeployKey(t *testing.T) {
 
 	want := &ProjectDeployKey{
 		ID:        11,
-		Title:     *String("New deploy key"),
+		Title:     "New deploy key",
 		Key:       "ssh-rsa AAAA...",
 		CreatedAt: &createdAt,
 		CanPush:   true,
diff --git a/deploy_tokens_test.go b/deploy_tokens_test.go
index 01b917b..8ef4cbd 100644
--- a/deploy_tokens_test.go
+++ b/deploy_tokens_test.go
@@ -184,8 +184,8 @@ func TestCreateProjectDeployToken(t *testing.T) {
 	expiresAt := time.Date(2021, 0o1, 0o1, 0, 0, 0, 0, time.UTC)
 
 	deployToken, _, err := client.DeployTokens.CreateProjectDeployToken(5, &CreateProjectDeployTokenOptions{
-		Name:      String("My deploy token"),
-		Username:  String("custom-user"),
+		Name:      Ptr("My deploy token"),
+		Username:  Ptr("custom-user"),
 		ExpiresAt: &expiresAt,
 		Scopes: &[]string{
 			"read_repository",
@@ -342,8 +342,8 @@ func TestCreateGroupDeployToken(t *testing.T) {
 	expiresAt := time.Date(2021, 0o1, 0o1, 0, 0, 0, 0, time.UTC)
 
 	deployToken, _, err := client.DeployTokens.CreateGroupDeployToken(5, &CreateGroupDeployTokenOptions{
-		Name:      String("My deploy token"),
-		Username:  String("custom-user"),
+		Name:      Ptr("My deploy token"),
+		Username:  Ptr("custom-user"),
 		ExpiresAt: &expiresAt,
 		Scopes: &[]string{
 			"read_repository",
diff --git a/deployments_merge_requests_test.go b/deployments_merge_requests_test.go
index eac4173..4c89247 100644
--- a/deployments_merge_requests_test.go
+++ b/deployments_merge_requests_test.go
@@ -20,8 +20,8 @@ func TestDeploymentMergeRequestsService_ListDeploymentMergeRequests(t *testing.T
 
 	opts := ListMergeRequestsOptions{
 		AssigneeID:             AssigneeID(UserIDAny),
-		WithLabelsDetails:      Bool(true),
-		WithMergeStatusRecheck: Bool(true),
+		WithLabelsDetails:      Ptr(true),
+		WithMergeStatusRecheck: Ptr(true),
 	}
 
 	mergeRequests, _, err := client.DeploymentMergeRequests.ListDeploymentMergeRequests(278964, 2, &opts)
diff --git a/environments_test.go b/environments_test.go
index cc43dd0..bdfb4bf 100644
--- a/environments_test.go
+++ b/environments_test.go
@@ -47,7 +47,7 @@ func TestListEnvironments(t *testing.T) {
 		]`)
 	})
 
-	envs, _, err := client.Environments.ListEnvironments(1, &ListEnvironmentsOptions{Name: String("review/fix-foo"), ListOptions: ListOptions{Page: 1, PerPage: 10}})
+	envs, _, err := client.Environments.ListEnvironments(1, &ListEnvironmentsOptions{Name: Ptr("review/fix-foo"), ListOptions: ListOptions{Page: 1, PerPage: 10}})
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -120,7 +120,7 @@ func TestCreateEnvironment(t *testing.T) {
     }`)
 	})
 
-	envs, _, err := client.Environments.CreateEnvironment(1, &CreateEnvironmentOptions{Name: String("deploy"), ExternalURL: String("https://deploy.example.gitlab.com"), Tier: String("production")})
+	envs, _, err := client.Environments.CreateEnvironment(1, &CreateEnvironmentOptions{Name: Ptr("deploy"), ExternalURL: Ptr("https://deploy.example.gitlab.com"), Tier: Ptr("production")})
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -146,7 +146,7 @@ func TestEditEnvironment(t *testing.T) {
     }`)
 	})
 
-	envs, _, err := client.Environments.EditEnvironment(1, 1, &EditEnvironmentOptions{Name: String("staging"), ExternalURL: String("https://staging.example.gitlab.com"), Tier: String("staging")})
+	envs, _, err := client.Environments.EditEnvironment(1, 1, &EditEnvironmentOptions{Name: Ptr("staging"), ExternalURL: Ptr("https://staging.example.gitlab.com"), Tier: Ptr("staging")})
 	if err != nil {
 		log.Fatal(err)
 	}
diff --git a/epics_test.go b/epics_test.go
index a8cabd4..06720af 100644
--- a/epics_test.go
+++ b/epics_test.go
@@ -72,8 +72,8 @@ func TestListGroupEpics(t *testing.T) {
 	})
 
 	listGroupEpics := &ListGroupEpicsOptions{
-		AuthorID: Int(26),
-		State:    String("opened"),
+		AuthorID: Ptr(26),
+		State:    Ptr("opened"),
 	}
 
 	epics, _, err := client.Epics.ListGroupEpics("7", listGroupEpics)
@@ -102,8 +102,8 @@ func TestCreateEpic(t *testing.T) {
 	})
 
 	createEpicOptions := &CreateEpicOptions{
-		Title:       String("Incredible idea"),
-		Description: String("This is a test epic"),
+		Title:       Ptr("Incredible idea"),
+		Description: Ptr("This is a test epic"),
 	}
 
 	epic, _, err := client.Epics.CreateEpic("7", createEpicOptions)
@@ -132,8 +132,8 @@ func TestUpdateEpic(t *testing.T) {
 	})
 
 	updateEpicOptions := &UpdateEpicOptions{
-		Title:       String("Incredible idea"),
-		Description: String("This is a test epic"),
+		Title:       Ptr("Incredible idea"),
+		Description: Ptr("This is a test epic"),
 	}
 
 	epic, _, err := client.Epics.UpdateEpic("7", 8, updateEpicOptions)
diff --git a/error_tracking_test.go b/error_tracking_test.go
index cc2cfa4..ccc31ca 100644
--- a/error_tracking_test.go
+++ b/error_tracking_test.go
@@ -72,8 +72,8 @@ func TestDisableErrorTracking(t *testing.T) {
 	et, _, err := client.ErrorTracking.EnableDisableErrorTracking(
 		1,
 		&EnableDisableErrorTrackingOptions{
-			Active:     Bool(false),
-			Integrated: Bool(false),
+			Active:     Ptr(false),
+			Integrated: Ptr(false),
 		},
 	)
 	if err != nil {
diff --git a/examples/pipelinestestreport.go b/examples/pipelinestestreport.go
index 1c7e6c3..bdc2427 100644
--- a/examples/pipelinestestreport.go
+++ b/examples/pipelinestestreport.go
@@ -28,7 +28,7 @@ func pipelineTestReportExample() {
 		log.Fatal(err)
 	}
 
-	opt := &gitlab.ListProjectPipelinesOptions{Ref: gitlab.String("master")}
+	opt := &gitlab.ListProjectPipelinesOptions{Ref: gitlab.Ptr("master")}
 	projectID := 1234
 
 	pipelines, _, err := git.Pipelines.ListProjectPipelines(projectID, opt)
diff --git a/group_badges_test.go b/group_badges_test.go
index 5c9e137..aaae30e 100644
--- a/group_badges_test.go
+++ b/group_badges_test.go
@@ -72,7 +72,7 @@ func TestAddGroupBadge(t *testing.T) {
 			fmt.Fprint(w, `{"id":3, "name":"three", "link_url":"LINK", "image_url":"IMAGE", "kind":"group"}`)
 		})
 
-	opt := &AddGroupBadgeOptions{ImageURL: String("IMAGE"), LinkURL: String("LINK")}
+	opt := &AddGroupBadgeOptions{ImageURL: Ptr("IMAGE"), LinkURL: Ptr("LINK")}
 	badge, _, err := client.GroupBadges.AddGroupBadge(1, opt)
 	if err != nil {
 		t.Errorf("GroupBadges.AddGroupBadge returned error: %v", err)
@@ -93,7 +93,7 @@ func TestEditGroupBadge(t *testing.T) {
 			fmt.Fprint(w, `{"id":2, "name":"two", "link_url":"NEW_LINK", "image_url":"NEW_IMAGE", "kind":"group"}`)
 		})
 
-	opt := &EditGroupBadgeOptions{ImageURL: String("NEW_IMAGE"), LinkURL: String("NEW_LINK")}
+	opt := &EditGroupBadgeOptions{ImageURL: Ptr("NEW_IMAGE"), LinkURL: Ptr("NEW_LINK")}
 	badge, _, err := client.GroupBadges.EditGroupBadge(1, 2, opt)
 	if err != nil {
 		t.Errorf("GroupBadges.EditGroupBadge returned error: %v", err)
diff --git a/group_import_export_test.go b/group_import_export_test.go
index 98c0494..3e3efb1 100644
--- a/group_import_export_test.go
+++ b/group_import_export_test.go
@@ -76,10 +76,10 @@ func TestGroupImport(t *testing.T) {
 		})
 
 	opt := &GroupImportFileOptions{
-		Name:     String("test"),
-		Path:     String("path"),
-		File:     String(tmpfile.Name()),
-		ParentID: Int(1),
+		Name:     Ptr("test"),
+		Path:     Ptr("path"),
+		File:     Ptr(tmpfile.Name()),
+		ParentID: Ptr(1),
 	}
 
 	_, err = client.GroupImportExport.ImportFile(opt)
diff --git a/group_labels_test.go b/group_labels_test.go
index d1c91d8..c79ab78 100644
--- a/group_labels_test.go
+++ b/group_labels_test.go
@@ -33,8 +33,8 @@ func TestCreateGroupGroupLabel(t *testing.T) {
 	})
 
 	l := &CreateGroupLabelOptions{
-		Name:  String("My / GroupLabel"),
-		Color: String("#11FF22"),
+		Name:  Ptr("My / GroupLabel"),
+		Color: Ptr("#11FF22"),
 	}
 	label, _, err := client.GroupLabels.CreateGroupLabel("1", l)
 	if err != nil {
@@ -54,7 +54,7 @@ func TestDeleteGroupLabel(t *testing.T) {
 	})
 
 	label := &DeleteGroupLabelOptions{
-		Name: String("My / GroupLabel"),
+		Name: Ptr("My / GroupLabel"),
 	}
 
 	_, err := client.GroupLabels.DeleteGroupLabel("1", label)
@@ -72,10 +72,10 @@ func TestUpdateGroupLabel(t *testing.T) {
 	})
 
 	l := &UpdateGroupLabelOptions{
-		Name:        String("My / GroupLabel"),
-		NewName:     String("New / GroupLabel"),
-		Color:       String("#11FF23"),
-		Description: String("This is updated label"),
+		Name:        Ptr("My / GroupLabel"),
+		NewName:     Ptr("New / GroupLabel"),
+		Color:       Ptr("#11FF23"),
+		Description: Ptr("This is updated label"),
 	}
 
 	label, resp, err := client.GroupLabels.UpdateGroupLabel("1", l)
diff --git a/group_milestones_test.go b/group_milestones_test.go
index b5fee3a..c16b5bf 100644
--- a/group_milestones_test.go
+++ b/group_milestones_test.go
@@ -36,7 +36,7 @@ func TestGroupMilestonesService_ListGroupMilestones(t *testing.T) {
 		Title:       "10.0",
 		Description: "Version",
 		State:       "active",
-		Expired:     Bool(false),
+		Expired:     Ptr(false),
 	}}
 
 	gms, resp, err := client.GroupMilestones.ListGroupMilestones(5, nil, nil)
@@ -86,7 +86,7 @@ func TestGroupMilestonesService_GetGroupMilestone(t *testing.T) {
 		Title:       "10.0",
 		Description: "Version",
 		State:       "active",
-		Expired:     Bool(false),
+		Expired:     Ptr(false),
 	}
 
 	gm, resp, err := client.GroupMilestones.GetGroupMilestone(5, 12, nil, nil)
@@ -136,7 +136,7 @@ func TestGroupMilestonesService_CreateGroupMilestone(t *testing.T) {
 		Title:       "10.0",
 		Description: "Version",
 		State:       "active",
-		Expired:     Bool(false),
+		Expired:     Ptr(false),
 	}
 
 	gm, resp, err := client.GroupMilestones.CreateGroupMilestone(5, nil, nil)
@@ -186,7 +186,7 @@ func TestGroupMilestonesService_UpdateGroupMilestone(t *testing.T) {
 		Title:       "10.0",
 		Description: "Version",
 		State:       "active",
-		Expired:     Bool(false),
+		Expired:     Ptr(false),
 	}
 
 	gm, resp, err := client.GroupMilestones.UpdateGroupMilestone(5, 12, nil, nil)
@@ -561,8 +561,8 @@ func TestGroupMilestonesService_GetGroupMilestoneBurndownChartEvents(t *testing.
 	})
 
 	want := []*BurndownChartEvent{{
-		Weight: Int(10),
-		Action: String("update"),
+		Weight: Ptr(10),
+		Action: Ptr("update"),
 	}}
 
 	bces, resp, err := client.GroupMilestones.GetGroupMilestoneBurndownChartEvents(3, 12, nil, nil)
diff --git a/group_protected_environments_test.go b/group_protected_environments_test.go
index b8ede66..2866e52 100644
--- a/group_protected_environments_test.go
+++ b/group_protected_environments_test.go
@@ -249,16 +249,16 @@ func TestGroupProtectEnvironments(t *testing.T) {
 	}
 
 	opt := &ProtectGroupEnvironmentOptions{
-		Name: String(environmentName),
+		Name: Ptr(environmentName),
 		DeployAccessLevels: &[]*GroupEnvironmentAccessOptions{
-			{AccessLevel: AccessLevel(30)},
+			{AccessLevel: Ptr(AccessLevelValue(30))},
 		},
-		RequiredApprovalCount: Int(2),
+		RequiredApprovalCount: Ptr(2),
 		ApprovalRules: &[]*GroupEnvironmentApprovalRuleOptions{
 			{
-				GroupID:                Int(10),
-				AccessLevel:            AccessLevel(0),
-				AccessLevelDescription: String("devops"),
+				GroupID:                Ptr(10),
+				AccessLevel:            Ptr(AccessLevelValue(0)),
+				AccessLevelDescription: Ptr("devops"),
 			},
 		},
 	}
@@ -294,9 +294,9 @@ func TestGroupProtectEnvironments(t *testing.T) {
 	}
 
 	opt = &ProtectGroupEnvironmentOptions{
-		Name: String(environmentName),
+		Name: Ptr(environmentName),
 		DeployAccessLevels: &[]*GroupEnvironmentAccessOptions{
-			{AccessLevel: AccessLevel(30)},
+			{AccessLevel: Ptr(AccessLevelValue(30))},
 		},
 	}
 	environment, _, err = client.GroupProtectedEnvironments.ProtectGroupEnvironment(2, opt)
@@ -357,16 +357,16 @@ func TestGroupUpdateProtectedEnvironments(t *testing.T) {
 	}
 
 	opt := &UpdateGroupProtectedEnvironmentOptions{
-		Name: String(environmentName),
+		Name: Ptr(environmentName),
 		DeployAccessLevels: &[]*UpdateGroupEnvironmentAccessOptions{
-			{AccessLevel: AccessLevel(30)},
+			{AccessLevel: Ptr(AccessLevelValue(30))},
 		},
-		RequiredApprovalCount: Int(2),
+		RequiredApprovalCount: Ptr(2),
 		ApprovalRules: &[]*UpdateGroupEnvironmentApprovalRuleOptions{
 			{
-				GroupID:                Int(10),
-				AccessLevel:            AccessLevel(0),
-				AccessLevelDescription: String("devops"),
+				GroupID:                Ptr(10),
+				AccessLevel:            Ptr(AccessLevelValue(0)),
+				AccessLevelDescription: Ptr("devops"),
 			},
 		},
 	}
@@ -402,9 +402,9 @@ func TestGroupUpdateProtectedEnvironments(t *testing.T) {
 	}
 
 	opt = &UpdateGroupProtectedEnvironmentOptions{
-		Name: String(environmentName),
+		Name: Ptr(environmentName),
 		DeployAccessLevels: &[]*UpdateGroupEnvironmentAccessOptions{
-			{AccessLevel: AccessLevel(30)},
+			{AccessLevel: Ptr(AccessLevelValue(30))},
 		},
 	}
 	environment, _, err = client.GroupProtectedEnvironments.UpdateGroupProtectedEnvironment(2, environmentName, opt)
@@ -440,11 +440,11 @@ func TestGroupUpdateProtectedEnvironments(t *testing.T) {
 	}
 
 	opt = &UpdateGroupProtectedEnvironmentOptions{
-		Name: String(environmentName),
+		Name: Ptr(environmentName),
 		DeployAccessLevels: &[]*UpdateGroupEnvironmentAccessOptions{
 			{
-				ID:          Int(42),
-				AccessLevel: AccessLevel(30),
+				ID:          Ptr(42),
+				AccessLevel: Ptr(AccessLevelValue(30)),
 			},
 		},
 	}
@@ -500,13 +500,13 @@ func TestGroupUpdateProtectedEnvironments(t *testing.T) {
 	}
 
 	opt = &UpdateGroupProtectedEnvironmentOptions{
-		Name: String(environmentName),
+		Name: Ptr(environmentName),
 		ApprovalRules: &[]*UpdateGroupEnvironmentApprovalRuleOptions{
 			{
-				ID:                     Int(1),
-				GroupID:                Int(10),
-				AccessLevel:            AccessLevel(0),
-				AccessLevelDescription: String("devops"),
+				ID:                     Ptr(1),
+				GroupID:                Ptr(10),
+				AccessLevel:            Ptr(AccessLevelValue(0)),
+				AccessLevelDescription: Ptr("devops"),
 			},
 		},
 	}
@@ -546,14 +546,14 @@ func TestGroupUpdateProtectedEnvironments(t *testing.T) {
 	}
 
 	opt = &UpdateGroupProtectedEnvironmentOptions{
-		Name: String(environmentName),
+		Name: Ptr(environmentName),
 		ApprovalRules: &[]*UpdateGroupEnvironmentApprovalRuleOptions{
 			{
-				ID:      Int(1),
-				Destroy: Bool(true),
+				ID:      Ptr(1),
+				Destroy: Ptr(true),
 			},
 		},
-		RequiredApprovalCount: Int(0),
+		RequiredApprovalCount: Ptr(0),
 	}
 
 	environment, _, err = client.GroupProtectedEnvironments.UpdateGroupProtectedEnvironment(5, environmentName, opt)
diff --git a/group_repository_storage_move_test.go b/group_repository_storage_move_test.go
index 36fe7ae..fe4d7bc 100644
--- a/group_repository_storage_move_test.go
+++ b/group_repository_storage_move_test.go
@@ -222,7 +222,7 @@ func TestGroupRepositoryStorageMove_ScheduleAllStorageMoves(t *testing.T) {
 
 	_, err := client.GroupRepositoryStorageMove.ScheduleAllStorageMoves(
 		ScheduleAllGroupStorageMovesOptions{
-			SourceStorageName: String("default"),
+			SourceStorageName: Ptr("default"),
 		},
 	)
 	require.NoError(t, err)
diff --git a/group_variables_test.go b/group_variables_test.go
index e4fc5cd..d0b0e20 100644
--- a/group_variables_test.go
+++ b/group_variables_test.go
@@ -81,10 +81,10 @@ func TestCreateGroupVariable(t *testing.T) {
 		})
 
 	opt := &CreateGroupVariableOptions{
-		Key:       String("TEST_VARIABLE_1"),
-		Value:     String("test1"),
-		Protected: Bool(false),
-		Masked:    Bool(true),
+		Key:       Ptr("TEST_VARIABLE_1"),
+		Value:     Ptr("test1"),
+		Protected: Ptr(false),
+		Masked:    Ptr(true),
 	}
 
 	variable, _, err := client.GroupVariables.CreateVariable(1, opt, nil)
diff --git a/group_wikis_test.go b/group_wikis_test.go
index 9aee995..e0badd3 100644
--- a/group_wikis_test.go
+++ b/group_wikis_test.go
@@ -88,9 +88,9 @@ func TestCreateGroupWikiPage(t *testing.T) {
 		})
 
 	groupwiki, _, err := client.GroupWikis.CreateGroupWikiPage(1, &CreateGroupWikiPageOptions{
-		Content: String("content here"),
-		Title:   String("deploy title"),
-		Format:  WikiFormat(WikiFormatRDoc),
+		Content: Ptr("content here"),
+		Title:   Ptr("deploy title"),
+		Format:  Ptr(WikiFormatRDoc),
 	})
 	if err != nil {
 		t.Errorf("GroupWikis.CreateGroupWikiPage returned error: %v", err)
@@ -122,9 +122,9 @@ func TestEditGroupWikiPage(t *testing.T) {
 		})
 
 	groupwiki, _, err := client.GroupWikis.EditGroupWikiPage(1, "deploy", &EditGroupWikiPageOptions{
-		Content: String("content here"),
-		Title:   String("deploy title"),
-		Format:  WikiFormat(WikiFormatRDoc),
+		Content: Ptr("content here"),
+		Title:   Ptr("deploy title"),
+		Format:  Ptr(WikiFormatRDoc),
 	})
 	if err != nil {
 		t.Errorf("GroupWikis.EditGroupWikiPage returned error: %v", err)
diff --git a/groups_test.go b/groups_test.go
index a6818ef..b6f8e04 100644
--- a/groups_test.go
+++ b/groups_test.go
@@ -77,8 +77,8 @@ func TestCreateGroup(t *testing.T) {
 		})
 
 	opt := &CreateGroupOptions{
-		Name: String("g"),
-		Path: String("g"),
+		Name: Ptr("g"),
+		Path: Ptr("g"),
 	}
 
 	group, _, err := client.Groups.CreateGroup(opt, nil)
@@ -122,7 +122,7 @@ func TestTransferSubGroup(t *testing.T) {
 		})
 
 	opt := &TransferSubGroupOptions{
-		GroupID: Int(2),
+		GroupID: Ptr(2),
 	}
 
 	group, _, err := client.Groups.TransferSubGroup(1, opt)
@@ -295,9 +295,9 @@ func TestAddGroupLDAPLink(t *testing.T) {
 		})
 
 	opt := &AddGroupLDAPLinkOptions{
-		CN:          String("gitlab_group_example_30"),
-		GroupAccess: AccessLevel(30),
-		Provider:    String("example_ldap_provider"),
+		CN:          Ptr("gitlab_group_example_30"),
+		GroupAccess: Ptr(AccessLevelValue(30)),
+		Provider:    Ptr("example_ldap_provider"),
 	}
 
 	link, _, err := client.Groups.AddGroupLDAPLink(1, opt)
@@ -330,9 +330,9 @@ func TestAddGroupLDAPLinkFilter(t *testing.T) {
 		})
 
 	opt := &AddGroupLDAPLinkOptions{
-		Filter:      String("(memberOf=example_group_dn)"),
-		GroupAccess: AccessLevel(30),
-		Provider:    String("example_ldap_provider"),
+		Filter:      Ptr("(memberOf=example_group_dn)"),
+		GroupAccess: Ptr(AccessLevelValue(30)),
+		Provider:    Ptr("example_ldap_provider"),
 	}
 
 	link, _, err := client.Groups.AddGroupLDAPLink(1, opt)
@@ -429,8 +429,8 @@ func TestAddGroupSAMLLink(t *testing.T) {
 		})
 
 	opt := &AddGroupSAMLLinkOptions{
-		SAMLGroupName: String("gitlab_group_example_developer"),
-		AccessLevel:   AccessLevel(DeveloperPermissions),
+		SAMLGroupName: Ptr("gitlab_group_example_developer"),
+		AccessLevel:   Ptr(DeveloperPermissions),
 	}
 
 	link, _, err := client.Groups.AddGroupSAMLLink(1, opt)
@@ -474,8 +474,8 @@ func TestShareGroupWithGroup(t *testing.T) {
 		})
 
 	group, _, err := client.Groups.ShareGroupWithGroup(1, &ShareGroupWithGroupOptions{
-		GroupID:     Int(1),
-		GroupAccess: AccessLevel(DeveloperPermissions),
+		GroupID:     Ptr(1),
+		GroupAccess: Ptr(DeveloperPermissions),
 	})
 	if err != nil {
 		t.Errorf("Groups.ShareGroupWithGroup returned error: %v", err)
@@ -513,9 +513,9 @@ func TestCreateGroupWithIPRestrictionRanges(t *testing.T) {
 		})
 
 	opt := &CreateGroupOptions{
-		Name:                String("g"),
-		Path:                String("g"),
-		IPRestrictionRanges: String("192.168.0.0/24"),
+		Name:                Ptr("g"),
+		Path:                Ptr("g"),
+		IPRestrictionRanges: Ptr("192.168.0.0/24"),
 	}
 
 	group, _, err := client.Groups.CreateGroup(opt, nil)
@@ -539,7 +539,7 @@ func TestUpdateGroupWithIPRestrictionRanges(t *testing.T) {
 		})
 
 	group, _, err := client.Groups.UpdateGroup(1, &UpdateGroupOptions{
-		IPRestrictionRanges: String("192.168.0.0/24"),
+		IPRestrictionRanges: Ptr("192.168.0.0/24"),
 	})
 	if err != nil {
 		t.Errorf("Groups.UpdateGroup returned error: %v", err)
diff --git a/invites_test.go b/invites_test.go
index d3178a2..e211c28 100644
--- a/invites_test.go
+++ b/invites_test.go
@@ -39,7 +39,7 @@ func TestGroupInvites(t *testing.T) {
 	})
 
 	opt := &InvitesOptions{
-		Email: String("example@member.org"),
+		Email: Ptr("example@member.org"),
 	}
 
 	projects, _, err := client.Invites.GroupInvites("test", opt)
@@ -62,7 +62,7 @@ func TestGroupInvitesError(t *testing.T) {
 	})
 
 	opt := &InvitesOptions{
-		Email: String("example@member.org"),
+		Email: Ptr("example@member.org"),
 	}
 
 	projects, _, err := client.Invites.GroupInvites("test", opt)
@@ -108,7 +108,7 @@ func TestProjectInvites(t *testing.T) {
 	})
 
 	opt := &InvitesOptions{
-		Email: String("example@member.org"),
+		Email: Ptr("example@member.org"),
 	}
 
 	projects, _, err := client.Invites.ProjectInvites("test", opt)
@@ -131,7 +131,7 @@ func TestProjectInvitesError(t *testing.T) {
 	})
 
 	opt := &InvitesOptions{
-		Email: String("example@member.org"),
+		Email: Ptr("example@member.org"),
 	}
 
 	projects, _, err := client.Invites.ProjectInvites("test", opt)
diff --git a/issues_statistics_test.go b/issues_statistics_test.go
index 42de5a2..6021bc6 100644
--- a/issues_statistics_test.go
+++ b/issues_statistics_test.go
@@ -34,8 +34,8 @@ func TestGetIssuesStatistics(t *testing.T) {
 	})
 
 	opt := &GetIssuesStatisticsOptions{
-		AssigneeID: Int(1),
-		AuthorID:   Int(1),
+		AssigneeID: Ptr(1),
+		AuthorID:   Ptr(1),
 	}
 
 	issue, _, err := client.IssuesStatistics.GetIssuesStatistics(opt)
@@ -76,8 +76,8 @@ func TestGetGroupIssuesStatistics(t *testing.T) {
 	})
 
 	opt := &GetGroupIssuesStatisticsOptions{
-		AssigneeID: Int(1),
-		AuthorID:   Int(1),
+		AssigneeID: Ptr(1),
+		AuthorID:   Ptr(1),
 	}
 
 	issue, _, err := client.IssuesStatistics.GetGroupIssuesStatistics(1, opt)
@@ -118,8 +118,8 @@ func TestGetProjectIssuesStatistics(t *testing.T) {
 	})
 
 	opt := &GetProjectIssuesStatisticsOptions{
-		AssigneeID: Int(1),
-		AuthorID:   Int(1),
+		AssigneeID: Ptr(1),
+		AuthorID:   Ptr(1),
 	}
 
 	issue, _, err := client.IssuesStatistics.GetProjectIssuesStatistics(1, opt)
diff --git a/issues_test.go b/issues_test.go
index 16f52c6..22a3038 100644
--- a/issues_test.go
+++ b/issues_test.go
@@ -100,7 +100,7 @@ func TestMoveIssue(t *testing.T) {
 		mustWriteHTTPResponse(t, w, "testdata/issue_move.json")
 	})
 
-	issue, _, err := client.Issues.MoveIssue("1", 11, &MoveIssueOptions{ToProjectID: Int(5)})
+	issue, _, err := client.Issues.MoveIssue("1", 11, &MoveIssueOptions{ToProjectID: Ptr(5)})
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -173,7 +173,7 @@ func TestListIssues(t *testing.T) {
 	})
 
 	listProjectIssue := &ListIssuesOptions{
-		AuthorID:   Int(0o1),
+		AuthorID:   Ptr(0o1),
 		AssigneeID: AssigneeID(0o2),
 	}
 
@@ -239,7 +239,7 @@ func TestListIssuesWithLabelDetails(t *testing.T) {
 	})
 
 	listProjectIssue := &ListIssuesOptions{
-		AuthorID:   Int(0o1),
+		AuthorID:   Ptr(0o1),
 		AssigneeID: AssigneeID(0o2),
 	}
 
@@ -283,8 +283,8 @@ func TestListIssuesSearchInTitle(t *testing.T) {
 	})
 
 	listProjectIssue := &ListIssuesOptions{
-		Search: String("Title"),
-		In:     String("title"),
+		Search: Ptr("Title"),
+		In:     Ptr("title"),
 	}
 
 	issues, _, err := client.Issues.ListIssues(listProjectIssue)
@@ -321,8 +321,8 @@ func TestListIssuesSearchInDescription(t *testing.T) {
 	})
 
 	listProjectIssue := &ListIssuesOptions{
-		Search: String("description"),
-		In:     String("description"),
+		Search: Ptr("description"),
+		In:     Ptr("description"),
 	}
 
 	issues, _, err := client.Issues.ListIssues(listProjectIssue)
@@ -367,7 +367,7 @@ func TestListIssuesSearchByIterationID(t *testing.T) {
 	})
 
 	listProjectIssue := &ListIssuesOptions{
-		IterationID: Int(90),
+		IterationID: Ptr(90),
 	}
 
 	issues, _, err := client.Issues.ListIssues(listProjectIssue)
@@ -404,7 +404,7 @@ func TestListProjectIssues(t *testing.T) {
 	})
 
 	listProjectIssue := &ListProjectIssuesOptions{
-		AuthorID:   Int(0o1),
+		AuthorID:   Ptr(0o1),
 		AssigneeID: AssigneeID(0o2),
 	}
 	issues, _, err := client.Issues.ListProjectIssues("1", listProjectIssue)
@@ -450,7 +450,7 @@ func TestListProjectIssuesSearchByIterationID(t *testing.T) {
 	})
 
 	listProjectIssue := &ListProjectIssuesOptions{
-		IterationID: Int(90),
+		IterationID: Ptr(90),
 	}
 
 	issues, _, err := client.Issues.ListProjectIssues(1, listProjectIssue)
@@ -487,8 +487,8 @@ func TestListGroupIssues(t *testing.T) {
 	})
 
 	listGroupIssue := &ListGroupIssuesOptions{
-		State:      String("Open"),
-		AuthorID:   Int(0o1),
+		State:      Ptr("Open"),
+		AuthorID:   Ptr(0o1),
 		AssigneeID: AssigneeID(0o2),
 	}
 
@@ -535,7 +535,7 @@ func TestListGroupIssuesSearchByIterationID(t *testing.T) {
 	})
 
 	listProjectIssue := &ListGroupIssuesOptions{
-		IterationID: Int(90),
+		IterationID: Ptr(90),
 	}
 
 	issues, _, err := client.Issues.ListGroupIssues(1, listProjectIssue)
@@ -571,8 +571,8 @@ func TestCreateIssue(t *testing.T) {
 	})
 
 	createIssueOptions := &CreateIssueOptions{
-		Title:       String("Title of issue"),
-		Description: String("This is description of an issue"),
+		Title:       Ptr("Title of issue"),
+		Description: Ptr("This is description of an issue"),
 	}
 
 	issue, _, err := client.Issues.CreateIssue("1", createIssueOptions)
@@ -602,8 +602,8 @@ func TestUpdateIssue(t *testing.T) {
 	})
 
 	updateIssueOpt := &UpdateIssueOptions{
-		Title:       String("Title of issue"),
-		Description: String("This is description of an issue"),
+		Title:       Ptr("Title of issue"),
+		Description: Ptr("This is description of an issue"),
 	}
 	issue, _, err := client.Issues.UpdateIssue(1, 5, updateIssueOpt)
 	if err != nil {
@@ -736,7 +736,7 @@ func TestSetTimeEstimate(t *testing.T) {
 	})
 
 	setTimeEstiOpt := &SetTimeEstimateOptions{
-		Duration: String("3h 30m"),
+		Duration: Ptr("3h 30m"),
 	}
 
 	timeState, _, err := client.Issues.SetTimeEstimate("1", 5, setTimeEstiOpt)
@@ -779,8 +779,8 @@ func TestAddSpentTime(t *testing.T) {
 		fmt.Fprint(w, `{"human_time_estimate": null, "human_total_time_spent": "1h", "time_estimate": 0, "total_time_spent": 3600}`)
 	})
 	addSpentTimeOpt := &AddSpentTimeOptions{
-		Duration: String("1h"),
-		Summary:  String("test"),
+		Duration: Ptr("1h"),
+		Summary:  Ptr("test"),
 	}
 
 	timeState, _, err := client.Issues.AddSpentTime("1", 5, addSpentTimeOpt)
diff --git a/job_token_scope_test.go b/job_token_scope_test.go
index 0e33f73..4300f21 100644
--- a/job_token_scope_test.go
+++ b/job_token_scope_test.go
@@ -142,7 +142,7 @@ func TestAddProjectToJobScopeAllowList(t *testing.T) {
 
 	addTokenResponse, resp, err := client.JobTokenScope.AddProjectToJobScopeAllowList(
 		1,
-		&JobTokenInboundAllowOptions{TargetProjectID: Int(2)},
+		&JobTokenInboundAllowOptions{TargetProjectID: Ptr(2)},
 	)
 	assert.NoError(t, err)
 	assert.Equal(t, want, addTokenResponse)
diff --git a/jobs_test.go b/jobs_test.go
index 0bdeb6b..5c65d41 100644
--- a/jobs_test.go
+++ b/jobs_test.go
@@ -199,7 +199,7 @@ func TestDownloadSingleArtifactsFileByTagOrBranch(t *testing.T) {
 		w.Write(wantContent)
 	})
 
-	opt := &DownloadArtifactsFileOptions{Job: String("publish")}
+	opt := &DownloadArtifactsFileOptions{Job: Ptr("publish")}
 	reader, resp, err := client.Jobs.DownloadSingleArtifactsFileByTagOrBranch(9, "abranch", "foo/bar.pdf", opt)
 	if err != nil {
 		t.Fatalf("Jobs.DownloadSingleArtifactsFileByTagOrBranch returns an error: %v", err)
diff --git a/labels_test.go b/labels_test.go
index 967e32f..3abfe3a 100644
--- a/labels_test.go
+++ b/labels_test.go
@@ -34,9 +34,9 @@ func TestCreateLabel(t *testing.T) {
 
 	// Create new label
 	l := &CreateLabelOptions{
-		Name:     String("My Label"),
-		Color:    String("#11FF22"),
-		Priority: Int(2),
+		Name:     Ptr("My Label"),
+		Color:    Ptr("#11FF22"),
+		Priority: Ptr(2),
 	}
 	label, _, err := client.Labels.CreateLabel("1", l)
 	if err != nil {
@@ -57,7 +57,7 @@ func TestDeleteLabel(t *testing.T) {
 
 	// Delete label
 	label := &DeleteLabelOptions{
-		Name: String("My Label"),
+		Name: Ptr("My Label"),
 	}
 
 	_, err := client.Labels.DeleteLabel("1", label)
@@ -76,11 +76,11 @@ func TestUpdateLabel(t *testing.T) {
 
 	// Update label
 	l := &UpdateLabelOptions{
-		Name:        String("My Label"),
-		NewName:     String("New Label"),
-		Color:       String("#11FF23"),
-		Description: String("This is updated label"),
-		Priority:    Int(42),
+		Name:        Ptr("My Label"),
+		NewName:     Ptr("New Label"),
+		Color:       Ptr("#11FF23"),
+		Description: Ptr("This is updated label"),
+		Priority:    Ptr(42),
 	}
 
 	label, resp, err := client.Labels.UpdateLabel("1", l)
diff --git a/markdown_test.go b/markdown_test.go
index 5a4aad4..96eaa2d 100644
--- a/markdown_test.go
+++ b/markdown_test.go
@@ -20,9 +20,9 @@ func TestRender(t *testing.T) {
 	})
 
 	opt := &RenderOptions{
-		Text:                    String("# Testing"),
-		GitlabFlavouredMarkdown: Bool(true),
-		Project:                 String("some/sub/group/project"),
+		Text:                    Ptr("# Testing"),
+		GitlabFlavouredMarkdown: Ptr(true),
+		Project:                 Ptr("some/sub/group/project"),
 	}
 	markdown, resp, err := client.Markdown.Render(opt)
 	if err != nil {
diff --git a/merge_request_approvals_test.go b/merge_request_approvals_test.go
index 619f538..71132dd 100644
--- a/merge_request_approvals_test.go
+++ b/merge_request_approvals_test.go
@@ -367,8 +367,8 @@ func TestCreateApprovalRules(t *testing.T) {
 	})
 
 	opt := &CreateMergeRequestApprovalRuleOptions{
-		Name:              String("security"),
-		ApprovalsRequired: Int(3),
+		Name:              Ptr("security"),
+		ApprovalsRequired: Ptr(3),
 		UserIDs:           &[]int{5, 50},
 		GroupIDs:          &[]int{5},
 	}
diff --git a/merge_requests_test.go b/merge_requests_test.go
index cfee816..8a7b191 100644
--- a/merge_requests_test.go
+++ b/merge_requests_test.go
@@ -159,8 +159,8 @@ func TestListProjectMergeRequests(t *testing.T) {
 
 	opts := ListProjectMergeRequestsOptions{
 		AssigneeID:             AssigneeID(UserIDAny),
-		WithLabelsDetails:      Bool(true),
-		WithMergeStatusRecheck: Bool(true),
+		WithLabelsDetails:      Ptr(true),
+		WithMergeStatusRecheck: Ptr(true),
 	}
 
 	mergeRequests, _, err := client.MergeRequests.ListProjectMergeRequests(278964, &opts)
diff --git a/merge_trains_test.go b/merge_trains_test.go
index fe4d997..101ca23 100644
--- a/merge_trains_test.go
+++ b/merge_trains_test.go
@@ -225,7 +225,7 @@ func TestAddMergeRequestToMergeTrain(t *testing.T) {
 		mustWriteHTTPResponse(t, w, "testdata/add_merge_request_in_merge_train.json")
 	})
 
-	opt := &AddMergeRequestToMergeTrainOptions{WhenPipelineSucceeds: Bool(true), Squash: Bool(true)}
+	opt := &AddMergeRequestToMergeTrainOptions{WhenPipelineSucceeds: Ptr(true), Squash: Ptr(true)}
 
 	mergeTrains, _, err := client.MergeTrains.AddMergeRequestToMergeTrain(597, 1, opt)
 	if err != nil {
diff --git a/milestones_test.go b/milestones_test.go
index 33dbf34..24c6cf7 100644
--- a/milestones_test.go
+++ b/milestones_test.go
@@ -36,7 +36,7 @@ func TestMilestonesService_ListMilestones(t *testing.T) {
 		Description: "Version",
 		State:       "active",
 		WebURL:      "",
-		Expired:     Bool(false),
+		Expired:     Ptr(false),
 	}}
 
 	ms, resp, err := client.Milestones.ListMilestones(5, nil)
@@ -86,7 +86,7 @@ func TestMilestonesService_GetMilestone(t *testing.T) {
 		Description: "Version",
 		State:       "active",
 		WebURL:      "",
-		Expired:     Bool(false),
+		Expired:     Ptr(false),
 	}
 
 	m, resp, err := client.Milestones.GetMilestone(5, 12, nil)
@@ -136,7 +136,7 @@ func TestMilestonesService_CreateMilestone(t *testing.T) {
 		Description: "Version",
 		State:       "active",
 		WebURL:      "",
-		Expired:     Bool(false),
+		Expired:     Ptr(false),
 	}
 
 	m, resp, err := client.Milestones.CreateMilestone(5, nil)
@@ -186,7 +186,7 @@ func TestMilestonesService_UpdateMilestone(t *testing.T) {
 		Description: "Version",
 		State:       "active",
 		WebURL:      "",
-		Expired:     Bool(false),
+		Expired:     Ptr(false),
 	}
 
 	m, resp, err := client.Milestones.UpdateMilestone(5, 12, nil)
diff --git a/namespaces_test.go b/namespaces_test.go
index c12df3e..b11ff32 100644
--- a/namespaces_test.go
+++ b/namespaces_test.go
@@ -95,8 +95,8 @@ func TestListNamespaces(t *testing.T) {
 		ownedOnly *bool
 	}{
 		{"with_nothing", nil, nil},
-		{"with_search", String("foobar"), nil},
-		{"with_owned_only", nil, Bool(false)},
+		{"with_search", Ptr("foobar"), nil},
+		{"with_owned_only", nil, Ptr(false)},
 	}
 
 	for _, tc := range testCases {
@@ -113,7 +113,7 @@ func TestListNamespaces(t *testing.T) {
 					Path:                 "user1",
 					Kind:                 "user",
 					FullPath:             "user1",
-					AvatarURL:            String("https://secure.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon"),
+					AvatarURL:            Ptr("https://secure.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon"),
 					WebURL:               "https://gitlab.example.com/user1",
 					Plan:                 "default",
 					BillableMembersCount: 1,
@@ -155,7 +155,7 @@ func TestListNamespaces(t *testing.T) {
 					Path:                 "group2",
 					Kind:                 "group",
 					FullPath:             "group2",
-					AvatarURL:            String("https://gitlab.example.com/groups/group2"),
+					AvatarURL:            Ptr("https://gitlab.example.com/groups/group2"),
 					WebURL:               "https://gitlab.example.com/group2",
 					Plan:                 "default",
 					BillableMembersCount: 1,
@@ -209,8 +209,8 @@ func TestGetNamespace(t *testing.T) {
 		WebURL:                      "https://gitlab.example.com/groups/group1",
 		MembersCountWithDescendants: 2,
 		BillableMembersCount:        2,
-		MaxSeatsUsed:                Int(0),
-		SeatsInUse:                  Int(0),
+		MaxSeatsUsed:                Ptr(0),
+		SeatsInUse:                  Ptr(0),
 		Plan:                        "default",
 		TrialEndsOn:                 nil,
 		Trial:                       false,
@@ -235,7 +235,7 @@ func TestNamespaceExists(t *testing.T) {
 	})
 
 	opt := &NamespaceExistsOptions{
-		ParentID: Int(1),
+		ParentID: Ptr(1),
 	}
 	exists, _, err := client.Namespaces.NamespaceExists("my-group", opt)
 	if err != nil {
@@ -292,8 +292,8 @@ func TestSearchNamespace(t *testing.T) {
 			WebURL:                      "https://gitlab.example.com/groups/twitter",
 			MembersCountWithDescendants: 2,
 			BillableMembersCount:        2,
-			MaxSeatsUsed:                Int(0),
-			SeatsInUse:                  Int(0),
+			MaxSeatsUsed:                Ptr(0),
+			SeatsInUse:                  Ptr(0),
 			Plan:                        "default",
 			TrialEndsOn:                 nil,
 			Trial:                       false,
diff --git a/personal_access_tokens_test.go b/personal_access_tokens_test.go
index 7d4f09d..de92d83 100644
--- a/personal_access_tokens_test.go
+++ b/personal_access_tokens_test.go
@@ -31,7 +31,7 @@ func TestListPersonalAccessTokensWithUserFilter(t *testing.T) {
 		mustWriteHTTPResponse(t, w, "testdata/list_personal_access_tokens_with_user_filter.json")
 	})
 
-	personalAccessTokens, _, err := client.PersonalAccessTokens.ListPersonalAccessTokens(&ListPersonalAccessTokensOptions{UserID: Int(1), ListOptions: ListOptions{Page: 1, PerPage: 10}})
+	personalAccessTokens, _, err := client.PersonalAccessTokens.ListPersonalAccessTokens(&ListPersonalAccessTokensOptions{UserID: Ptr(1), ListOptions: ListOptions{Page: 1, PerPage: 10}})
 	if err != nil {
 		t.Errorf("PersonalAccessTokens.ListPersonalAccessTokens returned error: %v", err)
 	}
diff --git a/pipeline_triggers_test.go b/pipeline_triggers_test.go
index 7ca789a..828a416 100644
--- a/pipeline_triggers_test.go
+++ b/pipeline_triggers_test.go
@@ -31,7 +31,7 @@ func TestRunPipeline(t *testing.T) {
 		fmt.Fprint(w, `{"id":1, "status":"pending"}`)
 	})
 
-	opt := &RunPipelineTriggerOptions{Ref: String("master")}
+	opt := &RunPipelineTriggerOptions{Ref: Ptr("master")}
 	pipeline, _, err := client.PipelineTriggers.RunPipelineTrigger(1, opt)
 	if err != nil {
 		t.Errorf("PipelineTriggers.RunPipelineTrigger returned error: %v", err)
diff --git a/pipelines_test.go b/pipelines_test.go
index 71d02f5..870f2ea 100644
--- a/pipelines_test.go
+++ b/pipelines_test.go
@@ -33,7 +33,7 @@ func TestListProjectPipelines(t *testing.T) {
 		fmt.Fprint(w, `[{"id":1},{"id":2}]`)
 	})
 
-	opt := &ListProjectPipelinesOptions{Ref: String("master")}
+	opt := &ListProjectPipelinesOptions{Ref: Ptr("master")}
 	piplines, _, err := client.Pipelines.ListProjectPipelines(1, opt)
 	if err != nil {
 		t.Errorf("Pipelines.ListProjectPipelines returned error: %v", err)
@@ -194,7 +194,7 @@ func TestGetLatestPipeline_WithRef(t *testing.T) {
 	})
 
 	pipeline, _, err := client.Pipelines.GetLatestPipeline(1, &GetLatestPipelineOptions{
-		Ref: String("abc"),
+		Ref: Ptr("abc"),
 	})
 
 	assert.NoError(t, err)
@@ -209,7 +209,7 @@ func TestCreatePipeline(t *testing.T) {
 		fmt.Fprint(w, `{"id":1, "status":"pending"}`)
 	})
 
-	opt := &CreatePipelineOptions{Ref: String("master")}
+	opt := &CreatePipelineOptions{Ref: Ptr("master")}
 	pipeline, _, err := client.Pipelines.CreatePipeline(1, opt)
 	if err != nil {
 		t.Errorf("Pipelines.CreatePipeline returned error: %v", err)
diff --git a/plan_limits_test.go b/plan_limits_test.go
index 1d6a1b1..f6c08dc 100644
--- a/plan_limits_test.go
+++ b/plan_limits_test.go
@@ -41,7 +41,7 @@ func TestGetCurrentPlanLimits(t *testing.T) {
 	})
 
 	opt := &GetCurrentPlanLimitsOptions{
-		PlanName: String("default"),
+		PlanName: Ptr("default"),
 	}
 	planlimit, _, err := client.PlanLimits.GetCurrentPlanLimits(opt)
 	if err != nil {
@@ -82,8 +82,8 @@ func TestChangePlanLimits(t *testing.T) {
 	})
 
 	opt := &ChangePlanLimitOptions{
-		PlanName:         String("default"),
-		ConanMaxFileSize: Int(3221225472),
+		PlanName:         Ptr("default"),
+		ConanMaxFileSize: Ptr(3221225472),
 	}
 	planlimit, _, err := client.PlanLimits.ChangePlanLimits(opt)
 	if err != nil {
diff --git a/project_managed_licenses_test.go b/project_managed_licenses_test.go
index 6438a7d..c4223fe 100644
--- a/project_managed_licenses_test.go
+++ b/project_managed_licenses_test.go
@@ -87,8 +87,8 @@ func TestAddManagedLicenses(t *testing.T) {
 	})
 
 	ops := AddManagedLicenseOptions{
-		Name:           String("MIT"),
-		ApprovalStatus: LicenseApprovalStatus(LicenseApproved),
+		Name:           Ptr("MIT"),
+		ApprovalStatus: Ptr(LicenseApproved),
 	}
 	license, _, err := client.ManagedLicenses.AddManagedLicense(1, &ops)
 	if err != nil {
@@ -129,7 +129,7 @@ func TestEditManagedLicenses(t *testing.T) {
 	})
 
 	ops := EditManagedLicenceOptions{
-		ApprovalStatus: LicenseApprovalStatus(LicenseBlacklisted),
+		ApprovalStatus: Ptr(LicenseBlacklisted),
 	}
 	license, _, err := client.ManagedLicenses.EditManagedLicense(1, 3, &ops)
 	if err != nil {
diff --git a/project_repository_storage_move_test.go b/project_repository_storage_move_test.go
index 81f7edc..e8322c2 100644
--- a/project_repository_storage_move_test.go
+++ b/project_repository_storage_move_test.go
@@ -208,7 +208,7 @@ func TestProjectRepositoryStorageMove_ScheduleAllStorageMoves(t *testing.T) {
 
 	_, err := client.ProjectRepositoryStorageMove.ScheduleAllStorageMoves(
 		ScheduleAllProjectStorageMovesOptions{
-			SourceStorageName: String("default"),
+			SourceStorageName: Ptr("default"),
 		},
 	)
 	require.NoError(t, err)
diff --git a/project_vulnerabilities_test.go b/project_vulnerabilities_test.go
index 5bf0b8d..1345d95 100644
--- a/project_vulnerabilities_test.go
+++ b/project_vulnerabilities_test.go
@@ -55,7 +55,7 @@ func TestCreateVulnerability(t *testing.T) {
 	})
 
 	opt := &CreateVulnerabilityOptions{
-		FindingID: Int(1),
+		FindingID: Ptr(1),
 	}
 
 	projectVulnerability, _, err := client.ProjectVulnerabilities.CreateVulnerability(1, opt)
diff --git a/projects_test.go b/projects_test.go
index c3e9b9a..e905986 100644
--- a/projects_test.go
+++ b/projects_test.go
@@ -40,12 +40,12 @@ func TestListProjects(t *testing.T) {
 
 	opt := &ListProjectsOptions{
 		ListOptions: ListOptions{Page: 2, PerPage: 3},
-		Archived:    Bool(true),
-		OrderBy:     String("name"),
-		Sort:        String("asc"),
-		Search:      String("query"),
-		Simple:      Bool(true),
-		Visibility:  Visibility(PublicVisibility),
+		Archived:    Ptr(true),
+		OrderBy:     Ptr("name"),
+		Sort:        Ptr("asc"),
+		Search:      Ptr("query"),
+		Simple:      Ptr(true),
+		Visibility:  Ptr(PublicVisibility),
 	}
 
 	projects, _, err := client.Projects.ListProjects(opt)
@@ -69,12 +69,12 @@ func TestListUserProjects(t *testing.T) {
 
 	opt := &ListProjectsOptions{
 		ListOptions: ListOptions{Page: 2, PerPage: 3},
-		Archived:    Bool(true),
-		OrderBy:     String("name"),
-		Sort:        String("asc"),
-		Search:      String("query"),
-		Simple:      Bool(true),
-		Visibility:  Visibility(PublicVisibility),
+		Archived:    Ptr(true),
+		OrderBy:     Ptr("name"),
+		Sort:        Ptr("asc"),
+		Search:      Ptr("query"),
+		Simple:      Ptr(true),
+		Visibility:  Ptr(PublicVisibility),
 	}
 
 	projects, _, err := client.Projects.ListUserProjects(1, opt)
@@ -127,12 +127,12 @@ func TestListUserStarredProjects(t *testing.T) {
 
 	opt := &ListProjectsOptions{
 		ListOptions: ListOptions{Page: 2, PerPage: 3},
-		Archived:    Bool(true),
-		OrderBy:     String("name"),
-		Sort:        String("asc"),
-		Search:      String("query"),
-		Simple:      Bool(true),
-		Visibility:  Visibility(PublicVisibility),
+		Archived:    Ptr(true),
+		OrderBy:     Ptr("name"),
+		Sort:        Ptr("asc"),
+		Search:      Ptr("query"),
+		Simple:      Ptr(true),
+		Visibility:  Ptr(PublicVisibility),
 	}
 
 	projects, _, err := client.Projects.ListUserStarredProjects(1, opt)
@@ -157,7 +157,7 @@ func TestListProjectsUsersByID(t *testing.T) {
 
 	opt := &ListProjectUserOptions{
 		ListOptions: ListOptions{Page: 2, PerPage: 3},
-		Search:      String("query"),
+		Search:      Ptr("query"),
 	}
 
 	projects, _, err := client.Projects.ListProjectsUsers(1, opt)
@@ -182,7 +182,7 @@ func TestListProjectsUsersByName(t *testing.T) {
 
 	opt := &ListProjectUserOptions{
 		ListOptions: ListOptions{Page: 2, PerPage: 3},
-		Search:      String("query"),
+		Search:      Ptr("query"),
 	}
 
 	projects, _, err := client.Projects.ListProjectsUsers("namespace/name", opt)
@@ -207,7 +207,7 @@ func TestListProjectsGroupsByID(t *testing.T) {
 
 	opt := &ListProjectGroupOptions{
 		ListOptions: ListOptions{Page: 2, PerPage: 3},
-		Search:      String("query"),
+		Search:      Ptr("query"),
 	}
 
 	groups, _, err := client.Projects.ListProjectsGroups(1, opt)
@@ -232,7 +232,7 @@ func TestListProjectsGroupsByName(t *testing.T) {
 
 	opt := &ListProjectGroupOptions{
 		ListOptions: ListOptions{Page: 2, PerPage: 3},
-		Search:      String("query"),
+		Search:      Ptr("query"),
 	}
 
 	groups, _, err := client.Projects.ListProjectsGroups("namespace/name", opt)
@@ -256,13 +256,13 @@ func TestListOwnedProjects(t *testing.T) {
 
 	opt := &ListProjectsOptions{
 		ListOptions: ListOptions{Page: 2, PerPage: 3},
-		Archived:    Bool(true),
-		OrderBy:     String("name"),
-		Sort:        String("asc"),
-		Search:      String("query"),
-		Simple:      Bool(true),
-		Owned:       Bool(true),
-		Visibility:  Visibility(PublicVisibility),
+		Archived:    Ptr(true),
+		OrderBy:     Ptr("name"),
+		Sort:        Ptr("asc"),
+		Search:      Ptr("query"),
+		Simple:      Ptr(true),
+		Owned:       Ptr(true),
+		Visibility:  Ptr(PublicVisibility),
 	}
 
 	projects, _, err := client.Projects.ListProjects(opt)
@@ -286,13 +286,13 @@ func TestListStarredProjects(t *testing.T) {
 
 	opt := &ListProjectsOptions{
 		ListOptions: ListOptions{Page: 2, PerPage: 3},
-		Archived:    Bool(true),
-		OrderBy:     String("name"),
-		Sort:        String("asc"),
-		Search:      String("query"),
-		Simple:      Bool(true),
-		Starred:     Bool(true),
-		Visibility:  Visibility(PublicVisibility),
+		Archived:    Ptr(true),
+		OrderBy:     Ptr("name"),
+		Sort:        Ptr("asc"),
+		Search:      Ptr("query"),
+		Simple:      Ptr(true),
+		Starred:     Ptr(true),
+		Visibility:  Ptr(PublicVisibility),
 	}
 
 	projects, _, err := client.Projects.ListProjects(opt)
@@ -403,7 +403,7 @@ func TestGetProjectWithOptions(t *testing.T) {
 		UploadsSize:           6523619,
 	}}
 
-	project, _, err := client.Projects.GetProject(1, &GetProjectOptions{Statistics: Bool(true)})
+	project, _, err := client.Projects.GetProject(1, &GetProjectOptions{Statistics: Ptr(true)})
 	if err != nil {
 		t.Fatalf("Projects.GetProject returns an error: %v", err)
 	}
@@ -422,8 +422,8 @@ func TestCreateProject(t *testing.T) {
 	})
 
 	opt := &CreateProjectOptions{
-		Name:        String("n"),
-		MergeMethod: MergeMethod(RebaseMerge),
+		Name:        Ptr("n"),
+		MergeMethod: Ptr(RebaseMerge),
 	}
 
 	project, _, err := client.Projects.CreateProject(opt)
@@ -573,12 +573,12 @@ func TestListProjectForks(t *testing.T) {
 
 	opt := &ListProjectsOptions{}
 	opt.ListOptions = ListOptions{Page: 2, PerPage: 3}
-	opt.Archived = Bool(true)
-	opt.OrderBy = String("name")
-	opt.Sort = String("asc")
-	opt.Search = String("query")
-	opt.Simple = Bool(true)
-	opt.Visibility = Visibility(PublicVisibility)
+	opt.Archived = Ptr(true)
+	opt.OrderBy = Ptr("name")
+	opt.Sort = Ptr("asc")
+	opt.Search = Ptr("query")
+	opt.Simple = Ptr(true)
+	opt.Visibility = Ptr(PublicVisibility)
 
 	projects, _, err := client.Projects.ListProjectForks("namespace/name", opt)
 	if err != nil {
@@ -599,8 +599,8 @@ func TestShareProjectWithGroup(t *testing.T) {
 	})
 
 	opt := &ShareWithGroupOptions{
-		GroupID:     Int(1),
-		GroupAccess: AccessLevel(AccessLevelValue(50)),
+		GroupID:     Ptr(1),
+		GroupAccess: Ptr(AccessLevelValue(50)),
 	}
 
 	_, err := client.Projects.ShareProjectWithGroup(1, opt)
@@ -679,7 +679,7 @@ func TestChangeApprovalConfiguration(t *testing.T) {
 	})
 
 	opt := &ChangeApprovalConfigurationOptions{
-		ApprovalsBeforeMerge: Int(3),
+		ApprovalsBeforeMerge: Ptr(3),
 	}
 
 	approvals, _, err := client.Projects.ChangeApprovalConfiguration(1, opt)
@@ -773,9 +773,9 @@ func TestForkProject(t *testing.T) {
 	})
 
 	project, _, err := client.Projects.ForkProject(1, &ForkProjectOptions{
-		NamespaceID: Int(namespaceID),
-		Name:        String(name),
-		Path:        String(path),
+		NamespaceID: Ptr(namespaceID),
+		Name:        Ptr(name),
+		Path:        Ptr(path),
 	})
 	if err != nil {
 		t.Errorf("Projects.ForkProject returned error: %v", err)
@@ -1219,8 +1219,8 @@ func TestCreateProjectApprovalRule(t *testing.T) {
 	})
 
 	opt := &CreateProjectLevelRuleOptions{
-		Name:              String("security"),
-		ApprovalsRequired: Int(3),
+		Name:              Ptr("security"),
+		ApprovalsRequired: Ptr(3),
 		UserIDs:           &[]int{5, 50},
 		GroupIDs:          &[]int{5},
 		ReportType:        String("code_coverage"),
@@ -1370,8 +1370,8 @@ func TestCreateProjectApprovalRuleEligibleApprovers(t *testing.T) {
 	})
 
 	opt := &CreateProjectLevelRuleOptions{
-		Name:              String("Any name"),
-		ApprovalsRequired: Int(1),
+		Name:              Ptr("Any name"),
+		ApprovalsRequired: Ptr(1),
 	}
 
 	rule, _, err := client.Projects.CreateProjectApprovalRule(1, opt)
@@ -1398,7 +1398,7 @@ func TestCreateProjectApprovalRuleEligibleApprovers(t *testing.T) {
 func TestProjectModelsOptionalMergeAttribute(t *testing.T) {
 	// Create a `CreateProjectOptions` struct, ensure that merge attribute doesn't serialize
 	jsonString, err := json.Marshal(&CreateProjectOptions{
-		Name: String("testProject"),
+		Name: Ptr("testProject"),
 	})
 	if err != nil {
 		t.Fatal("Failed to marshal object", err)
@@ -1407,7 +1407,7 @@ func TestProjectModelsOptionalMergeAttribute(t *testing.T) {
 
 	// Test the same thing but for `EditProjectOptions` struct
 	jsonString, err = json.Marshal(&EditProjectOptions{
-		Name: String("testProject"),
+		Name: Ptr("testProject"),
 	})
 	if err != nil {
 		t.Fatal("Failed to marshal object", err)
diff --git a/protected_branches_test.go b/protected_branches_test.go
index 6e8e5b6..0aaecbe 100644
--- a/protected_branches_test.go
+++ b/protected_branches_test.go
@@ -150,11 +150,11 @@ func TestProtectRepositoryBranches(t *testing.T) {
 	}`)
 	})
 	opt := &ProtectRepositoryBranchesOptions{
-		Name:                      String("master"),
-		PushAccessLevel:           AccessLevel(MaintainerPermissions),
-		MergeAccessLevel:          AccessLevel(MaintainerPermissions),
-		AllowForcePush:            Bool(true),
-		CodeOwnerApprovalRequired: Bool(true),
+		Name:                      Ptr("master"),
+		PushAccessLevel:           Ptr(MaintainerPermissions),
+		MergeAccessLevel:          Ptr(MaintainerPermissions),
+		AllowForcePush:            Ptr(true),
+		CodeOwnerApprovalRequired: Ptr(true),
 	}
 	projects, _, err := client.ProtectedBranches.ProtectRepositoryBranches("1", opt)
 	if err != nil {
@@ -195,7 +195,7 @@ func TestUpdateRepositoryBranches(t *testing.T) {
 		}`)
 	})
 	opt := &UpdateProtectedBranchOptions{
-		CodeOwnerApprovalRequired: Bool(true),
+		CodeOwnerApprovalRequired: Ptr(true),
 	}
 	protectedBranch, _, err := client.ProtectedBranches.UpdateProtectedBranch("1", "master", opt)
 	if err != nil {
diff --git a/protected_environments_test.go b/protected_environments_test.go
index e4cf3b9..dda3b38 100644
--- a/protected_environments_test.go
+++ b/protected_environments_test.go
@@ -247,16 +247,16 @@ func TestProtectRepositoryEnvironments(t *testing.T) {
 	}
 
 	opt := &ProtectRepositoryEnvironmentsOptions{
-		Name: String("my-awesome-environment"),
+		Name: Ptr("my-awesome-environment"),
 		DeployAccessLevels: &[]*EnvironmentAccessOptions{
-			{AccessLevel: AccessLevel(30)},
+			{AccessLevel: Ptr(AccessLevelValue(30))},
 		},
-		RequiredApprovalCount: Int(2),
+		RequiredApprovalCount: Ptr(2),
 		ApprovalRules: &[]*EnvironmentApprovalRuleOptions{
 			{
-				GroupID:                Int(10),
-				AccessLevel:            AccessLevel(0),
-				AccessLevelDescription: String("devops"),
+				GroupID:                Ptr(10),
+				AccessLevel:            Ptr(AccessLevelValue(0)),
+				AccessLevelDescription: Ptr("devops"),
 			},
 		},
 	}
@@ -290,9 +290,9 @@ func TestProtectRepositoryEnvironments(t *testing.T) {
 	}
 
 	opt = &ProtectRepositoryEnvironmentsOptions{
-		Name: String("my-awesome-environment2"),
+		Name: Ptr("my-awesome-environment2"),
 		DeployAccessLevels: &[]*EnvironmentAccessOptions{
-			{AccessLevel: AccessLevel(30)},
+			{AccessLevel: Ptr(AccessLevelValue(30))},
 		},
 	}
 	environment, _, err = client.ProtectedEnvironments.ProtectRepositoryEnvironments(2, opt)
@@ -353,16 +353,16 @@ func TestUpdateProtectedEnvironments(t *testing.T) {
 	}
 
 	opt := &UpdateProtectedEnvironmentsOptions{
-		Name: String(environmentName),
+		Name: Ptr(environmentName),
 		DeployAccessLevels: &[]*UpdateEnvironmentAccessOptions{
-			{AccessLevel: AccessLevel(30)},
+			{AccessLevel: Ptr(AccessLevelValue(30))},
 		},
-		RequiredApprovalCount: Int(2),
+		RequiredApprovalCount: Ptr(2),
 		ApprovalRules: &[]*UpdateEnvironmentApprovalRuleOptions{
 			{
-				GroupID:                Int(10),
-				AccessLevel:            AccessLevel(0),
-				AccessLevelDescription: String("devops"),
+				GroupID:                Ptr(10),
+				AccessLevel:            Ptr(AccessLevelValue(0)),
+				AccessLevelDescription: Ptr("devops"),
 			},
 		},
 	}
@@ -398,9 +398,9 @@ func TestUpdateProtectedEnvironments(t *testing.T) {
 	}
 
 	opt = &UpdateProtectedEnvironmentsOptions{
-		Name: String(environmentName),
+		Name: Ptr(environmentName),
 		DeployAccessLevels: &[]*UpdateEnvironmentAccessOptions{
-			{AccessLevel: AccessLevel(30)},
+			{AccessLevel: Ptr(AccessLevelValue(30))},
 		},
 	}
 	environment, _, err = client.ProtectedEnvironments.UpdateProtectedEnvironments(2, environmentName, opt)
@@ -436,11 +436,11 @@ func TestUpdateProtectedEnvironments(t *testing.T) {
 	}
 
 	opt = &UpdateProtectedEnvironmentsOptions{
-		Name: String(environmentName),
+		Name: Ptr(environmentName),
 		DeployAccessLevels: &[]*UpdateEnvironmentAccessOptions{
 			{
-				ID:          Int(42),
-				AccessLevel: AccessLevel(30),
+				ID:          Ptr(42),
+				AccessLevel: Ptr(AccessLevelValue(30)),
 			},
 		},
 	}
@@ -496,13 +496,13 @@ func TestUpdateProtectedEnvironments(t *testing.T) {
 	}
 
 	opt = &UpdateProtectedEnvironmentsOptions{
-		Name: String(environmentName),
+		Name: Ptr(environmentName),
 		ApprovalRules: &[]*UpdateEnvironmentApprovalRuleOptions{
 			{
-				ID:                     Int(1),
-				GroupID:                Int(10),
-				AccessLevel:            AccessLevel(0),
-				AccessLevelDescription: String("devops"),
+				ID:                     Ptr(1),
+				GroupID:                Ptr(10),
+				AccessLevel:            Ptr(AccessLevelValue(0)),
+				AccessLevelDescription: Ptr("devops"),
 			},
 		},
 	}
@@ -542,14 +542,14 @@ func TestUpdateProtectedEnvironments(t *testing.T) {
 	}
 
 	opt = &UpdateProtectedEnvironmentsOptions{
-		Name: String(environmentName),
+		Name: Ptr(environmentName),
 		ApprovalRules: &[]*UpdateEnvironmentApprovalRuleOptions{
 			{
-				ID:      Int(1),
-				Destroy: Bool(true),
+				ID:      Ptr(1),
+				Destroy: Ptr(true),
 			},
 		},
-		RequiredApprovalCount: Int(0),
+		RequiredApprovalCount: Ptr(0),
 	}
 
 	environment, _, err = client.ProtectedEnvironments.UpdateProtectedEnvironments(5, environmentName, opt)
diff --git a/protected_tags_test.go b/protected_tags_test.go
index 87c4b8f..345b7c3 100644
--- a/protected_tags_test.go
+++ b/protected_tags_test.go
@@ -114,11 +114,11 @@ func TestProtectRepositoryTags(t *testing.T) {
 	}
 
 	opt := &ProtectRepositoryTagsOptions{
-		Name:              String("my-awesome-tag"),
-		CreateAccessLevel: AccessLevel(30),
+		Name:              Ptr("my-awesome-tag"),
+		CreateAccessLevel: Ptr(AccessLevelValue(30)),
 		AllowedToCreate: &[]*TagsPermissionOptions{
 			{
-				GroupID: Int(300),
+				GroupID: Ptr(300),
 			},
 		},
 	}
diff --git a/releaselinks_test.go b/releaselinks_test.go
index ff6f947..a922636 100644
--- a/releaselinks_test.go
+++ b/releaselinks_test.go
@@ -68,8 +68,8 @@ func TestReleaseLinksService_CreateReleaseLink(t *testing.T) {
 		{
 			description: "Mandatory Attributes",
 			options: &CreateReleaseLinkOptions{
-				Name: String("awesome-v0.2.dmg"),
-				URL:  String("http://192.168.10.15:3000"),
+				Name: Ptr("awesome-v0.2.dmg"),
+				URL:  Ptr("http://192.168.10.15:3000"),
 			},
 			response: `{
 				"id":1,
@@ -87,10 +87,10 @@ func TestReleaseLinksService_CreateReleaseLink(t *testing.T) {
 		{
 			description: "Optional Attributes",
 			options: &CreateReleaseLinkOptions{
-				Name:     String("release-notes.md"),
-				URL:      String("http://192.168.10.15:3000"),
-				FilePath: String("docs/release-notes.md"),
-				LinkType: LinkType(OtherLinkType),
+				Name:     Ptr("release-notes.md"),
+				URL:      Ptr("http://192.168.10.15:3000"),
+				FilePath: Ptr("docs/release-notes.md"),
+				LinkType: Ptr(OtherLinkType),
 			},
 			response: `{
 				"id":1,
@@ -159,9 +159,9 @@ func TestReleaseLinksService_UpdateReleaseLink(t *testing.T) {
 	releaseLink, _, err := client.ReleaseLinks.UpdateReleaseLink(
 		1, exampleTagName, 1,
 		&UpdateReleaseLinkOptions{
-			Name:     String(exampleReleaseName),
-			FilePath: String("http://192.168.10.15:3000/namespace/example/-/releases/v0.1/downloads/awesome-v0.2.dmg"),
-			LinkType: LinkType(OtherLinkType),
+			Name:     Ptr(exampleReleaseName),
+			FilePath: Ptr("http://192.168.10.15:3000/namespace/example/-/releases/v0.1/downloads/awesome-v0.2.dmg"),
+			LinkType: Ptr(OtherLinkType),
 		})
 
 	require.NoError(t, err)
diff --git a/releases_test.go b/releases_test.go
index d4bb441..013f80f 100644
--- a/releases_test.go
+++ b/releases_test.go
@@ -92,9 +92,9 @@ func TestReleasesService_CreateRelease(t *testing.T) {
 		})
 
 	opts := &CreateReleaseOptions{
-		Name:        String("name"),
-		TagName:     String(exampleTagName),
-		Description: String("Description"),
+		Name:        Ptr("name"),
+		TagName:     Ptr(exampleTagName),
+		Description: Ptr("Description"),
 	}
 
 	release, _, err := client.Releases.CreateRelease(1, opts)
@@ -136,12 +136,12 @@ func TestReleasesService_CreateReleaseWithAsset(t *testing.T) {
 		})
 
 	opts := &CreateReleaseOptions{
-		Name:        String("name"),
-		TagName:     String(exampleTagName),
-		Description: String("Description"),
+		Name:        Ptr("name"),
+		TagName:     Ptr(exampleTagName),
+		Description: Ptr("Description"),
 		Assets: &ReleaseAssetsOptions{
 			Links: []*ReleaseAssetLinkOptions{
-				{String("sldkf"), String("sldkfj"), String("sldkfh"), LinkType(OtherLinkType)},
+				{Ptr("sldkf"), Ptr("sldkfj"), Ptr("sldkfh"), Ptr(OtherLinkType)},
 			},
 		},
 	}
@@ -185,12 +185,12 @@ func TestReleasesService_CreateReleaseWithAssetAndNameMetadata(t *testing.T) {
 		})
 
 	opts := &CreateReleaseOptions{
-		Name:        String("name"),
-		TagName:     String(exampleTagNameWithMetadata),
-		Description: String("Description"),
+		Name:        Ptr("name"),
+		TagName:     Ptr(exampleTagNameWithMetadata),
+		Description: Ptr("Description"),
 		Assets: &ReleaseAssetsOptions{
 			Links: []*ReleaseAssetLinkOptions{
-				{String("sldkf"), String("sldkfj"), String("sldkfh"), LinkType(OtherLinkType)},
+				{Ptr("sldkf"), Ptr("sldkfj"), Ptr("sldkfh"), Ptr(OtherLinkType)},
 			},
 		},
 	}
@@ -234,9 +234,9 @@ func TestReleasesService_CreateReleaseWithMilestones(t *testing.T) {
 		})
 
 	opts := &CreateReleaseOptions{
-		Name:        String("name"),
-		TagName:     String(exampleTagName),
-		Description: String("Description"),
+		Name:        Ptr("name"),
+		TagName:     Ptr(exampleTagName),
+		Description: Ptr("Description"),
 		Milestones:  &[]string{exampleTagName, "v0.1.0"},
 	}
 
@@ -279,9 +279,9 @@ func TestReleasesService_CreateReleaseWithReleasedAt(t *testing.T) {
 		})
 
 	opts := &CreateReleaseOptions{
-		Name:        String("name"),
-		TagName:     String(exampleTagName),
-		Description: String("Description"),
+		Name:        Ptr("name"),
+		TagName:     Ptr(exampleTagName),
+		Description: Ptr("Description"),
 		ReleasedAt:  &time.Time{},
 	}
 
@@ -316,8 +316,8 @@ func TestReleasesService_UpdateRelease(t *testing.T) {
 		})
 
 	opts := &UpdateReleaseOptions{
-		Name:        String("name"),
-		Description: String("Description"),
+		Name:        Ptr("name"),
+		Description: Ptr("Description"),
 	}
 
 	release, _, err := client.Releases.UpdateRelease(1, exampleTagName, opts)
@@ -351,8 +351,8 @@ func TestReleasesService_UpdateReleaseWithMilestones(t *testing.T) {
 		})
 
 	opts := &UpdateReleaseOptions{
-		Name:        String("name"),
-		Description: String("Description"),
+		Name:        Ptr("name"),
+		Description: Ptr("Description"),
 		Milestones:  &[]string{exampleTagName, "v0.1.0"},
 	}
 
@@ -387,8 +387,8 @@ func TestReleasesService_UpdateReleaseWithReleasedAt(t *testing.T) {
 		})
 
 	opts := &UpdateReleaseOptions{
-		Name:        String("name"),
-		Description: String("Description"),
+		Name:        Ptr("name"),
+		Description: Ptr("Description"),
 		ReleasedAt:  &time.Time{},
 	}
 
diff --git a/repositories_test.go b/repositories_test.go
index ae63004..e08b67e 100644
--- a/repositories_test.go
+++ b/repositories_test.go
@@ -146,7 +146,7 @@ func TestRepositoriesService_Archive(t *testing.T) {
 		)
 	})
 
-	opt := &ArchiveOptions{Format: String("gz")}
+	opt := &ArchiveOptions{Format: Ptr("gz")}
 	want := []byte("{" +
 		"size: 100" +
 		"content: content" +
@@ -181,7 +181,7 @@ func TestRepositoriesService_StreamArchive(t *testing.T) {
 	})
 
 	var w http.ResponseWriter
-	opt := &ArchiveOptions{Format: String("gz")}
+	opt := &ArchiveOptions{Format: Ptr("gz")}
 
 	resp, err := client.Repositories.StreamArchive(1, w, opt, nil)
 	require.NoError(t, err)
@@ -239,8 +239,8 @@ func TestRepositoriesService_Compare(t *testing.T) {
 	})
 
 	opt := &CompareOptions{
-		From: String("master"),
-		To:   String("feature"),
+		From: Ptr("master"),
+		To:   Ptr("feature"),
 	}
 	want := &Compare{
 		Commit: &Commit{
@@ -402,7 +402,7 @@ func TestAddChangelogData(t *testing.T) {
 	resp, err := client.Repositories.AddChangelog(
 		1,
 		&AddChangelogOptions{
-			Version: String("1.0.0"),
+			Version: Ptr("1.0.0"),
 		})
 	require.NoError(t, err)
 	assert.Equal(t, http.StatusOK, resp.StatusCode)
@@ -424,7 +424,7 @@ func TestGenerateChangelogData(t *testing.T) {
 	notes, _, err := client.Repositories.GenerateChangelogData(
 		1,
 		GenerateChangelogDataOptions{
-			Version: String("1.0.0"),
+			Version: Ptr("1.0.0"),
 		},
 	)
 	require.NoError(t, err)
diff --git a/repository_files_test.go b/repository_files_test.go
index 6945b6f..34e27a0 100644
--- a/repository_files_test.go
+++ b/repository_files_test.go
@@ -268,7 +268,7 @@ func TestRepositoryFilesService_CreateFile(t *testing.T) {
 	require.NotNil(t, resp)
 	require.Equal(t, want, fi)
 
-	fi, resp, err = client.RepositoryFiles.CreateFile(13083, "app%2Fproject%2Erb", &CreateFileOptions{ExecuteFilemode: Bool(true)})
+	fi, resp, err = client.RepositoryFiles.CreateFile(13083, "app%2Fproject%2Erb", &CreateFileOptions{ExecuteFilemode: Ptr(true)})
 	require.NoError(t, err)
 	require.NotNil(t, resp)
 	require.Equal(t, want, fi)
@@ -312,7 +312,7 @@ func TestRepositoryFilesService_UpdateFile(t *testing.T) {
 	require.NotNil(t, resp)
 	require.Equal(t, want, fi)
 
-	fi, resp, err = client.RepositoryFiles.UpdateFile(13083, "app%2Fproject%2Erb", &UpdateFileOptions{ExecuteFilemode: Bool(true)})
+	fi, resp, err = client.RepositoryFiles.UpdateFile(13083, "app%2Fproject%2Erb", &UpdateFileOptions{ExecuteFilemode: Ptr(true)})
 	require.NoError(t, err)
 	require.NotNil(t, resp)
 	require.Equal(t, want, fi)
diff --git a/repository_submodules_test.go b/repository_submodules_test.go
index fed614d..f670773 100644
--- a/repository_submodules_test.go
+++ b/repository_submodules_test.go
@@ -41,7 +41,7 @@ func TestRepositorySubmodulesService_UpdateSubmodule(t *testing.T) {
 		CommitterEmail: "noty@gmail.com",
 		Message:        "Update my submodule",
 		ParentIDs:      []string{"ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba"},
-		Status:         BuildState(Running),
+		Status:         Ptr(Running),
 	}
 
 	sc, resp, err := client.RepositorySubmodules.UpdateSubmodule(13083, "app%2Fproject", nil)
diff --git a/resource_weight_events_test.go b/resource_weight_events_test.go
index ac59db4..ec72cc9 100644
--- a/resource_weight_events_test.go
+++ b/resource_weight_events_test.go
@@ -47,7 +47,7 @@ func TestResourceWeightEventsService_ListIssueWightEvents(t *testing.T) {
 			AvatarURL: "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
 			WebURL:    "http://gitlab.example.com/root",
 		},
-		CreatedAt: Time(time.Date(2018, time.August, 20, 13, 38, 20, 77000000, time.UTC)),
+		CreatedAt: Ptr(time.Date(2018, time.August, 20, 13, 38, 20, 77000000, time.UTC)),
 		IssueID:   253,
 		Weight:    3,
 	}}
diff --git a/runners_test.go b/runners_test.go
index aaefd19..9ed77d7 100644
--- a/runners_test.go
+++ b/runners_test.go
@@ -74,9 +74,9 @@ func TestListRunnersJobs(t *testing.T) {
 			Stage:          "test",
 			Name:           "run_tests",
 			Ref:            "master",
-			CreatedAt:      Time(time.Date(2021, time.October, 22, 11, 59, 25, 201000000, time.UTC)),
-			StartedAt:      Time(time.Date(2021, time.October, 22, 11, 59, 33, 660000000, time.UTC)),
-			FinishedAt:     Time(time.Date(2021, time.October, 22, 15, 59, 25, 201000000, time.UTC)),
+			CreatedAt:      Ptr(time.Date(2021, time.October, 22, 11, 59, 25, 201000000, time.UTC)),
+			StartedAt:      Ptr(time.Date(2021, time.October, 22, 11, 59, 33, 660000000, time.UTC)),
+			FinishedAt:     Ptr(time.Date(2021, time.October, 22, 15, 59, 25, 201000000, time.UTC)),
 			Duration:       171.540594,
 			QueuedDuration: 2.535766,
 			User: &User{
@@ -91,16 +91,16 @@ func TestListRunnersJobs(t *testing.T) {
 			Commit: &Commit{
 				ID:             "6c016b801a88f4bd31f927fc045b5c746a6f823e",
 				ShortID:        "6c016b80",
-				CreatedAt:      Time(time.Date(2018, time.March, 21, 14, 41, 0, 0, time.UTC)),
+				CreatedAt:      Ptr(time.Date(2018, time.March, 21, 14, 41, 0, 0, time.UTC)),
 				ParentIDs:      []string{"6008b4902d40799ab11688e502d9f1f27f6d2e18"},
 				Title:          "Update env for specific runner",
 				Message:        "Update env for specific runner\n",
 				AuthorName:     "John SMITH",
 				AuthorEmail:    "john.smith@example.com",
-				AuthoredDate:   Time(time.Date(2018, time.March, 21, 14, 41, 0, 0, time.UTC)),
+				AuthoredDate:   Ptr(time.Date(2018, time.March, 21, 14, 41, 0, 0, time.UTC)),
 				CommitterName:  "John SMITH",
 				CommitterEmail: "john.smith@example.com",
-				CommittedDate:  Time(time.Date(2018, time.March, 21, 14, 41, 0, 0, time.UTC)),
+				CommittedDate:  Ptr(time.Date(2018, time.March, 21, 14, 41, 0, 0, time.UTC)),
 				WebURL:         "https://gitlab.example.com/awesome/packages/common/-/commit/6c016b801a88f4bd31f927fc045b5c746a6f823e",
 			},
 			Pipeline: pipeline,
@@ -112,7 +112,7 @@ func TestListRunnersJobs(t *testing.T) {
 				NameWithNamespace: "awesome",
 				Path:              "common",
 				PathWithNamespace: "awesome",
-				CreatedAt:         Time(time.Date(2018, time.February, 13, 9, 21, 48, 107000000, time.UTC)),
+				CreatedAt:         Ptr(time.Date(2018, time.February, 13, 9, 21, 48, 107000000, time.UTC)),
 			},
 		},
 	}
@@ -170,7 +170,7 @@ func TestUpdateRunnersDetails(t *testing.T) {
 		ID:             6,
 		IsShared:       false,
 		RunnerType:     "project_type",
-		ContactedAt:    Time(time.Date(2016, time.January, 25, 16, 39, 48, 166000000, time.UTC)),
+		ContactedAt:    Ptr(time.Date(2016, time.January, 25, 16, 39, 48, 166000000, time.UTC)),
 		Online:         true,
 		Status:         "online",
 		Token:          "205086a8e3b9a2b818ffac9b89d102",
@@ -219,7 +219,7 @@ func TestGetRunnerDetails(t *testing.T) {
 		ID:             6,
 		IsShared:       false,
 		RunnerType:     "project_type",
-		ContactedAt:    Time(time.Date(2016, time.January, 25, 16, 39, 48, 166000000, time.UTC)),
+		ContactedAt:    Ptr(time.Date(2016, time.January, 25, 16, 39, 48, 166000000, time.UTC)),
 		Online:         true,
 		Status:         "online",
 		Token:          "205086a8e3b9a2b818ffac9b89d102",
@@ -254,7 +254,7 @@ func TestRegisterNewRunner(t *testing.T) {
 	want := &Runner{
 		ID:             12345,
 		Token:          "6337ff461c94fd3fa32ba3b1ff4125",
-		TokenExpiresAt: Time(time.Date(2016, time.January, 25, 16, 39, 48, 166000000, time.UTC)),
+		TokenExpiresAt: Ptr(time.Date(2016, time.January, 25, 16, 39, 48, 166000000, time.UTC)),
 	}
 	if !reflect.DeepEqual(want, runner) {
 		t.Errorf("Runners.RegisterNewRunner returned %+v, want %+v", runner, want)
@@ -288,19 +288,19 @@ func TestRegisterNewRunnerInfo(t *testing.T) {
 	})
 
 	opt := &RegisterNewRunnerOptions{
-		Token:       String("6337ff461c94fd3fa32ba3b1ff4125"),
-		Description: String("some description"),
+		Token:       Ptr("6337ff461c94fd3fa32ba3b1ff4125"),
+		Description: Ptr("some description"),
 		Info: &RegisterNewRunnerInfoOptions{
-			String("some name"),
-			String("13.7.0"),
-			String("943fc252"),
-			String("linux"),
-			String("amd64"),
+			Ptr("some name"),
+			Ptr("13.7.0"),
+			Ptr("943fc252"),
+			Ptr("linux"),
+			Ptr("amd64"),
 		},
-		Active:         Bool(true),
-		Locked:         Bool(true),
-		RunUntagged:    Bool(false),
-		MaximumTimeout: Int(45),
+		Active:         Ptr(true),
+		Locked:         Ptr(true),
+		RunUntagged:    Ptr(false),
+		MaximumTimeout: Ptr(45),
 	}
 	runner, resp, err := client.Runners.RegisterNewRunner(opt, nil)
 	if err != nil {
@@ -316,7 +316,7 @@ func TestRegisterNewRunnerInfo(t *testing.T) {
 		Online:         true,
 		Status:         "online",
 		Token:          "1111122222333333444444",
-		TokenExpiresAt: Time(time.Date(2016, time.January, 25, 16, 39, 48, 166000000, time.UTC)),
+		TokenExpiresAt: Ptr(time.Date(2016, time.January, 25, 16, 39, 48, 166000000, time.UTC)),
 	}
 	if !reflect.DeepEqual(want, runner) {
 		t.Errorf("Runners.RegisterNewRunner returned %+v, want %+v", runner, want)
@@ -409,8 +409,8 @@ func TestResetInstanceRunnerRegistrationToken(t *testing.T) {
 	}
 
 	want := &RunnerRegistrationToken{
-		Token:          String("6337ff461c94fd3fa32ba3b1ff4125"),
-		TokenExpiresAt: Time(time.Date(2016, time.January, 25, 16, 39, 48, 166000000, time.UTC)),
+		Token:          Ptr("6337ff461c94fd3fa32ba3b1ff4125"),
+		TokenExpiresAt: Ptr(time.Date(2016, time.January, 25, 16, 39, 48, 166000000, time.UTC)),
 	}
 	if !reflect.DeepEqual(want, token) {
 		t.Errorf("Runners.ResetInstanceRunnerRegistrationToken returned %+v, want %+v", token, want)
@@ -440,8 +440,8 @@ func TestResetGroupRunnerRegistrationToken(t *testing.T) {
 	}
 
 	want := &RunnerRegistrationToken{
-		Token:          String("6337ff461c94fd3fa32ba3b1ff4125"),
-		TokenExpiresAt: Time(time.Date(2016, time.January, 25, 16, 39, 48, 166000000, time.UTC)),
+		Token:          Ptr("6337ff461c94fd3fa32ba3b1ff4125"),
+		TokenExpiresAt: Ptr(time.Date(2016, time.January, 25, 16, 39, 48, 166000000, time.UTC)),
 	}
 	if !reflect.DeepEqual(want, token) {
 		t.Errorf("Runners.ResetGroupRunnerRegistrationToken returned %+v, want %+v", token, want)
@@ -471,8 +471,8 @@ func TestResetProjectRunnerRegistrationToken(t *testing.T) {
 	}
 
 	want := &RunnerRegistrationToken{
-		Token:          String("6337ff461c94fd3fa32ba3b1ff4125"),
-		TokenExpiresAt: Time(time.Date(2016, time.January, 25, 16, 39, 48, 166000000, time.UTC)),
+		Token:          Ptr("6337ff461c94fd3fa32ba3b1ff4125"),
+		TokenExpiresAt: Ptr(time.Date(2016, time.January, 25, 16, 39, 48, 166000000, time.UTC)),
 	}
 	if !reflect.DeepEqual(want, token) {
 		t.Errorf("Runners.ResetProjectRunnerRegistrationToken returned %+v, want %+v", token, want)
@@ -502,8 +502,8 @@ func TestResetRunnerAuthenticationToken(t *testing.T) {
 	}
 
 	want := &RunnerAuthenticationToken{
-		Token:          String("6337ff461c94fd3fa32ba3b1ff4125"),
-		TokenExpiresAt: Time(time.Date(2016, time.January, 25, 16, 39, 48, 166000000, time.UTC)),
+		Token:          Ptr("6337ff461c94fd3fa32ba3b1ff4125"),
+		TokenExpiresAt: Ptr(time.Date(2016, time.January, 25, 16, 39, 48, 166000000, time.UTC)),
 	}
 	if !reflect.DeepEqual(want, token) {
 		t.Errorf("Runners.ResetRunnerAuthenticationToken returned %+v, want %+v", token, want)
diff --git a/services_test.go b/services_test.go
index b2515a0..fe8a8d4 100644
--- a/services_test.go
+++ b/services_test.go
@@ -87,12 +87,12 @@ func TestSetCustomIssueTrackerService(t *testing.T) {
 	})
 
 	opt := &SetCustomIssueTrackerServiceOptions{
-		NewIssueURL: String("1"),
-		IssuesURL:   String("2"),
-		ProjectURL:  String("3"),
-		Description: String("4"),
-		Title:       String("5"),
-		PushEvents:  Bool(true),
+		NewIssueURL: Ptr("1"),
+		IssuesURL:   Ptr("2"),
+		ProjectURL:  Ptr("3"),
+		Description: Ptr("4"),
+		Title:       Ptr("5"),
+		PushEvents:  Ptr(true),
 	}
 
 	_, err := client.Services.SetCustomIssueTrackerService(1, opt)
@@ -215,7 +215,7 @@ func TestSetDiscordService(t *testing.T) {
 	})
 
 	opt := &SetDiscordServiceOptions{
-		WebHook: String("webhook_uri"),
+		WebHook: Ptr("webhook_uri"),
 	}
 
 	_, err := client.Services.SetDiscordService(1, opt)
@@ -262,7 +262,7 @@ func TestSetDroneCIService(t *testing.T) {
 		testMethod(t, r, http.MethodPut)
 	})
 
-	opt := &SetDroneCIServiceOptions{String("t"), String("u"), Bool(true)}
+	opt := &SetDroneCIServiceOptions{Ptr("t"), Ptr("u"), Ptr(true)}
 
 	_, err := client.Services.SetDroneCIService(1, opt)
 	if err != nil {
@@ -308,7 +308,7 @@ func TestSetEmailsOnPushService(t *testing.T) {
 		testMethod(t, r, http.MethodPut)
 	})
 
-	opt := &SetEmailsOnPushServiceOptions{String("t"), Bool(true), Bool(true), Bool(true), Bool(true), String("t")}
+	opt := &SetEmailsOnPushServiceOptions{Ptr("t"), Ptr(true), Ptr(true), Ptr(true), Ptr(true), Ptr("t")}
 
 	_, err := client.Services.SetEmailsOnPushService(1, opt)
 	if err != nil {
@@ -397,16 +397,16 @@ func TestSetJiraService(t *testing.T) {
 	})
 
 	opt := &SetJiraServiceOptions{
-		URL:                   String("asd"),
-		APIURL:                String("asd"),
-		ProjectKey:            String("as"),
-		Username:              String("aas"),
-		Password:              String("asd"),
-		Active:                Bool(true),
-		JiraIssueTransitionID: String("2,3"),
-		CommitEvents:          Bool(true),
-		CommentOnEventEnabled: Bool(true),
-		MergeRequestsEvents:   Bool(true),
+		URL:                   Ptr("asd"),
+		APIURL:                Ptr("asd"),
+		ProjectKey:            Ptr("as"),
+		Username:              Ptr("aas"),
+		Password:              Ptr("asd"),
+		Active:                Ptr(true),
+		JiraIssueTransitionID: Ptr("2,3"),
+		CommitEvents:          Ptr(true),
+		CommentOnEventEnabled: Ptr(true),
+		MergeRequestsEvents:   Ptr(true),
 	}
 
 	_, err := client.Services.SetJiraService(1, opt)
@@ -454,9 +454,9 @@ func TestSetMattermostService(t *testing.T) {
 	})
 
 	opt := &SetMattermostServiceOptions{
-		WebHook:  String("webhook_uri"),
-		Username: String("username"),
-		Channel:  String("#development"),
+		WebHook:  Ptr("webhook_uri"),
+		Username: Ptr("username"),
+		Channel:  Ptr("#development"),
 	}
 
 	_, err := client.Services.SetMattermostService(1, opt)
@@ -504,9 +504,9 @@ func TestSetPipelinesEmailService(t *testing.T) {
 	})
 
 	opt := &SetPipelinesEmailServiceOptions{
-		Recipients:                String("test@email.com"),
-		NotifyOnlyBrokenPipelines: Bool(true),
-		NotifyOnlyDefaultBranch:   Bool(false),
+		Recipients:                Ptr("test@email.com"),
+		NotifyOnlyBrokenPipelines: Ptr(true),
+		NotifyOnlyDefaultBranch:   Ptr(false),
 		AddPusher:                 nil,
 		BranchesToBeNotified:      nil,
 		PipelineEvents:            nil,
@@ -556,7 +556,7 @@ func TestSetPrometheusService(t *testing.T) {
 		testMethod(t, r, http.MethodPut)
 	})
 
-	opt := &SetPrometheusServiceOptions{String("t"), String("u"), String("a")}
+	opt := &SetPrometheusServiceOptions{Ptr("t"), Ptr("u"), Ptr("a")}
 
 	_, err := client.Services.SetPrometheusService(1, opt)
 	if err != nil {
@@ -603,9 +603,9 @@ func TestSetSlackService(t *testing.T) {
 	})
 
 	opt := &SetSlackServiceOptions{
-		WebHook:  String("webhook_uri"),
-		Username: String("username"),
-		Channel:  String("#development"),
+		WebHook:  Ptr("webhook_uri"),
+		Username: Ptr("username"),
+		Channel:  Ptr("#development"),
 	}
 
 	_, err := client.Services.SetSlackService(1, opt)
@@ -653,10 +653,10 @@ func TestSetYouTrackService(t *testing.T) {
 	})
 
 	opt := &SetYouTrackServiceOptions{
-		IssuesURL:   String("https://example.org/youtrack/issue/:id"),
-		ProjectURL:  String("https://example.org/youtrack/projects/1"),
-		Description: String("description"),
-		PushEvents:  Bool(true),
+		IssuesURL:   Ptr("https://example.org/youtrack/issue/:id"),
+		ProjectURL:  Ptr("https://example.org/youtrack/projects/1"),
+		Description: Ptr("description"),
+		PushEvents:  Ptr(true),
 	}
 
 	_, err := client.Services.SetYouTrackService(1, opt)
@@ -704,7 +704,7 @@ func TestSetSlackSlashCommandsService(t *testing.T) {
 	})
 
 	opt := &SetSlackSlashCommandsServiceOptions{
-		Token: String("token"),
+		Token: Ptr("token"),
 	}
 
 	_, err := client.Services.SetSlackSlashCommandsService(1, opt)
@@ -752,8 +752,8 @@ func TestSetMattermostSlashCommandsService(t *testing.T) {
 	})
 
 	opt := &SetMattermostSlashCommandsServiceOptions{
-		Token:    String("token"),
-		Username: String("username"),
+		Token:    Ptr("token"),
+		Username: Ptr("username"),
 	}
 
 	_, err := client.Services.SetMattermostSlashCommandsService(1, opt)
diff --git a/settings_test.go b/settings_test.go
index 20aadb2..a4ad6ce 100644
--- a/settings_test.go
+++ b/settings_test.go
@@ -51,7 +51,7 @@ func TestUpdateSettings(t *testing.T) {
 	})
 
 	options := &UpdateSettingsOptions{
-		DefaultProjectsLimit: Int(100),
+		DefaultProjectsLimit: Ptr(100),
 	}
 	settings, _, err := client.Settings.UpdateSettings(options)
 	if err != nil {
diff --git a/snippet_repository_storage_move_test.go b/snippet_repository_storage_move_test.go
index 84e2f3d..8dab451 100644
--- a/snippet_repository_storage_move_test.go
+++ b/snippet_repository_storage_move_test.go
@@ -208,7 +208,7 @@ func TestSnippetRepositoryStorageMove_ScheduleAllStorageMoves(t *testing.T) {
 
 	_, err := client.SnippetRepositoryStorageMove.ScheduleAllStorageMoves(
 		ScheduleAllSnippetStorageMovesOptions{
-			SourceStorageName: String("default"),
+			SourceStorageName: Ptr("default"),
 		},
 	)
 	require.NoError(t, err)
diff --git a/snippets_test.go b/snippets_test.go
index 7da054b..25790c4 100644
--- a/snippets_test.go
+++ b/snippets_test.go
@@ -49,11 +49,11 @@ func TestSnippetsService_CreateSnippet(t *testing.T) {
 	})
 
 	opt := &CreateSnippetOptions{
-		Title:       String("test"),
-		FileName:    String("file"),
-		Description: String("description"),
-		Content:     String("content"),
-		Visibility:  Visibility(PublicVisibility),
+		Title:       Ptr("test"),
+		FileName:    Ptr("file"),
+		Description: Ptr("description"),
+		Content:     Ptr("content"),
+		Visibility:  Ptr(PublicVisibility),
 	}
 
 	s, _, err := client.Snippets.CreateSnippet(opt)
@@ -72,11 +72,11 @@ func TestSnippetsService_UpdateSnippet(t *testing.T) {
 	})
 
 	opt := &UpdateSnippetOptions{
-		Title:       String("test"),
-		FileName:    String("file"),
-		Description: String("description"),
-		Content:     String("content"),
-		Visibility:  Visibility(PublicVisibility),
+		Title:       Ptr("test"),
+		FileName:    Ptr("file"),
+		Description: Ptr("description"),
+		Content:     Ptr("content"),
+		Visibility:  Ptr(PublicVisibility),
 	}
 
 	s, _, err := client.Snippets.UpdateSnippet(1, opt)
diff --git a/system_hooks_test.go b/system_hooks_test.go
index 1205ff0..1cd33d3 100644
--- a/system_hooks_test.go
+++ b/system_hooks_test.go
@@ -90,7 +90,7 @@ func TestSystemHooksService_AddHook(t *testing.T) {
 	})
 
 	opt := &AddHookOptions{
-		URL: String("https://gitlab.example.com/hook"),
+		URL: Ptr("https://gitlab.example.com/hook"),
 	}
 
 	hook, _, err := client.SystemHooks.AddHook(opt)
diff --git a/tags_test.go b/tags_test.go
index 320ceb7..77793de 100644
--- a/tags_test.go
+++ b/tags_test.go
@@ -74,7 +74,7 @@ func TestTagsService_CreateReleaseNote(t *testing.T) {
 			fmt.Fprint(w, `{"tag_name": "1.0.0", "description": "Amazing release. Wow"}`)
 		})
 
-	opt := &CreateReleaseNoteOptions{Description: String("Amazing release. Wow")}
+	opt := &CreateReleaseNoteOptions{Description: Ptr("Amazing release. Wow")}
 
 	release, _, err := client.Tags.CreateReleaseNote(1, "1.0.0", opt)
 	if err != nil {
@@ -96,7 +96,7 @@ func TestTagsService_UpdateReleaseNote(t *testing.T) {
 			fmt.Fprint(w, `{"tag_name": "1.0.0", "description": "Amazing release. Wow!"}`)
 		})
 
-	opt := &UpdateReleaseNoteOptions{Description: String("Amazing release. Wow!")}
+	opt := &UpdateReleaseNoteOptions{Description: Ptr("Amazing release. Wow!")}
 
 	release, _, err := client.Tags.UpdateReleaseNote(1, "1.0.0", opt)
 	if err != nil {
diff --git a/topics_test.go b/topics_test.go
index 0098fe9..d8776c1 100644
--- a/topics_test.go
+++ b/topics_test.go
@@ -56,7 +56,7 @@ func TestTopicsService_ListTopics(t *testing.T) {
     ]`)
 	})
 
-	opt := &ListTopicsOptions{Search: String("git")}
+	opt := &ListTopicsOptions{Search: Ptr("git")}
 	topics, _, err := client.Topics.ListTopics(opt)
 	if err != nil {
 		t.Errorf("Tags.ListTags returned error: %v", err)
@@ -135,7 +135,7 @@ func TestTopicsService_CreateTopic(t *testing.T) {
     }`)
 	})
 
-	opt := &CreateTopicOptions{Name: String("topic1"), Title: String("Topic 1"), Description: String("description")}
+	opt := &CreateTopicOptions{Name: Ptr("topic1"), Title: Ptr("Topic 1"), Description: Ptr("description")}
 	release, _, err := client.Topics.CreateTopic(opt)
 	if err != nil {
 		t.Errorf("Topics.CreateTopic returned error: %v", err)
@@ -162,7 +162,7 @@ func TestTopicsService_UpdateTopic(t *testing.T) {
     }`)
 	})
 
-	opt := &UpdateTopicOptions{Name: String("topic1"), Title: String("Topic 1"), Description: String("description")}
+	opt := &UpdateTopicOptions{Name: Ptr("topic1"), Title: Ptr("Topic 1"), Description: Ptr("description")}
 	release, _, err := client.Topics.UpdateTopic(1, opt)
 	if err != nil {
 		t.Errorf("Topics.UpdateTopic returned error: %v", err)
diff --git a/users_test.go b/users_test.go
index 5525ab7..2fca55d 100644
--- a/users_test.go
+++ b/users_test.go
@@ -48,7 +48,7 @@ func TestGetUser(t *testing.T) {
 		Name:         "John Smith",
 		State:        "active",
 		WebURL:       "http://localhost:3000/john_smith",
-		CreatedAt:    Time(time.Date(2012, time.May, 23, 8, 0o0, 58, 0, time.UTC)),
+		CreatedAt:    Ptr(time.Date(2012, time.May, 23, 8, 0o0, 58, 0, time.UTC)),
 		Bio:          "Bio of John Smith",
 		Location:     "USA",
 		PublicEmail:  "john@example.com",
@@ -87,7 +87,7 @@ func TestGetUserAdmin(t *testing.T) {
 		Name:             "John Smith",
 		State:            "active",
 		WebURL:           "http://localhost:3000/john_smith",
-		CreatedAt:        Time(time.Date(2012, time.May, 23, 8, 0, 58, 0, time.UTC)),
+		CreatedAt:        Ptr(time.Date(2012, time.May, 23, 8, 0, 58, 0, time.UTC)),
 		Bio:              "Bio of John Smith",
 		Location:         "USA",
 		PublicEmail:      "john@example.com",
@@ -105,11 +105,11 @@ func TestGetUserAdmin(t *testing.T) {
 		CanCreateGroup:   true,
 		CanCreateProject: true,
 		ProjectsLimit:    100,
-		CurrentSignInAt:  Time(time.Date(2012, time.June, 2, 6, 36, 55, 0, time.UTC)),
+		CurrentSignInAt:  Ptr(time.Date(2012, time.June, 2, 6, 36, 55, 0, time.UTC)),
 		CurrentSignInIP:  &currentSignInIP,
-		LastSignInAt:     Time(time.Date(2012, time.June, 1, 11, 41, 1, 0, time.UTC)),
+		LastSignInAt:     Ptr(time.Date(2012, time.June, 1, 11, 41, 1, 0, time.UTC)),
 		LastSignInIP:     &lastSignInIP,
-		ConfirmedAt:      Time(time.Date(2012, time.May, 23, 9, 0o5, 22, 0, time.UTC)),
+		ConfirmedAt:      Ptr(time.Date(2012, time.May, 23, 9, 0o5, 22, 0, time.UTC)),
 		TwoFactorEnabled: true,
 		Note:             "DMCA Request: 2018-11-05 | DMCA Violation | Abuse | https://gitlab.zendesk.com/agent/tickets/123",
 		Identities:       []*UserIdentity{{Provider: "github", ExternUID: "2435223452345"}},
@@ -669,8 +669,8 @@ func TestCreateUserRunner(t *testing.T) {
 	})
 
 	createRunnerOpts := &CreateUserRunnerOptions{
-		ProjectID:  Int(1),
-		RunnerType: String("project_type"),
+		ProjectID:  Ptr(1),
+		RunnerType: Ptr("project_type"),
 	}
 
 	response, _, err := client.Users.CreateUserRunner(createRunnerOpts)
diff --git a/validate_test.go b/validate_test.go
index 55e9d62..ab4bfc3 100644
--- a/validate_test.go
+++ b/validate_test.go
@@ -163,10 +163,10 @@ func TestValidateProjectNamespace(t *testing.T) {
 		{
 			description: "valid",
 			request: &ProjectNamespaceLintOptions{
-				Content:     String("{'build': {'script': 'echo build'}}"),
-				DryRun:      Bool(false),
-				IncludeJobs: Bool(true),
-				Ref:         String("foo"),
+				Content:     Ptr("{'build': {'script': 'echo build'}}"),
+				DryRun:      Ptr(false),
+				IncludeJobs: Ptr(true),
+				Ref:         Ptr("foo"),
 			},
 			response: `{
 				"valid": true,
@@ -184,8 +184,8 @@ func TestValidateProjectNamespace(t *testing.T) {
 		{
 			description: "invalid",
 			request: &ProjectNamespaceLintOptions{
-				Content: String("{'build': {'script': 'echo build', 'bad_key': 'value'}}"),
-				DryRun:  Bool(false),
+				Content: Ptr("{'build': {'script': 'echo build', 'bad_key': 'value'}}"),
+				DryRun:  Ptr(false),
 			},
 			response: `{
 				"valid": false,
diff --git a/wikis_test.go b/wikis_test.go
index e392216..3bfe51c 100644
--- a/wikis_test.go
+++ b/wikis_test.go
@@ -49,7 +49,7 @@ func TestListWikis(t *testing.T) {
 		  ]`)
 	})
 
-	wikis, _, err := client.Wikis.ListWikis(1, &ListWikisOptions{WithContent: Bool(true)})
+	wikis, _, err := client.Wikis.ListWikis(1, &ListWikisOptions{WithContent: Ptr(true)})
 	if err != nil {
 		t.Errorf("Wikis.ListWikis returned error: %v", err)
 	}
@@ -126,9 +126,9 @@ func TestCreateWikiPage(t *testing.T) {
 	})
 
 	opt := &CreateWikiPageOptions{
-		Content: String("Hello world"),
-		Title:   String("Hello"),
-		Format:  WikiFormat(WikiFormatMarkdown),
+		Content: Ptr("Hello world"),
+		Title:   Ptr("Hello"),
+		Format:  Ptr(WikiFormatMarkdown),
 	}
 	wiki, _, err := client.Wikis.CreateWikiPage(1, opt)
 	if err != nil {
@@ -161,9 +161,9 @@ func TestEditWikiPage(t *testing.T) {
 	})
 
 	opt := &EditWikiPageOptions{
-		Content: String("documentation"),
-		Format:  WikiFormat(WikiFormatMarkdown),
-		Title:   String("Docs"),
+		Content: Ptr("documentation"),
+		Format:  Ptr(WikiFormatMarkdown),
+		Title:   Ptr("Docs"),
 	}
 	wiki, _, err := client.Wikis.EditWikiPage(1, "foo", opt)
 	if err != nil {