From c817c16567b20e82ae70844b51c0fb244a8c5aab Mon Sep 17 00:00:00 2001
From: David Bloss <david@opslevel.com>
Date: Fri, 10 Nov 2023 13:53:37 -0600
Subject: [PATCH 1/2] make UserIdentifierInput fields pointers

---
 team_test.go | 4 ++--
 user.go      | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/team_test.go b/team_test.go
index dbbab2ad..abac7521 100644
--- a/team_test.go
+++ b/team_test.go
@@ -797,7 +797,7 @@ func TestTeamAddMemberhip(t *testing.T) {
 	team, _ := clientWithAlias.GetTeamWithAlias("example")
 	newMembership := ol.TeamMembershipUserInput{
 		Role: "user",
-		User: ol.UserIdentifierInput{Id: id1, Email: "kyle@opslevel.com"},
+		User: ol.UserIdentifierInput{Id: &id1, Email: ol.NewString("kyle@opslevel.com")},
 	}
 	result, err := clientWithTeamId.AddMemberships(&team.TeamId, newMembership)
 	// Assert
@@ -829,7 +829,7 @@ func TestTeamRemoveMemberhip(t *testing.T) {
 	team, _ := client1.GetTeamWithAlias("example")
 	membershipToDelete := ol.TeamMembershipUserInput{
 		Role: "user",
-		User: ol.UserIdentifierInput{Id: id1, Email: "kyle@opslevel.com"},
+		User: ol.UserIdentifierInput{Id: &id1, Email: ol.NewString("kyle@opslevel.com")},
 	}
 
 	result, err := client2.RemoveMemberships(&team.TeamId, membershipToDelete)
diff --git a/user.go b/user.go
index 41eebe98..4df23c70 100644
--- a/user.go
+++ b/user.go
@@ -30,8 +30,8 @@ type UserConnection struct {
 }
 
 type UserIdentifierInput struct {
-	Id    ID     `graphql:"id" json:"id,omitempty"`
-	Email string `graphql:"email" json:"email,omitempty"`
+	Id    *ID     `graphql:"id" json:"id,omitempty"`
+	Email *string `graphql:"email" json:"email,omitempty"`
 }
 
 type UserInput struct {
@@ -53,11 +53,11 @@ func (u *User) ResourceType() TaggableResource {
 func NewUserIdentifier(value string) UserIdentifierInput {
 	if IsID(value) {
 		return UserIdentifierInput{
-			Id: ID(value),
+			Id: NewID(value),
 		}
 	}
 	return UserIdentifierInput{
-		Email: value,
+		Email: NewString(value),
 	}
 }
 

From 9048c95a73beb8f10c8b0b13e3609f4c1abc6383 Mon Sep 17 00:00:00 2001
From: David Bloss <david@opslevel.com>
Date: Fri, 10 Nov 2023 13:58:29 -0600
Subject: [PATCH 2/2] add changie log

---
 .changes/unreleased/Bugfix-20231110-135823.yaml | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 .changes/unreleased/Bugfix-20231110-135823.yaml

diff --git a/.changes/unreleased/Bugfix-20231110-135823.yaml b/.changes/unreleased/Bugfix-20231110-135823.yaml
new file mode 100644
index 00000000..ad5fcd12
--- /dev/null
+++ b/.changes/unreleased/Bugfix-20231110-135823.yaml
@@ -0,0 +1,3 @@
+kind: Bugfix
+body: make UserIdentifierInput fields pointers, fixing the omitempty struct tag behavior
+time: 2023-11-10T13:58:23.41047-06:00