Skip to content

Commit

Permalink
sync: generate client with 2023-11-17 spec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 17, 2023
1 parent dd2e4ce commit eefcc62
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
20 changes: 20 additions & 0 deletions services/metalv1/api_devices.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions services/metalv1/docs/DevicesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ Name | Type | Description | Notes

## FindOrganizationDevices

> DeviceList FindOrganizationDevices(ctx, id).Search(search).Categories(categories).Facility(facility).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute()
> DeviceList FindOrganizationDevices(ctx, id).Search(search).Categories(categories).Facility(facility).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).MacAddress(macAddress).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute()
Retrieve all devices of an organization

Expand Down Expand Up @@ -925,14 +925,15 @@ func main() {
tag := "tag_example" // string | Filter by device tag (optional)
type_ := "type__example" // string | Filter by instance type (ondemand,spot,reserved) (optional)
hasTerminationTime := true // bool | Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. (optional)
macAddress := "macAddress_example" // string | Filter by MAC address (optional)
include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
page := int32(56) // int32 | Page to return (optional) (default to 1)
perPage := int32(56) // int32 | Items returned per page (optional) (default to 10)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DevicesApi.FindOrganizationDevices(context.Background(), id).Search(search).Categories(categories).Facility(facility).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute()
resp, r, err := apiClient.DevicesApi.FindOrganizationDevices(context.Background(), id).Search(search).Categories(categories).Facility(facility).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).MacAddress(macAddress).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DevicesApi.FindOrganizationDevices``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
Expand Down Expand Up @@ -966,6 +967,7 @@ Name | Type | Description | Notes
**tag** | **string** | Filter by device tag |
**type_** | **string** | Filter by instance type (ondemand,spot,reserved) |
**hasTerminationTime** | **bool** | Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. |
**macAddress** | **string** | Filter by MAC address |
**include** | **[]string** | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. |
**exclude** | **[]string** | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. |
**page** | **int32** | Page to return | [default to 1]
Expand All @@ -991,7 +993,7 @@ Name | Type | Description | Notes

## FindProjectDevices

> DeviceList FindProjectDevices(ctx, id).Search(search).Categories(categories).Facility(facility).Metro(metro).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute()
> DeviceList FindProjectDevices(ctx, id).Search(search).Categories(categories).Facility(facility).Metro(metro).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).MacAddress(macAddress).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute()
Retrieve all devices of a project

Expand Down Expand Up @@ -1021,14 +1023,15 @@ func main() {
tag := "tag_example" // string | Filter by device tag (optional)
type_ := "type__example" // string | Filter by instance type (ondemand,spot,reserved) (optional)
hasTerminationTime := true // bool | Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. (optional)
macAddress := "macAddress_example" // string | Filter by MAC address (optional)
include := []string{"Inner_example"} // []string | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude := []string{"Inner_example"} // []string | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
page := int32(56) // int32 | Page to return (optional) (default to 1)
perPage := int32(56) // int32 | Items returned per page (optional) (default to 10)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DevicesApi.FindProjectDevices(context.Background(), id).Search(search).Categories(categories).Facility(facility).Metro(metro).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute()
resp, r, err := apiClient.DevicesApi.FindProjectDevices(context.Background(), id).Search(search).Categories(categories).Facility(facility).Metro(metro).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).MacAddress(macAddress).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DevicesApi.FindProjectDevices``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
Expand Down Expand Up @@ -1063,6 +1066,7 @@ Name | Type | Description | Notes
**tag** | **string** | Filter by device tag |
**type_** | **string** | Filter by instance type (ondemand,spot,reserved) |
**hasTerminationTime** | **bool** | Filter only instances marked for termination. When set to true, only include instances that have a termination time. When set to false, only include instances that do not have a termination time. |
**macAddress** | **string** | Filter by MAC address |
**include** | **[]string** | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. |
**exclude** | **[]string** | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. |
**page** | **int32** | Page to return | [default to 1]
Expand Down

0 comments on commit eefcc62

Please sign in to comment.