Skip to content

Commit

Permalink
feat: OpenAPI spec update via Stainless API
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Feb 14, 2024
1 parent 7b5c28a commit 9098871
Show file tree
Hide file tree
Showing 7 changed files with 313 additions and 313 deletions.
66 changes: 33 additions & 33 deletions auditlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (r *AuditLogService) AuditLogsGetAccountAuditLogs(ctx context.Context, acco
}

// Union satisfied by [AuditLogAuditLogsGetAccountAuditLogsResponseObject] or
// [AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommon].
// [AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommon].
type AuditLogAuditLogsGetAccountAuditLogsResponse interface {
implementsAuditLogAuditLogsGetAccountAuditLogsResponse()
}
Expand Down Expand Up @@ -225,19 +225,19 @@ func (r *AuditLogAuditLogsGetAccountAuditLogsResponseObjectResultResource) Unmar
return apijson.UnmarshalRoot(data, r)
}

type AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommon struct {
Errors []AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonError `json:"errors,required"`
Messages []AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonMessage `json:"messages,required"`
Result AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonResult `json:"result,required"`
type AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommon struct {
Errors []AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonError `json:"errors,required"`
Messages []AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonMessage `json:"messages,required"`
Result AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonResult `json:"result,required"`
// Whether the API call was successful
Success AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonSuccess `json:"success,required"`
JSON auditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonJSON `json:"-"`
Success AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonSuccess `json:"success,required"`
JSON auditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonJSON `json:"-"`
}

// auditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonJSON
// auditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonJSON
// contains the JSON metadata for the struct
// [AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommon]
type auditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonJSON struct {
// [AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommon]
type auditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonJSON struct {
Errors apijson.Field
Messages apijson.Field
Result apijson.Field
Expand All @@ -246,64 +246,64 @@ type auditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonJSON s
ExtraFields map[string]apijson.Field
}

func (r *AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommon) UnmarshalJSON(data []byte) (err error) {
func (r *AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommon) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}

func (r AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommon) implementsAuditLogAuditLogsGetAccountAuditLogsResponse() {
func (r AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommon) implementsAuditLogAuditLogsGetAccountAuditLogsResponse() {
}

type AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonError struct {
type AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonError struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON auditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonErrorJSON `json:"-"`
JSON auditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonErrorJSON `json:"-"`
}

// auditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonErrorJSON
// auditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonErrorJSON
// contains the JSON metadata for the struct
// [AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonError]
type auditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonErrorJSON struct {
// [AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonError]
type auditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonErrorJSON struct {
Code apijson.Field
Message apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

func (r *AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonError) UnmarshalJSON(data []byte) (err error) {
func (r *AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonError) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}

type AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonMessage struct {
type AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonMessage struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON auditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonMessageJSON `json:"-"`
JSON auditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonMessageJSON `json:"-"`
}

// auditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonMessageJSON
// auditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonMessageJSON
// contains the JSON metadata for the struct
// [AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonMessage]
type auditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonMessageJSON struct {
// [AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonMessage]
type auditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonMessageJSON struct {
Code apijson.Field
Message apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

func (r *AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonMessage) UnmarshalJSON(data []byte) (err error) {
func (r *AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonMessage) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}

// Union satisfied by
// [AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonResultUnknown],
// [AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonResultArray]
// [AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonResultUnknown],
// [AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonResultArray]
// or [shared.UnionString].
type AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonResult interface {
ImplementsAuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonResult()
type AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonResult interface {
ImplementsAuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonResult()
}

func init() {
apijson.RegisterUnion(
reflect.TypeOf((*AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonResult)(nil)).Elem(),
reflect.TypeOf((*AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonResult)(nil)).Elem(),
"",
apijson.UnionVariant{
TypeFilter: gjson.String,
Expand All @@ -312,16 +312,16 @@ func init() {
)
}

type AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonResultArray []interface{}
type AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonResultArray []interface{}

func (r AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonResultArray) ImplementsAuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonResult() {
func (r AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonResultArray) ImplementsAuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonResult() {
}

// Whether the API call was successful
type AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonSuccess bool
type AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonSuccess bool

const (
AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonSuccessTrue AuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonSuccess = true
AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonSuccessTrue AuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonSuccess = true
)

type AuditLogAuditLogsGetAccountAuditLogsParams struct {
Expand Down
6 changes: 3 additions & 3 deletions internal/shared/union.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func (UnionString) ImplementsMembershipUpdateResponse() {}
func (UnionString) ImplementsMembershipGetResponse() {}
func (UnionString) ImplementsUserUserEditUserResponse() {}
func (UnionString) ImplementsUserUserUserDetailsResponse() {}
func (UnionString) ImplementsUserAuditLogAuditLogsGetUserAuditLogsResponseO40s3NBgAPIResponseCommonResult() {
func (UnionString) ImplementsUserAuditLogAuditLogsGetUserAuditLogsResponseNPkreyMxAPIResponseCommonResult() {
}
func (UnionString) ImplementsUserBillingProfileUserBillingProfileBillingProfileDetailsResponse() {}
func (UnionString) ImplementsUserInviteUpdateResponse() {}
Expand Down Expand Up @@ -45,7 +45,7 @@ func (UnionString) ImplementsAccessKeyAccessKeyConfigurationGetTheAccessKeyConfi
func (UnionString) ImplementsAccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponse() {
}
func (UnionString) ImplementsAccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponse() {}
func (UnionString) ImplementsPurgeCachZonePurgeParamsA0Lwu6OoFilesFile() {}
func (UnionString) ImplementsPurgeCachZonePurgeParamsOkX7gBs6FilesFile() {}
func (UnionString) ImplementsSSLAnalyzeAnalyzeCertificateAnalyzeCertificateResponse() {}
func (UnionString) ImplementsSSLCertificatePackGetResponse() {}
func (UnionString) ImplementsSubscriptionUpdateResponse() {}
Expand Down Expand Up @@ -157,7 +157,7 @@ func (UnionString) ImplementsAddressAddressMapIPDeleteResponse() {}
func (UnionString) ImplementsAddressAddressMapZoneUpdateResponse() {}
func (UnionString) ImplementsAddressAddressMapZoneDeleteResponse() {}
func (UnionString) ImplementsAddressPrefixDeleteResponse() {}
func (UnionString) ImplementsAuditLogAuditLogsGetAccountAuditLogsResponseO40s3NBgAPIResponseCommonResult() {
func (UnionString) ImplementsAuditLogAuditLogsGetAccountAuditLogsResponseNPkreyMxAPIResponseCommonResult() {
}
func (UnionString) ImplementsBillingProfileAccountBillingProfileBillingProfileDetailsResponse() {}
func (UnionString) ImplementsCfdTunnelConfigurationCloudflareTunnelConfigurationGetConfigurationResponse() {
Expand Down
Loading

0 comments on commit 9098871

Please sign in to comment.