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 16, 2024
1 parent 7634dea commit 7fc6183
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
// [AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommon].
// [AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommon].
type AuditLogAuditLogsGetAccountAuditLogsResponse interface {
implementsAuditLogAuditLogsGetAccountAuditLogsResponse()
}
Expand Down Expand Up @@ -225,19 +225,19 @@ func (r *AuditLogAuditLogsGetAccountAuditLogsResponseObjectResultResource) Unmar
return apijson.UnmarshalRoot(data, r)
}

type AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommon struct {
Errors []AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonError `json:"errors,required"`
Messages []AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonMessage `json:"messages,required"`
Result AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonResult `json:"result,required"`
type AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommon struct {
Errors []AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonError `json:"errors,required"`
Messages []AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonMessage `json:"messages,required"`
Result AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonResult `json:"result,required"`
// Whether the API call was successful
Success AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonSuccess `json:"success,required"`
JSON auditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonJSON `json:"-"`
Success AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonSuccess `json:"success,required"`
JSON auditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonJSON `json:"-"`
}

// auditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonJSON
// auditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonJSON
// contains the JSON metadata for the struct
// [AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommon]
type auditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonJSON struct {
// [AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommon]
type auditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonJSON struct {
Errors apijson.Field
Messages apijson.Field
Result apijson.Field
Expand All @@ -246,64 +246,64 @@ type auditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonJSON s
ExtraFields map[string]apijson.Field
}

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

func (r AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommon) implementsAuditLogAuditLogsGetAccountAuditLogsResponse() {
func (r AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommon) implementsAuditLogAuditLogsGetAccountAuditLogsResponse() {
}

type AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonError struct {
type AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonError struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON auditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonErrorJSON `json:"-"`
JSON auditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonErrorJSON `json:"-"`
}

// auditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonErrorJSON
// auditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonErrorJSON
// contains the JSON metadata for the struct
// [AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonError]
type auditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonErrorJSON struct {
// [AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonError]
type auditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonErrorJSON struct {
Code apijson.Field
Message apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

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

type AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonMessage struct {
type AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonMessage struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON auditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonMessageJSON `json:"-"`
JSON auditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonMessageJSON `json:"-"`
}

// auditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonMessageJSON
// auditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonMessageJSON
// contains the JSON metadata for the struct
// [AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonMessage]
type auditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonMessageJSON struct {
// [AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonMessage]
type auditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonMessageJSON struct {
Code apijson.Field
Message apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

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

// Union satisfied by
// [AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonResultUnknown],
// [AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonResultArray]
// [AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonResultUnknown],
// [AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonResultArray]
// or [shared.UnionString].
type AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonResult interface {
ImplementsAuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonResult()
type AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonResult interface {
ImplementsAuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonResult()
}

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

type AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonResultArray []interface{}
type AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonResultArray []interface{}

func (r AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonResultArray) ImplementsAuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonResult() {
func (r AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonResultArray) ImplementsAuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonResult() {
}

// Whether the API call was successful
type AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonSuccess bool
type AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonSuccess bool

const (
AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonSuccessTrue AuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonSuccess = true
AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonSuccessTrue AuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonSuccess = 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) ImplementsUserAuditLogListResponse6edTwAciAPIResponseCommonResult() {}
func (UnionString) ImplementsUserAuditLogListResponse1eJRmpNrAPIResponseCommonResult() {}
func (UnionString) ImplementsUserBillingProfileUserBillingProfileBillingProfileDetailsResponse() {}
func (UnionString) ImplementsUserInviteUpdateResponse() {}
func (UnionString) ImplementsUserInviteGetResponse() {}
Expand Down Expand Up @@ -43,7 +43,7 @@ func (UnionString) ImplementsAccessKeyAccessKeyConfigurationGetTheAccessKeyConfi
func (UnionString) ImplementsAccessKeyAccessKeyConfigurationUpdateTheAccessKeyConfigurationResponse() {
}
func (UnionString) ImplementsAccessKeyRotateAccessKeyConfigurationRotateAccessKeysResponse() {}
func (UnionString) ImplementsPurgeCachZonePurgeParamsKvoyXkScFilesFile() {}
func (UnionString) ImplementsPurgeCachZonePurgeParamsRDiKezySFilesFile() {}
func (UnionString) ImplementsSSLAnalyzeAnalyzeCertificateAnalyzeCertificateResponse() {}
func (UnionString) ImplementsSSLCertificatePackGetResponse() {}
func (UnionString) ImplementsSubscriptionUpdateResponse() {}
Expand Down Expand Up @@ -151,7 +151,7 @@ func (UnionString) ImplementsAddressAddressMapIPDeleteResponse() {}
func (UnionString) ImplementsAddressAddressMapZoneUpdateResponse() {}
func (UnionString) ImplementsAddressAddressMapZoneDeleteResponse() {}
func (UnionString) ImplementsAddressPrefixDeleteResponse() {}
func (UnionString) ImplementsAuditLogAuditLogsGetAccountAuditLogsResponse6edTwAciAPIResponseCommonResult() {
func (UnionString) ImplementsAuditLogAuditLogsGetAccountAuditLogsResponse1eJRmpNrAPIResponseCommonResult() {
}
func (UnionString) ImplementsBillingProfileAccountBillingProfileBillingProfileDetailsResponse() {}
func (UnionString) ImplementsCfdTunnelConfigurationCloudflareTunnelConfigurationGetConfigurationResponse() {
Expand Down
Loading

0 comments on commit 7fc6183

Please sign in to comment.