diff --git a/api.md b/api.md index a03517f8548..b04ccfc438e 100644 --- a/api.md +++ b/api.md @@ -5169,13 +5169,13 @@ Methods: Methods: -- client.ZeroTrust.Access.Logs.AccessRequests.List(ctx context.Context, params zero_trust.AccessLogAccessRequestListParams) ([]zero_trust.AccessRequests, error) +- client.ZeroTrust.Access.Logs.AccessRequests.List(ctx context.Context, params zero_trust.AccessLogAccessRequestListParams) ([]zero_trust.AccessRequest, error) #### SCIM Response Types: -- zero_trust.AccessRequests +- zero_trust.AccessRequest ##### Updates diff --git a/zero_trust/accesslogaccessrequest.go b/zero_trust/accesslogaccessrequest.go index 8cdbee118ee..c5b956ec393 100644 --- a/zero_trust/accesslogaccessrequest.go +++ b/zero_trust/accesslogaccessrequest.go @@ -38,7 +38,7 @@ func NewAccessLogAccessRequestService(opts ...option.RequestOption) (r *AccessLo } // Gets a list of Access authentication audit logs for an account. -func (r *AccessLogAccessRequestService) List(ctx context.Context, params AccessLogAccessRequestListParams, opts ...option.RequestOption) (res *[]AccessRequests, err error) { +func (r *AccessLogAccessRequestService) List(ctx context.Context, params AccessLogAccessRequestListParams, opts ...option.RequestOption) (res *[]AccessRequest, err error) { var env AccessLogAccessRequestListResponseEnvelope opts = append(r.Options[:], opts...) if params.AccountID.Value == "" { @@ -97,7 +97,7 @@ type AccessLogAccessRequestListResponseEnvelope struct { Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success AccessLogAccessRequestListResponseEnvelopeSuccess `json:"success,required"` - Result []AccessRequests `json:"result"` + Result []AccessRequest `json:"result"` JSON accessLogAccessRequestListResponseEnvelopeJSON `json:"-"` } diff --git a/zero_trust/accesslogscim.go b/zero_trust/accesslogscim.go index 14ad8e3a709..420c5a96a7a 100644 --- a/zero_trust/accesslogscim.go +++ b/zero_trust/accesslogscim.go @@ -30,7 +30,7 @@ func NewAccessLogSCIMService(opts ...option.RequestOption) (r *AccessLogSCIMServ return } -type AccessRequests struct { +type AccessRequest struct { // The event that occurred, such as a login attempt. Action string `json:"action"` // The result of the authentication event. @@ -47,12 +47,12 @@ type AccessRequests struct { // The unique identifier for the request to Cloudflare. RayID string `json:"ray_id"` // The email address of the authenticating user. - UserEmail string `json:"user_email" format:"email"` - JSON accessRequestsJSON `json:"-"` + UserEmail string `json:"user_email" format:"email"` + JSON accessRequestJSON `json:"-"` } -// accessRequestsJSON contains the JSON metadata for the struct [AccessRequests] -type accessRequestsJSON struct { +// accessRequestJSON contains the JSON metadata for the struct [AccessRequest] +type accessRequestJSON struct { Action apijson.Field Allowed apijson.Field AppDomain apijson.Field @@ -66,10 +66,10 @@ type accessRequestsJSON struct { ExtraFields map[string]apijson.Field } -func (r *AccessRequests) UnmarshalJSON(data []byte) (err error) { +func (r *AccessRequest) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r accessRequestsJSON) RawJSON() string { +func (r accessRequestJSON) RawJSON() string { return r.raw }