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 bf01fee commit fbddd0f
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
// [AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommon].
// [AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommon].
type AuditLogAuditLogsGetAccountAuditLogsResponse interface {
implementsAuditLogAuditLogsGetAccountAuditLogsResponse()
}
Expand Down Expand Up @@ -225,19 +225,19 @@ func (r *AuditLogAuditLogsGetAccountAuditLogsResponseObjectResultResource) Unmar
return apijson.UnmarshalRoot(data, r)
}

type AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommon struct {
Errors []AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonError `json:"errors,required"`
Messages []AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonMessage `json:"messages,required"`
Result AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonResult `json:"result,required"`
type AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommon struct {
Errors []AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonError `json:"errors,required"`
Messages []AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonMessage `json:"messages,required"`
Result AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonResult `json:"result,required"`
// Whether the API call was successful
Success AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonSuccess `json:"success,required"`
JSON auditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonJSON `json:"-"`
Success AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonSuccess `json:"success,required"`
JSON auditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonJSON `json:"-"`
}

// auditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonJSON
// auditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonJSON
// contains the JSON metadata for the struct
// [AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommon]
type auditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonJSON struct {
// [AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommon]
type auditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonJSON struct {
Errors apijson.Field
Messages apijson.Field
Result apijson.Field
Expand All @@ -246,64 +246,64 @@ type auditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonJSON s
ExtraFields map[string]apijson.Field
}

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

func (r AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommon) implementsAuditLogAuditLogsGetAccountAuditLogsResponse() {
func (r AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommon) implementsAuditLogAuditLogsGetAccountAuditLogsResponse() {
}

type AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonError struct {
type AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonError struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON auditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonErrorJSON `json:"-"`
JSON auditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonErrorJSON `json:"-"`
}

// auditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonErrorJSON
// auditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonErrorJSON
// contains the JSON metadata for the struct
// [AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonError]
type auditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonErrorJSON struct {
// [AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonError]
type auditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonErrorJSON struct {
Code apijson.Field
Message apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

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

type AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonMessage struct {
type AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonMessage struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON auditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonMessageJSON `json:"-"`
JSON auditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonMessageJSON `json:"-"`
}

// auditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonMessageJSON
// auditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonMessageJSON
// contains the JSON metadata for the struct
// [AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonMessage]
type auditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonMessageJSON struct {
// [AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonMessage]
type auditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonMessageJSON struct {
Code apijson.Field
Message apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

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

// Union satisfied by
// [AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonResultUnknown],
// [AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonResultArray]
// [AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonResultUnknown],
// [AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonResultArray]
// or [shared.UnionString].
type AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonResult interface {
ImplementsAuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonResult()
type AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonResult interface {
ImplementsAuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonResult()
}

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

type AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonResultArray []interface{}
type AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonResultArray []interface{}

func (r AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonResultArray) ImplementsAuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonResult() {
func (r AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonResultArray) ImplementsAuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonResult() {
}

// Whether the API call was successful
type AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonSuccess bool
type AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonSuccess bool

const (
AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonSuccessTrue AuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonSuccess = true
AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonSuccessTrue AuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonSuccess = 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) ImplementsUserAuditLogListResponseXWp4G6CaAPIResponseCommonResult() {}
func (UnionString) ImplementsUserAuditLogListResponseM9cAFh8yAPIResponseCommonResult() {}
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) ImplementsPurgeCachZonePurgeParamsIkgtf7G3FilesFile() {}
func (UnionString) ImplementsPurgeCachZonePurgeParamsJIaMi3xIFilesFile() {}
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) ImplementsAuditLogAuditLogsGetAccountAuditLogsResponseXWp4G6CaAPIResponseCommonResult() {
func (UnionString) ImplementsAuditLogAuditLogsGetAccountAuditLogsResponseM9cAFh8yAPIResponseCommonResult() {
}
func (UnionString) ImplementsBillingProfileAccountBillingProfileBillingProfileDetailsResponse() {}
func (UnionString) ImplementsCfdTunnelConfigurationCloudflareTunnelConfigurationGetConfigurationResponse() {
Expand Down
Loading

0 comments on commit fbddd0f

Please sign in to comment.