Skip to content

Commit

Permalink
chore: update auto-generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
mittwald-machine committed Feb 12, 2025
1 parent 5840200 commit 9a75b11
Show file tree
Hide file tree
Showing 406 changed files with 3,844 additions and 1,814 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,25 @@ type DeprecatedLinkDatabaseRequest struct {
// BuildRequest builds an *http.Request instance from this request that may be used
// with any regular *http.Client instance.
func (r *DeprecatedLinkDatabaseRequest) BuildRequest() (*http.Request, error) {
body, err := r.body()
body, contentType, err := r.body()
if err != nil {
return nil, err
}

return http.NewRequest(http.MethodPut, r.url(), body)
req, err := http.NewRequest(http.MethodPut, r.url(), body)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", contentType)
return req, nil
}

func (r *DeprecatedLinkDatabaseRequest) body() (io.Reader, error) {
func (r *DeprecatedLinkDatabaseRequest) body() (io.Reader, string, error) {
out, err := json.Marshal(&r.Body)
if err != nil {
return nil, fmt.Errorf("error while marshalling JSON: %w", err)
return nil, "", fmt.Errorf("error while marshalling JSON: %w", err)
}
return bytes.NewReader(out), nil
return bytes.NewReader(out), "application/json", nil
}

func (r *DeprecatedLinkDatabaseRequest) url() string {
Expand Down
15 changes: 10 additions & 5 deletions mittwaldv2/generated/clients/appclientv2/executeaction_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,25 @@ type ExecuteActionRequest struct {
// BuildRequest builds an *http.Request instance from this request that may be used
// with any regular *http.Client instance.
func (r *ExecuteActionRequest) BuildRequest() (*http.Request, error) {
body, err := r.body()
body, contentType, err := r.body()
if err != nil {
return nil, err
}

return http.NewRequest(http.MethodPost, r.url(), body)
req, err := http.NewRequest(http.MethodPost, r.url(), body)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", contentType)
return req, nil
}

func (r *ExecuteActionRequest) body() (io.Reader, error) {
func (r *ExecuteActionRequest) body() (io.Reader, string, error) {
out, err := json.Marshal(&r.Body)
if err != nil {
return nil, fmt.Errorf("error while marshalling JSON: %w", err)
return nil, "", fmt.Errorf("error while marshalling JSON: %w", err)
}
return bytes.NewReader(out), nil
return bytes.NewReader(out), "application/json", nil
}

func (r *ExecuteActionRequest) url() string {
Expand Down
13 changes: 9 additions & 4 deletions mittwaldv2/generated/clients/appclientv2/getapp_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,21 @@ type GetAppRequest struct {
// BuildRequest builds an *http.Request instance from this request that may be used
// with any regular *http.Client instance.
func (r *GetAppRequest) BuildRequest() (*http.Request, error) {
body, err := r.body()
body, contentType, err := r.body()
if err != nil {
return nil, err
}

return http.NewRequest(http.MethodGet, r.url(), body)
req, err := http.NewRequest(http.MethodGet, r.url(), body)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", contentType)
return req, nil
}

func (r *GetAppRequest) body() (io.Reader, error) {
return nil, nil
func (r *GetAppRequest) body() (io.Reader, string, error) {
return nil, "", nil
}

func (r *GetAppRequest) url() string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,21 @@ type GetAppinstallationRequest struct {
// BuildRequest builds an *http.Request instance from this request that may be used
// with any regular *http.Client instance.
func (r *GetAppinstallationRequest) BuildRequest() (*http.Request, error) {
body, err := r.body()
body, contentType, err := r.body()
if err != nil {
return nil, err
}

return http.NewRequest(http.MethodGet, r.url(), body)
req, err := http.NewRequest(http.MethodGet, r.url(), body)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", contentType)
return req, nil
}

func (r *GetAppinstallationRequest) body() (io.Reader, error) {
return nil, nil
func (r *GetAppinstallationRequest) body() (io.Reader, string, error) {
return nil, "", nil
}

func (r *GetAppinstallationRequest) url() string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,21 @@ type GetAppversionRequest struct {
// BuildRequest builds an *http.Request instance from this request that may be used
// with any regular *http.Client instance.
func (r *GetAppversionRequest) BuildRequest() (*http.Request, error) {
body, err := r.body()
body, contentType, err := r.body()
if err != nil {
return nil, err
}

return http.NewRequest(http.MethodGet, r.url(), body)
req, err := http.NewRequest(http.MethodGet, r.url(), body)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", contentType)
return req, nil
}

func (r *GetAppversionRequest) body() (io.Reader, error) {
return nil, nil
func (r *GetAppversionRequest) body() (io.Reader, string, error) {
return nil, "", nil
}

func (r *GetAppversionRequest) url() string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,21 @@ type GetInstalledSystemsoftwareForAppinstallationRequest struct {
// BuildRequest builds an *http.Request instance from this request that may be used
// with any regular *http.Client instance.
func (r *GetInstalledSystemsoftwareForAppinstallationRequest) BuildRequest() (*http.Request, error) {
body, err := r.body()
body, contentType, err := r.body()
if err != nil {
return nil, err
}

return http.NewRequest(http.MethodGet, r.url(), body)
req, err := http.NewRequest(http.MethodGet, r.url(), body)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", contentType)
return req, nil
}

func (r *GetInstalledSystemsoftwareForAppinstallationRequest) body() (io.Reader, error) {
return nil, nil
func (r *GetInstalledSystemsoftwareForAppinstallationRequest) body() (io.Reader, string, error) {
return nil, "", nil
}

func (r *GetInstalledSystemsoftwareForAppinstallationRequest) url() string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,21 @@ type GetMissingDependenciesForAppinstallationRequest struct {
// BuildRequest builds an *http.Request instance from this request that may be used
// with any regular *http.Client instance.
func (r *GetMissingDependenciesForAppinstallationRequest) BuildRequest() (*http.Request, error) {
body, err := r.body()
body, contentType, err := r.body()
if err != nil {
return nil, err
}

return http.NewRequest(http.MethodGet, r.url(), body)
req, err := http.NewRequest(http.MethodGet, r.url(), body)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", contentType)
return req, nil
}

func (r *GetMissingDependenciesForAppinstallationRequest) body() (io.Reader, error) {
return nil, nil
func (r *GetMissingDependenciesForAppinstallationRequest) body() (io.Reader, string, error) {
return nil, "", nil
}

func (r *GetMissingDependenciesForAppinstallationRequest) url() string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,21 @@ type GetSystemsoftwareRequest struct {
// BuildRequest builds an *http.Request instance from this request that may be used
// with any regular *http.Client instance.
func (r *GetSystemsoftwareRequest) BuildRequest() (*http.Request, error) {
body, err := r.body()
body, contentType, err := r.body()
if err != nil {
return nil, err
}

return http.NewRequest(http.MethodGet, r.url(), body)
req, err := http.NewRequest(http.MethodGet, r.url(), body)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", contentType)
return req, nil
}

func (r *GetSystemsoftwareRequest) body() (io.Reader, error) {
return nil, nil
func (r *GetSystemsoftwareRequest) body() (io.Reader, string, error) {
return nil, "", nil
}

func (r *GetSystemsoftwareRequest) url() string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,21 @@ type GetSystemsoftwareversionRequest struct {
// BuildRequest builds an *http.Request instance from this request that may be used
// with any regular *http.Client instance.
func (r *GetSystemsoftwareversionRequest) BuildRequest() (*http.Request, error) {
body, err := r.body()
body, contentType, err := r.body()
if err != nil {
return nil, err
}

return http.NewRequest(http.MethodGet, r.url(), body)
req, err := http.NewRequest(http.MethodGet, r.url(), body)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", contentType)
return req, nil
}

func (r *GetSystemsoftwareversionRequest) body() (io.Reader, error) {
return nil, nil
func (r *GetSystemsoftwareversionRequest) body() (io.Reader, string, error) {
return nil, "", nil
}

func (r *GetSystemsoftwareversionRequest) url() string {
Expand Down
15 changes: 10 additions & 5 deletions mittwaldv2/generated/clients/appclientv2/linkdatabase_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,25 @@ type LinkDatabaseRequest struct {
// BuildRequest builds an *http.Request instance from this request that may be used
// with any regular *http.Client instance.
func (r *LinkDatabaseRequest) BuildRequest() (*http.Request, error) {
body, err := r.body()
body, contentType, err := r.body()
if err != nil {
return nil, err
}

return http.NewRequest(http.MethodPatch, r.url(), body)
req, err := http.NewRequest(http.MethodPatch, r.url(), body)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", contentType)
return req, nil
}

func (r *LinkDatabaseRequest) body() (io.Reader, error) {
func (r *LinkDatabaseRequest) body() (io.Reader, string, error) {
out, err := json.Marshal(&r.Body)
if err != nil {
return nil, fmt.Errorf("error while marshalling JSON: %w", err)
return nil, "", fmt.Errorf("error while marshalling JSON: %w", err)
}
return bytes.NewReader(out), nil
return bytes.NewReader(out), "application/json", nil
}

func (r *LinkDatabaseRequest) url() string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,21 @@ type ListAppinstallationsRequest struct {
// BuildRequest builds an *http.Request instance from this request that may be used
// with any regular *http.Client instance.
func (r *ListAppinstallationsRequest) BuildRequest() (*http.Request, error) {
body, err := r.body()
body, contentType, err := r.body()
if err != nil {
return nil, err
}

return http.NewRequest(http.MethodGet, r.url(), body)
req, err := http.NewRequest(http.MethodGet, r.url(), body)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", contentType)
return req, nil
}

func (r *ListAppinstallationsRequest) body() (io.Reader, error) {
return nil, nil
func (r *ListAppinstallationsRequest) body() (io.Reader, string, error) {
return nil, "", nil
}

func (r *ListAppinstallationsRequest) url() string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,21 @@ type ListAppinstallationsForUserRequest struct {
// BuildRequest builds an *http.Request instance from this request that may be used
// with any regular *http.Client instance.
func (r *ListAppinstallationsForUserRequest) BuildRequest() (*http.Request, error) {
body, err := r.body()
body, contentType, err := r.body()
if err != nil {
return nil, err
}

return http.NewRequest(http.MethodGet, r.url(), body)
req, err := http.NewRequest(http.MethodGet, r.url(), body)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", contentType)
return req, nil
}

func (r *ListAppinstallationsForUserRequest) body() (io.Reader, error) {
return nil, nil
func (r *ListAppinstallationsForUserRequest) body() (io.Reader, string, error) {
return nil, "", nil
}

func (r *ListAppinstallationsForUserRequest) url() string {
Expand Down
13 changes: 9 additions & 4 deletions mittwaldv2/generated/clients/appclientv2/listapps_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,21 @@ type ListAppsRequest struct {
// BuildRequest builds an *http.Request instance from this request that may be used
// with any regular *http.Client instance.
func (r *ListAppsRequest) BuildRequest() (*http.Request, error) {
body, err := r.body()
body, contentType, err := r.body()
if err != nil {
return nil, err
}

return http.NewRequest(http.MethodGet, r.url(), body)
req, err := http.NewRequest(http.MethodGet, r.url(), body)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", contentType)
return req, nil
}

func (r *ListAppsRequest) body() (io.Reader, error) {
return nil, nil
func (r *ListAppsRequest) body() (io.Reader, string, error) {
return nil, "", nil
}

func (r *ListAppsRequest) url() string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,21 @@ type ListAppversionsRequest struct {
// BuildRequest builds an *http.Request instance from this request that may be used
// with any regular *http.Client instance.
func (r *ListAppversionsRequest) BuildRequest() (*http.Request, error) {
body, err := r.body()
body, contentType, err := r.body()
if err != nil {
return nil, err
}

return http.NewRequest(http.MethodGet, r.url(), body)
req, err := http.NewRequest(http.MethodGet, r.url(), body)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", contentType)
return req, nil
}

func (r *ListAppversionsRequest) body() (io.Reader, error) {
return nil, nil
func (r *ListAppversionsRequest) body() (io.Reader, string, error) {
return nil, "", nil
}

func (r *ListAppversionsRequest) url() string {
Expand Down
Loading

0 comments on commit 9a75b11

Please sign in to comment.