Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change int to float. #2715

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-10-04 10:38:19.185228",
"spec_repo_commit": "7a63d530"
"regenerated": "2024-10-04 13:48:04.846310",
"spec_repo_commit": "7679754f"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-10-04 10:38:19.200021",
"spec_repo_commit": "7a63d530"
"regenerated": "2024-10-04 13:48:04.862359",
"spec_repo_commit": "7679754f"
}
}
}
12 changes: 6 additions & 6 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22548,18 +22548,18 @@ components:
type: integer
x:
description: The position of the widget on the x (horizontal) axis. Should
be a non-negative integer.
be a non-negative number.
example: 0
format: int64
format: double
minimum: 0
type: integer
type: number
y:
description: The position of the widget on the y (vertical) axis. Should
be a non-negative integer.
be a non-negative number.
example: 0
format: int64
format: double
minimum: 0
type: integer
type: number
required:
- x
- y
Expand Down
36 changes: 18 additions & 18 deletions api/datadogV1/model_widget_layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ type WidgetLayout struct {
IsColumnBreak *bool `json:"is_column_break,omitempty"`
// The width of the widget. Should be a non-negative integer.
Width int64 `json:"width"`
// The position of the widget on the x (horizontal) axis. Should be a non-negative integer.
X int64 `json:"x"`
// The position of the widget on the y (vertical) axis. Should be a non-negative integer.
Y int64 `json:"y"`
// The position of the widget on the x (horizontal) axis. Should be a non-negative number.
X float64 `json:"x"`
// The position of the widget on the y (vertical) axis. Should be a non-negative number.
Y float64 `json:"y"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject map[string]interface{} `json:"-"`
AdditionalProperties map[string]interface{} `json:"-"`
Expand All @@ -32,7 +32,7 @@ type WidgetLayout struct {
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed.
func NewWidgetLayout(height int64, width int64, x int64, y int64) *WidgetLayout {
func NewWidgetLayout(height int64, width int64, x float64, y float64) *WidgetLayout {
this := WidgetLayout{}
this.Height = height
this.Width = width
Expand Down Expand Up @@ -124,48 +124,48 @@ func (o *WidgetLayout) SetWidth(v int64) {
}

// GetX returns the X field value.
func (o *WidgetLayout) GetX() int64 {
func (o *WidgetLayout) GetX() float64 {
if o == nil {
var ret int64
var ret float64
return ret
}
return o.X
}

// GetXOk returns a tuple with the X field value
// and a boolean to check if the value has been set.
func (o *WidgetLayout) GetXOk() (*int64, bool) {
func (o *WidgetLayout) GetXOk() (*float64, bool) {
if o == nil {
return nil, false
}
return &o.X, true
}

// SetX sets field value.
func (o *WidgetLayout) SetX(v int64) {
func (o *WidgetLayout) SetX(v float64) {
o.X = v
}

// GetY returns the Y field value.
func (o *WidgetLayout) GetY() int64 {
func (o *WidgetLayout) GetY() float64 {
if o == nil {
var ret int64
var ret float64
return ret
}
return o.Y
}

// GetYOk returns a tuple with the Y field value
// and a boolean to check if the value has been set.
func (o *WidgetLayout) GetYOk() (*int64, bool) {
func (o *WidgetLayout) GetYOk() (*float64, bool) {
if o == nil {
return nil, false
}
return &o.Y, true
}

// SetY sets field value.
func (o *WidgetLayout) SetY(v int64) {
func (o *WidgetLayout) SetY(v float64) {
o.Y = v
}

Expand All @@ -192,11 +192,11 @@ func (o WidgetLayout) MarshalJSON() ([]byte, error) {
// UnmarshalJSON deserializes the given payload.
func (o *WidgetLayout) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
Height *int64 `json:"height"`
IsColumnBreak *bool `json:"is_column_break,omitempty"`
Width *int64 `json:"width"`
X *int64 `json:"x"`
Y *int64 `json:"y"`
Height *int64 `json:"height"`
IsColumnBreak *bool `json:"is_column_break,omitempty"`
Width *int64 `json:"width"`
X *float64 `json:"x"`
Y *float64 `json:"y"`
}{}
if err = datadog.Unmarshal(bytes, &all); err != nil {
return datadog.Unmarshal(bytes, &o.UnparsedObject)
Expand Down
Loading