@@ -87,8 +87,7 @@ func (r *AccountService) ListLoginProvidersAutoPaging(ctx context.Context, param
8787}
8888
8989type Account struct {
90- ID string `json:"id" format:"uuid"`
91- AvatarURL string `json:"avatarUrl"`
90+ ID string `json:"id,required" format:"uuid"`
9291 // A Timestamp represents a point in time independent of any time zone or local
9392 // calendar, encoded as a count of seconds and fractions of seconds at nanosecond
9493 // resolution. The count is relative to an epoch at UTC midnight on January 1,
@@ -177,17 +176,12 @@ type Account struct {
177176 // Joda Time's
178177 // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
179178 // to obtain a formatter capable of generating timestamps in this format.
180- CreatedAt time.Time `json:"createdAt" format:"date-time"`
181- Email string `json:"email"`
182- Joinables []JoinableOrganization `json:"joinables"`
183- Memberships []AccountMembership `json:"memberships"`
184- Name string `json:"name"`
185- // organization_id is the ID of the organization the account is owned by if it's
186- // created through custom SSO
187- OrganizationID string `json:"organizationId,nullable"`
179+ CreatedAt time.Time `json:"createdAt,required" format:"date-time"`
180+ Email string `json:"email,required"`
181+ Name string `json:"name,required"`
188182 // public_email_provider is true if the email for the Account matches a known
189183 // public email provider
190- PublicEmailProvider bool `json:"publicEmailProvider"`
184+ PublicEmailProvider bool `json:"publicEmailProvider,required "`
191185 // A Timestamp represents a point in time independent of any time zone or local
192186 // calendar, encoded as a count of seconds and fractions of seconds at nanosecond
193187 // resolution. The count is relative to an epoch at UTC midnight on January 1,
@@ -276,22 +270,28 @@ type Account struct {
276270 // Joda Time's
277271 // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
278272 // to obtain a formatter capable of generating timestamps in this format.
279- UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
280- JSON accountJSON `json:"-"`
273+ UpdatedAt time.Time `json:"updatedAt,required" format:"date-time"`
274+ AvatarURL string `json:"avatarUrl"`
275+ Joinables []JoinableOrganization `json:"joinables"`
276+ Memberships []AccountMembership `json:"memberships"`
277+ // organization_id is the ID of the organization the account is owned by if it's
278+ // created through custom SSO
279+ OrganizationID string `json:"organizationId,nullable"`
280+ JSON accountJSON `json:"-"`
281281}
282282
283283// accountJSON contains the JSON metadata for the struct [Account]
284284type accountJSON struct {
285285 ID apijson.Field
286- AvatarURL apijson.Field
287286 CreatedAt apijson.Field
288287 Email apijson.Field
289- Joinables apijson.Field
290- Memberships apijson.Field
291288 Name apijson.Field
292- OrganizationID apijson.Field
293289 PublicEmailProvider apijson.Field
294290 UpdatedAt apijson.Field
291+ AvatarURL apijson.Field
292+ Joinables apijson.Field
293+ Memberships apijson.Field
294+ OrganizationID apijson.Field
295295 raw string
296296 ExtraFields map [string ]apijson.Field
297297}
@@ -306,16 +306,16 @@ func (r accountJSON) RawJSON() string {
306306
307307type AccountMembership struct {
308308 // organization_id is the id of the organization the user is a member of
309- OrganizationID string `json:"organizationId" format:"uuid"`
309+ OrganizationID string `json:"organizationId,required " format:"uuid"`
310310 // organization_name is the member count of the organization the user is a member
311311 // of
312- OrganizationMemberCount int64 `json:"organizationMemberCount"`
312+ OrganizationMemberCount int64 `json:"organizationMemberCount,required "`
313313 // organization_name is the name of the organization the user is a member of
314- OrganizationName string `json:"organizationName"`
314+ OrganizationName string `json:"organizationName,required "`
315315 // user_id is the ID the user has in the organization
316- UserID string `json:"userId" format:"uuid"`
316+ UserID string `json:"userId,required " format:"uuid"`
317317 // user_role is the role the user has in the organization
318- UserRole shared.OrganizationRole `json:"userRole"`
318+ UserRole shared.OrganizationRole `json:"userRole,required "`
319319 JSON accountMembershipJSON `json:"-"`
320320}
321321
@@ -341,12 +341,12 @@ func (r accountMembershipJSON) RawJSON() string {
341341
342342type JoinableOrganization struct {
343343 // organization_id is the id of the organization the user can join
344- OrganizationID string `json:"organizationId" format:"uuid"`
344+ OrganizationID string `json:"organizationId,required " format:"uuid"`
345345 // organization_member_count is the member count of the organization the user can
346346 // join
347- OrganizationMemberCount int64 `json:"organizationMemberCount"`
347+ OrganizationMemberCount int64 `json:"organizationMemberCount,required "`
348348 // organization_name is the name of the organization the user can join
349- OrganizationName string `json:"organizationName"`
349+ OrganizationName string `json:"organizationName,required "`
350350 JSON joinableOrganizationJSON `json:"-"`
351351}
352352
@@ -370,10 +370,10 @@ func (r joinableOrganizationJSON) RawJSON() string {
370370
371371type LoginProvider struct {
372372 // login_url is the URL to redirect the browser agent to for login
373- LoginURL string `json:"loginUrl"`
373+ LoginURL string `json:"loginUrl,required "`
374374 // provider is the provider used by this login method, e.g. "github", "google",
375375 // "custom"
376- Provider string `json:"provider"`
376+ Provider string `json:"provider,required "`
377377 JSON loginProviderJSON `json:"-"`
378378}
379379
@@ -394,7 +394,7 @@ func (r loginProviderJSON) RawJSON() string {
394394}
395395
396396type AccountGetResponse struct {
397- Account Account `json:"account"`
397+ Account Account `json:"account,required "`
398398 JSON accountGetResponseJSON `json:"-"`
399399}
400400
@@ -418,7 +418,7 @@ type AccountDeleteResponse = interface{}
418418
419419type AccountGetSSOLoginURLResponse struct {
420420 // login_url is the URL to redirect the user to for SSO login
421- LoginURL string `json:"loginUrl"`
421+ LoginURL string `json:"loginUrl,required "`
422422 JSON accountGetSSOLoginURLResponseJSON `json:"-"`
423423}
424424
@@ -447,7 +447,7 @@ func (r AccountGetParams) MarshalJSON() (data []byte, err error) {
447447}
448448
449449type AccountDeleteParams struct {
450- AccountID param.Field [string ] `json:"accountId" format:"uuid"`
450+ AccountID param.Field [string ] `json:"accountId,required " format:"uuid"`
451451}
452452
453453func (r AccountDeleteParams ) MarshalJSON () (data []byte , err error ) {
@@ -456,7 +456,7 @@ func (r AccountDeleteParams) MarshalJSON() (data []byte, err error) {
456456
457457type AccountGetSSOLoginURLParams struct {
458458 // email is the email the user wants to login with
459- Email param.Field [string ] `json:"email" format:"email"`
459+ Email param.Field [string ] `json:"email,required " format:"email"`
460460 // return_to is the URL the user will be redirected to after login
461461 ReturnTo param.Field [string ] `json:"returnTo" format:"uri"`
462462}
0 commit comments